private void Window_Initialized(object sender, EventArgs e) { TextBoxLogger.Initialize(LogsTextBox, StatusLabel, StatusImage); _ruleSet = BuildRuleSet(); _renamer = new Renamer(TextBoxLogger.Get(), FileSystemWrapper.Create(), _ruleSet); _renamer.TargetFolderAdded += Renamer_TargetFolderAdded; _renamer.RenamesSet += Renamer_RenamesSet; _renamer.SolutionRenamed += Renamer_SolutionRenamed; _renameTimer.Tick += RenameTimer_Tick; _renameTimer.Interval = TimeSpan.FromSeconds(1.5); }
private void StartLocalDbButton_Click(object sender, RoutedEventArgs e) { if (MessageBox.Show("Are you sure you want to restart the SQL local DB instance?", "Restart local DB", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes) { var result = ProcessUtility.RunCommand("Start SQL LocalDB", @"sqllocaldb start MSSQLLocalDB", TextBoxLogger.Get()); if (result.IsSuccess) { MessageBox.Show("SQL LocalDB started successfully.", "Success"); } else { MessageBox.Show("Could not successfully start SQL Local DB.", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } } }