예제 #1
0
        public ExampleForm(ExportProvider exportProvider)
        {
            _shaderFragments = exportProvider.GetExport <ShaderFragmentArchive.Archive>().Value;
            _nodeCreator     = exportProvider.GetExport <NodeEditorCore.IShaderFragmentNodeCreator>().Value;
            _modelConversion = exportProvider.GetExport <NodeEditorCore.IModelConversion>().Value;

            InitializeComponent();

            _hyperGraphModel = new HyperGraph.GraphModel();
            _hyperGraphModel.CompatibilityStrategy = _nodeCreator.CreateCompatibilityStrategy();

            _graphAdapter = new HyperGraph.GraphControl();
            _graphAdapter.Attach(graphControl);
            _graphAdapter.HighlightCompatible = true;
            _graphAdapter.LargeGridStep       = 160F;
            _graphAdapter.LargeStepGridColor  = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
            _graphAdapter.ShowLabels          = false;
            _graphAdapter.SmallGridStep       = 20F;
            _graphAdapter.SmallStepGridColor  = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));

            _graphAdapter.Model     = _hyperGraphModel;
            _graphAdapter.Selection = new GraphSelection();
            _graphAdapter.Selection.SelectionChanged += OnFocusChanged;

            graphControl.MouseEnter += OnGraphMouseEnter;
            graphControl.Paint      += graphControl_Paint;

            _tabGroupTextureNode = new RibbonTabGroup(_ribbon, (uint)RibbonMarkupCommands.cmdTabGroupTextureNode);

            _showLabels = new RibbonLib.Controls.RibbonCheckBox(_ribbon, (uint)RibbonMarkupCommands.cmdShowLabels);
            _showLabels.ExecuteEvent += new EventHandler <ExecuteEventArgs>(OnShowLabelsChanged);

            _generateTestScript = new RibbonLib.Controls.RibbonButton(_ribbon, (uint)RibbonMarkupCommands.cmdButtonTestScript);
            _generateTestScript.ExecuteEvent += new EventHandler <ExecuteEventArgs>(OnGenerateTestScript);

            _saveAsButton = new RibbonLib.Controls.RibbonButton(_ribbon, (uint)RibbonMarkupCommands.cmdSaveAs);
            _saveAsButton.ExecuteEvent += new EventHandler <ExecuteEventArgs>(OnSaveAs);

            _loadButton = new RibbonLib.Controls.RibbonButton(_ribbon, (uint)RibbonMarkupCommands.cmdLoad);
            _loadButton.ExecuteEvent += new EventHandler <ExecuteEventArgs>(OnLoad);

            var fragmentTreeModel = exportProvider.GetExport <NodeEditorCore.ShaderFragmentArchiveModel>().Value;

            _fragmentTree.Model                 = new Aga.Controls.Tree.SortedTreeModel(fragmentTreeModel);
            _fragmentTree.ItemDrag             += new ItemDragEventHandler(OnFragmentTreeItemDrag);
            _fragmentTree.NodeMouseDoubleClick += new EventHandler <Aga.Controls.Tree.TreeNodeAdvMouseEventArgs>(OnFragmentTreeItemDoubleClick);

            // _materialParametersGrid.SelectedObject = new DictionaryPropertyGridAdapter(_document.PreviewMaterialState);

            try
            {
                LoadFile("defaultload.sh");
            }
            catch (System.Exception) {}
        }
