예제 #1
0
        private void setupOther()
        {
            // Quick Access

            var btConnect = new ButtonTool("btConnect");

            btConnect.SharedProps.Caption = "Connect...";
            btConnect.Tag = "ConnectToBrand";
            btConnect.SharedProps.AppearancesSmall.Appearance.Image = 6;

            _view.tbManager.Tools.Add(btConnect);

            _view.tbManager.Ribbon.QuickAccessToolbar.Tools.Add(btConnect);

            // Footer

            var btExit = new ButtonTool("btExit");

            btExit.SharedProps.Caption = "Exit Novel8r";
            btExit.SharedProps.AppearancesSmall.Appearance.Image = 2;
            btExit.SharedProps.DisplayStyle = ToolDisplayStyle.ImageAndText;
            btExit.ToolClick += RibbonEventHandlers.btExit_ToolClick;

            _view.tbManager.Tools.Add(btExit);

            _view.tbManager.Ribbon.ApplicationMenu.FooterToolbar.Tools.Add(btExit);

            // Left ToolArea

            var btOpenProject = new ButtonTool("btOpenProject");

            btOpenProject.SharedProps.Caption = "Open Project";

            var btImportProject = new ButtonTool("btImportProject");

            btImportProject.SharedProps.Caption = "Import Project";

            var pmtRecent = new PopupMenuTool("pmtRecent");

            pmtRecent.SharedProps.Caption = "Recent Projects";
            pmtRecent.Tag = "Recent";

            _view.tbManager.Tools.Add(btImportProject);
            _view.tbManager.Tools.Add(btOpenProject);
            _view.tbManager.Tools.Add(pmtRecent);

            _view.tbManager.Ribbon.ApplicationMenu.ToolAreaLeft.Tools.Add(btOpenProject);
            _view.tbManager.Ribbon.ApplicationMenu.ToolAreaLeft.Tools.Add(btImportProject);
            _view.tbManager.Ribbon.ApplicationMenu.ToolAreaLeft.Tools.Add(btConnect);

            int recentId = _view.tbManager.Ribbon.ApplicationMenu.ToolAreaLeft.Tools.Add(pmtRecent);

            _view.tbManager.Ribbon.ApplicationMenu.ToolAreaLeft.Tools[recentId].Tag = pmtRecent.Tag;

            // Right ToolArea

            var mdiWindowListTool = new MdiWindowListTool("MDIWindowList");

            _view.tbManager.Tools.Add(mdiWindowListTool);

            _view.tbManager.Ribbon.ApplicationMenu.ToolAreaRight.Tools.Add(mdiWindowListTool);
        }
