private void StopButton_Click(object sender, RoutedEventArgs e) { Executable ex = GetItemExecutable(sender); if (ex is null) { return; } ex.Stop(); }
private void RebuildMediaDb() { if (ScannerExecutable is null || !ScannerExecutable.Exists) { return; } if (ScannerExecutable.Running) { ScannerExecutable.Stop(); ScannerExecutable.ProcessExited += RebuildAndRestart; } else { ClearScannerDatabases(); } }
private void RebuildMediaDb(Executable ex) { if (ex is null || !ex.Exists) { return; } if (ex.Running) { ex.Stop(); ex.ProcessExited += RebuildAndRestart; } else { ClearScannerDatabases(ex); } }
private void StopButton_Click(object sender, RoutedEventArgs e) { Executable executable = ((FrameworkElement)sender).DataContext as Executable; executable.Stop(); }