Exemple #1
0
 protected override void OnStartup(StartupEventArgs e)
 {
     if (CheckAnotherInstance() && e.Args.Length >= 1)
     {
         PipeServer.SendPipeMessgae(e.Args[0]);
         Thread.Sleep(500);
         System.Environment.Exit(0);
     }
     if (e.Args.Length >= 1)
     {
         args = e.Args[0];
     }
     base.OnStartup(e);
 }
Exemple #2
0
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            ps.running = false;
            PipeServer.SendPipeMessgae("exit|exit|exit");

            Settings.Settings.Default.autoSave = (bool)autoSelect.IsChecked;
            if (null != thDownload)
            {
                thDownload.Abort();
            }
            if (null != thSearch)
            {
                thSearch.Abort();
            }
            mtx.Close();
        }