コード例 #1
0
        public void UpdateVisibleState()
        {
            if (!GitFlowPage.GitFlowIsInstalled)
            {
                IsVisible = false;
                return;
            }

            var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepo.RepositoryPath, GitFlowPage.OutputWindow);
            if (gf.IsInitialized)
            {
                if (GitFlowPage.ActiveRepo.IsTfsGitRepository() && GitFlowPage.ActiveRepo.AreBranchPoliciesActive())
                {
                    if (notificationGuid == Guid.Empty && ServiceProvider != null)
                    {
                        notificationGuid = ShowNotification("Branch policies apply to this repository.", NotificationType.Information);
                    }
                }
                else
                {
                    if (notificationGuid != Guid.Empty && ServiceProvider != null)
                    {
                        HideNotification(notificationGuid);
                    }
                }

                if (!IsVisible)
                {
                    SectionContent = new GitFlowActionsUI(model);
                    IsVisible = true;
                }
                model.Update();
            }
            else
            {
                IsVisible = false;
            }
        }
コード例 #2
0
        public void UpdateVisibleState()
        {
            if (!GitFlowPage.GitFlowIsInstalled)
            {
                IsVisible = false;
                return;
            }

            var gf = new VsGitFlowWrapper(GitFlowPage.ActiveRepo.RepositoryPath, GitFlowPage.OutputWindow);
            if (gf.IsInitialized)
            {
                if (!IsVisible)
                {
                    SectionContent = new GitFlowActionsUI(model);
                    IsVisible = true;
                }
                model.Update();
            }
            else
            {
                IsVisible = false;
            }
        }