예제 #2
0
		public ExampleForm(ExportProvider exportProvider)
		{
            _shaderFragments = exportProvider.GetExport<ShaderFragmentArchive.Archive>().Value;
            _nodeCreator = exportProvider.GetExport<NodeEditorCore.IShaderFragmentNodeCreator>().Value;
            _modelConversion = exportProvider.GetExport<NodeEditorCore.IModelConversion>().Value;

			InitializeComponent();

            _hyperGraphModel = new HyperGraph.GraphModel();
            _hyperGraphModel.CompatibilityStrategy = _nodeCreator.CreateCompatibilityStrategy();

            _graphAdapter = new HyperGraph.GraphControl();
            _graphAdapter.Attach(graphControl);
            _graphAdapter.HighlightCompatible = true;
            _graphAdapter.LargeGridStep = 160F;
            _graphAdapter.LargeStepGridColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
            _graphAdapter.ShowLabels = false;
            _graphAdapter.SmallGridStep = 20F;
            _graphAdapter.SmallStepGridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));

            _graphAdapter.Model = _hyperGraphModel;
            _graphAdapter.Selection = new GraphSelection();
            _graphAdapter.Selection.SelectionChanged += OnFocusChanged;

            graphControl.MouseEnter += OnGraphMouseEnter;
            graphControl.Paint += graphControl_Paint;

            _tabGroupTextureNode = new RibbonTabGroup(_ribbon, (uint)RibbonMarkupCommands.cmdTabGroupTextureNode);

            _showLabels = new RibbonLib.Controls.RibbonCheckBox(_ribbon, (uint)RibbonMarkupCommands.cmdShowLabels);
            _showLabels.ExecuteEvent += new EventHandler<ExecuteEventArgs>(OnShowLabelsChanged);

            _generateTestScript = new RibbonLib.Controls.RibbonButton(_ribbon, (uint)RibbonMarkupCommands.cmdButtonTestScript);
            _generateTestScript.ExecuteEvent += new EventHandler<ExecuteEventArgs>(OnGenerateTestScript);

            _saveAsButton = new RibbonLib.Controls.RibbonButton(_ribbon, (uint)RibbonMarkupCommands.cmdSaveAs);
            _saveAsButton.ExecuteEvent += new EventHandler<ExecuteEventArgs>(OnSaveAs);

            _loadButton = new RibbonLib.Controls.RibbonButton(_ribbon, (uint)RibbonMarkupCommands.cmdLoad);
            _loadButton.ExecuteEvent += new EventHandler<ExecuteEventArgs>(OnLoad);

            var fragmentTreeModel = exportProvider.GetExport<NodeEditorCore.ShaderFragmentArchiveModel>().Value;
            _fragmentTree.Model = new Aga.Controls.Tree.SortedTreeModel(fragmentTreeModel);
            _fragmentTree.ItemDrag += new ItemDragEventHandler(OnFragmentTreeItemDrag);
            _fragmentTree.NodeMouseDoubleClick += new EventHandler<Aga.Controls.Tree.TreeNodeAdvMouseEventArgs>(OnFragmentTreeItemDoubleClick);

            // _materialParametersGrid.SelectedObject = new DictionaryPropertyGridAdapter(_document.PreviewMaterialState);

            try
            {
                LoadFile("defaultload.sh");
            }
            catch(System.Exception) {}
		}
