Пример #1
0
        private void btnAnalyze_Click(object sender, RoutedEventArgs e)
        {
            ClearList();
            string drive_letter = lbDrives.SelectedItem.ToString().Replace(@"\", "");

            if (!ProcessManagement.LaunchCommandLineApp(DEFRAG_DISK_CMD, drive_letter + DEFRAG_DISK_ARG))
            {
                System.Windows.MessageBox.Show("Couldn't start the process!", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
            btnAbort.IsEnabled = true;
        }
Пример #2
0
 private void btnStart_Click(object sender, RoutedEventArgs e)
 {
     ClearList();
     if (lbDrives.SelectedIndex != -1)
     {
         string drive_letter = lbDrives.SelectedItem.ToString().Replace(@"\", "");
         string arg          = CHECK_DISK_PARAMS + drive_letter + CHECK_DISK_ARG;
         if (!ProcessManagement.LaunchCommandLineApp(CHECK_DISK_CMD, arg))
         {
             System.Windows.MessageBox.Show("Couldn't start the process!", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
         }
         btnAbort.IsEnabled = true;
     }
 }
Пример #3
0
 private void wcSecure_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
 {
     progressDownloadSecure.Value = e.ProgressPercentage;
     if (progressDownloadSecure.Value == 100)
     {
         string path = dwnldPathSecure + fileNameSecure;
         txtProgressSecure.Text = "Scanning File";
         ProcessManagement.LaunchCommandLineApp("Utils/ssDownload.bat", path, arguments2: "3");
         isProcessFinished                = false;
         txtURLSecure.IsEnabled           = true;
         progressDownloadSecure.Value     = 0;
         progressDownloadSecure.IsEnabled = false;
         btnCancelSecure.IsEnabled        = false;
         btnDownloadSecure.IsEnabled      = true;
     }
 }
Пример #4
0
 private void btnStart_Click(object sender, RoutedEventArgs e)
 {
     if (lbDrives.SelectedIndex != -1)
     {
         string drive_letter = lbDrives.SelectedItem.ToString().Replace(@"\", "");
         if (!ProcessManagement.LaunchCommandLineApp(CLEANER_DISK_CMD, CLEANER_DISK_PARAMS + drive_letter))
         {
             System.Windows.MessageBox.Show("Couldn't start the process!", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
         }
     }
     if (chkDelete.IsChecked == true)
     {
         for (int i = 0; i < lbBrowsers.Items.Count; i++)
         {
             DeleteBrowsersCache(GetBrowserPath(i));
         }
     }
 }
Пример #5
0
 private void btnStartScan_Click(object sender, RoutedEventArgs e)
 {
     if (pathScanFile != String.Empty)
     {
         if (File.Exists(pathScanFile))
         {
             ProcessManagement.LaunchCommandLineApp("Utils/ssDownload.bat", pathScanFile, arguments2: "3");
             ButtonsState(false);
         }
         else
         {
             MessageBox.Show("The selected file doesn't exist!", "File not found", MessageBoxButton.OK, MessageBoxImage.Error);
         }
     }
     else
     {
         MessageBox.Show("No file has been selected to be scanned.", "Warning", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }
Пример #6
0
 private void btnFullScan_Click(object sender, RoutedEventArgs e)
 {
     ProcessManagement.LaunchCommandLineApp("Utils/ssDownload.bat", pathScanFile, arguments2: "2");
     ButtonsState(false);
 }