private void CreateRibbonBar()
        {
            RibbonBar ribbonBar = axCommandBars.AddRibbonBar("DemoSoft Team Ribbon");

            ribbonBar.EnableDocking(XTPToolBarFlags.xtpFlagStretched);

            // 系统菜单
            CommandBarPopup popupSystem = ribbonBar.AddSystemButton();

            popupSystem.IconId = ResourceId.ID_SYSTEM_ICON;
            popupSystem.CommandBar.Controls.Add(XTPControlType.xtpControlButton, ResourceId.ID_CONFIG_STOCK, "配置程序(&O)", false, false);
            CommandBarControl controlSystem = popupSystem.CommandBar.Controls.Add(XTPControlType.xtpControlButton, ResourceId.ID_APP_HIDE, "退出(&E)", false, false);

            controlSystem.BeginGroup = true;
            popupSystem.CommandBar.SetIconSize(32, 32);

            // 关于菜单
            CommandBarControl controlAbout = ribbonBar.Controls.Add(XTPControlType.xtpControlButton, ResourceId.ID_APP_ABOUT, "关于(&A)", false, false);

            controlAbout.Flags = XTPControlFlags.xtpFlagRightAlign;

            // 主页
            RibbonTab primarySR = ribbonBar.InsertTab(0, "主页(&H)");

            primarySR.Id = ResourceId.ID_HOME;

            // 配置 -> 配置程序
            RibbonGroup       groupConfig      = primarySR.Groups.AddGroup("配置(&C)", ResourceId.ID_CONFIG_BUILD);
            CommandBarControl controlConfigApp = groupConfig.Add(XTPControlType.xtpControlButton, ResourceId.ID_CONFIG_STOCK, "配置程序(&O)", false, false);

            // 生成SR -> 创建SR报表
            RibbonGroup       groupPrimaryStockBuild     = primarySR.Groups.AddGroup("生成SR(&B)", ResourceId.ID_SR_BUILD);
            CommandBarControl controlBuildPrimaryReportS = groupPrimaryStockBuild.Add(XTPControlType.xtpControlSplitButtonPopup, ResourceId.ID_NEW_SR, "创建SR报表(&C)", false, false);

            controlBuildPrimaryReportS.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ResourceId.ID_LOAD_SR_FILE, "读取SR报表(&L)", false, false);
            controlBuildPrimaryReportS.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ResourceId.ID_LOAD_SR_CONFIG, "读取SR策略(&L)", false, false);

            // 视图
            RibbonTab tabView = ribbonBar.InsertTab(3, "视图(&V)");

            tabView.Id = ResourceId.ID_TAB_VIEW;

            // 视图 -> 报表
            RibbonGroup       groupShow        = tabView.Groups.AddGroup("报表(&D)", ResourceId.ID_GROUP_SHOW);
            CommandBarControl controlWorkspace = groupShow.Add(XTPControlType.xtpControlCheckBox, ResourceId.ID_SHOW_WORKSPACE, "工作区(&W)", false, false);

            groupShow.Add(XTPControlType.xtpControlCheckBox, ResourceId.ID_SHOW_STATUS, "状态栏(&S)", false, false);

            // 工具
            RibbonTab tabTools = ribbonBar.InsertTab(4, "工具(&T)");

            tabTools.Id = ResourceId.ID_TAB_TOOLS;

            // 工具 -> 内部工具
            RibbonGroup groupTools = tabTools.Groups.AddGroup("内部工具(&I)", ResourceId.ID_GROUP_TOOLS);

            // Welcome To DemoSoft Team
            ribbonBar.QuickAccessControls.Add(XTPControlType.xtpControlButton, ResourceId.ID_WELCOME, " Home ", false, false);
        }
