コード例 #1
0
        public bool StartApplyPatchDialog(string patchFile)
        {
            if (!InvokeEvent(PreApplyPatch))
            {
                return(true);
            }

            var form = new FormApplyPatch();

            form.SetPatchFile(patchFile);
            form.ShowDialog();

            InvokeEvent(PostApplyPatch);

            return(true);
        }
コード例 #2
0
        public bool StartApplyPatchDialog(string patchFile)
        {
            if (!RequiresValidWorkingDir())
            {
                return(false);
            }

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

            var form = new FormApplyPatch();

            form.SetPatchFile(patchFile);
            form.ShowDialog();

            InvokeEvent(PostApplyPatch);

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

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

            using (var form = new FormApplyPatch())
            {
                form.SetPatchFile(patchFile);
                form.ShowDialog(owner);
            }

            InvokeEvent(owner, PostApplyPatch);

            return(true);
        }
コード例 #4
0
 public bool StartApplyPatchDialog(IWin32Window owner, string patchFile)
 {
     return DoAction(owner, true, PreApplyPatch, PostApplyPatch, () =>
         {
             using (var form = new FormApplyPatch(this))
             {
                 if (Directory.Exists(patchFile))
                     form.SetPatchDir(patchFile);
                 else
                     form.SetPatchFile(patchFile);
                 return form.ShowDialog(owner) != DialogResult.Cancel;
             }
         }
     );
 }
コード例 #5
0
ファイル: GitUICommands.cs プロジェクト: phiree/gitextensions
        public bool StartApplyPatchDialog(IWin32Window owner, string patchFile)
        {
            if (!RequiresValidWorkingDir())
                return false;

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

            var form = new FormApplyPatch();
            form.SetPatchFile(patchFile);
            form.ShowDialog(owner);

            InvokeEvent(owner, PostApplyPatch);

            return true;
        }
コード例 #6
0
        public bool StartApplyPatchDialog(string patchFile)
        {
            if (!InvokeEvent(PreApplyPatch))
                return true;

            var form = new FormApplyPatch();
            form.SetPatchFile(patchFile);
            form.ShowDialog();

            InvokeEvent(PostApplyPatch);

            return true;
        }