Ejemplo n.º 1
0
 public void Kill()
 {
     if (SelectedProcess != null)
     {
         SelectedProcess.Kill();
         SelectedProcess = null;
     }
 }
Ejemplo n.º 2
0
 private void TerminateImplementation(object obj)
 {
     if (SelectedProcess.Path != "Not available")
     {
         SelectedProcess.Terminate();
     }
     else
     {
         MessageBox.Show("Can`t commit this");
     }
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 6
0
 internal void ChangePriority()
 {
     SelectedProcess.ChangePriority(SelectedPriorites);
 }
Ejemplo n.º 7
0
 public void KillSelectedProcess()
 {
     SelectedProcess.Kill();
 }