Inheritance: Common.Controls.BaseForm
示例#1
0
        private void _AddApplicationMenu()
        {
            if (_AppSupportsCommands())
            {
                AppCommand schedulerMenu = _application.AppCommands.Find(MENU_ID_ROOT);
                if (schedulerMenu == null)
                {
                    schedulerMenu = new AppCommand(MENU_ID_ROOT, MENU_ID_NAME);
                    _application.AppCommands.Add(schedulerMenu);
                }

                AppCommand rootCommand = new AppCommand("ShowEditor", "Show Editor...");
                rootCommand.Click += (sender, e) =>
                {
                    using (ShowListForm form = new ShowListForm(_data))
                    {
                        if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                        {
                        }
                    }
                };
                if (schedulerMenu.Items.Length > 0)
                {
                    schedulerMenu.Add(new AppCommand("s1", "-"));
                }
                schedulerMenu.Add(rootCommand);
            }
        }
示例#2
0
		private void _AddApplicationMenu()
		{
			if (_AppSupportsCommands()) {
				AppCommand schedulerMenu = _application.AppCommands.Find(MENU_ID_ROOT);
				if (schedulerMenu == null)
				{
					schedulerMenu = new AppCommand(MENU_ID_ROOT, MENU_ID_NAME);
					_application.AppCommands.Add(schedulerMenu);
				} 

				AppCommand rootCommand = new AppCommand("ShowEditor", "Show Editor...");
				rootCommand.Click += (sender, e) =>
				{
					using (ShowListForm form = new ShowListForm(_data))
					{
						if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
						{
						}
					}
				};
				if (schedulerMenu.Items.Length > 0)
					schedulerMenu.Add(new AppCommand("s1", "-"));
				schedulerMenu.Add(rootCommand);
			}
		}