示例#1
0
文件: OutputBox.cs 项目: bdn-mca/TGit
        public OutputBox(string branchName, OptionPageGrid options, string pushCommand)
        {
            InitializeComponent();

            _branchName  = branchName;
            _pushCommand = pushCommand;

            richTextBox.TextChanged += textBox_TextChanged;

            if (string.IsNullOrEmpty(branchName))
            {
                localBranchCheckBox.Visible  = false;
                remoteBranchCheckBox.Visible = false;
                pushCheckBox.Visible         = false;
                richTextBox.Height          += 30;
            }
            else
            {
                remoteBranchCheckBox.Enabled = GitHelper.RemoteBranchExists(branchName);
            }

            if (options != null)
            {
                localBranchCheckBox.Checked  = options.DeleteLocalBranch;
                remoteBranchCheckBox.Checked = options.DeleteRemoteBranch;
                pushCheckBox.Checked         = options.PushChanges;
            }
        }
示例#2
0
        private void BackgroundThreadInitialization()
        {
            _dte       = (DTE)GetService(typeof(DTE));
            _envHelper = new EnvHelper(_dte);
            CommandHelper.EnvHelper = _envHelper;

            _options = (OptionPageGrid)GetDialogPage(typeof(OptionPageGrid));

            // Add our command handlers for menu (commands must exist in the .vsct file)
            _mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
        }