예제 #3
0
파일: ExampleForm.cs 프로젝트: taknim/XLE
        public ExampleForm()
        {
            InitializeComponent();

            graphControl.CompatibilityStrategy = new ShaderFragmentNodeCompatibility();
            graphControl.ConnectionAdded      += new EventHandler <AcceptNodeConnectionEventArgs>(OnConnectionAdded);
            graphControl.ConnectionAdding     += new EventHandler <AcceptNodeConnectionEventArgs>(OnConnectionAdding);
            graphControl.ConnectionRemoving   += new EventHandler <AcceptNodeConnectionEventArgs>(OnConnectionRemoved);
            graphControl.NodeAdded            += new EventHandler <AcceptNodeEventArgs>(OnNodeAdded);
            graphControl.NodeRemoved          += new EventHandler <NodeEventArgs>(OnNodeRemoved);
            graphControl.ConnectionRemoving   += new EventHandler <AcceptNodeConnectionEventArgs>(OnConnectionRemoved);
            graphControl.ShowElementMenu      += new EventHandler <AcceptElementLocationEventArgs>(OnShowElementMenu);
            graphControl.FocusChanged         += new EventHandler <ElementEventArgs>(OnFocusChanged);
            graphControl.MouseEnter           += new System.EventHandler(OnGraphMouseEnter);
            graphControl.ConnectorDoubleClick += new EventHandler <HyperGraph.GraphControl.NodeConnectorEventArgs>(OnConnectorDoubleClick);

            _tabGroupTextureNode = new RibbonTabGroup(_ribbon, (uint)RibbonMarkupCommands.cmdTabGroupTextureNode);

            _showLabels = new RibbonLib.Controls.RibbonCheckBox(_ribbon, (uint)RibbonMarkupCommands.cmdShowLabels);
            _showLabels.ExecuteEvent += new EventHandler <ExecuteEventArgs>(OnShowLabelsChanged);

            _generateTestScript = new RibbonLib.Controls.RibbonButton(_ribbon, (uint)RibbonMarkupCommands.cmdButtonTestScript);
            _generateTestScript.ExecuteEvent += new EventHandler <ExecuteEventArgs>(OnGenerateTestScript);

            _saveAsButton = new RibbonLib.Controls.RibbonButton(_ribbon, (uint)RibbonMarkupCommands.cmdSaveAs);
            _saveAsButton.ExecuteEvent += new EventHandler <ExecuteEventArgs>(OnSaveAs);

            _loadButton = new RibbonLib.Controls.RibbonButton(_ribbon, (uint)RibbonMarkupCommands.cmdLoad);
            _loadButton.ExecuteEvent += new EventHandler <ExecuteEventArgs>(OnLoad);

            _fragmentTree.Model                 = new Aga.Controls.Tree.SortedTreeModel(new TreeViewArchiveModel());
            _fragmentTree.ItemDrag             += new ItemDragEventHandler(OnFragmentTreeItemDrag);
            _fragmentTree.NodeMouseDoubleClick += new EventHandler <Aga.Controls.Tree.TreeNodeAdvMouseEventArgs>(OnFragmentTreeItemDoubleClick);

            _materialParametersGrid.SelectedObject = new DictionaryPropertyGridAdapter(_document.PreviewMaterialState);

            try
            {
                System.IO.FileStream fileStream = new System.IO.FileStream("defaultload.sh", System.IO.FileMode.Open);
                try
                {
                    LoadFromShader(fileStream);
                }
                finally
                {
                    fileStream.Close();
                }
            }
            catch (System.Exception) {}
        }
