Pre-launch verification is unconditional

This commit is contained in:
Vladimir
2024-07-28 14:15:55 +04:00
parent 1a576c50c6
commit 7f51166d9e
2 changed files with 2 additions and 23 deletions

View File

@@ -315,20 +315,16 @@ namespace Process_Auto_Relaunch
private void ProcessStart(string path, string args)
{
if (checkBoxCheckProcess.Checked)
if (ProcessByNameIsRuning(path))
{
if (ProcessByNameIsRuning(path))
{
// Процесс уже запущен
return;
}
}
// Процесс не запущен
WatchedProcess = Process.Start(path, args);
cpuLastTime = 0;
cpuMeasureTimer.Start();
Status($"Процесс {ProcessName} был запущен.", NotifyLevel.logAlways);
Status($"Процесс {ProcessName} запущен.", NotifyLevel.logAlways);
}
private void BackgroundWorkerDoWork(object sender, System.ComponentModel.DoWorkEventArgs e)