static void CreateToolboxService() { SD.MainThread.VerifyAccess(); if (toolboxService == null) { sideBar = new SharpDevelopSideBar(); LoadToolbox(); toolboxService = new ICSharpCode.FormsDesigner.Services.ToolboxService(); ReloadSideTabs(false); toolboxService.SelectedItemUsed += new EventHandler(SelectedToolUsedHandler); sideBar.SideTabDeleted += SideTabDeleted; } }
static void CreateToolboxService() { Debug.Assert(WorkbenchSingleton.InvokeRequired == false); if (toolboxService == null) { sideBar = new SharpDevelopSideBar(); LoadToolbox(); toolboxService = new ICSharpCode.FormsDesigner.Services.ToolboxService(); ReloadSideTabs(false); toolboxService.SelectedItemUsed += new EventHandler(SelectedToolUsedHandler); sideBar.SideTabDeleted += SideTabDeleted; } }
void GenerateStandardSideBar() { sideBar = new SharpDevelopSideBar(); SideTab tab = new SideTab(sideBar, "${res:SharpDevelop.SideBar.GeneralCategory}"); tab.DisplayName = StringParser.Parse(tab.Name); sideBar.Tabs.Add(tab); sideBar.ActiveTab = tab; tab = new SideTab(sideBar, "${res:SharpDevelop.SideBar.ClipboardRing}"); tab.DisplayName = StringParser.Parse(tab.Name); tab.IsClipboardRing = true; tab.CanBeDeleted = false; tab.CanDragDrop = false; sideBar.Tabs.Add(tab); }
public SideBarView() { try { XmlDocument doc = new XmlDocument(); doc.Load(Path.Combine(PropertyService.ConfigDirectory, "SideBarConfig.xml")); if (doc.DocumentElement.Attributes["version"] == null || doc.DocumentElement.Attributes["version"].InnerText != "1.0") { GenerateStandardSideBar(); } else { sideBar = new SharpDevelopSideBar(doc.DocumentElement["SideBar"]); } } catch (Exception) { GenerateStandardSideBar(); } sideBar.Dock = DockStyle.Fill; }
public SharpDevelopSideBar() { SideBar = this; SideTabItemFactory = new SharpDevelopSideTabItemFactory(); MouseUp += new MouseEventHandler(SetContextMenu); sideTabContent.MouseUp += new MouseEventHandler(SetItemContextMenu); foreach (TextTemplate template in TextTemplate.TextTemplates) { SideTab tab = new SideTab(this, template.Name); tab.DisplayName = StringParser.Parse(tab.Name); tab.CanSaved = false; foreach (TextTemplate.Entry entry in template.Entries) { tab.Items.Add(SideTabItemFactory.CreateSideTabItem(entry.Display, entry.Value)); } tab.CanBeDeleted = tab.CanDragDrop = false; standardTabs[tab] = true; Tabs.Add(tab); } sideTabContent.DoubleClick += new EventHandler(MyDoubleClick); }