void MainWindow_ContentRendered(object sender, EventArgs e) { //MenuItem btn = this.Toolbar.Items[0] as MenuItem; //btn.RaiseEvent(new RoutedEventArgs(MenuItem.ClickEvent)); scanDialog = new ScanWindow(true); bool? result = scanDialog.ShowDialog(); if (result.HasValue) { LogClass.AddInfoToLog(LogClass.LogInfo.Info, result.ToString()); } else LogClass.AddInfoToLog(LogClass.LogInfo.Info, "result DON'T HAVE Value"); if (result.HasValue && result == true) { isNewScanStarted = true; ScanSelectedDrivesOrFolders(true); } }
/// <summary> /// Open MenuItem click event handler /// Calls the Scan Window in dialog mode /// </summary> void Analyze_Click(object sender, RoutedEventArgs e) { LogClass.AddInfoToLog(LogClass.LogInfo.Start, "Analyze_Click"); scanDialog = new ScanWindow(false); bool? result = scanDialog.ShowDialog(); if (result.HasValue && result == true) { LogClass.AddInfoToLog(LogClass.LogInfo.Info, "RESULT = TRUE"); isNewScanStarted = true; ScanSelectedDrivesOrFolders(true); } LogClass.AddInfoToLog(LogClass.LogInfo.End, "Analyze_Click"); }
void Window_Closing(object sender, CancelEventArgs e) { LogClass.AddInfoToLog(LogClass.LogInfo.Start, "Window_Closing"); scanDialog = null; directories = null; rtvFolderList.ItemsSource = null; dgFileListByFolder.ItemsSource = null; isAborted = true; bwDiskScanner.CancelAsync(); LogClass.AddInfoToLog(LogClass.LogInfo.End, "Window_Closing"); }
/// <summary> /// Handles ContentRendered event of Window /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void MainWindow_ContentRendered(object sender, EventArgs e) { scanDialog = new ScanWindow(true); bool? result = scanDialog.ShowDialog(); if (result.HasValue && result == true) { isNewScanStarted = true; ScanSelectedDrivesOrFolders(true); } }
/// <summary> /// Open MenuItem click event handler /// Calls the Scan Window in dialog mode /// </summary> void Analyze_Click(object sender, RoutedEventArgs e) { scanDialog = new ScanWindow(false); bool? result = scanDialog.ShowDialog(); if (result.HasValue && result == true) { isNewScanStarted = true; ScanSelectedDrivesOrFolders(true); } }
/// <summary> /// Handles Window Closing event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void Window_Closing(object sender, CancelEventArgs e) { scanDialog = null; directories = null; rtvFolderList.ItemsSource = null; dgFileListByFolder.ItemsSource = null; isAborted = true; bwDiskScanner.CancelAsync(); }