/// <summary> /// Add custom views on this controller /// </summary> protected override void AddViews() { base.AddViews(); TaskbarView view = WorkItem.SmartParts.AddNew <TaskbarView>(SmartPartNames.SmartPart_Shell_TaskbarView); WorkItem.RootWorkItem.Items.Add(view.TaskbarWorkspace, UIExtensionSiteNames.Shell_NaviPane_Taskbar); WorkItem.RootWorkItem.Workspaces.Add(view.TaskbarWorkspace, UIExtensionSiteNames.Shell_Workspace_Taskbar); }
public void OnShowTaskbar(object sender, EventArgs e) { TaskbarView view = WorkItem.SmartParts.Get <TaskbarView>(SmartPartNames.SmartPart_Shell_TaskbarView); if (view == null) { view = WorkItem.SmartParts.AddNew <TaskbarView>(SmartPartNames.SmartPart_Shell_TaskbarView); } IWorkspace wp = WorkItem.Workspaces[UIExtensionSiteNames.Shell_Workspace_Dockable]; if (wp != null) { DockManagerSmartPartInfo spi = new DockManagerSmartPartInfo(); spi.Title = "关联任务"; spi.ImageFile = "${magic-wand}"; spi.Tabbed = true; spi.Dock = DevExpress.XtraBars.Docking.DockingStyle.Right; wp.Show(view, spi); } }