public void RunInConsoleProgressWindow(string arguments) { var console_progress_window = new ConsoleProgressWindow(_working_directory, _execute_filename, arguments); console_progress_window.Owner = GlobalSetting.GetInstance().GetWindow(); console_progress_window.ShowDialog(); }
private void OnIsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) { bool previousVisibled = (bool)e.OldValue; bool newVisibled = (bool)e.NewValue; if (previousVisibled == false && newVisibled == true) { var task = GetViewModel().Refresh(); task.GetAwaiter().OnCompleted(() => { GlobalSetting.GetInstance().ConfigModel.AddRecentRepository(git_repository_path_); GetViewModel().DirectoryTree.SetTreeViewRootPath(git_repository_path_); tabControl.Focus(); }); } }
private void RestoreTabs() { var tab_infos = GlobalSetting.GetInstance().ConfigModel.LastTabInfos; if (tab_infos.Count == 0) { AddNewTab(); } else { foreach (var tab_info in tab_infos) { AddTab(tab_info.Directory, tab_info.IsFocused); } } }
private void Window_Closed(object sender, System.EventArgs e) { GlobalSetting.GetInstance().ConfigModel.CollectTabInfo(tab_control_.Items); Config.ConfigFileController.Save(GlobalSetting.GetInstance().ConfigModel); }
private void Window_Loaded(object sender, RoutedEventArgs e) { GlobalSetting.GetInstance().SetWindow(this); SetTitleToGitVersion(); RestoreTabs(); }
public static void ShowMessage(string message) { MainWindow window = GlobalSetting.GetInstance().GetWindow(); MessageBox.Show(window, message, Caption); }
public static MessageBoxResult ShowMessageWithOKCancel(string message) { MainWindow window = GlobalSetting.GetInstance().GetWindow(); return(MessageBox.Show(window, message, Caption, MessageBoxButton.OKCancel, MessageBoxImage.Question)); }