コード例 #1
0
 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
ファイル: GitHubHomeSection.cs プロジェクト: ehmz11/aaa
        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;
        }