示例#1
0
		public FDMenus(IMainForm mainForm)
		{
			// modify the view menu
			CommandBarMenu viewMenu = mainForm.GetCBMenu("ViewMenu");
			View = new CommandBarButton("&Project Explorer");
			View.Image = Icons.Project.Img;
			viewMenu.Items.Add(View);

			// modify the tools menu - add a nice GUI classpath editor
			GlobalClasspaths = new CommandBarButton("&Global Classpaths...");
			GlobalClasspaths.Shortcut = Keys.F9 | Keys.Control;

			mainForm.IgnoredKeys.Add(GlobalClasspaths.Shortcut);

			CommandBarMenu toolsMenu = mainForm.GetCBMenu("ToolsMenu");
			toolsMenu.Items.AddSeparator();
			toolsMenu.Items.Add(GlobalClasspaths);

			ProjectMenu = new ProjectMenu();

			CommandBar mainMenu = mainForm.GetCBMainMenu();
			mainMenu.Items.Insert(5, ProjectMenu);

			RecentComboBox = RecentComboBox.Create();

			CommandBar toolBar = mainForm.GetCBToolbar();

			if (toolBar != null) // you might have turned off the toolbar
			{
				toolBar.Items.AddSeparator();
				toolBar.Items.Add(ProjectMenu.TestMovie);
				toolBar.Items.Add(RecentComboBox);
			}
		}
示例#2
0
        public FDMenus(IMainForm mainForm)
        {
            // modify the view menu
            CommandBarMenu viewMenu = mainForm.GetCBMenu("ViewMenu");

            View       = new CommandBarButton("&Project Explorer");
            View.Image = Icons.Project.Img;
            viewMenu.Items.Add(View);

            // modify the tools menu - add a nice GUI classpath editor
            GlobalClasspaths          = new CommandBarButton("&Global Classpaths...");
            GlobalClasspaths.Shortcut = Keys.F9 | Keys.Control;

            mainForm.IgnoredKeys.Add(GlobalClasspaths.Shortcut);

            CommandBarMenu toolsMenu = mainForm.GetCBMenu("ToolsMenu");

            toolsMenu.Items.AddSeparator();
            toolsMenu.Items.Add(GlobalClasspaths);

            ProjectMenu = new ProjectMenu();

            CommandBar mainMenu = mainForm.GetCBMainMenu();

            mainMenu.Items.Insert(5, ProjectMenu);

            RecentComboBox = RecentComboBox.Create();

            CommandBar toolBar = mainForm.GetCBToolbar();

            if (toolBar != null)             // you might have turned off the toolbar
            {
                toolBar.Items.AddSeparator();
                toolBar.Items.Add(ProjectMenu.TestMovie);
                toolBar.Items.Add(RecentComboBox);
            }
        }