private void ShowStartPageOnStartup() { if (_startPageFactory.ShowOnStartup) { _viewDockService.ShowView(Guids.StartPageView); } }
/// <summary>Initializes a new instance of the <see cref="MainForm"/> class.</summary> public MainForm() { InitializeComponent(); _configurationService = GitterApplication.ConfigurationService; _repositoryManagerService = new RepositoryManagerService(SavedRecentRepositories); _viewDockService = new ViewDockService(this, _toolDockGrid, _configurationService.ViewsSection); _notificationService = new BalloonNotificationService(); _repositoryManagerService.RecentRepositories.Changed += OnRecentRepositoriesChanged; ProvideToolbar(new StandardToolbar(this)); _mnuRepository.DropDownItems.Insert(0, new ToolStripMenuItem(Resources.StrInit.AddEllipsis(), CachedResources.Bitmaps["ImgRepositoryInitSmall"], OnInitRepositoryClick)); _mnuRepository.DropDownItems.Insert(1, new ToolStripMenuItem(Resources.StrClone.AddEllipsis(), CachedResources.Bitmaps["ImgRepositoryCloneSmall"], OnCloneRepositoryClick)); _mnuRepository.DropDownItems.Insert(2, new ToolStripSeparator()); _viewDockService = new ViewDockService(this, _toolDockGrid, _configurationService.ViewsSection); _viewDockService.RegisterFactory( _startPageFactory = new StartPageViewFactory()); _viewDockService.RegisterFactory( _repositoryExplorerFactory = new RepositoryExplorerViewFactory(this)); _viewDockService.RegisterFactory( _logFactory = new LogViewFactory()); LoadOptions(); LoadRecentRepositories(); _viewDockService.ShowView(Guids.RepositoryExplorerView); _repositoryProviders = new Dictionary <string, IRepositoryProvider>(); _issueTrackerProviders = new Dictionary <string, IRepositoryServiceProvider>(); _activeIssueTrackerProviders = new HashSet <IRepositoryServiceProvider>(); _additionalGui = new LinkedList <IGuiProvider>(); LoadProviders(); _mnuView.DropDownItems.Insert(0, new ViewMenuItem(_repositoryExplorerFactory, this)); _mnuView.DropDownItems.Insert(1, new ViewMenuItem(_startPageFactory, this)); _mnuView.DropDownItems.Insert(2, new ToolStripSeparator()); _mnuView.DropDownItems.Add(new ToolStripSeparator()); _mnuView.DropDownItems.Add(new ViewMenuItem(_logFactory, this)); _mnuRepository.Text = Resources.StrRepository; _mnuExit.Text = Resources.StrExit; _mnuOpenRepository.Text = Resources.StrOpen.AddEllipsis(); _mnuRecentRepositories.Text = Resources.StrRecent; _mnuView.Text = Resources.StrView; _mnuToolbars.Text = Resources.StrToolbars; _mnuTools.Text = Resources.StrTools; _mnuOptions.Text = Resources.StrOptions.AddEllipsis(); _mnuHelp.Text = Resources.StrHelp; _mnuAbout.Text = Resources.StrAbout.AddEllipsis(); _recentRepositoryPath = string.Empty; }