예제 #1
0
        private void EnableButtons()
        {
            if (GitModule.Current.InTheMiddleOfRebase())
            {
                if (Height < 200)
                {
                    Height = 500;
                }

                Branches.Enabled = false;
                Ok.Enabled       = false;

                AddFiles.Enabled  = true;
                Resolved.Enabled  = !GitModule.Current.InTheMiddleOfConflictedMerge();
                Mergetool.Enabled = GitModule.Current.InTheMiddleOfConflictedMerge();
                Skip.Enabled      = true;
                Abort.Enabled     = true;
            }
            else
            {
                Branches.Enabled  = true;
                Ok.Enabled        = true;
                AddFiles.Enabled  = false;
                Resolved.Enabled  = false;
                Mergetool.Enabled = false;
                Skip.Enabled      = false;
                Abort.Enabled     = false;
            }

            SolveMergeconflicts.Visible = GitModule.Current.InTheMiddleOfConflictedMerge();

            Resolved.Text            = _continueRebaseText.Text;
            Mergetool.Text           = _solveConflictsText.Text;
            ContinuePanel.BackColor  = Color.Transparent;
            MergeToolPanel.BackColor = Color.Transparent;

            if (GitModule.Current.InTheMiddleOfConflictedMerge())
            {
                AcceptButton = Mergetool;
                Mergetool.Focus();
                Mergetool.Text           = _solveConflictsText2.Text;
                MergeToolPanel.BackColor = Color.Black;
            }
            else if (GitModule.Current.InTheMiddleOfRebase())
            {
                AcceptButton = Resolved;
                Resolved.Focus();
                Resolved.Text           = _continueRebaseText2.Text;
                ContinuePanel.BackColor = Color.Black;
            }
        }
예제 #2
0
        private void EnableButtons()
        {
            if (Module.InTheMiddleOfPatch())
            {
                Apply.Enabled            = false;
                IgnoreWhitespace.Enabled = false;
                PatchFileMode.Enabled    = false;
                PatchDirMode.Enabled     = false;
                AddFiles.Enabled         = true;
                Resolved.Enabled         = !Module.InTheMiddleOfConflictedMerge();
                Mergetool.Enabled        = Module.InTheMiddleOfConflictedMerge();
                Skip.Enabled             = true;
                Abort.Enabled            = true;

                PatchFile.Enabled   = false;
                PatchFile.ReadOnly  = false;
                BrowsePatch.Enabled = false;
                PatchDir.Enabled    = false;
                PatchDir.ReadOnly   = false;
                BrowseDir.Enabled   = false;
            }
            else
            {
                PatchFile.Enabled   = PatchFileMode.Checked;
                PatchFile.ReadOnly  = !PatchFileMode.Checked;
                BrowsePatch.Enabled = PatchFileMode.Checked;
                PatchDir.Enabled    = PatchDirMode.Checked;
                PatchDir.ReadOnly   = !PatchDirMode.Checked;
                BrowseDir.Enabled   = PatchDirMode.Checked;

                Apply.Enabled            = true;
                IgnoreWhitespace.Enabled = true;
                PatchFileMode.Enabled    = true;
                PatchDirMode.Enabled     = true;
                AddFiles.Enabled         = false;
                Resolved.Enabled         = false;
                Mergetool.Enabled        = false;
                Skip.Enabled             = false;
                Abort.Enabled            = false;
            }

            patchGrid1.Initialize();

            SolveMergeConflicts.Visible = Module.InTheMiddleOfConflictedMerge();

            Resolved.Text            = _conflictResolvedText.Text;
            Mergetool.Text           = _conflictMergetoolText.Text;
            ContinuePanel.BackColor  = Color.Transparent;
            MergeToolPanel.BackColor = Color.Transparent;

            if (Module.InTheMiddleOfConflictedMerge())
            {
                Mergetool.Text = ">" + _conflictMergetoolText.Text + "<";
                Mergetool.Focus();
                AcceptButton             = Mergetool;
                MergeToolPanel.BackColor = Color.Black;
            }
            else if (Module.InTheMiddleOfPatch())
            {
                Resolved.Text = ">" + _conflictResolvedText.Text + "<";
                Resolved.Focus();
                AcceptButton            = Resolved;
                ContinuePanel.BackColor = Color.Black;
            }
        }