Example #1
0
        public void CloseMe(bool saveBeforeClose)
        {
            if (this.m_contract != null)
            {
                this.m_contract.RemoveChangedHandlers();
            }

            if (Closing != null)
            {
                Closing(this, new SelectorClosingEventArgs(m_contract, saveBeforeClose));
            }
            m_contract = 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);
            }
        }
Example #2
0
        public void OpenMe(ContractSelectControl s, Control attach_sel, Control attach_form, Contract contractToCopy)
        {
            if (IsOpened())
            {
                CloseMe(true);
            }

            m_contract          = new Contract(contractToCopy);
            m_contract.Born     = true;
            m_contract.Changed += 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();
        }
Example #3
0
 public bool IsAttachedToThisControl(ContractSelectControl csc)
 {
     return(m_selControl == csc);
 }
Example #4
0
        public void OpenMe(ContractSelectControl s, Control attach_sel, Control attach_form, Contract contractToCopy)
        {
            if (IsOpened())
                CloseMe(true);

            m_contract = new Contract(contractToCopy);
            m_contract.Born = true;
            m_contract.Changed += 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();
        }
Example #5
0
 public bool IsAttachedToThisControl(ContractSelectControl csc)
 {
     return (m_selControl == csc);
 }
Example #6
0
        public void CloseMe(bool saveBeforeClose)
        {
            if (this.m_contract != null)
            {
                this.m_contract.RemoveChangedHandlers();
            }

            if (Closing != null)
                Closing(this, new SelectorClosingEventArgs(m_contract, saveBeforeClose));
            m_contract = 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);
        }