Inheritance: GitExtensionsForm
コード例 #1
0
        private void cherryPickThisCommitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var selectedRevisions = FileChanges.GetSelectedRevisions();

            if (selectedRevisions.Count == 1)
            {
                using (var frm = new FormCherryPick(UICommands, selectedRevisions[0]))
                    frm.ShowDialog(this);
            }
        }
コード例 #2
0
        public bool StartCherryPickDialog()
        {
            if (!InvokeEvent(PreCherryPick))
            {
                return(true);
            }

            var form = new FormCherryPick();

            form.ShowDialog();

            InvokeEvent(PostCherryPick);

            return(true);
        }
コード例 #3
0
        public bool StartCherryPickDialog(IWin32Window owner)
        {
            if (!RequiresValidWorkingDir(owner))
            {
                return(false);
            }

            if (!InvokeEvent(owner, PreCherryPick))
            {
                return(true);
            }

            using (var form = new FormCherryPick())
                form.ShowDialog(owner);

            InvokeEvent(owner, PostCherryPick);

            return(true);
        }
コード例 #4
0
        public bool StartCherryPickDialog()
        {
            if (!RequiresValidWorkingDir())
            {
                return(false);
            }

            if (!InvokeEvent(PreCherryPick))
            {
                return(true);
            }

            var form = new FormCherryPick();

            form.ShowDialog();

            InvokeEvent(PostCherryPick);

            return(true);
        }
コード例 #5
0
        public bool StartCherryPickDialog(IWin32Window owner, GitRevision revision)
        {
            // TODO: compare this code with StartArchiveDialog(...). Which one is to use?

            if (!RequiresValidWorkingDir(owner))
            {
                return false;
            }

            if (!InvokeEvent(owner, PreCherryPick))
            {
                return true;
            }

            using (var form = new FormCherryPick(this, revision))
            {
                if (form.ShowDialog(owner) == DialogResult.OK)
                {
                    InvokeEvent(owner, PostCherryPick);
                    return true;
                }
                else
                {
                    return false;
                }
            }
        }
コード例 #6
0
ファイル: GitUICommands.cs プロジェクト: phiree/gitextensions
        public bool StartCherryPickDialog(IWin32Window owner)
        {
            if (!RequiresValidWorkingDir())
                return false;

            if (!InvokeEvent(owner, PreCherryPick))
                return true;

            var form = new FormCherryPick();
            form.ShowDialog(owner);

            InvokeEvent(owner, PostCherryPick);

            return true;
        }
コード例 #7
0
        private void CherryPickCommitToolStripMenuItemClick(object sender, EventArgs e)
        {
            var revisions = GetSelectedRevisions(SortDirection.Descending);

            FormCherryPick prevForm = null;

            try
            {
                foreach (var r in revisions)
                {
                    var frm = new FormCherryPick(UICommands, r);
                    if (prevForm != null)
                    {
                        frm.CopyOptions(prevForm);
                        prevForm.Dispose();
                    }
                    prevForm = frm;
                    if (frm.ShowDialog(this) != DialogResult.OK)
                    {
                        return;
                    }
                }
            }
            finally
            {
                if (prevForm != null)
                {
                    prevForm.Dispose();
                }
            }

            ForceRefreshRevisions();
            OnActionOnRepositoryPerformed();
        }
コード例 #8
0
        public bool StartCherryPickDialog()
        {
            if (!InvokeEvent(PreCherryPick))
                return true;

            FormCherryPick form = new FormCherryPick();
            form.ShowDialog();

            InvokeEvent(PostCherryPick);

            return true;
        }
コード例 #9
0
ファイル: FormFileHistory.cs プロジェクト: Rdot/gitextensions
 private void cherryPickThisCommitToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var selectedRevisions = FileChanges.GetSelectedRevisions();
     if (selectedRevisions.Count == 1)
     {
         using (var frm = new FormCherryPick(UICommands, selectedRevisions[0]))
             frm.ShowDialog(this);
     }
 }
コード例 #10
0
 public void CopyOptions(FormCherryPick source)
 {
     AutoCommit.Checked        = source.AutoCommit.Checked;
     checkAddReference.Checked = source.checkAddReference.Checked;
 }
コード例 #11
0
 public void CopyOptions(FormCherryPick source)
 {
     AutoCommit.Checked = source.AutoCommit.Checked;
     checkAddReference.Checked = source.checkAddReference.Checked;
 }