public void Close() { if (form == null) { return; } form.Dispose(); form = null; }
public static bool disposeForm() { if (form != null) { form.Dispose(); form = null; } return(true); }
/// <summary> /// Entry point of the plug in /// Write "toBabylon" in the Maya console to start it /// </summary> /// <param name="argl"></param> public override void doIt(MArgList argl) { if (form == null) { form = new ExporterForm(); } form.Show(); form.BringToFront(); form.WindowState = FormWindowState.Normal; form.FormClosed += (object sender, FormClosedEventArgs e) => { if (form == null) { return; } form.Dispose(); form = null; }; }