Пример #2
0
        private void CreateRibbonBar()
        {
            RibbonBar ribbonBar = axCommandBars.AddRibbonBar("DemoSoft Team Ribbon");

            ribbonBar.EnableDocking(XTPToolBarFlags.xtpFlagStretched);

            CommandBarPopup controlFile = ribbonBar.AddSystemButton();

            controlFile.IconId = ResourceID.ID_SYSTEM_ICON;
            controlFile.CommandBar.Controls.Add(XTPControlType.xtpControlButton, ResourceID.ID_FILE_OPEN, "打开(&O)...", false, false);

            CommandBarControl control = controlFile.CommandBar.Controls.Add(XTPControlType.xtpControlButton, ResourceID.ID_FILE_CLOSE, "关闭(&C)", false, false);

            control.BeginGroup = true;
            control            = controlFile.CommandBar.Controls.Add(XTPControlType.xtpControlButton, ResourceID.ID_APP_EXIT, "退出(E&)", false, false);
            controlFile.CommandBar.SetIconSize(32, 32);

            CommandBarControl controlAbout = ribbonBar.Controls.Add(XTPControlType.xtpControlButton, ResourceID.ID_APP_ABOUT, "关于(&A)", false, false);

            controlAbout.Flags = XTPControlFlags.xtpFlagRightAlign;

            RibbonTab tabHome = ribbonBar.InsertTab(0, "开始(&H)");

            tabHome.Id = ResourceID.ID_TAB_HOME;

            RibbonGroup groupFile = tabHome.Groups.AddGroup("文件(&F)", ResourceID.ID_GROUP_FILE);

            groupFile.Add(XTPControlType.xtpControlButton, ResourceID.ID_FILE_OPEN, "打开(&O)", false, false);
            groupFile.Add(XTPControlType.xtpControlButton, ResourceID.ID_FILE_CLOSE, "关闭(&C)", false, false);

            RibbonTab tabView = ribbonBar.InsertTab(2, "视图(&V)");

            tabView.Id = ResourceID.ID_TAB_VIEW;

            RibbonGroup groupShowHide = tabView.Groups.AddGroup("显示/隐藏", ResourceID.ID_GROUP_SHOWHIDE);

            groupShowHide.Add(XTPControlType.xtpControlCheckBox, ResourceID.ID_VIEW_STATUS_BAR, "状态栏", false, false);
            groupShowHide.Add(XTPControlType.xtpControlCheckBox, ResourceID.ID_VIEW_WORKSPACE, "工作区", false, false);

            RibbonTab tabTools = ribbonBar.InsertTab(3, "工具(&T)");

            tabTools.Id = ResourceID.ID_TAB_TOOLS;

            RibbonGroup groupPatchTool = tabTools.Groups.AddGroup("工具集", ResourceID.ID_GROUP_TOOLS);

            groupPatchTool.Add(XTPControlType.xtpControlButton, ResourceID.ID_PATCH_TOOL, "产生补丁程序", false, false);
            //groupPatchTool.Add( XTPControlType.xtpControlButton, ResourceID.ID_PATCH_FILE, "Patch EXE", false, false );

            ribbonBar.QuickAccessControls.Add(XTPControlType.xtpControlButton, ResourceID.ID_WELCOME, "Welcome", false, false);
            ribbonBar.QuickAccessControls.Add(XTPControlType.xtpControlButton, ResourceID.ID_TO, "To", false, false);
            ribbonBar.QuickAccessControls.Add(XTPControlType.xtpControlButton, ResourceID.ID_DEMO_SOFT, "DemoSoft", false, false);
            ribbonBar.QuickAccessControls.Add(XTPControlType.xtpControlButton, ResourceID.ID_TEAM, "Team", false, false);
        }
        private void CreateRibbonBar()
        {
            RibbonBar ribbonBar = axCommandBars.AddRibbonBar("DemoSoft Team Ribbon");

            ribbonBar.EnableDocking(XTPToolBarFlags.xtpFlagStretched);

            // 系统菜单
            CommandBarPopup popupSystem = ribbonBar.AddSystemButton();

            popupSystem.IconId = ResourceId.ID_SYSTEM_ICON;
            popupSystem.CommandBar.Controls.Add(XTPControlType.xtpControlButton, ResourceId.ID_CONFIG_SR, "配置(&P)", false, false);
            CommandBarControl controlSystem = popupSystem.CommandBar.Controls.Add(XTPControlType.xtpControlButton, ResourceId.ID_APP_HIDE, "退出(&E)", false, false);

            controlSystem.BeginGroup = true;
            popupSystem.CommandBar.SetIconSize(32, 32);

            // 关于菜单
            CommandBarControl controlAbout = ribbonBar.Controls.Add(XTPControlType.xtpControlButton, ResourceId.ID_APP_ABOUT, "关于(&A)", false, false);

            controlAbout.Flags = XTPControlFlags.xtpFlagRightAlign;

            // 主页
            RibbonTab primarySR = ribbonBar.InsertTab(0, "主页(&H)");

            primarySR.Id = ResourceId.ID_HOME_SR;

            // 初级SR报表 -> 初级SR生成
            RibbonGroup       groupConfig      = primarySR.Groups.AddGroup("配置(&C)", ResourceId.ID_CONFIG_BUILD);
            CommandBarControl controlConfigApp = groupConfig.Add(XTPControlType.xtpControlButton, ResourceId.ID_CONFIG_SR, "配置策略(&O)", false, false);

            // 初级SR报表 -> 初级SR生成
            RibbonGroup       groupPrimaryStockBuild       = primarySR.Groups.AddGroup("SR生成(&F)", ResourceId.ID_SR_BUILD);
            CommandBarControl controlBuildPrimaryReportS   = groupPrimaryStockBuild.Add(XTPControlType.xtpControlButton, ResourceId.ID_BUILD_SR, "生成SR报表(&T)", false, false);
            CommandBarControl controlBuildPrimaryReportSsa = groupPrimaryStockBuild.Add(XTPControlType.xtpControlSplitButtonPopup, ResourceId.ID_NEW_UTMR_DTMS, "创建UTMR-DTMS报表(&T)", false, false);

            controlBuildPrimaryReportSsa.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ResourceId.ID_LOAD_UTMR_DTMS_FILE, "读取UTMR-DTMS报表(&L)", false, false);
            controlBuildPrimaryReportSsa.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ResourceId.ID_LOAD_UTMR_DTMS_CONFIG, "读取UTMR-DTMS策略(&L)", false, false);

            RibbonGroup       groupPrimaryStockReport   = primarySR.Groups.AddGroup("SR报表(&F)", ResourceId.ID_SR_REPORT);
            CommandBarControl controlOpenPrimaryReportS = groupPrimaryStockReport.Add(XTPControlType.xtpControlButton, ResourceId.ID_REPORT_SR, "显示SR静态报表(&S)", false, false);
            CommandBarControl controlOpenPrimaryReportD = groupPrimaryStockReport.Add(XTPControlType.xtpControlButton, ResourceId.ID_REPORT_MSRK, "显示MSRK报表(&M)", false, false);

            // 视图
            RibbonTab tabView = ribbonBar.InsertTab(3, "视图(&V)");

            tabView.Id = ResourceId.ID_TAB_VIEW;

            // 视图 -> 报表
            RibbonGroup       groupShow        = tabView.Groups.AddGroup("报表(&D)", ResourceId.ID_GROUP_SHOW);
            CommandBarControl controlWorkspace = groupShow.Add(XTPControlType.xtpControlCheckBox, ResourceId.ID_SHOW_WORKSPACE, "工作区(&W)", false, false);

            controlWorkspace.Checked = true;
            groupShow.Add(XTPControlType.xtpControlCheckBox, ResourceId.ID_SHOW_STATUS, "状态栏(&S)", false, false);

            // 工具
            RibbonTab tabTools = ribbonBar.InsertTab(4, "工具(&T)");

            tabTools.Id = ResourceId.ID_TAB_TOOLS;

            // 工具 -> 内部工具
            RibbonGroup groupTools = tabTools.Groups.AddGroup("内部工具(&I)", ResourceId.ID_GROUP_TOOLS);

            // Welcome To DemoSoft Team
            ribbonBar.QuickAccessControls.Add(XTPControlType.xtpControlButton, ResourceId.ID_WELCOME, "SR", false, false);
            ribbonBar.QuickAccessControls.Add(XTPControlType.xtpControlButton, ResourceId.ID_TO, "Trading", false, false);
            ribbonBar.QuickAccessControls.Add(XTPControlType.xtpControlButton, ResourceId.ID_DEMO_SOFT, "Wizard", false, false);
            //ribbonBar.QuickAccessControls.Add( XTPControlType.xtpControlButton, ResourceId.ID_TEAM, "Team", false, false );
        }
