public GitHubHomeSection(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder)
     : base(apiFactory, holder)
 {
     Title            = "GitHub";
     View             = new GitHubHomeContent();
     View.DataContext = this;
 }
示例#2
0
        public GitHubHomeSection(IGitHubServiceProvider serviceProvider,
                                 ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder,
                                 IVisualStudioBrowser visualStudioBrowser)
            : base(serviceProvider, apiFactory, holder)
        {
            Title                    = "GitHub";
            View                     = new GitHubHomeContent();
            View.DataContext         = this;
            this.visualStudioBrowser = visualStudioBrowser;

            var openOnGitHub = ReactiveCommand.Create();

            openOnGitHub.Subscribe(_ => DoOpenOnGitHub());
            OpenOnGitHub = openOnGitHub;
        }
示例#3
0
        public GitHubHomeSection(IGitHubServiceProvider serviceProvider,
                                 ISimpleApiClientFactory apiFactory,
                                 ITeamExplorerServiceHolder holder,
                                 IVisualStudioBrowser visualStudioBrowser,
                                 ITeamExplorerServices teamExplorerServices,
                                 IPackageSettings settings,
                                 IUsageTracker usageTracker)
            : base(serviceProvider, apiFactory, holder)
        {
            Title                     = "GitHub";
            View                      = new GitHubHomeContent();
            View.DataContext          = this;
            this.visualStudioBrowser  = visualStudioBrowser;
            this.teamExplorerServices = teamExplorerServices;
            this.settings             = settings;
            this.usageTracker         = usageTracker;

            var openOnGitHub = ReactiveCommand.Create();

            openOnGitHub.Subscribe(_ => DoOpenOnGitHub());
            OpenOnGitHub = openOnGitHub;

            // We want to display a welcome message but only if Team Explorer isn't
            // already displaying the "Install 3rd Party Tools" message. To do this
            // we need to set a timer and check in the tick as at this point the message
            // won't be initialized.
            if (!settings.HideTeamExplorerWelcomeMessage)
            {
                var timer = new DispatcherTimer();
                timer.Interval = new TimeSpan(10);
                timer.Tick    += (s, e) =>
                {
                    timer.Stop();
                    if (!IsGitToolsMessageVisible())
                    {
                        ShowWelcomeMessage();
                    }
                };
                timer.Start();
            }
        }
示例#4
0
        public GitHubHomeSection(IGitHubServiceProvider serviceProvider,
                                 ISimpleApiClientFactory apiFactory,
                                 ITeamExplorerServiceHolder holder,
                                 IVisualStudioBrowser visualStudioBrowser,
                                 ITeamExplorerServices teamExplorerServices,
                                 IPackageSettings settings,
                                 IUsageTracker usageTracker)
            : base(serviceProvider, apiFactory, holder)
        {
            Title                     = "GitHub";
            View                      = new GitHubHomeContent();
            View.DataContext          = this;
            this.visualStudioBrowser  = visualStudioBrowser;
            this.teamExplorerServices = teamExplorerServices;
            this.settings             = settings;
            this.usageTracker         = usageTracker;

            var openOnGitHub = new RelayCommand(_ => DoOpenOnGitHub());

            OpenOnGitHub = openOnGitHub;
        }