Ejemplo n.º 1
0
 protected override void OnStartup(StartupEventArgs e)
 {
     base.OnStartup(e);
     if (!SingleInstance.IsNewInstance(InstanceId))
     {
         WinMsg.BroadcastMessage(ShowWpfUiMsg);
         Shutdown();
         return;
     }
     WinMsg.RegisterReciveMessage(ShowWpfUiMsg, () =>
     {
         this.MainWindow.Show();
     });
     Log.LogLocation = true;
     Log.ListenSystemDiagnosticsLog();
     Clipboards.Instance.IsListenning = true;
     this.MainWindow = new MainWindow();
     this.MainWindow.Show();
     this.ShutdownMode = ShutdownMode.OnMainWindowClose;
 }