예제 #2
0
파일: MDISfera.cs 프로젝트: gipasoft/Sfera
        private void initializeRibbon()
        {
            // by default, the ribbon is not visible. to show the ribbon
            // set the Visible property to true.
            ultraToolbarsManager1.Ribbon.Visible = true;

            // the ApplicationMenuButtonImage is used to specify the image
            // that will be displayed within the rounded application menu button
            // located at the upper left corner of the ribbon
            ultraToolbarsManager1.Ribbon.ApplicationMenuButtonImage = CondominioResources.sferanew_trasparente;

            var mdiWindowListTool = new MdiWindowListTool("WindowList")
            {
                DisplayArrangeIconsCommand = MdiWindowListCommandDisplayStyle.DisplayOnMenuAndDialog,
                DisplayCascadeCommand = MdiWindowListCommandDisplayStyle.DisplayOnMenuAndDialog,
                DisplayCloseWindowsCommand = MdiWindowListCommandDisplayStyle.DisplayOnMenuAndDialog,
                DisplayMinimizeCommand = MdiWindowListCommandDisplayStyle.DisplayOnMenuAndDialog,
                DisplayTileHorizontalCommand = MdiWindowListCommandDisplayStyle.DisplayOnDialog,
                DisplayTileVerticalCommand = MdiWindowListCommandDisplayStyle.DisplayOnMenuAndDialog
            };
            // Specify which window list commands to show.

            loadPlugins();

            // =====================================
            //  PopMenu - Layout
            // =====================================
            var salvaLayoutButton = createButtonTool("salvaLayoutTool", "Salva Layout", CondominioResources.export_large, CondominioResources.export_large);
            salvaLayoutButton.SharedProps.DescriptionOnMenu = @"Permette il salvataggio del layout delle liste in un file zippato a scelta dell'utente";
            salvaLayoutButton.ToolClick += salvaLayoutToolClick;

            var ripristinaLayoutButton = createButtonTool("ripristinaLayoutTool", "Ripristina Layout", CondominioResources.import_large, CondominioResources.import_large);
            ripristinaLayoutButton.SharedProps.DescriptionOnMenu = @"Permette il ripristino del layout delle liste da un file zip creato tramite la funzione di salvataggio del layout.";
            ripristinaLayoutButton.ToolClick += ripristinaLayoutToolClick;

            var resetLayoutButton = createButtonTool("resetLayoutTool", "Reset Layout", CondominioResources.reset_large, CondominioResources.reset_large);
            resetLayoutButton.SharedProps.DescriptionOnMenu = @"Permette di ripristinare il layout di default delle liste eliminando tutte le personalizzazioni.";
            resetLayoutButton.ToolClick += resetLayoutToolClick;

            var layoutPopup = new PopupMenuTool("layoutPopUpMenuTool");
            layoutPopup.SharedProps.Caption = @"Layout";
            layoutPopup.SharedProps.Priority = 90;
            layoutPopup.SharedProps.MergeOrder = 90;
            layoutPopup.InstanceProps.IsFirstInGroup = true;
            layoutPopup.SharedProps.AppearancesLarge.Appearance.Image = CondominioResources.column;
            layoutPopup.SharedProps.AppearancesSmall.Appearance.Image = CondominioResources.column;
            ultraToolbarsManager1.Tools.Add(layoutPopup);
            layoutPopup.Tools.AddToolRange(new[] { "salvaLayoutTool", "ripristinaLayoutTool", "resetLayoutTool" });
            ultraToolbarsManager1.Ribbon.ApplicationMenu.ToolAreaLeft.Tools.AddTool("layoutPopUpMenuTool");
            ultraToolbarsManager1.Ribbon.ApplicationMenu.ToolAreaLeft.Settings.UseLargeImages = DefaultableBoolean.True;


            // =====================================
            //  PopMenu - Guida
            // =====================================
            var relaeaseButton = createButtonTool("releasenoteTool", "Aggiornamenti", CondominioResources.release_small, CondominioResources.releaseNotes);
            relaeaseButton.SharedProps.DescriptionOnMenu = @"Visualizza quali aggiornamenti comprendono le ultime versioni di sfera rilasciate";
            ultraToolbarsManager1.Ribbon.TabItemToolbar.Tools.AddTool("releasenoteTool");
            relaeaseButton.ToolClick +=relaeaseButtonToolClick;

            var helpButton = createButtonTool("helpTool", "Guida", CondominioResources.help, CondominioResources.help);
            helpButton.SharedProps.DescriptionOnMenu = @"Visualizza la guida di sfera, la guida è navigabile e stampabile.";
            ultraToolbarsManager1.Ribbon.TabItemToolbar.Tools.AddTool("helpTool");
            helpButton.ToolClick += helpButtonToolClick;

            var popupHelp = new PopupMenuTool("popUpMenuTool");
            popupHelp.SharedProps.Caption = @"Guida";
            popupHelp.SharedProps.Priority = 90;
            popupHelp.SharedProps.MergeOrder = 90;
            popupHelp.InstanceProps.IsFirstInGroup = true;
            popupHelp.SharedProps.AppearancesLarge.Appearance.Image = CondominioResources.help;
            popupHelp.SharedProps.AppearancesSmall.Appearance.Image = CondominioResources.help;
            ultraToolbarsManager1.Tools.Add(popupHelp);
            popupHelp.Tools.AddToolRange(new[] { "helpTool", "releasenoteTool" });
            ultraToolbarsManager1.Ribbon.ApplicationMenu.ToolAreaLeft.Tools.AddTool("popUpMenuTool");
            ultraToolbarsManager1.Ribbon.ApplicationMenu.ToolAreaLeft.Settings.UseLargeImages = DefaultableBoolean.True;

            ultraToolbarsManager1.Tools.Add(mdiWindowListTool);
            ultraToolbarsManager1.Ribbon.ApplicationMenu.ToolAreaRight.Tools.AddTool("WindowList");
        }