예제 #4
0
파일: ExampleForm.cs 프로젝트: ldh9451/XLE
        public ExampleForm()
        {
            InitializeComponent();

            graphControl.CompatibilityStrategy = new ShaderFragmentNodeCompatibility();
            graphControl.ConnectionAdded	+= new EventHandler<AcceptNodeConnectionEventArgs>(OnConnectionAdded);
            graphControl.ConnectionAdding	+= new EventHandler<AcceptNodeConnectionEventArgs>(OnConnectionAdding);
            graphControl.ConnectionRemoving += new EventHandler<AcceptNodeConnectionEventArgs>(OnConnectionRemoved);
            graphControl.NodeAdded          += new EventHandler<AcceptNodeEventArgs>(OnNodeAdded);
            graphControl.NodeRemoved        += new EventHandler<NodeEventArgs>(OnNodeRemoved);
            graphControl.ConnectionRemoving += new EventHandler<AcceptNodeConnectionEventArgs>(OnConnectionRemoved);
            graphControl.ShowElementMenu	+= new EventHandler<AcceptElementLocationEventArgs>(OnShowElementMenu);
            graphControl.FocusChanged       += new EventHandler<ElementEventArgs>(OnFocusChanged);
            graphControl.MouseEnter         += new System.EventHandler(OnGraphMouseEnter);
            graphControl.ConnectorDoubleClick += new EventHandler<HyperGraph.GraphControl.NodeConnectorEventArgs>(OnConnectorDoubleClick);

            _tabGroupTextureNode = new RibbonTabGroup(_ribbon, (uint)RibbonMarkupCommands.cmdTabGroupTextureNode);

            _showLabels = new RibbonLib.Controls.RibbonCheckBox(_ribbon, (uint)RibbonMarkupCommands.cmdShowLabels);
            _showLabels.ExecuteEvent += new EventHandler<ExecuteEventArgs>(OnShowLabelsChanged);

            _generateTestScript = new RibbonLib.Controls.RibbonButton(_ribbon, (uint)RibbonMarkupCommands.cmdButtonTestScript);
            _generateTestScript.ExecuteEvent += new EventHandler<ExecuteEventArgs>(OnGenerateTestScript);

            _saveAsButton = new RibbonLib.Controls.RibbonButton(_ribbon, (uint)RibbonMarkupCommands.cmdSaveAs);
            _saveAsButton.ExecuteEvent += new EventHandler<ExecuteEventArgs>(OnSaveAs);

            _loadButton = new RibbonLib.Controls.RibbonButton(_ribbon, (uint)RibbonMarkupCommands.cmdLoad);
            _loadButton.ExecuteEvent += new EventHandler<ExecuteEventArgs>(OnLoad);

            _fragmentTree.Model = new Aga.Controls.Tree.SortedTreeModel(new TreeViewArchiveModel());
            _fragmentTree.ItemDrag += new ItemDragEventHandler(OnFragmentTreeItemDrag);
            _fragmentTree.NodeMouseDoubleClick += new EventHandler<Aga.Controls.Tree.TreeNodeAdvMouseEventArgs>(OnFragmentTreeItemDoubleClick);

            _materialParametersGrid.SelectedObject = new DictionaryPropertyGridAdapter(_document.PreviewMaterialState);

            try
            {
                System.IO.FileStream fileStream = new System.IO.FileStream("defaultload.sh", System.IO.FileMode.Open);
                try
                {
                    LoadFromShader(fileStream);
                }
                finally
                {
                    fileStream.Close();
                }
            }
            catch (System.Exception) {}
        }
