Esempio n. 1
0
        private void MenuButton1_click(object sender, EventArgs e)
        {
            ChensMenuButton1 button1 = (ChensMenuButton1)sender;
            bool             oldFlag = button1.jsmodule.OpenFlag;

            foreach (JSModule jsmodule in jsModules.modules)
            {
                jsmodule.OpenFlag = false;
            }
            button1.jsmodule.OpenFlag = !oldFlag;


            this.ResizeControls();
        }
Esempio n. 2
0
        private void CreateMenuButton1(JSModule module)
        {
            Panel panel = new Panel();

            panel.Visible = module.OpenFlag;
            this.Controls.Add(panel);

            ChensMenuButton1 button1 = new ChensMenuButton1(module, this.jsModules, panel);

            AddClickHandleToMenuButton2(panel);
            button1.Click     += new EventHandler(MenuButton1_click);
            button1.Left       = 0;
            button1.Width      = this.Width - 1;
            module.menuButton1 = button1;

            this.Controls.Add(button1);
        }