Пример #4
0
        private void CreateRibbonBar()
        {
            RibbonBar ribbonBar = axCommandBars.AddRibbonBar("DemoSoftTeamRibbon");

            ribbonBar.EnableDocking(XTPToolBarFlags.xtpFlagStretched);

            // 系统菜单
            CommandBarPopup popupSystem = ribbonBar.AddSystemButton();

            popupSystem.IconId = ResourceId.ID_SYSTEM_ICON;
            popupSystem.CommandBar.Controls.Add(XTPControlType.xtpControlButton, ResourceId.ID_FILE_CONFIG_POLICY, "配置策略(&P)", false, false);
            popupSystem.CommandBar.Controls.Add(XTPControlType.xtpControlButton, ResourceId.ID_FILE_CONFIG_TASK, "配置任务(&T)", false, false);
            CommandBarControl controlSystem = popupSystem.CommandBar.Controls.Add(XTPControlType.xtpControlButton, ResourceId.ID_APP_HIDE, "退出(&E)", false, false);

            controlSystem.BeginGroup = true;
            popupSystem.CommandBar.SetIconSize(32, 32);

            // 关于菜单
            CommandBarControl controlAbout = ribbonBar.Controls.Add(XTPControlType.xtpControlButton, ResourceId.ID_APP_ABOUT, "关于(&A)", false, false);

            controlAbout.Flags = XTPControlFlags.xtpFlagRightAlign;

            // 开始
            RibbonTab tabHome = ribbonBar.InsertTab(0, "开始(&H)");

            tabHome.Id = ResourceId.ID_TAB_HOME;

            // 开始 -> 文件
            RibbonGroup     groupFile     = tabHome.Groups.AddGroup("文件(&F)", ResourceId.ID_GROUP_FILE);
            CommandBarPopup controlConfig = (CommandBarPopup)groupFile.Add(XTPControlType.xtpControlSplitButtonPopup, ResourceId.ID_FILE_CONFIG_POLICY, "配置策略(&P)", false, false);

            controlConfig.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ResourceId.ID_FILE_CONFIG_NEW_POLICY, "新建策略(&N)", false, false);

            CommandBarPopup controlConfig1 = (CommandBarPopup)groupFile.Add(XTPControlType.xtpControlSplitButtonPopup, ResourceId.ID_FILE_CONFIG_TASK, "配置任务(&T)", false, false);

            controlConfig1.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ResourceId.ID_FILE_CONFIG_NEW_TASK, "新建任务(&N)", false, false);

            CommandBarPopup controlConfig2 = (CommandBarPopup)groupFile.Add(XTPControlType.xtpControlButtonPopup, ResourceId.ID_FILE_SCAN_TASK, "扫描任务(&T)", false, false);

            controlConfig2.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ResourceId.ID_FILE_SCAN_ALL_TASK, "扫描全部(&N)", false, false);

            //int index = 1;
            //foreach ( var item in U50GlobalSetting.TaskInfos )
            //{
            //    CommandBarControl controlScanTask01 = controlConfig2.CommandBar.Controls.Add( XTPControlType.xtpControlButton, ResourceId.ID_FILE_SCAN_TASK01 + index, string.Format( "{0}(&{1})", item.Name, index ), false, false );
            //    if ( index == 1 )
            //        controlScanTask01.BeginGroup = true;

            //    index++;
            //}


            // 开始 -> 报表
            RibbonGroup     groupReport = tabHome.Groups.AddGroup("报表(&R)", ResourceId.ID_GROUP_FILE);
            CommandBarPopup controlOpen = (CommandBarPopup)groupReport.Add(XTPControlType.xtpControlButtonPopup, ResourceId.ID_FILE_OPEN, "打开报表(&O)", false, false);

            controlOpen.CommandBar.Controls.Add(XTPControlType.xtpControlButton, ResourceId.ID_FILE_OPEN_ALL, "打开全部(&A)", false, false);

            //int index2 = 1;
            //foreach ( var item in U50GlobalSetting.TaskInfos )
            //{
            //    CommandBarControl controlOpenPolicy01 = controlOpen.CommandBar.Controls.Add( XTPControlType.xtpControlButton, ResourceId.ID_FILE_OPEN_POLICY01 + index2, string.Format( "打开<{0}>报表(&{1})", item.Name, index2 ), false, false );
            //    if ( index2 == 1 )
            //        controlOpenPolicy01.BeginGroup = true;

            //    index2++;
            //}

            CommandBarPopup ControlClose = (CommandBarPopup)groupReport.Add(XTPControlType.xtpControlButtonPopup, ResourceId.ID_FILE_CLOSE, "关闭报表(&C)", false, false);

            ControlClose.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ResourceId.ID_FILE_CLOSE_ALL, "关闭全部(&A)", false, false);

            //int index3 = 1;
            //foreach ( var item in U50GlobalSetting.TaskInfos )
            //{
            //    CommandBarControl controlClosePolicy01 = ControlClose.CommandBar.Controls.Add( XTPControlType.xtpControlButton, ResourceId.ID_FILE_CLOSE_POLICY01 + index3, string.Format( "关闭<{0}>报表(&{1})", item.Name, index3 ), false, false );
            //    if ( index3 == 1 )
            //        controlClosePolicy01.BeginGroup = true;

            //    index3++;
            //}

            // 视图
            RibbonTab tabView = ribbonBar.InsertTab(2, "视图(&V)");

            tabView.Id = ResourceId.ID_TAB_VIEW;

            // 视图 -> 显示
            RibbonGroup       groupShow        = tabView.Groups.AddGroup("显示(&D)", ResourceId.ID_GROUP_SHOW);
            CommandBarControl controlWorkspace = groupShow.Add(XTPControlType.xtpControlCheckBox, ResourceId.ID_SHOW_WORKSPACE, "工作区(&W)", false, false);

            controlWorkspace.Checked = true;
            groupShow.Add(XTPControlType.xtpControlCheckBox, ResourceId.ID_SHOW_STATUS, "状态栏(&S)", false, false);

            // 视图 -> 图表
            RibbonGroup groupGraph = tabView.Groups.AddGroup("图表(&D)", ResourceId.ID_GROUP_GRAPH);

            groupGraph.Add(XTPControlType.xtpControlCheckBox, ResourceId.ID_GRAPH_WORKSPACE, "主升浪幅度线(&W)", false, false);
            groupGraph.Add(XTPControlType.xtpControlCheckBox, ResourceId.ID_GRAPH_STATUS, "下跌浪幅度线(&S)", false, false);
            groupGraph.Add(XTPControlType.xtpControlCheckBox, ResourceId.ID_GRAPH_STATUS, "盘整浪幅度线(&S)", false, false);
            groupGraph.Add(XTPControlType.xtpControlCheckBox, ResourceId.ID_GRAPH_STATUS, "整理区幅度线(&S)", false, false);

            // 工具
            RibbonTab tabTools = ribbonBar.InsertTab(3, "工具(&T)");

            tabTools.Id = ResourceId.ID_TAB_TOOLS;

            // 工具 -> 内部工具
            RibbonGroup groupTools = tabTools.Groups.AddGroup("内部工具(&I)", ResourceId.ID_GROUP_TOOLS);

            // Welcome To DemoSoft Team
            ribbonBar.QuickAccessControls.Add(XTPControlType.xtpControlButton, ResourceId.ID_WELCOME, "Welcome", false, false);
            ribbonBar.QuickAccessControls.Add(XTPControlType.xtpControlButton, ResourceId.ID_TO, "To", false, false);
            ribbonBar.QuickAccessControls.Add(XTPControlType.xtpControlButton, ResourceId.ID_DEMO_SOFT, "DemoSoft", false, false);
            ribbonBar.QuickAccessControls.Add(XTPControlType.xtpControlButton, ResourceId.ID_TEAM, "Team", false, false);
        }
