/// <summary> /// Initialize everything with null values. Used by constructors. /// </summary> void SetInitialValues() { m_Dialog = null; m_Line = null; m_Length = new Distance(); }
/// <summary> /// Starts the user interface (if any) for this command. /// </summary> /// <returns>True if command started ok.</returns> internal override bool Run() { // Don't run more than once. if (m_Dialog!=null) throw new InvalidOperationException("SimpleLineSubdivisionUI.Run - Command is already running."); UpdateUI pup = this.Update; if (pup!=null) m_Dialog = new SimpleLineSubdivisionControl(pup); else m_Dialog = new SimpleLineSubdivisionControl(this, m_Line, this.Recall); this.Container.Display(m_Dialog); return true; }
/// <summary> /// Destroys any dialogs that are currently displayed. /// </summary> void KillDialogs() { this.Container.Clear(); if (m_Dialog!=null) { m_Dialog.Dispose(); m_Dialog = null; } }
public override void Dispose() { base.Dispose(); // removes any controls from container if (m_Dialog!=null) { m_Dialog.Dispose(); m_Dialog = null; } }