摘要:
代码:/// <summary> /// Interaction logic for App.xaml /// </summary> public partial class App : Application { public App() { Debug.WriteLine("App constructor"); this.Startup += new StartupEventHandler(App_Startup); } void App_Startup(object... 阅读全文
摘要:
WPF 单例启动的例子,记一下。参考 WPF Single Instance workaround关键代码:namespace 你的命名空间{ public class Startup { [STAThread] public static void Main(string[] args) { SingleInstanceApplicationWrapper wrapper = new SingleInstanceApplicationWrapper(); wrapper.Run(args); ... 阅读全文