public void OpenMe(ResultSelectControl s, Control attach_sel, Control attach_form, Result resultToCopy) { if (IsOpened()) { CloseMe(true); } m_result = new Result(resultToCopy); m_result.Born = true; m_result.Changed += OnResultChanged; m_result._AddContractChangedHandler(OnContractChanged); m_selControl = s; m_attach_sel = attach_sel; m_attach_form = attach_form; DefineLocation(); if (!m_attach_form.Controls.Contains(this)) { m_attach_form.Controls.Add(this); } Visible = true; BringToFront(); this.Focus(); }
public void CloseMe(bool saveBeforeClose) { if (this.m_result != null) { this.m_result._RemoveContractChangedHandler(OnContractChanged); this.m_result.RemoveChangedHandlers(); } if (Closing != null) { Closing(this, new SelectorClosingEventArgs(m_result, saveBeforeClose)); } m_result = null; m_selControl = null; //if (m_attach_form != null && m_attach_form.Controls.Contains(this)) // m_attach_form.Controls.Remove(this); m_attach_sel = null; m_attach_form = null; this.Size = new Size(0, 0); this.Visible = false; if (Closed != null) { Closed(this, null); } }
public void CloseMe(bool saveBeforeClose) { if (this.m_result != null) { this.m_result._RemoveContractChangedHandler(OnContractChanged); this.m_result.RemoveChangedHandlers(); } if(Closing != null) Closing(this, new SelectorClosingEventArgs(m_result, saveBeforeClose)); m_result = null; m_selControl = null; //if (m_attach_form != null && m_attach_form.Controls.Contains(this)) // m_attach_form.Controls.Remove(this); m_attach_sel = null; m_attach_form = null; this.Size = new Size(0, 0); this.Visible = false; if (Closed != null) Closed(this, null); }
public void OpenMe(ResultSelectControl s, Control attach_sel, Control attach_form, Result resultToCopy) { if (IsOpened()) CloseMe(true); m_result = new Result(resultToCopy); m_result.Born = true; m_result.Changed += OnResultChanged; m_result._AddContractChangedHandler(OnContractChanged); m_selControl = s; m_attach_sel = attach_sel; m_attach_form = attach_form; DefineLocation(); if (!m_attach_form.Controls.Contains(this)) m_attach_form.Controls.Add(this); Visible = true; BringToFront(); this.Focus(); }
public bool IsAttachedToThisControl(ResultSelectControl rsc) { return (m_selControl == rsc); }
public bool IsAttachedToThisControl(ResultSelectControl rsc) { return(m_selControl == rsc); }