예제 #1
0
        protected override void OnLoad(EventArgs e)
        {
            this.loading = true;
            try {
                base.OnLoad(e);

                // init controls
                foreach (Control c in this.Controls)
                {
                    // tag
                    tag_infos ti = new tag_infos((string)c.Name, c.Tag);
                    c.Tag = ti;

                    // applico gli stili
                    if (c is DataGridView)
                    {
                        main.style.init_grid((DataGridView)c);
                    }
                    else if (c is ComboBox)
                    {
                        main.style.init_combo_h3((ComboBox)c);
                    }

                    c.KeyDown += C_KeyDown;
                }
            } finally { this.loading = false; }
        }
예제 #2
0
        protected void init_control(Control c)
        {
            if (c is base_combo)
            {
                ((base_combo)c).set_parent(this);
            }
            else if (c is base_dgv)
            {
                ((base_dgv)c).main = this;
            }
            tag_infos ti = new tag_infos((string)c.Name, c.Tag);

            c.Tag      = ti;
            c.KeyDown += C_KeyDown;

            foreach (Control c2 in c.Controls)
            {
                init_control(c2);
            }
        }