Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
                });
            }
        }
Exemplo n.º 3
0
        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);
                }
            }
        }
Exemplo n.º 4
0
 private void Window_Closed(object sender, System.EventArgs e)
 {
     GlobalSetting.GetInstance().ConfigModel.CollectTabInfo(tab_control_.Items);
     Config.ConfigFileController.Save(GlobalSetting.GetInstance().ConfigModel);
 }
Exemplo n.º 5
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     GlobalSetting.GetInstance().SetWindow(this);
     SetTitleToGitVersion();
     RestoreTabs();
 }
Exemplo n.º 6
0
        public static void ShowMessage(string message)
        {
            MainWindow window = GlobalSetting.GetInstance().GetWindow();

            MessageBox.Show(window, message, Caption);
        }
Exemplo n.º 7
0
        public static MessageBoxResult ShowMessageWithOKCancel(string message)
        {
            MainWindow window = GlobalSetting.GetInstance().GetWindow();

            return(MessageBox.Show(window, message, Caption, MessageBoxButton.OKCancel, MessageBoxImage.Question));
        }