private void Patches_DoubleClick(object sender, EventArgs e) { if (Patches.SelectedRows.Count != 1) return; var patchFile = (PatchFile)Patches.SelectedRows[0].DataBoundItem; using (var viewPatch = new FormViewPatch(UICommands)) { viewPatch.LoadPatch(patchFile.FullName); viewPatch.ShowDialog(this); } }
public bool StartViewPatchDialog(IWin32Window owner, string patchFile) { if (!InvokeEvent(owner, PreViewPatch)) return true; using (var viewPatch = new FormViewPatch(this)) { if (!String.IsNullOrEmpty(patchFile)) viewPatch.LoadPatch(patchFile); viewPatch.ShowDialog(owner); } InvokeEvent(owner, PostViewPatch); return true; }