private void Window_Loaded(object sender, RoutedEventArgs e) { this.Style = (Style)Resources["GradientStyle"]; this.gitViewModel = GitViewModel.Current; this.gitConsole.GitExePath = GitBash.GitExePath; this.rootGrid.RowDefinitions[2].Height = new GridLength(0); if (gitViewModel.Tracker.IsGit) this.Title = gitViewModel.Tracker.WorkingDirectory; this.gitViewModel.GraphChanged += gitViewModel_GraphChanged; gitViewModel_GraphChanged(this, null); Action a1 = () => { this.WindowState = WindowState.Maximized; this.console_height = (this.ActualHeight - 60) * 0.5; }; this.Dispatcher.BeginInvoke(a1, DispatcherPriority.ApplicationIdle); var optionSet = new OptionSet() { {"c|commit", "show commit UI", v => { if (!string.IsNullOrWhiteSpace(v)) { Action act = () => HistoryViewCommands.PendingChanges.Execute(null, this); this.Dispatcher.BeginInvoke(act, DispatcherPriority.ApplicationIdle); } } }, }; optionSet.Parse(Environment.GetCommandLineArgs()); }
private void Window_Loaded(object sender, RoutedEventArgs e) { this.Style = (Style)Resources["GradientStyle"]; GitBash.GitExePath = GitSccOptions.Current.GitBashPath; GitBash.UseUTF8FileNames = GitSccOptions.Current.UseUTF8FileNames; if (!GitBash.Exists) { GitBash.GitExePath = TryFindFile(new string[] { @"C:\Program Files\Git\bin\sh.exe", @"C:\Program Files (x86)\Git\bin\sh.exe", }); } //this.gitConsole.GitExePath = GitBash.GitExePath; //this.rootGrid.RowDefinitions[0].Height = new GridLength(this.ActualHeight - 60); this.gitViewModel = GitViewModel.Current; //this.bottomToolBar.GitViewModel = GitViewModel.Current; if (gitViewModel.Tracker.HasGitRepository) { this.Title = gitViewModel.Tracker.GitWorkingDirectory; } this.gitViewModel.GraphChanged += (o, reload) => { // show loading sign immediately ////Action a = () => loading.Visibility = Visibility.Visible; ////this.Dispatcher.BeginInvoke(a, DispatcherPriority.Render); loading.Visibility = Visibility.Visible; Action act = () => { if (gitViewModel.Tracker.HasGitRepository) { this.txtRepo.Text = gitViewModel.Tracker.GitWorkingDirectory; this.txtPrompt.Text = GitIntellisenseHelper.GetPrompt(); } this.graph.Show(gitViewModel.Tracker, reload != null); }; this.Dispatcher.BeginInvoke(act, DispatcherPriority.ApplicationIdle); }; this.gitViewModel.Refresh(true); Action a1 = () => this.WindowState = WindowState.Maximized; this.Dispatcher.BeginInvoke(a1, DispatcherPriority.ApplicationIdle); }
private void Window_Loaded(object sender, RoutedEventArgs e) { this.Style = (Style)Resources["GradientStyle"]; this.gitViewModel = GitViewModel.Current; this.gitConsole.GitExePath = GitBash.GitExePath; this.rootGrid.RowDefinitions[2].Height = new GridLength(this.ActualHeight / 3); this.gitConsole.mainWindow = this; if (gitViewModel.Tracker.IsGit) { this.Title = gitViewModel.Tracker.WorkingDirectory; } this.gitViewModel.GraphChanged += gitViewModel_GraphChanged; gitViewModel_GraphChanged(this, null); Action a1 = () => { this.WindowState = WindowState.Maximized; this.console_height = (this.ActualHeight - 60) * 0.5; }; this.Dispatcher.BeginInvoke(a1, DispatcherPriority.ApplicationIdle); var optionSet = new OptionSet() { { "c|commit", "show commit UI", v => { if (!string.IsNullOrWhiteSpace(v)) { Action act = () => HistoryViewCommands.PendingChanges.Execute(null, this); this.Dispatcher.BeginInvoke(act, DispatcherPriority.ApplicationIdle); } } }, }; optionSet.Parse(Environment.GetCommandLineArgs()); }
private void Window_Loaded(object sender, RoutedEventArgs e) { this.Style = (Style)Resources["GradientStyle"]; GitBash.GitExePath = GitSccOptions.Current.GitBashPath; GitBash.UseUTF8FileNames = !GitSccOptions.Current.NotUseUTF8FileNames; if (!GitBash.Exists) GitBash.GitExePath = TryFindFile(new string[] { @"C:\Program Files\Git\bin\sh.exe", @"C:\Program Files (x86)\Git\bin\sh.exe", }); //this.gitConsole.GitExePath = GitBash.GitExePath; //this.rootGrid.RowDefinitions[0].Height = new GridLength(this.ActualHeight - 60); this.gitViewModel = GitViewModel.Current; //this.bottomToolBar.GitViewModel = GitViewModel.Current; if (gitViewModel.Tracker.HasGitRepository) this.Title = gitViewModel.Tracker.GitWorkingDirectory; this.gitViewModel.GraphChanged += (o, reload) => { // show loading sign immediately ////Action a = () => loading.Visibility = Visibility.Visible; ////this.Dispatcher.BeginInvoke(a, DispatcherPriority.Render); loading.Visibility = Visibility.Visible; Action act = () => { if (gitViewModel.Tracker.HasGitRepository) { this.txtRepo.Text = gitViewModel.Tracker.GitWorkingDirectory; this.txtPrompt.Text = GitIntellisenseHelper.GetPrompt(); } this.graph.Show(gitViewModel.Tracker, reload != null); this.pendingChanges.Refresh(gitViewModel.Tracker); }; this.Dispatcher.BeginInvoke(act, DispatcherPriority.ApplicationIdle); }; this.gitViewModel.Refresh(true); Action a1 = () => this.WindowState = WindowState.Maximized; this.Dispatcher.BeginInvoke(a1, DispatcherPriority.ApplicationIdle); var optionSet = new OptionSet() { {"c|commit", "show commit UI", v => { if (!string.IsNullOrWhiteSpace(v)) { Action act = () => HistoryViewCommands.PendingChanges.Execute(null, this); this.Dispatcher.BeginInvoke(act, DispatcherPriority.ApplicationIdle); } } }, }; optionSet.Parse(Environment.GetCommandLineArgs()); }
private void Window_Loaded(object sender, RoutedEventArgs e) { GitBash.GitExePath = GitSccOptions.Current.GitBashPath; if (!GitBash.Exists) GitBash.GitExePath = TryFindFile(new string[] { @"C:\Program Files\Git\bin\sh.exe", @"C:\Program Files (x86)\Git\bin\sh.exe", }); this.gitConsole.GitExePath = GitBash.GitExePath; this.rootGrid.RowDefinitions[0].Height = new GridLength(this.ActualHeight * 0.8); this.gitViewModel = GitViewModel.Current; //this.bottomToolBar.GitViewModel = GitViewModel.Current; if (gitViewModel.Tracker.HasGitRepository) this.Title = gitViewModel.Tracker.GitWorkingDirectory; this.gitViewModel.GraphChanged += (o, reload) => { // show loading sign immediately Action a = () => loading.Visibility = Visibility.Visible; this.Dispatcher.BeginInvoke(a, DispatcherPriority.Render); Action act = () => { loading.Visibility = Visibility.Visible; if (gitViewModel.Tracker.HasGitRepository) this.Title = gitViewModel.Tracker.GitWorkingDirectory; this.graph.Show(gitViewModel.Tracker, reload != null); this.gitConsole.WorkingDirectory = gitViewModel.Tracker.HasGitRepository ? gitViewModel.Tracker.GitWorkingDirectory : gitViewModel.WorkingDirectory; }; this.Dispatcher.BeginInvoke(act, DispatcherPriority.ApplicationIdle); }; this.gitViewModel.Refresh(true); }