Beispiel #1
0
        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;
            }
        }
Beispiel #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;
        }