예제 #1
0
파일: FormEx.cs 프로젝트: ToughBill/NanCrm
        protected override void OnLoad(EventArgs e)
        {
            foreach (Control ctrl in this.Controls)
            {
                if (ctrl is ComboBoxEx)
                {
                    ComboBoxEx comb = (ComboBoxEx)ctrl;
                    comb.DefineNewProc = new DeleDefineNewProc(ComboBoxDefineNewProc);
                    comb.InitSource();
                }
            }

            base.OnLoad(e);
        }
예제 #2
0
        protected override void OnLoad(EventArgs e)
        {
            foreach (Control ctrl in this.Controls)
            {
                if (ctrl is ComboBoxEx)
                {
                    ComboBoxEx comb = (ComboBoxEx)ctrl;
                    comb.DefineNewProc = new DeleDefineNewProc(ComboBoxDefineNewProc);
                    comb.InitSource();
                }
            }

            base.OnLoad(e);

            foreach (Control ctrl in this.Controls)
            {
                if (ctrl is ObjectGrid)
                {
                    ObjectGrid objGrid = (ObjectGrid)ctrl;
                    objGrid.ItemsChanged += new EventHandler <BrightIdeasSoftware.ItemsChangedEventArgs>(objGrid_ItemsChanged);
                }
                else if (ctrl is ComboBoxEx)
                {
                    ComboBoxEx comb = (ComboBoxEx)ctrl;
                    comb.SelectedValueChanged += new EventHandler(comb_SelectedIndexChanged);
                }
                else if (ctrl is TextBoxEx)
                {
                    TextBoxEx txt = (TextBoxEx)ctrl;
                    txt.TextChanged += new EventHandler(txt_TextChanged);
                }
                else if (ctrl is RichTextBoxEx)
                {
                    RichTextBoxEx rtxt = (RichTextBoxEx)ctrl;
                    rtxt.TextChanged += new EventHandler(rtxt_TextChanged);
                }
            }
        }