コード例 #1
0
        private void StopButton_Click(object sender, RoutedEventArgs e)
        {
            Executable ex = GetItemExecutable(sender);

            if (ex is null)
            {
                return;
            }
            ex.Stop();
        }
コード例 #2
0
 private void RebuildMediaDb()
 {
     if (ScannerExecutable is null || !ScannerExecutable.Exists)
     {
         return;
     }
     if (ScannerExecutable.Running)
     {
         ScannerExecutable.Stop();
         ScannerExecutable.ProcessExited += RebuildAndRestart;
     }
     else
     {
         ClearScannerDatabases();
     }
 }
コード例 #3
0
 private void RebuildMediaDb(Executable ex)
 {
     if (ex is null || !ex.Exists)
     {
         return;
     }
     if (ex.Running)
     {
         ex.Stop();
         ex.ProcessExited += RebuildAndRestart;
     }
     else
     {
         ClearScannerDatabases(ex);
     }
 }
コード例 #4
0
        private void StopButton_Click(object sender, RoutedEventArgs e)
        {
            Executable executable = ((FrameworkElement)sender).DataContext as Executable;

            executable.Stop();
        }