Пример #5
0
        private void CreateRibbonBar()
        {
            RibbonBar ribbonBar = axCommandBars.AddRibbonBar("DemoSoft Team Ribbon");

            ribbonBar.EnableDocking(XTPToolBarFlags.xtpFlagStretched);

            // 系统菜单
            CommandBarPopup popupSystem = ribbonBar.AddSystemButton();

            popupSystem.IconId = ResourceId.ID_SYSTEM_ICON;
            popupSystem.CommandBar.Controls.Add(XTPControlType.xtpControlButton, ResourceId.ID_FILE_CONFIG_POLICY, "配置策略(&P)", false, false);
            popupSystem.CommandBar.Controls.Add(XTPControlType.xtpControlButton, ResourceId.ID_FILE_CONFIG_TASK, "配置任务(&T)", false, false);
            CommandBarControl controlSystem = popupSystem.CommandBar.Controls.Add(XTPControlType.xtpControlButton, ResourceId.ID_APP_HIDE, "退出(&E)", false, false);

            controlSystem.BeginGroup = true;
            popupSystem.CommandBar.SetIconSize(32, 32);

            // 关于菜单
            CommandBarControl controlAbout = ribbonBar.Controls.Add(XTPControlType.xtpControlButton, ResourceId.ID_APP_ABOUT, "关于(&A)", false, false);

            controlAbout.Flags = XTPControlFlags.xtpFlagRightAlign;

            // 开始
            RibbonTab tabHome = ribbonBar.InsertTab(0, "开始(&H)");

            tabHome.Id = ResourceId.ID_TAB_HOME;

            // 开始 -> 文件
            RibbonGroup     groupFile     = tabHome.Groups.AddGroup("文件(&F)", ResourceId.ID_GROUP_FILE);
            CommandBarPopup controlConfig = (CommandBarPopup)groupFile.Add(XTPControlType.xtpControlSplitButtonPopup, ResourceId.ID_FILE_CONFIG_POLICY, "配置策略(&P)", false, false);

            controlConfig.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ResourceId.ID_FILE_CONFIG_NEW_POLICY, "新建策略(&N)", false, false);

            CommandBarPopup controlConfig1 = (CommandBarPopup)groupFile.Add(XTPControlType.xtpControlSplitButtonPopup, ResourceId.ID_FILE_CONFIG_TASK, "配置任务(&T)", false, false);

            controlConfig1.CommandBar.Controls.Add(XtremeCommandBars.XTPControlType.xtpControlButton, ResourceId.ID_FILE_CONFIG_NEW_TASK, "新建任务(&N)", false, false);

            //CommandBarPopup controlConfig2 = (CommandBarPopup)groupFile.Add( XTPControlType.xtpControlButtonPopup, ResourceId.ID_FILE_SCAN_TASK, "扫描任务(&T)", false, false );
            //controlConfig2.CommandBar.Controls.Add( XtremeCommandBars.XTPControlType.xtpControlButton, ResourceId.ID_FILE_SCAN_ALL_TASK, "扫描全部(&N)", false, false );

            // 开始 -> 报表
            RibbonGroup groupReport = tabHome.Groups.AddGroup("报表(&R)", ResourceId.ID_GROUP_FILE);

            m_ControlOpen  = (CommandBarPopup)groupReport.Add(XTPControlType.xtpControlButtonPopup, ResourceId.ID_FILE_OPEN, "打开报表(&O)", false, false);
            m_ControlClose = (CommandBarPopup)groupReport.Add(XTPControlType.xtpControlButtonPopup, ResourceId.ID_FILE_CLOSE, "关闭报表(&C)", false, false);

            U50GlobalSetting.LoadingTaskSetting  += new EventHandler(U50GlobalSetting_LoadingTaskSetting);
            U50GlobalSetting.LoadedTaskSetting   += new EventHandler(U50GlobalSetting_LoadedTaskSetting);
            TaskManager.Instance.AddedTaskInfo   += new EventHandler(U50GlobalSetting_LoadedTaskSetting);
            TaskManager.Instance.RemoveTaskInfo  += new EventHandler(U50GlobalSetting_LoadedTaskSetting);
            TaskManager.Instance.RefreshTaskInfo += new EventHandler(U50GlobalSetting_LoadedTaskSetting);
            U50GlobalSetting_LoadedTaskSetting(this, EventArgs.Empty);

            // 视图
            RibbonTab tabView = ribbonBar.InsertTab(2, "视图(&V)");

            tabView.Id = ResourceId.ID_TAB_VIEW;

            // 视图 -> 显示
            RibbonGroup       groupShow        = tabView.Groups.AddGroup("显示(&D)", ResourceId.ID_GROUP_SHOW);
            CommandBarControl controlWorkspace = groupShow.Add(XTPControlType.xtpControlCheckBox, ResourceId.ID_SHOW_WORKSPACE, "工作区(&W)", false, false);

            controlWorkspace.Checked = true;
            groupShow.Add(XTPControlType.xtpControlCheckBox, ResourceId.ID_SHOW_STATUS, "状态栏(&S)", false, false);

            // 视图 -> 图表
            RibbonGroup groupGraph = tabView.Groups.AddGroup("图表(&D)", ResourceId.ID_GROUP_GRAPH);

            groupGraph.Add(XTPControlType.xtpControlCheckBox, ResourceId.ID_GRAPH_WORKSPACE, "主升浪幅度线(&W)", false, false);
            groupGraph.Add(XTPControlType.xtpControlCheckBox, ResourceId.ID_GRAPH_STATUS, "下跌浪幅度线(&S)", false, false);
            groupGraph.Add(XTPControlType.xtpControlCheckBox, ResourceId.ID_GRAPH_STATUS, "盘整浪幅度线(&S)", false, false);
            groupGraph.Add(XTPControlType.xtpControlCheckBox, ResourceId.ID_GRAPH_STATUS, "整理区幅度线(&S)", false, false);

            // 工具
            RibbonTab tabTools = ribbonBar.InsertTab(3, "工具(&T)");

            tabTools.Id = ResourceId.ID_TAB_TOOLS;

            // 工具 -> 内部工具
            RibbonGroup groupTools = tabTools.Groups.AddGroup("内部工具(&I)", ResourceId.ID_GROUP_TOOLS);

            // Welcome To DemoSoft Team
            ribbonBar.QuickAccessControls.Add(XTPControlType.xtpControlButton, ResourceId.ID_WELCOME, "Welcome", false, false);
            ribbonBar.QuickAccessControls.Add(XTPControlType.xtpControlButton, ResourceId.ID_TO, "To", false, false);
            ribbonBar.QuickAccessControls.Add(XTPControlType.xtpControlButton, ResourceId.ID_DEMO_SOFT, "DemoSoft", false, false);
            ribbonBar.QuickAccessControls.Add(XTPControlType.xtpControlButton, ResourceId.ID_TEAM, "Team", false, false);
        }