private void ShowTimeTrackingListView() { string key = "TimeTrackingListView"; var localizedCaption = Properties.Resources.ResourceManager.GetString("TimeTracking"); var timeTrackingListView = WorkItem.Items.Get <TimeTrackingListView>(key); if (timeTrackingListView == null) { timeTrackingListView = WorkItem.Items.AddNew <TimeTrackingListView>(key); WorkItem.EventTopics[EventTopicNames.FocusedRowChanged].RemovePublication(timeTrackingListView, EventTopicNames.FocusedRowChanged); var info = new DockManagerSmartPartInfo { ID = new Guid("AB4566B2-0B6A-485A-8796-0ECF9D2CA65B"), Title = localizedCaption, Name = "TimeTracking", Dock = DockingStyle.Right, ParentPanelName = "Note", Index = 1 }; WorkItem.RegisterSmartPartInfo(timeTrackingListView, info); timeTrackingListView.InitEntityView("TimeTracking"); } timeTrackingListView.Dock = DockStyle.Fill; BindList(timeTrackingListView); WorkItem.Workspaces[WorkspaceNames.DockManagerWorkspace].Show(timeTrackingListView); }
private void ShowNoteListView() { string key = "NoteListView"; var noteListView = WorkItem.Items.Get <NoteListView>(key); if (noteListView == null) { noteListView = WorkItem.Items.AddNew <NoteListView>(key); WorkItem.EventTopics[EventTopicNames.FocusedRowChanged] .RemovePublication(noteListView, EventTopicNames.FocusedRowChanged); var localizedCaption = Properties.Resources.ResourceManager.GetString("Notes"); var info = new DockManagerSmartPartInfo { ID = new Guid("E4A671F2-C37B-4C40-B3B3-53C6724586A7"), Title = localizedCaption, Name = "Note", Dock = DockingStyle.Right, XtraBounds = new System.Drawing.Rectangle(0, 0, 448, 0), Index = 0 }; WorkItem.RegisterSmartPartInfo(noteListView, info); noteListView.InitEntityView("Note"); } noteListView.Dock = DockStyle.Fill; BindNotes(noteListView); WorkItem.Workspaces[WorkspaceNames.DockManagerWorkspace].Show(noteListView); }
/// <summary> /// Usage sample for the CABDevExpress.Extension Kit DockManagerWorkspace /// </summary> /// <param name="dockWorkspace"></param> public void Show(IWorkspace dockWorkspace) { var info = new DockManagerSmartPartInfo { Name = "Statistics", Dock = DockingStyle.Right }; SmartParts.AddNew <StatisticsBarView>(DockableStatisticsView); dockWorkspace.Show(SmartParts[DockableStatisticsView], info); }
public void CanShow_DockManagerWorkspace_If_PanelName_Is_NotNull() { var dockManager = new DockManager(new ContainerControl()); var dockManagerWorkspace = new DockManagerWorkspace(dockManager); var smartPartInfo = new DockManagerSmartPartInfo { ParentPanelName = "PanelBob", Name = "Bob", Dock = DockingStyle.Bottom }; dockManagerWorkspace.Show(_smartPart, smartPartInfo); dockManagerWorkspace.DockPanels.Count.ShouldEqual(1); dockManager.Panels[0].Name.ShouldEqual("Bob"); dockManager.Panels[0].Dock.ShouldEqual(DockingStyle.Bottom); dockManagerWorkspace.Close(_smartPart); dockManagerWorkspace.DockPanels.Count.ShouldEqual(0); }
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); } }
public void OnShowDynamicHelp(object sender, EventArgs e) { DynamicHelpView view = WorkItem.SmartParts.Get <DynamicHelpView>(SmartPartNames.SmartPart_Shell_DynamicHelp); if (view == null) { view = WorkItem.SmartParts.AddNew <DynamicHelpView>(SmartPartNames.SmartPart_Shell_DynamicHelp); } IWorkspace wp = WorkItem.Workspaces[UIExtensionSiteNames.Shell_Workspace_Dockable]; if (wp != null) { DockManagerSmartPartInfo spi = new DockManagerSmartPartInfo(); spi.Title = "动态帮助"; spi.ImageFile = "${help}"; spi.Tabbed = true; spi.Dock = DevExpress.XtraBars.Docking.DockingStyle.Right; wp.Show(view, spi); } }