Пример #1
0
		/**
		* Builds the main menu and toolbar from xml file
		*/
		public void InitializeCommandBarMenus()
		{
			try 
			{
				this.images = new Images(FilePaths.Images, 16);
				this.xmlBuilder = new XmlBuilder(this, this.images);
				this.itemFinder = new ItemFinder(this.xmlBuilder);
				this.commandBarManager = new CommandBarManager();
				this.editorMenu = this.xmlBuilder.GenerateContextMenu(FilePaths.ScintillaMenu);
				this.tabMenu = this.xmlBuilder.GenerateContextMenu(FilePaths.TabMenu);
				this.commandBarManager.CommandBars.Add(this.xmlBuilder.GenerateMainMenu(FilePaths.MainMenu));
				if (this.settings.GetBool("FlashDevelop.ViewToolBar"))
				{
					this.commandBarManager.CommandBars.Add(this.xmlBuilder.GenerateToolBar(FilePaths.ToolBar));
				}
				this.Controls.Add(this.commandBarManager);
			} 
			catch (Exception ex)
			{
				ErrorHandler.ShowError("Error while building menus.", ex);
			}
		}
Пример #2
0
		/**
		* Constructor
		*/
		public ItemFinder(XmlBuilder xmlBuilder)
		{
			this.xmlBuilder = xmlBuilder;
		}