Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
        public bool StartCherryPickDialog()
        {
            if (!InvokeEvent(PreCherryPick))
            {
                return(true);
            }

            var form = new FormCherryPick();

            form.ShowDialog();

            InvokeEvent(PostCherryPick);

            return(true);
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
        public bool StartCherryPickDialog()
        {
            if (!RequiresValidWorkingDir())
            {
                return(false);
            }

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

            var form = new FormCherryPick();

            form.ShowDialog();

            InvokeEvent(PostCherryPick);

            return(true);
        }
Exemplo n.º 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;
                }
            }
        }
Exemplo n.º 6
0
        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;
        }
Exemplo n.º 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();
        }
Exemplo n.º 8
0
        public bool StartCherryPickDialog()
        {
            if (!InvokeEvent(PreCherryPick))
                return true;

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

            InvokeEvent(PostCherryPick);

            return true;
        }
Exemplo n.º 9
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);
     }
 }