/// <summary> /// Moves to the first control /// </summary> public override void MoveFirst(bool autoMove = true) { // Clear results before going back ResultArray.Clear(); base.MoveFirst(autoMove); }
public override bool OnUnloaded(bool forceExit) { bool exit; var analyze = CurrentControl as Analyze; if (analyze != null) { exit = forceExit || MessageBox.Show("Would you like to cancel the scan that's in progress?", Utils.ProductName, MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes; if (exit) { analyze.AbortScanThread(); ResultArray.Clear(); return(true); } return(false); } if (!(CurrentControl is Results)) { return(true); } exit = forceExit || MessageBox.Show("Would you like to cancel?", Utils.ProductName, MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes; if (!exit) { return(false); } ResultArray.Clear(); return(true); }