Beispiel #1
0
        private void ExecuteCommand(MenuCommand menuCommand)
        {
            if (menuCommand == null)
            {
                return;
            }

            var commandID = menuCommand.CommandID;

            if (commandID.Guid == MainCommandSet)
            {
                switch (commandID.ID)
                {
                case CopyReleaseCommandId: ToolsHelper.CopyRelease(package); break;

                //case CopyReleaseCommandId: TextEditorHelper.AddReferencesToPatchFileCommandId(package); break;
                case RunNormalCommandId: ToolsHelper.Run(package, "start"); break;

                case RunReaderCommandId: ToolsHelper.Run(package, "reader"); break;

                case RunRcpCommandId: ToolsHelper.Run(package, "rcp"); break;

                case CopyRunNormalCommandId: ToolsHelper.CopyRun(package, "start"); break;

                case CopyRunReaderCommandId: ToolsHelper.CopyRun(package, "reader"); break;

                case CopyRunRcpCommandId: ToolsHelper.CopyRun(package, "rcp"); break;

                case UpdateAmagDataCommandId: ToolsHelper.UpdateAmagData(package); break;

                case OpenFileMacrosXmlCommandId: FileHelper.OpenNotepad(package, "macros.xml"); break;

                case OpenFileChangesLstCommandId: FileHelper.OpenNotepad(package, "changes.lst"); break;

                case OpenFileMrpChangesLstCommandId: FileHelper.OpenNotepad(package, "changes.lst(MRP)"); break;

                case OpenFileFactsCommandId: FileHelper.OpenNotepad(package, "facts.txt"); break;

                case AboutCommandId: AboutDialog.ShowAboutDialog(); break;

                case GoToIconsCommandId: FileHelper.GoToLocation(package, "icons"); break;

                case UpdateEnumsCommandCommandId: ToolsHelper.ENums(package); break;

                case RunRepositoryNormalCommandId: ToolsHelper.RunRepository(package, "start"); break;

                case RunRepositoryReaderCommandId: ToolsHelper.RunRepository(package, "reader"); break;

                case RunRepositoryRcpCommandId: ToolsHelper.RunRepository(package, "rcp"); break;
                }
            }

            if (commandID.Guid == ContextCommandSet)
            {
                switch (commandID.ID)
                {
                case GuidGenerateCommandId: TextEditorHelper.InsertGuidCPP(package); break;

                case CopySelectionAdressCommandId: TextEditorHelper.CopySelectionAdress(package); break;
                }
            }
        }