Example #1
0
 public void Kill()
 {
     if (SelectedProcess != null)
     {
         SelectedProcess.Kill();
         SelectedProcess = null;
     }
 }
Example #2
0
 private void TerminateImplementation(object obj)
 {
     if (SelectedProcess.Path != "Not available")
     {
         SelectedProcess.Terminate();
     }
     else
     {
         MessageBox.Show("Can`t commit this");
     }
 }
Example #3
0
        private void SubscribeToEvents()
        {
            PropertyChanged += (sender, args) =>
            {
                if (args.PropertyName == nameof(SelectedProcess))
                {
                    Processes.Where(x => x != SelectedProcess).ForEach(x => x.IsCountingNotVisitedOutputLinesOn = true);

                    SelectedProcess.IsCountingNotVisitedOutputLinesOn = false;
                    SelectedProcess.ResetCounter();
                }
            };
        }
 // Start the currently selected process
 public void StartProcess()
 {
     try
     {
         if (SelectedProcess != null)
         {
             SelectedProcess.StartInfo.FileName = SelectedProcess.ProcessName + ".exe";
             SelectedProcess.Start();
             Processes.Remove(SelectedProcess);
         }
     }
     catch
     {
         Processes.Remove(SelectedProcess);
     }
 }
Example #5
0
        private async void DeleteImplementation(object obj)
        {
            LoaderManeger.Instance.ShowLoader();
            await Task.Run(() => {
                try
                {
                    SelectedProcess?.DeleteProcess();
                    OnPropertyChanged("ProcessList");
                }
                catch (Exception e)
                {
                    MessageBox.Show("Access denied to this process", "ERROR",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            });

            LoaderManeger.Instance.HideLoader();
        }
 internal void ChangePriority()
 {
     SelectedProcess.ChangePriority(SelectedPriorites);
 }
Example #7
0
 public void KillSelectedProcess()
 {
     SelectedProcess.Kill();
 }