示例#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);
        }
        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);
        }
 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
        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;
        }