예제 #5
0
 private void InitializeComponents()
 {
     // Instantiate Controls
     HelpButton = new RibbonHelpButton(ribbon, (uint)RibbonMarkupCommands.HelpButton);
     ApplicationMenu = new RibbonApplicationMenu(ribbon, (uint)RibbonMarkupCommands.ApplicationMenu);
     RecentItems = new RibbonRecentItems(ribbon, (uint)RibbonMarkupCommands.RecentItems);
     ButtonNew = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ButtonNew);
     ButtonOpen = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ButtonOpen);
     ButtonSave = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ButtonSave);
     SaveAs = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SaveAs);
     SaveAll = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SaveAll);
     Export = new RibbonDropDownButton(ribbon, (uint)RibbonMarkupCommands.Export);
     ExportAsPNG = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ExportAsPNG);
     ExportAsJPG = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ExportAsJPG);
     Close = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.Close);
     ButtonExit = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ButtonExit);
     TabHome = new RibbonTab(ribbon, (uint)RibbonMarkupCommands.TabHome);
     NewNode = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.NewNode);
     NewChildNode = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.NewChildNode);
     NewLongNode = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.NewLongNode);
     NewNodeAbove = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.NewNodeAbove);
     NewNodeBelow = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.NewNodeBelow);
     NewNodeParent = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.NewNodeParent);
     GrpEdit = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpEdit);
     EditText = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.EditText);
     EditLong = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.EditLong);
     DeleteNode = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.DeleteNode);
     GrpClipboard = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpClipboard);
     Paste = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.Paste);
     PasteAsText = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.PasteAsText);
     Cut = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.Cut);
     Copy = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.Copy);
     FormatPainter = new RibbonToggleButton(ribbon, (uint)RibbonMarkupCommands.FormatPainter);
     GrpFont = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpFont);
     RichFont = new RibbonFontControl(ribbon, (uint)RibbonMarkupCommands.RichFont);
     GrpFormat = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpFormat);
     BackColor = new RibbonDropDownColorPicker(ribbon, (uint)RibbonMarkupCommands.BackColor);
     ClearFormatting = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ClearFormatting);
     GrpIcons = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpIcons);
     IconsGallery = new RibbonInRibbonGallery(ribbon, (uint)RibbonMarkupCommands.IconsGallery);
     RemoveLastIcon = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.RemoveLastIcon);
     RemoveAllIcons = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.RemoveAllIcons);
     LaunchIconsDialog = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.LaunchIconsDialog);
     TabEdit = new RibbonTab(ribbon, (uint)RibbonMarkupCommands.TabEdit);
     GrpSelect = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpSelect);
     SelectAll = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SelectAll);
     SelectSiblings = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SelectSiblings);
     SelectAncestors = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SelectAncestors);
     SelectChildren = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SelectChildren);
     SelectDescendents = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SelectDescendents);
     SelectDescendentsUpto1 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SelectDescendentsUpto1);
     SelectDescendentsUpto2 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SelectDescendentsUpto2);
     SelectDescendentsUpto3 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SelectDescendentsUpto3);
     SelectDescendentsUpto4 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SelectDescendentsUpto4);
     SelectDescendentsUpto5 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SelectDescendentsUpto5);
     ExpandOnSelect = new RibbonCheckBox(ribbon, (uint)RibbonMarkupCommands.ExpandOnSelect);
     SelectLevel = new RibbonDropDownButton(ribbon, (uint)RibbonMarkupCommands.SelectLevel);
     SelectLevel1 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SelectLevel1);
     SelectLevel2 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SelectLevel2);
     SelectLevel3 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SelectLevel3);
     SelectLevel4 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SelectLevel4);
     SelectLevel5 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SelectLevel5);
     SelectLevelCurrent = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SelectLevelCurrent);
     GrpExpand = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpExpand);
     ExpandAll = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ExpandAll);
     CollapseAll = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.CollapseAll);
     ToggleCurrent = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ToggleCurrent);
     ToggleBranch = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ToggleBranch);
     ExpandMapToCurrentLevel = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ExpandMapToCurrentLevel);
     ExpandMapToLevel1 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ExpandMapToLevel1);
     ExpandMapToLevel2 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ExpandMapToLevel2);
     ExpandMapToLevel3 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ExpandMapToLevel3);
     ExpandMapToLevel4 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ExpandMapToLevel4);
     ExpandMapToLevel5 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ExpandMapToLevel5);
     GrpNavigate = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpNavigate);
     NavigateToCenter = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.NavigateToCenter);
     NavigateToFirstSibling = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.NavigateToFirstSibling);
     NavigateToLastSibling = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.NavigateToLastSibling);
     GrpMove = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpMove);
     MoveUp = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.MoveUp);
     MoveDown = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.MoveDown);
     GrpSort = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpSort);
     SortAlphabetic = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SortAlphabetic);
     SortDueDate = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SortDueDate);
     SortNodeCount = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SortNodeCount);
     SortCreateDate = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SortCreateDate);
     SortModifiedDate = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.SortModifiedDate);
     SortOrder = new RibbonToggleButton(ribbon, (uint)RibbonMarkupCommands.SortOrder);
     GrpUndo = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpUndo);
     Undo = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.Undo);
     Redo = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.Redo);
     TabInsert = new RibbonTab(ribbon, (uint)RibbonMarkupCommands.TabInsert);
     GrpHyperlink = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpHyperlink);
     Hyperlink = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.Hyperlink);
     HyperlinkFile = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.HyperlinkFile);
     HyperlinkFolder = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.HyperlinkFolder);
     RemoveHyperlink = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.RemoveHyperlink);
     GrpNote = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpNote);
     InsertNote = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.InsertNote);
     GrpTask = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpTask);
     AddTask = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.AddTask);
     AddTaskToday = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.AddTaskToday);
     AddTaskTomorrow = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.AddTaskTomorrow);
     AddTaskNextWeek = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.AddTaskNextWeek);
     AddTaskNextMonth = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.AddTaskNextMonth);
     AddTaskNextQuarter = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.AddTaskNextQuarter);
     CompleteTask = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.CompleteTask);
     RemoveTask = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.RemoveTask);
     TabFormat = new RibbonTab(ribbon, (uint)RibbonMarkupCommands.TabFormat);
     GrpNodeFormat = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpNodeFormat);
     NodeShape = new RibbonDropDownGallery(ribbon, (uint)RibbonMarkupCommands.NodeShape);
     ClearShapeFormat = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ClearShapeFormat);
     LineColor = new RibbonDropDownColorPicker(ribbon, (uint)RibbonMarkupCommands.LineColor);
     LinePattern = new RibbonDropDownButton(ribbon, (uint)RibbonMarkupCommands.LinePattern);
     LinePatternSolid = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.LinePatternSolid);
     LinePatternDashed = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.LinePatternDashed);
     LinePatternDotted = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.LinePatternDotted);
     LinePatternMixed = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.LinePatternMixed);
     LineThickness = new RibbonDropDownButton(ribbon, (uint)RibbonMarkupCommands.LineThickness);
     LineThickness1 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.LineThickness1);
     LineThickness2 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.LineThickness2);
     LineThickness4 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.LineThickness4);
     GrpNodeStyle = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpNodeStyle);
     NodeStyleGallery = new RibbonInRibbonGallery(ribbon, (uint)RibbonMarkupCommands.NodeStyleGallery);
     CreateNodeStyle = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.CreateNodeStyle);
     GrpClearFormat = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpClearFormat);
     TabView = new RibbonTab(ribbon, (uint)RibbonMarkupCommands.TabView);
     GrpViewTask = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpViewTask);
     ViewCalendar = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ViewCalendar);
     ViewTaskList = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ViewTaskList);
     GrpViewNote = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpViewNote);
     ViewNote = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ViewNote);
     TabGroupNote = new RibbonTabGroup(ribbon, (uint)RibbonMarkupCommands.TabGroupNote);
     TabNoteEditor = new RibbonTab(ribbon, (uint)RibbonMarkupCommands.TabNoteEditor);
     GrpNoteFont = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpNoteFont);
     GrpNoteClearFormat = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpNoteClearFormat);
     GrpParagraph = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpParagraph);
     Bullets = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.Bullets);
     Numbers = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.Numbers);
     Outdent = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.Outdent);
     Indent = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.Indent);
     AlignLeft = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.AlignLeft);
     AlignCenter = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.AlignCenter);
     AlignRight = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.AlignRight);
     Justify = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.Justify);
     GrpNoteStyles = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpNoteStyles);
     NoteHeading1 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.NoteHeading1);
     NoteHeading2 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.NoteHeading2);
     NoteHeading3 = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.NoteHeading3);
     NoteNormal = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.NoteNormal);
     GrpNoteTable = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpNoteTable);
     NoteInsertTable = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.NoteInsertTable);
     GrpNoteEditHtml = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpNoteEditHtml);
     NoteEditHtml = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.NoteEditHtml);
     TabGroupNoteTable = new RibbonTabGroup(ribbon, (uint)RibbonMarkupCommands.TabGroupNoteTable);
     TabNoteTableLayout = new RibbonTab(ribbon, (uint)RibbonMarkupCommands.TabNoteTableLayout);
     GrpCustomizeTable = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpCustomizeTable);
     ModifyTableProperties = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.ModifyTableProperties);
     GrpTableDelete = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpTableDelete);
     DeleteRow = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.DeleteRow);
     DeleteColumn = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.DeleteColumn);
     DeleteTable = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.DeleteTable);
     GrpTableInsert = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpTableInsert);
     InsertRowAbove = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.InsertRowAbove);
     InsertRowBelow = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.InsertRowBelow);
     InsertColumnLeft = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.InsertColumnLeft);
     InsertColumnRight = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.InsertColumnRight);
     GrpTableMove = new RibbonGroup(ribbon, (uint)RibbonMarkupCommands.GrpTableMove);
     MoveRowUp = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.MoveRowUp);
     MoveRowDown = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.MoveRowDown);
     MoveColumnLeft = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.MoveColumnLeft);
     MoveColumnRight = new RibbonButton(ribbon, (uint)RibbonMarkupCommands.MoveColumnRight);
 }
