WPF 中对启动参数的处理
/// <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();
}
}
posted on 2009-11-08 17:41 Sunwayking 阅读(5012) 评论(0) 编辑 收藏 举报