Inheritance: GitExtensionsForm
Example #1
0
        public bool StartCheckoutBranchDialog(IWin32Window owner, string branch, bool remote)
        {
            if (!RequiresValidWorkingDir())
            {
                return(false);
            }

            if (!InvokeEvent(PreCheckoutBranch))
            {
                return(false);
            }

            bool needRefresh;

            if (CheckForDirtyDir(owner, out needRefresh))
            {
                return(needRefresh);
            }

            var form = new FormCheckoutBranch(branch, remote);

            form.ShowDialog(owner);

            InvokeEvent(PostCheckoutBranch);

            return(true);
        }
Example #2
0
        public bool StartCheckoutBranchDialog(IWin32Window owner, string branch, bool remote, string containRevison)
        {
            if (!RequiresValidWorkingDir())
            {
                return(false);
            }

            if (!InvokeEvent(owner, PreCheckoutBranch))
            {
                return(false);
            }

            bool needRefresh;
            bool force;

            if (CheckForDirtyDir(owner, out needRefresh, out force))
            {
                return(needRefresh);
            }

            var form = new FormCheckoutBranch(branch, remote, containRevison, force);

            if (form.ShowDialog(owner) == DialogResult.Cancel)
            {
                return(false);
            }

            InvokeEvent(owner, PostCheckoutBranch);

            return(true);
        }
Example #3
0
 public bool StartCheckoutBranchDialog(IWin32Window owner, string branch, bool remote, string containRevison)
 {
     return(DoAction(owner, true, PreCheckoutBranch, PostCheckoutBranch, () =>
     {
         using (var form = new FormCheckoutBranch(branch, remote, containRevison))
             return form.DoDefaultActionOrShow(owner) != DialogResult.Cancel;
     }
                     ));
 }
Example #4
0
        public bool StartCheckoutBranchDialog(string branch, bool remote)
        {
            if (!InvokeEvent(PreCheckoutBranch))
            {
                return(false);
            }

            var form = new FormCheckoutBranch(branch, remote);

            form.ShowDialog();

            InvokeEvent(PostCheckoutBranch);

            return(true);
        }
        public bool StartCheckoutBranchDialog()
        {
            if (!RequiresValidWorkingDir())
            {
                return(false);
            }

            if (!InvokeEvent(PreCheckoutBranch))
            {
                return(false);
            }

            var form = new FormCheckoutBranch();

            form.ShowDialog();

            InvokeEvent(PostCheckoutBranch);

            return(true);
        }
Example #6
0
        public bool StartCheckoutBranchDialog(IWin32Window owner)
        {
            if (!RequiresValidWorkingDir())
            {
                return(false);
            }

            if (!InvokeEvent(PreCheckoutBranch))
            {
                return(false);
            }

            var form = new FormCheckoutBranch();

            if (form.ShowDialog(owner) != DialogResult.OK)
            {
                return(false);
            }

            InvokeEvent(PostCheckoutBranch);

            return(true);
        }
 public bool StartCheckoutBranchDialog(IWin32Window owner, string branch, bool remote, string containRevison)
 {
     return DoAction(owner, true, PreCheckoutBranch, PostCheckoutBranch, () =>
         {
             using (var form = new FormCheckoutBranch(this, branch, remote, containRevison))
                 return form.DoDefaultActionOrShow(owner) != DialogResult.Cancel;
         }
     );
 }
Example #8
0
        public bool StartCheckoutBranchDialog(IWin32Window owner, string branch, bool remote, string containRevison)
        {
            if (!RequiresValidWorkingDir())
                return false;

            if (!InvokeEvent(owner, PreCheckoutBranch))
                return false;

            bool needRefresh;
            bool force;
            if (CheckForDirtyDir(owner, out needRefresh, out force))
                return needRefresh;

            var form = new FormCheckoutBranch(branch, remote, containRevison, force);
            if (form.ShowDialog(owner) == DialogResult.Cancel)
                return false;

            InvokeEvent(owner, PostCheckoutBranch);

            return true;
        }
Example #9
0
        public bool StartCheckoutBranchDialog(IWin32Window owner, string branch, bool remote)
        {
            if (!RequiresValidWorkingDir())
                return false;

            if (!InvokeEvent(PreCheckoutBranch))
                return false;

            bool needRefresh;
            if (CheckForDirtyDir(owner, out needRefresh))
                return needRefresh;

            var form = new FormCheckoutBranch(branch, remote);
            form.ShowDialog(owner);

            InvokeEvent(PostCheckoutBranch);

            return true;
        }
Example #10
0
        public bool StartCheckoutBranchDialog(string branch, bool remote)
        {
            if (!RequiresValidWorkingDir())
                return false;

            if (!InvokeEvent(PreCheckoutBranch))
                return false;

            var form = new FormCheckoutBranch(branch, remote);
            form.ShowDialog();

            InvokeEvent(PostCheckoutBranch);

            return true;
        }
Example #11
0
        public bool StartCheckoutBranchDialog()
        {
            if (!RequiresValidWorkingDir())
                return false;

            if (!InvokeEvent(PreCheckoutBranch))
                return false;

            var form = new FormCheckoutBranch();

            if (form.ShowDialog() != DialogResult.OK)
                return false;

            InvokeEvent(PostCheckoutBranch);

            return true;
        }
Example #12
0
        public bool StartCheckoutBranchDialog(IWin32Window owner, string branch, bool remote, string containRevison, bool showOptions)
        {
            if (!RequiresValidWorkingDir(owner))
                return false;

            if (!InvokeEvent(owner, PreCheckoutBranch))
                return false;

            using (var form = new FormCheckoutBranch(branch, remote, containRevison, showOptions))
            {
                if (form.ShowDialog(owner) == DialogResult.Cancel)
                    return false;
            }

            InvokeEvent(owner, PostCheckoutBranch);

            return true;
        }
Example #13
0
        public bool StartCheckoutBranchDialog()
        {
            if (!InvokeEvent(PreCheckoutBranch))
                return false;

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

            InvokeEvent(PostCheckoutBranch);

            return true;
        }