public Ribbon(RibbonLib.Ribbon ribbon, Controller.MainCtrl mainCtrl, IMainForm mainForm) { this.ribbon = ribbon; this.mainCtrl = mainCtrl; this.mainForm = mainForm; InitializeComponents(); HelpButton.ExecuteEvent += HelpButton_ExecuteEvent; //Application Menu ApplicationMenu.TooltipTitle = "Menu"; ApplicationMenu.TooltipDescription = "Application main menu"; ButtonNew.ExecuteEvent += _buttonNew_ExecuteEvent; ButtonExit.ExecuteEvent += _buttonExit_ExecuteEvent; ButtonOpen.ExecuteEvent += _buttonOpen_ExecuteEvent; ButtonSave.ExecuteEvent += _buttonSave_ExecuteEvent; SaveAs.ExecuteEvent += SaveAs_ExecuteEvent; SaveAll.ExecuteEvent += SaveAll_ExecuteEvent; ExportAsPNG.ExecuteEvent += ExportAsPNG_ExecuteEvent; ExportAsJPG.ExecuteEvent += ExportAsJPG_ExecuteEvent; Close.ExecuteEvent += Close_ExecuteEvent; RecentItems.RecentItems = CreateRecentItemsList(); RecentItems.ExecuteEvent += RecentItems_ExecuteEvent; //Home Tab : New Node group NewChildNode.ExecuteEvent += NewChildNode_ExecuteEvent; NewLongNode.ExecuteEvent += NewLongNode_ExecuteEvent; NewNodeAbove.ExecuteEvent += NewNodeAbove_ExecuteEvent; NewNodeBelow.ExecuteEvent += NewNodeBelow_ExecuteEvent; NewNodeParent.ExecuteEvent += NewParent_ExecuteEvent; //Home Tab: Edit group EditText.ExecuteEvent += _btnEditText_ExecuteEvent; EditLong.ExecuteEvent += _btnEditLong_ExecuteEvent; DeleteNode.ExecuteEvent += _btnDeleteNode_ExecuteEvent; //Home Tab: Cipboard group Paste.ExecuteEvent += _btnPaste_ExecuteEvent; PasteAsText.ExecuteEvent += _btnPasteAsText_ExecuteEvent; Cut.ExecuteEvent += _btnCut_ExecuteEvent; Copy.ExecuteEvent += _btnCopy_ExecuteEvent; FormatPainter.ExecuteEvent += _btnFormatPainter_ExecuteEvent; //Home Tab: Font group RichFont.ExecuteEvent += _RichFont_ExecuteEvent; //Home Tab: Format Group BackColor.ExecuteEvent += BackColor_ExecuteEvent; ClearFormatting.ExecuteEvent += ClearFormatting_ExecuteEvent; //Home Tab: Icons Group IconsGallery.ItemsSourceReady += _iconGallery_ItemsSourceReady; IconsGallery.ExecuteEvent += _iconGallery_ExecuteEvent; LaunchIconsDialog.ExecuteEvent += _launchIconsDialog_ExecuteEvent; RemoveLastIcon.ExecuteEvent += _removeLastIcon_ExecuteEvent; RemoveAllIcons.ExecuteEvent += _removeAllIcons_ExecuteEvent; //Edit Tab: Select Group SelectAll.ExecuteEvent += SelectAll_ExecuteEvent; SelectSiblings.ExecuteEvent += SelectSiblings_ExecuteEvent; SelectAncestors.ExecuteEvent += SelectAncestors_ExecuteEvent; SelectChildren.ExecuteEvent += SelectChildren_ExecuteEvent; SelectDescendents.ExecuteEvent += SelectDescendents_ExecuteEvent; SelectDescendentsUpto1.ExecuteEvent += SelectDescendentsUpto1_ExecuteEvent; SelectDescendentsUpto2.ExecuteEvent += SelectDescendentsUpto2_ExecuteEvent; SelectDescendentsUpto3.ExecuteEvent += SelectDescendentsUpto3_ExecuteEvent; SelectDescendentsUpto4.ExecuteEvent += SelectDescendentsUpto4_ExecuteEvent; SelectDescendentsUpto5.ExecuteEvent += SelectDescendentsUpto5_ExecuteEvent; SelectLevel1.ExecuteEvent += SelectLevel1_ExecuteEvent; SelectLevel2.ExecuteEvent += SelectLevel2_ExecuteEvent; SelectLevel3.ExecuteEvent += SelectLevel3_ExecuteEvent; SelectLevel4.ExecuteEvent += SelectLevel4_ExecuteEvent; SelectLevel5.ExecuteEvent += SelectLevel5_ExecuteEvent; SelectLevelCurrent.ExecuteEvent += SelectLevelCurrent_ExecuteEvent; //Edit Tab: Expand / Collapse Group ExpandAll.ExecuteEvent += ExpandAll_ExecuteEvent; CollapseAll.ExecuteEvent += CollapseAll_ExecuteEvent; ToggleCurrent.ExecuteEvent += ToggleCurrent_ExecuteEvent; ToggleBranch.ExecuteEvent += ToggleBranch_ExecuteEvent; ExpandMapToCurrentLevel.ExecuteEvent += ExpandMapToCurrentLevel_ExecuteEvent; ExpandMapToLevel1.ExecuteEvent += ExpandMapToLevel1_ExecuteEvent; ExpandMapToLevel2.ExecuteEvent += ExpandMapToLevel2_ExecuteEvent; ExpandMapToLevel3.ExecuteEvent += ExpandMapToLevel3_ExecuteEvent; ExpandMapToLevel4.ExecuteEvent += ExpandMapToLevel4_ExecuteEvent; ExpandMapToLevel5.ExecuteEvent += ExpandMapToLevel5_ExecuteEvent; //Edit Tab: Navigate Group NavigateToCenter.ExecuteEvent += NavigateToCenter_ExecuteEvent; NavigateToFirstSibling.ExecuteEvent += NavigateToFirstSibling_ExecuteEvent; NavigateToLastSibling.ExecuteEvent += NavigateToLastSibling_ExecuteEvent; //Edit Tab: Move MoveUp.ExecuteEvent += MoveUp_ExecuteEvent; MoveDown.ExecuteEvent += MoveDown_ExecuteEvent; //Edit Tab: Sort SortAlphabetic.ExecuteEvent += SortAlphabetic_ExecuteEvent; SortDueDate.ExecuteEvent += SortDueDate_ExecuteEvent; SortNodeCount.ExecuteEvent += SortNodeCount_ExecuteEvent; SortModifiedDate.ExecuteEvent += SortModifiedDate_ExecuteEvent; SortCreateDate.ExecuteEvent += SortCreateDate_ExecuteEvent; SortOrder.ExecuteEvent += SortOrder_ExecuteEvent; SortOrder.BooleanValue = true; //Edit Tab: Undo / Redo Undo.ExecuteEvent += Undo_ExecuteEvent; Redo.ExecuteEvent += Redo_ExecuteEvent; //Insert Tab: Hyperlink Hyperlink.ExecuteEvent += Hyperlink_ExecuteEvent; HyperlinkFile.ExecuteEvent += HyperlinkFile_ExecuteEvent; HyperlinkFolder.ExecuteEvent += HyperlinkFolder_ExecuteEvent; RemoveHyperlink.ExecuteEvent += RemoveHyperlink_ExecuteEvent; //Insert Tab: Note InsertNote.ExecuteEvent += InsertNote_ExecuteEvent; //Format Tab: Node Format NodeShape.ItemsSourceReady += NodeShape_ItemsSourceReady; NodeShape.ExecuteEvent += NodeShape_ExecuteEvent; ClearShapeFormat.ExecuteEvent += ClearShapeFormat_ExecuteEvent; LineColor.ExecuteEvent += LineColor_ExecuteEvent; LinePatternSolid.ExecuteEvent += LinePatternSolid_ExecuteEvent; LinePatternDashed.ExecuteEvent += LinePatternDashed_ExecuteEvent; LinePatternDotted.ExecuteEvent += LinePatternDotted_ExecuteEvent; LinePatternMixed.ExecuteEvent += LinePatternMixed_ExecuteEvent; LineThickness1.ExecuteEvent += LineThickness1_ExecuteEvent; LineThickness2.ExecuteEvent += LineThickness2_ExecuteEvent; LineThickness4.ExecuteEvent += LineThickness4_ExecuteEvent; NodeStyleGallery.ItemsSourceReady += NodeStyleGallery_ItemsSourceReady; NodeStyleGallery.ExecuteEvent += NodeStyleGallery_ExecuteEvent; //Format Tab: Node Style CreateNodeStyle.ExecuteEvent += CreateNodeStyle_ExecuteEvent; //View Tab: View Tasks ViewTaskList.ExecuteEvent += ViewTaskList_ExecuteEvent; //View Tab: View Note ViewNote.ExecuteEvent += ViewNote_ExecuteEvent; //Note Editor Tab: Paragraph Bullets.ExecuteEvent += (o, e) => mainForm.NoteEditor.AddBullets(); Numbers.ExecuteEvent += (o, e) => mainForm.NoteEditor.AddNumbering(); Indent.ExecuteEvent += (o, e) => mainForm.NoteEditor.IndentSelection(); Outdent.ExecuteEvent += (o, e) => mainForm.NoteEditor.OutdentSelection(); AlignLeft.ExecuteEvent += (o, e) => mainForm.NoteEditor.AlignSelectionLeft(); AlignRight.ExecuteEvent += (o, e) => mainForm.NoteEditor.AlignSelectionRight(); AlignCenter.ExecuteEvent += (o, e) => mainForm.NoteEditor.AlignSelectionCenter(); Justify.ExecuteEvent += (o, e) => mainForm.NoteEditor.AlignSelectionFull(); //Note Editor Tab: Note Styles NoteHeading1.ExecuteEvent += (o, e) => mainForm.NoteEditor.ApplyHeading1(); NoteHeading2.ExecuteEvent += (o, e) => mainForm.NoteEditor.ApplyHeading2(); NoteHeading3.ExecuteEvent += (o, e) => mainForm.NoteEditor.ApplyHeading3(); NoteNormal.ExecuteEvent += (o, e) => mainForm.NoteEditor.ApplyNormalStyle(); //Note Editor Tab: Table NoteInsertTable.ExecuteEvent += (o, e) => mainCtrl.NoteCrtl.InsertTable(); //Note Editor Tab: Note Edit Html NoteEditHtml.ExecuteEvent += (o, e) => mainCtrl.NoteCrtl.ShowHtmlSourceDialog(); //Note Editor Table Tab ModifyTableProperties.ExecuteEvent += (o, e) => mainCtrl.NoteCrtl.ModifyTable(); DeleteRow.ExecuteEvent += (o, e) => mainCtrl.NoteCrtl.DeleteTableRow(); DeleteColumn.ExecuteEvent += (o, e) => mainCtrl.NoteCrtl.DeleteTableColumn(); DeleteTable.ExecuteEvent += (o, e) => mainCtrl.NoteCrtl.DeleteTable(); InsertRowAbove.ExecuteEvent += (o, e) => mainCtrl.NoteCrtl.InsertTableRowAbove(); InsertRowBelow.ExecuteEvent += (o, e) => mainCtrl.NoteCrtl.InsertTableRowBelow(); InsertColumnLeft.ExecuteEvent += (o, e) => mainCtrl.NoteCrtl.InsertTableColumnLeft(); InsertColumnRight.ExecuteEvent += (o, e) => mainCtrl.NoteCrtl.InsertTableColumnRight(); MoveRowUp.ExecuteEvent += (o, e) => mainCtrl.NoteCrtl.MoveTableRowUp(); MoveRowDown.ExecuteEvent += (o, e) => mainCtrl.NoteCrtl.MoveTableRowDown(); MoveColumnLeft.ExecuteEvent += (o, e) => mainCtrl.NoteCrtl.MoveTableColumnLeft(); MoveColumnRight.ExecuteEvent += (o, e) => mainCtrl.NoteCrtl.MoveTableColumnRight(); //register for change events mainCtrl.PersistenceManager.CurrentTreeChanged += PersistenceManager_CurrentTreeChanged; MindMate.Model.ClipboardManager.StatusChanged += ClipboardManager_StatusChanged; mainForm.EditorTabs.ControlAdded += Tabs_ControlAdded; mainForm.EditorTabs.ControlRemoved += Tabs_ControlRemoved; mainForm.EditorTabs.SelectedIndexChanged += Tabs_SelectedIndexChanged; mainForm.NoteEditor.CursorMoved += NoteEditor_CursorMoved; }
/// <summary> /// RibbonUIApplication ctor /// </summary> /// <param name="ribbon">Ribbon</param> /// <param name="form">Form where ribbon should reside</param> public RibbonUIApplication(Ribbon ribbon, Ribbon ribbonControl) { _ribbon = ribbon; _ribbonControl = ribbonControl; }
/// <summary> /// RibbonUIApplication ctor /// </summary> /// <param name="ribbon">Ribbon</param> /// <param name="ribbonControl">Ribbon</param> public RibbonUIApplication(Ribbon ribbon, Ribbon ribbonControl) { _ribbon = ribbon; _ribbonControl = ribbonControl; }