void m_MenuItem_Click(object sender, EventArgs e) { if (!Enabled) return; if (Opened) return; // Can only have one open / time m_Editor = new frmMapEditor(); m_Editor.Plugin = this; m_Editor.MdiParent = m_Parent; m_Editor.FormClosed += new FormClosedEventHandler(m_Editor_FormClosed); m_Editor.Show(); }
public void FileOpened(string filename) { if ((m_Editor != null) && (!m_Editor.Disposing)) { try { m_Editor.Close(); m_Editor.Dispose(); } catch { } m_Editor = null; } }
void m_MenuItem_Click(object sender, EventArgs e) { if (!Enabled) { return; } if (Opened) { return; // Can only have one open / time } m_Editor = new frmMapEditor(); m_Editor.Plugin = this; m_Editor.MdiParent = m_Parent; m_Editor.FormClosed += new FormClosedEventHandler(m_Editor_FormClosed); m_Editor.Show(); }
public void Unload() { m_MenuItem.Visible = false; m_MenuItem.Dispose(); m_MenuItem = null; if ((m_Editor != null) && (!m_Editor.Disposing)) { try { m_Editor.Close(); m_Editor.Dispose(); } catch { } m_Editor = null; } }
void m_Editor_FormClosed(object sender, FormClosedEventArgs e) { m_Editor = null; }