Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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();
        }
Esempio n. 5
0
 public bool IsAttachedToThisControl(ResultSelectControl rsc)
 {
     return (m_selControl == rsc);
 }
Esempio n. 6
0
 public bool IsAttachedToThisControl(ResultSelectControl rsc)
 {
     return(m_selControl == rsc);
 }