예제 #6
0
 public RibbonItems(Ribbon ribbon)
 {
     if (ribbon == null)
     {
         throw new ArgumentNullException(nameof(ribbon), "Parameter is null");
     }
     this.Ribbon              = ribbon;
     Application              = new RibbonApplicationMenu(ribbon, Cmd.cmdApplication);
     ButtonOpen               = new RibbonButton(ribbon, Cmd.cmdButtonOpen);
     ButtonSaveGpx            = new RibbonButton(ribbon, Cmd.cmdButtonSaveGpx);
     ButtonAbout              = new RibbonButton(ribbon, Cmd.cmdButtonAbout);
     ButtonExit               = new RibbonButton(ribbon, Cmd.cmdButtonExit);
     ButtonHelp               = new RibbonHelpButton(ribbon, Cmd.cmdButtonHelp);
     QAT                      = new RibbonQuickAccessToolbar(ribbon, Cmd.cmdQAT);
     ButtonSession            = new RibbonButton(ribbon, Cmd.cmdButtonSession);
     ButtonLaps               = new RibbonButton(ribbon, Cmd.cmdButtonLaps);
     ButtonMap                = new RibbonButton(ribbon, Cmd.cmdButtonMap);
     ToggleSettings           = new RibbonToggleButton(ribbon, Cmd.cmdToggleSettings);
     TabGroupSettings         = new RibbonTabGroup(ribbon, Cmd.cmdTabGroupSettings);
     TabSettings              = new RibbonTab(ribbon, Cmd.cmdTabSettings);
     GroupApp                 = new RibbonGroup(ribbon, Cmd.cmdGroupApp);
     CheckCurrentAppSize      = new RibbonCheckBox(ribbon, Cmd.cmdCheckCurrentAppSize);
     GroupMapControl          = new RibbonGroup(ribbon, Cmd.cmdGroupMapControl);
     SpinnerMapWidth          = new RibbonSpinner(ribbon, Cmd.cmdSpinnerMapWidth);
     SpinnerMapHeight         = new RibbonSpinner(ribbon, Cmd.cmdSpinnerMapHeight);
     Hidden1                  = new RibbonButton(ribbon, Cmd.cmdHidden1);
     GroupSettings            = new RibbonGroup(ribbon, Cmd.cmdGroupSettings);
     ButtonSaveSettings       = new RibbonButton(ribbon, Cmd.cmdButtonSaveSettings);
     TabChart                 = new RibbonTab(ribbon, Cmd.CmdTabChart);
     GroupChartSelect         = new RibbonGroup(ribbon, Cmd.cmdGroupChartSelect);
     ComboSelect              = new RibbonComboBox(ribbon, Cmd.cmdComboSelect);
     ToggleSmooth             = new RibbonToggleButton(ribbon, Cmd.cmdToggleSmooth);
     GroupChartSpeed          = new RibbonGroup(ribbon, Cmd.cmdGroupChartSpeed);
     ButtonSpeed              = new RibbonCheckBox(ribbon, Cmd.cmdButtonSpeed);
     ButtonCadence            = new RibbonCheckBox(ribbon, Cmd.cmdButtonCadence);
     GroupChartPower          = new RibbonGroup(ribbon, Cmd.cmdGroupChartPower);
     ButtonPower              = new RibbonCheckBox(ribbon, Cmd.cmdButtonPower);
     ButtonLRBalance          = new RibbonCheckBox(ribbon, Cmd.cmdButtonLRBalance);
     ButtonHeartRate          = new RibbonCheckBox(ribbon, Cmd.cmdButtonHeartRate);
     GroupChartPower1         = new RibbonGroup(ribbon, Cmd.cmdGroupChartPower1);
     ComboPower               = new RibbonComboBox(ribbon, Cmd.cmdComboPower);
     ComboLRBalance           = new RibbonComboBox(ribbon, Cmd.cmdComboLRBalance);
     GroupChartEffectiveness  = new RibbonGroup(ribbon, Cmd.cmdGroupChartEffectiveness);
     ButtonLTorqueEff         = new RibbonCheckBox(ribbon, Cmd.cmdButtonLTorqueEff);
     ButtonRTorqueEff         = new RibbonCheckBox(ribbon, Cmd.cmdButtonRTorqueEff);
     GroupChartEffectiveness1 = new RibbonGroup(ribbon, Cmd.cmdGroupChartEffectiveness1);
     ComboLTorque             = new RibbonComboBox(ribbon, Cmd.cmdComboLTorque);
     ComboRTorque             = new RibbonComboBox(ribbon, Cmd.cmdComboRTorque);
     GroupChartSmoothness     = new RibbonGroup(ribbon, Cmd.cmdGroupChartSmoothness);
     ButtonLSmoothness        = new RibbonCheckBox(ribbon, Cmd.cmdButtonLSmoothness);
     ButtonRSmoothness        = new RibbonCheckBox(ribbon, Cmd.cmdButtonRSmoothness);
     GroupChartSmoothness1    = new RibbonGroup(ribbon, Cmd.cmdGroupChartSmoothness1);
     ComboLSmoothness         = new RibbonComboBox(ribbon, Cmd.cmdComboLSmoothness);
     ComboRSmoothness         = new RibbonComboBox(ribbon, Cmd.cmdComboRSmoothness);
     GroupChartClimbing       = new RibbonGroup(ribbon, Cmd.cmdGroupChartClimbing);
     ButtonAltitude           = new RibbonCheckBox(ribbon, Cmd.cmdButtonAltitude);
     ButtonGrade              = new RibbonCheckBox(ribbon, Cmd.cmdButtonGrade);
     GroupChartExtras         = new RibbonGroup(ribbon, Cmd.cmdGroupChartExtras);
     ButtonTemperature        = new RibbonCheckBox(ribbon, Cmd.cmdButtonTemperature);
     TabView                  = new RibbonTab(ribbon, Cmd.cmdTabView);
     GroupTotals              = new RibbonGroup(ribbon, Cmd.cmdGroupTotals);
     GroupExtras              = new RibbonGroup(ribbon, Cmd.cmdGroupExtras);
     ButtonMyExtras           = new RibbonButton(ribbon, Cmd.cmdButtonMyExtras);
     GroupMaps                = new RibbonGroup(ribbon, Cmd.cmdGroupMaps);
     GroupZones               = new RibbonGroup(ribbon, Cmd.cmdGroupZones);
     ButtonHeartRateZones     = new RibbonButton(ribbon, Cmd.cmdButtonHeartRateZones);
     ButtonPowerZones         = new RibbonButton(ribbon, Cmd.cmdButtonPowerZones);
     GroupIntern              = new RibbonGroup(ribbon, Cmd.cmdGroupIntern);
     ButtonActivity           = new RibbonButton(ribbon, Cmd.cmdButtonActivity);
     ButtonDeveloperDataId    = new RibbonButton(ribbon, Cmd.cmdButtonDeveloperDataId);
     ButtonDeviceInfo         = new RibbonButton(ribbon, Cmd.cmdButtonDeviceInfo);
     ButtonEvent              = new RibbonButton(ribbon, Cmd.cmdButtonEvent);
     ButtonFieldDescription   = new RibbonButton(ribbon, Cmd.cmdButtonFieldDescription);
     ButtonFileId             = new RibbonButton(ribbon, Cmd.cmdButtonFileId);
     ButtonSport              = new RibbonButton(ribbon, Cmd.cmdButtonSport);
     ButtonWorkout            = new RibbonButton(ribbon, Cmd.cmdButtonWorkout);
     ButtonWahooFF00          = new RibbonButton(ribbon, Cmd.cmdButtonWahooFF00);
     ButtonWahooFF01          = new RibbonButton(ribbon, Cmd.cmdButtonWahooFF01);
     Hidden2                  = new RibbonButton(ribbon, Cmd.cmdHidden2);
 }