public static MultiForm makeMultiForm() { if (form == null) form = new MultiForm(); return form; }
public void Unload(INWN2PluginHost cHost) { UI.MultiForm form = UI.MultiForm.makeMultiForm(); form.Dispose(); m_cMenuItem.Dispose(); m_cMenuItem = null; }
public static MultiForm makeMultiForm() { if (form == null) { form = new MultiForm(); } return(form); }
/// <summary> /// A utility method to handle the launch of the multiform. /// If the data is different than null, then it becomes the default data for the multiform /// </summary> /// <param name="data"></param> public static void makeMultiForm(brushData data) { UI.MultiForm form = UI.MultiForm.makeMultiForm(); if (data != null) { form.setData(data); } if (DialogResult.OK == form.ShowDialog() && form.data != null) { drawPolygon.Enabled = false; if (form.data.mode == paintmode.paint) { debugOut("brush!"); tool = "Brush"; } else if (form.data.mode == paintmode.eyedrop) { debugOut("eyedrop"); tool = "Eyedrop tool"; } else if (form.data.mode == paintmode.polygon) { debugOut("Polygon"); tool = "Polygon paint"; drawPolygon.Enabled = true; } else { throw new Exception("Error wrong paint mode"); } // setStartStopTitle(true); if (!form.stopSystem) { if (m_timer != null) { m_timer.setNewData(form.data); m_timer.resumeTexture(); } else { m_timer = new IntervalTimer(form.data); m_timer.startTexture(); } setStartStopTitle(true); } else { if (m_timer != null) { m_timer.stopTexture(); setStartStopTitle(false); } } } if (form.data == null) { setStartStopTitle(false); } }