示例#1
0
        /// <summary>
        /// 重新初始化菜单系统,只保留系统管理和帮助
        /// </summary>
        public void ReInitPage()
        {
            RibbonPage sysMana = control.Pages.GetPageByText("系统管理");
            RibbonPage help    = control.Pages.GetPageByText("帮助");

            control.BeginInit();
            control.Pages.Clear();
            control.Pages.Insert(0, sysMana);
            control.Pages.Insert(1, help);
            control.EndInit();
        }
示例#2
0
        private void AddGanttPageToRibbon()
        {
            RibbonStatusBar               ribbonStatusBar               = new RibbonStatusBar();
            GanttBarController            ganttBarController            = new GanttBarController();
            GanttSplitViewRibbonPageGroup ganttSplitViewRibbonPageGroup = new GanttSplitViewRibbonPageGroup();

            ganttViewRibbonPage = new GanttViewRibbonPage();
            GanttAllowResizeBarCheckItem            ganttAllowResizeBarCheckItem            = new GanttAllowResizeBarCheckItem();
            GanttPanelVisibilityDefaultBarCheckItem ganttPanelVisibilityDefaultBarCheckItem = new GanttPanelVisibilityDefaultBarCheckItem();
            GanttPanelVisibilityBothBarCheckItem    ganttPanelVisibilityBothBarCheckItem    = new GanttPanelVisibilityBothBarCheckItem();
            GanttPanelVisibilityChartBarCheckItem   ganttPanelVisibilityChartBarCheckItem   = new GanttPanelVisibilityChartBarCheckItem();
            GanttPanelVisibilityTreeBarCheckItem    ganttPanelVisibilityTreeBarCheckItem    = new GanttPanelVisibilityTreeBarCheckItem();
            GanttPanelVisibilityBarSubItem          ganttPanelVisibilityBarSubItem          = new GanttPanelVisibilityBarSubItem();
            GanttFixedPanelDefaultBarCheckItem      ganttFixedPanelDefaultBarCheckItem      = new GanttFixedPanelDefaultBarCheckItem();
            GanttFixedPanelNoneBarCheckItem         ganttFixedPanelNoneBarCheckItem         = new GanttFixedPanelNoneBarCheckItem();
            GanttFixedPanelChartBarCheckItem        ganttFixedPanelChartBarCheckItem        = new GanttFixedPanelChartBarCheckItem();
            GanttFixedPanelTreeBarCheckItem         ganttFixedPanelTreeBarCheckItem         = new GanttFixedPanelTreeBarCheckItem();
            GanttFixedPanelBarSubItem ganttFixedPanelBarSubItem = new GanttFixedPanelBarSubItem();

            ganttControl.BeginInit();
            ribbonControl.BeginInit();
            ((System.ComponentModel.ISupportInitialize)ganttBarController).BeginInit();
            //
            // ribbonControl
            //
            ribbonControl.Items.AddRange(new DevExpress.XtraBars.BarItem[] {
                ribbonControl.ExpandCollapseItem,
                ribbonControl.SearchEditItem,
                ganttAllowResizeBarCheckItem,
                ganttPanelVisibilityBarSubItem,
                ganttPanelVisibilityDefaultBarCheckItem,
                ganttPanelVisibilityBothBarCheckItem,
                ganttPanelVisibilityChartBarCheckItem,
                ganttPanelVisibilityTreeBarCheckItem,
                ganttFixedPanelBarSubItem,
                ganttFixedPanelDefaultBarCheckItem,
                ganttFixedPanelNoneBarCheckItem,
                ganttFixedPanelChartBarCheckItem,
                ganttFixedPanelTreeBarCheckItem
            });
            ribbonControl.Pages.AddRange(new RibbonPage[] {
                ganttViewRibbonPage
            });
            ribbonControl.StatusBar = ribbonStatusBar;
            ribbonStatusBar.Ribbon  = ribbonControl;
            //
            // ganttBarController
            //
            ganttBarController.BarItems.Add(ganttAllowResizeBarCheckItem);
            ganttBarController.BarItems.Add(ganttPanelVisibilityDefaultBarCheckItem);
            ganttBarController.BarItems.Add(ganttPanelVisibilityBothBarCheckItem);
            ganttBarController.BarItems.Add(ganttPanelVisibilityChartBarCheckItem);
            ganttBarController.BarItems.Add(ganttPanelVisibilityTreeBarCheckItem);
            ganttBarController.BarItems.Add(ganttPanelVisibilityBarSubItem);
            ganttBarController.BarItems.Add(ganttFixedPanelDefaultBarCheckItem);
            ganttBarController.BarItems.Add(ganttFixedPanelNoneBarCheckItem);
            ganttBarController.BarItems.Add(ganttFixedPanelChartBarCheckItem);
            ganttBarController.BarItems.Add(ganttFixedPanelTreeBarCheckItem);
            ganttBarController.BarItems.Add(ganttFixedPanelBarSubItem);
            ganttBarController.Control = ganttControl;
            //
            // ganttSplitViewRibbonPageGroup
            //
            ganttSplitViewRibbonPageGroup.CaptionButtonVisible = DevExpress.Utils.DefaultBoolean.False;
            ganttSplitViewRibbonPageGroup.ItemLinks.Add(ganttAllowResizeBarCheckItem);
            ganttSplitViewRibbonPageGroup.ItemLinks.Add(ganttPanelVisibilityBarSubItem);
            ganttSplitViewRibbonPageGroup.ItemLinks.Add(ganttFixedPanelBarSubItem);
            //
            // ganttViewRibbonPage
            //
            ganttViewRibbonPage.Groups.AddRange(new RibbonPageGroup[] {
                ganttSplitViewRibbonPageGroup
            });
            ganttViewRibbonPage.Text = "Gantt";
            //
            // ganttPanelVisibilityBarSubItem
            //
            ganttPanelVisibilityBarSubItem.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] {
                new DevExpress.XtraBars.LinkPersistInfo(ganttPanelVisibilityDefaultBarCheckItem),
                new DevExpress.XtraBars.LinkPersistInfo(ganttPanelVisibilityBothBarCheckItem),
                new DevExpress.XtraBars.LinkPersistInfo(ganttPanelVisibilityChartBarCheckItem),
                new DevExpress.XtraBars.LinkPersistInfo(ganttPanelVisibilityTreeBarCheckItem)
            });
            //
            // ganttFixedPanelBarSubItem
            //
            ganttFixedPanelBarSubItem.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] {
                new DevExpress.XtraBars.LinkPersistInfo(ganttFixedPanelDefaultBarCheckItem),
                new DevExpress.XtraBars.LinkPersistInfo(ganttFixedPanelNoneBarCheckItem),
                new DevExpress.XtraBars.LinkPersistInfo(ganttFixedPanelChartBarCheckItem),
                new DevExpress.XtraBars.LinkPersistInfo(ganttFixedPanelTreeBarCheckItem)
            });
            ganttControl.EndInit();
            ribbonControl.EndInit();
            ((System.ComponentModel.ISupportInitialize)ganttBarController).EndInit();
        }
示例#3
0
 public static void transEnd(RibbonControl oSuperParent)
 {
     oSuperParent.EndInit();
 }