/// <summary>
/// Interaction logic for App.xaml /// </summary> public partial class App : Application { Window1 window1; // 添加启动参数的处理 protected override void OnStartup(StartupEventArgs e) { window1 = new Window1(); if (e.Args.Length > 0) window1.ShowEx(e.Args[0]); else window1.Show(); } }