Пример #1
0
        private void ConfigContextMenu(Object sender, StatusEventArgs e)
        {
            MyMenu    menu      = new MyMenu(_dgvMain);
            MenuStrip menuStrip = menu.CreateMainMenu();

            this.Controls.Remove(this.MainMenuStrip);
            this.MainMenuStrip = menuStrip;
            this.Controls.Add(menuStrip);

            _dgvCar.ContextMenuStrip = menu.CreateContextMenu();
        }
Пример #2
0
        private void ConfigContextMenu(Object sender, StatusEventArgs e)
        {
            MyMenu menu = new MyMenu(_dgvMain);
            MenuStrip menuStrip = menu.CreateMainMenu();

            this.Controls.Remove(this.MainMenuStrip);
            this.MainMenuStrip = menuStrip;
            this.Controls.Add(menuStrip);

            _dgvCar.ContextMenuStrip = menu.CreateContextMenu();
        }