Пример #1
0
        void ITreeViewItem.SetTools(ITreeView TV)
        {
            mTreeView    = TV;
            mContextMenu = new ContextMenu();

            if (mShowMode == eActivitiesGroupsItemsShowMode.ReadWrite)
            {
                if (mActivitiesGroupFolder.IsRootFolder)
                {
                    AddFolderNodeBasicManipulationsOptions(mContextMenu, nodeItemTypeName: GingerDicser.GetTermResValue(eTermResKey.ActivitiesGroup), allowAddNew: false, allowRenameFolder: false, allowDeleteFolder: false, allowRefresh: false, allowDeleteAllItems: true);
                }
                else
                {
                    AddFolderNodeBasicManipulationsOptions(mContextMenu, nodeItemTypeName: GingerDicser.GetTermResValue(eTermResKey.ActivitiesGroup), allowAddNew: false, allowRefresh: false);
                }

                MenuItem exportMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Export");
                TreeViewUtils.AddSubMenuItem(exportMenu, "Export All to ALM", ExportAllToALM, null, "@ALM_16x16.png");

                AddSourceControlOptions(mContextMenu, false, false);
            }
            else
            {
                AddFolderNodeBasicManipulationsOptions(mContextMenu, GingerDicser.GetTermResValue(eTermResKey.ActivitiesGroup), false, false, false, false, false, false, false, false, false, false);
            }
        }
Пример #2
0
 public override void AddSourceControlOptions(ContextMenu CM, bool addDetailsOption = true, bool addLocksOption = true)
 {
     if (App.UserProfile.Solution != null && App.UserProfile.Solution.SourceControl != null)
     {
         MenuItem sourceControlMenu = TreeViewUtils.CreateSubMenu(CM, "Source Control");
         if (addDetailsOption)
         {
             TreeViewUtils.AddSubMenuItem(sourceControlMenu, "Get Info", SourceControlGetInfo, null, "@Info_16x16.png");
         }
         TreeViewUtils.AddSubMenuItem(sourceControlMenu, "Check-In Changes", SourceControlCheckIn, null, "@CheckIn2_16x16.png");
         if (App.UserProfile.Solution.SourceControl.IsSupportingGetLatestForIndividualFiles)
         {
             TreeViewUtils.AddSubMenuItem(sourceControlMenu, "Get Latest Version", SourceControlGetLatestVersion, null, "@GetLatest2_16x16.png");
         }
         if (App.UserProfile.Solution.ShowIndicationkForLockedItems && App.UserProfile.Solution.SourceControl.IsSupportingLocks && addLocksOption)
         {
             if (ItemSourceControlStatus == SourceControlFileInfo.eRepositoryItemStatus.LockedByAnotherUser || ItemSourceControlStatus == SourceControlFileInfo.eRepositoryItemStatus.LockedByMe)
             {
                 TreeViewUtils.AddSubMenuItem(sourceControlMenu, "UnLock Item", SourceControlUnlock, null, "@Unlock_16x16.png");
             }
             else
             {
                 TreeViewUtils.AddSubMenuItem(sourceControlMenu, "Lock Item", SourceControlLock, null, "@Lock_16x16.png");
             }
         }
         TreeViewUtils.AddSubMenuItem(sourceControlMenu, "Undo Changes", SourceControlUndoChanges, null, "@Undo_16x16.png");
     }
 }
Пример #3
0
        void ITreeViewItem.SetTools(ITreeView TV)
        {
            mTreeView    = TV;
            mContextMenu = new ContextMenu();

            if (mViewMode == eBusinessFlowsTreeViewMode.ReadWrite)
            {
                if (mBusFlowsFolder.IsRootFolder)
                {
                    AddFolderNodeBasicManipulationsOptions(mContextMenu, nodeItemTypeName: GingerDicser.GetTermResValue(eTermResKey.BusinessFlow), allowRenameFolder: false, allowDeleteFolder: false, allowRefresh: false);
                }
                else
                {
                    AddFolderNodeBasicManipulationsOptions(mContextMenu, nodeItemTypeName: GingerDicser.GetTermResValue(eTermResKey.BusinessFlow), allowRefresh: false);
                }
                AddSourceControlOptions(mContextMenu, false, false);

                MenuItem importMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Import");
                TreeViewUtils.AddSubMenuItem(importMenu, "Import External " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow), ImportExternalBuinessFlow, null, eImageType.ImportFile);
                TreeViewUtils.AddSubMenuItem(importMenu, "Import ALM Test Set", ALMTSImport, null, "@ALM_16x16.png");
                TreeViewUtils.AddSubMenuItem(importMenu, "Import ALM Test Set By ID", ALMTSImportById, null, "@ALM_16x16.png");
                TreeViewUtils.AddSubMenuItem(importMenu, "Import Gherkin Feature File", ImportGherkinFeature, null, "@FeatureFile_16X16.png");
                TreeViewUtils.AddSubMenuItem(importMenu, "Import Selenium Script", ImportSeleniumScript, null, eImageType.ImportFile);
                TreeViewUtils.AddSubMenuItem(importMenu, "Import QTP Script", ImportAQTPScript, null, eImageType.ImportFile);
                TreeViewUtils.AddSubMenuItem(importMenu, "Import ASAP Script", ImportASAPScript, null, eImageType.ImportFile);
                MenuItem exportMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Export");
                TreeViewUtils.AddSubMenuItem(exportMenu, "Export All to ALM", ExportAllToALM, null, "@ALM_16x16.png");
            }
            else
            {
                AddFolderNodeBasicManipulationsOptions(mContextMenu, GingerDicser.GetTermResValue(eTermResKey.BusinessFlow), false, false, false, false, false, false, false, false, false, false);
            }
        }
Пример #4
0
        void ITreeViewItem.SetTools(ITreeView TV)
        {
            mTreeView    = TV;
            mContextMenu = new ContextMenu();
            if (mViewMode == eBusinessFlowsTreeViewMode.ReadWrite)
            {
                if (WorkSpace.Instance.UserProfile.UserTypeHelper.IsSupportAutomate)
                {
                    TreeViewUtils.AddMenuItem(mContextMenu, "Automate", Automate, null, eImageType.Automate);
                }

                AddItemNodeBasicManipulationsOptions(mContextMenu);
                AddSourceControlOptions(mContextMenu);

                MenuItem ExportMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Export");
                TreeViewUtils.AddSubMenuItem(ExportMenu, "Export to ALM", ExportToALM, null, "@ALM_16x16.png");
                TreeViewUtils.AddSubMenuItem(ExportMenu, "Export to CSV", ExportToCSV, null, "@CSV_16x16.png");
                if (WorkSpace.Instance.BetaFeatures.BFExportToJava)
                {
                    TreeViewUtils.AddSubMenuItem(ExportMenu, "Export to Java", ExportToJava, null, "");
                }
            }

            AddGherkinOptions(mContextMenu);
        }
Пример #5
0
        void ITreeViewItem.SetTools(ITreeView TV)
        {
            mTreeView    = TV;
            mContextMenu = new ContextMenu();
            if (mViewMode == eBusinessFlowsTreeViewMode.ReadWrite)
            {
                if (WorkSpace.Instance.UserProfile.UserTypeHelper.IsSupportAutomate)
                {
                    TreeViewUtils.AddMenuItem(mContextMenu, "Automate", Automate, null, eImageType.Automate);
                }

                AddItemNodeBasicManipulationsOptions(mContextMenu);
                MenuItem actConversionMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Conversion", eImageType.Convert);
                TreeViewUtils.AddSubMenuItem(actConversionMenu, "Legacy Actions Conversion", ActionsConversionHandler, null, eImageType.Convert);
                TreeViewUtils.AddSubMenuItem(actConversionMenu, "Clean Inactive Legacy Actions", LegacyActionsRemoveHandler, null, eImageType.Delete);

                AddSourceControlOptions(mContextMenu);

                MenuItem ExportMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Export", eImageType.Export);
                TreeViewUtils.AddSubMenuItem(ExportMenu, "Export to ALM", ExportToALM, null, eImageType.ALM);
                TreeViewUtils.AddSubMenuItem(ExportMenu, "Export to CSV", ExportToCSV, null, eImageType.CSV);
                if (WorkSpace.Instance.BetaFeatures.BFExportToJava)
                {
                    TreeViewUtils.AddSubMenuItem(ExportMenu, "Export to Java", ExportToJava, null, "");
                }
            }

            AddGherkinOptions(mContextMenu);
        }
Пример #6
0
        void ITreeViewItem.SetTools(ITreeView TV)
        {
            mTreeView    = TV;
            mContextMenu = new ContextMenu();

            TreeViewUtils.AddMenuItem(mContextMenu, "Refresh", RefreshItems, null, eImageType.Refresh);
            TV.AddToolbarTool(eImageType.Refresh, "Refresh", RefreshItems);

            TreeViewUtils.AddMenuItem(mContextMenu, "Duplicate", Duplicate, null, "@Duplicate_16x16.png");
            TV.AddToolbarTool("@Duplicate_16x16.png", "Duplicate", new RoutedEventHandler(Duplicate));

            MenuItem importMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Add New Table");

            TreeViewUtils.AddSubMenuItem(importMenu, "Add New Customized Table", AddNewCustomizedTable, null, "@Add_16x16.png");
            TreeViewUtils.AddSubMenuItem(importMenu, "Add New Key Value Table", AddNewKeyValueTable, null, "@Add_16x16.png");

            TreeViewUtils.AddMenuItem(mContextMenu, "Commit All", CommitAll, null, "@Commit_16x16.png");
            TV.AddToolbarTool("@Commit_16x16.png", "Commit All", new RoutedEventHandler(CommitAll));

            TreeViewUtils.AddMenuItem(mContextMenu, "Rename", Rename, null, "@Edit_16x16.png");
            TV.AddToolbarTool("@Edit_16x16.png", "Rename", new RoutedEventHandler(Rename));

            TreeViewUtils.AddMenuItem(mContextMenu, "Delete", Delete, null, "@Trash_16x16.png");
            TV.AddToolbarTool("@Trash_16x16.png", "Delete", new RoutedEventHandler(Delete));

            TreeViewUtils.AddMenuItem(mContextMenu, "Export to Excel", ExportToExcel, null, "@Export_16x16.png");
            TV.AddToolbarTool("@Export_16x16.png", "Export to Excel", new RoutedEventHandler(ExportToExcel));

            TreeViewUtils.AddMenuItem(mContextMenu, "Import from Excel", AddNewTableFromExcel, null, eImageType.ExcelFile);

            AddSourceControlOptions(mContextMenu);
        }
Пример #7
0
        public void AddGherkinOptions(ContextMenu CM)
        {
            MenuItem GherkinMenu = TreeViewUtils.CreateSubMenu(CM, "Gherkin");

            //TOD Change Icon
            TreeViewUtils.AddSubMenuItem(GherkinMenu, "Create Feature file", CreateGherkinFeatureFile, null, "@FeatureFile_16X16.png");
            TreeViewUtils.AddSubMenuItem(GherkinMenu, "Import Feature file", ImportGherkinFeatureFile, null, "@FeatureFile_16X16.png");
        }
Пример #8
0
 public void AddGherkinOptions(ContextMenu CM)
 {
     if (System.IO.Path.GetExtension(FileName) == ".feature" && WorkSpace.Instance.UserProfile.UserTypeHelper.IsSupportAutomate)
     {
         MenuItem GherkinMenu = TreeViewUtils.CreateSubMenu(CM, "Gherkin");
         //TOD Change Icon
         TreeViewUtils.AddSubMenuItem(GherkinMenu, "Automate mapped " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow), GoToGherkinBusinessFlow, null, eImageType.File);
     }
 }
Пример #9
0
 public void AddGherkinOptions(ContextMenu CM)
 {
     if (mBusinessFlow.Source == BusinessFlow.eSource.Gherkin)
     {
         MenuItem GherkinMenu = TreeViewUtils.CreateSubMenu(CM, "Gherkin");
         //TOD Change Icon
         TreeViewUtils.AddSubMenuItem(GherkinMenu, "Open Feature file", GoToGherkinFeatureFile, null, "@FeatureFile_16X16.png");
     }
 }
Пример #10
0
 public void AddGherkinOptions(ContextMenu CM)
 {
     if (System.IO.Path.GetExtension(FileName) == ".feature" && App.UserProfile.UserTypeHelper.IsSupportAutomate)
     {
         MenuItem GherkinMenu = TreeViewUtils.CreateSubMenu(CM, "Gherkin");
         //TOD Change Icon
         TreeViewUtils.AddSubMenuItem(GherkinMenu, "Automate mapped Business Flow", GoToGherkinBusinessFlow, null, eImageType.File);
     }
 }
Пример #11
0
        private void AddImportsAndCreateDocumentsOptions()
        {
            //Creating the Generic menus
            MenuItem ImportDocumentMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Import Document");
            MenuItem CreateDocumentMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Create Document");

            //Creating text and VBS menus
            TreeViewUtils.AddSubMenuItem(ImportDocumentMenu, "Import txt Document", ImportNewDocument, ".txt", "@Import_16x16.png");
            TreeViewUtils.AddSubMenuItem(ImportDocumentMenu, "Import VBS Document", ImportNewDocument, ".vbs", "@Import_16x16.png");
            TreeViewUtils.AddSubMenuItem(CreateDocumentMenu, "Create txt Document", CreateNewDocument, ".txt", "@Add_16x16.png");
            TreeViewUtils.AddSubMenuItem(CreateDocumentMenu, "Create VBS Document", CreateNewDocument, ".vbs", "@Add_16x16.png");

            // AddSolutionPlugInEditorsOptions(ImportDocumentMenu, CreateDocumentMenu);
        }
Пример #12
0
        private void AddImportsAndCreateDocumentsOptions()
        {
            //Creating the Generic menus
            MenuItem ImportDocumentMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Import Document");
            MenuItem CreateDocumentMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Create Document");

            //Creating text and VBS menus
            TreeViewUtils.AddSubMenuItem(ImportDocumentMenu, "Import txt Document", ImportNewDocument, ".txt", eImageType.Download);
            TreeViewUtils.AddSubMenuItem(ImportDocumentMenu, "Import VBS Document", ImportNewDocument, ".vbs", eImageType.Download);
            TreeViewUtils.AddSubMenuItem(ImportDocumentMenu, "Import Feature Document", ImportGherkinFeatureFile, null, eImageType.Download);
            TreeViewUtils.AddSubMenuItem(CreateDocumentMenu, "Create txt Document", CreateNewDocument, ".txt", eImageType.Add);
            TreeViewUtils.AddSubMenuItem(CreateDocumentMenu, "Create VBS Document", CreateNewDocument, ".vbs", eImageType.Add);
            TreeViewUtils.AddSubMenuItem(CreateDocumentMenu, "Create Feature Document", CreateGherkinFeatureFile, null, eImageType.Add);
        }
Пример #13
0
        void ITreeViewItem.SetTools(ITreeView TV)
        {
            mTreeView = TV;
            mContextMenu = new ContextMenu();

            MenuItem addMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Add API Model", eImageType.Add);
            TreeViewUtils.AddSubMenuItem(addMenu, "Import API's", AddAPIModelFromDocument, null, eImageType.Download); 
            TreeViewUtils.AddSubMenuItem(addMenu, "SOAP API Model", AddSoapAPIModel, null, eImageType.APIModel16);
            TreeViewUtils.AddSubMenuItem(addMenu, "REST API Model", AddRESTAPIModel, null, eImageType.APIModel16); 
            if (mAPIModelFolder.IsRootFolder)
                AddFolderNodeBasicManipulationsOptions(mContextMenu, "API Model", allowAddNew:false, allowDeleteFolder:false, allowRenameFolder:false, allowRefresh: false);
            else
                AddFolderNodeBasicManipulationsOptions(mContextMenu, "API Model", allowAddNew: false, allowRefresh: false);

            AddSourceControlOptions(mContextMenu);
        }
        void ITreeViewItem.SetTools(ITreeView TV)
        {
            mTreeView    = TV;
            mContextMenu = new ContextMenu();

            if (mTreeView.Tree.TreeChildFolderOnly == true)
            {
                AddFolderNodeBasicManipulationsOptions(mContextMenu, GingerDicser.GetTermResValue(eTermResKey.BusinessFlow), true, false, false, false, false, false, false, true, false, false, true);
            }
            else if (mViewMode == eBusinessFlowsTreeViewMode.ReadWrite)
            {
                if (mBusFlowsFolder.IsRootFolder)
                {
                    AddFolderNodeBasicManipulationsOptions(mContextMenu, nodeItemTypeName: GingerDicser.GetTermResValue(eTermResKey.BusinessFlow), allowRenameFolder: false, allowDeleteFolder: false, allowRefresh: false, allowDeleteAllItems: true);
                }
                else
                {
                    AddFolderNodeBasicManipulationsOptions(mContextMenu, nodeItemTypeName: GingerDicser.GetTermResValue(eTermResKey.BusinessFlow), allowRefresh: false);
                }

                MenuItem actConversionMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Conversion", eImageType.Convert);
                TreeViewUtils.AddSubMenuItem(actConversionMenu, "Legacy Actions Conversion", ActionsConversionHandler, null, eImageType.Convert);
                TreeViewUtils.AddSubMenuItem(actConversionMenu, "Clean Inactive Legacy Actions", LegacyActionsRemoveHandler, null, eImageType.Delete);

                AddSourceControlOptions(mContextMenu, false, false);

                MenuItem importMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Import");
                TreeViewUtils.AddSubMenuItem(importMenu, "Import External " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow), ImportExternalBuinessFlow, null, eImageType.ImportFile);
                TreeViewUtils.AddSubMenuItem(importMenu, "Import ALM Test Set", ALMTSImport, null, "@ALM_16x16.png");
                TreeViewUtils.AddSubMenuItem(importMenu, "Import ALM Test Set By ID", ALMTSImportById, null, "@ALM_16x16.png");
                TreeViewUtils.AddSubMenuItem(importMenu, "Import Gherkin Feature File", ImportGherkinFeature, null, "@FeatureFile_16X16.png");
                //TreeViewUtils.AddSubMenuItem(importMenu, "Import Selenium Script", ImportSeleniumScript, null, eImageType.ImportFile);
                //TreeViewUtils.AddSubMenuItem(importMenu, "Import QTP Script", ImportAQTPScript, null, eImageType.ImportFile);
                //TreeViewUtils.AddSubMenuItem(importMenu, "Import ASAP Script", ImportASAPScript, null, eImageType.ImportFile);
                MenuItem exportMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Export");
                TreeViewUtils.AddSubMenuItem(exportMenu, "Export All to ALM", ExportAllToALM, null, "@ALM_16x16.png");
            }
            else
            {
                AddFolderNodeBasicManipulationsOptions(mContextMenu, GingerDicser.GetTermResValue(eTermResKey.BusinessFlow), false, false, false, false, false, false, false, false, false, false, true);
            }
        }
        void ITreeViewItem.SetTools(ITreeView TV)
        {
            mTreeView    = TV;
            mContextMenu = new ContextMenu();

            MenuItem addMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Add Page Objects Model (POM)", eImageType.Add);

            TreeViewUtils.AddSubMenuItem(addMenu, "Learn POM from live page", AddPOM, null, eImageType.Screen);
            TreeViewUtils.AddSubMenuItem(addMenu, "Empty POM", AddEmptyPOM, null, eImageType.ApplicationPOMModel);
            if (mPOMModelFolder.IsRootFolder)
            {
                AddFolderNodeBasicManipulationsOptions(mContextMenu, "Page Objects Model", allowAddNew: false, allowDeleteFolder: false, allowRenameFolder: false, allowRefresh: false, allowDeleteAllItems: true);
            }
            else
            {
                AddFolderNodeBasicManipulationsOptions(mContextMenu, "Page Objects Model", allowAddNew: false, allowRefresh: false);
            }

            AddSourceControlOptions(mContextMenu);
        }
Пример #16
0
        void ITreeViewItem.SetTools(ITreeView TV)
        {
            mTreeView    = TV;
            mContextMenu = new ContextMenu();
            if (mShowMode == SharedActivitiesGroupsFolderTreeItem.eActivitiesGroupsItemsShowMode.ReadWrite)
            {
                AddItemNodeBasicManipulationsOptions(mContextMenu);

                TreeViewUtils.AddMenuItem(mContextMenu, "View Repository Item Usage", ShowUsage, null, eImageType.InstanceLink);

                MenuItem exportMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Export");
                TreeViewUtils.AddSubMenuItem(exportMenu, "Export All to ALM", ExportToALM, null, "@ALM_16x16.png");

                AddSourceControlOptions(mContextMenu);
            }
            else
            {
                TreeViewUtils.AddMenuItem(mContextMenu, "View Repository Item Usage", ShowUsage, null, eImageType.InstanceLink);
            }
        }
Пример #17
0
        void ITreeViewItem.SetTools(ITreeView TV)
        {
            mTreeView    = TV;
            mContextMenu = new ContextMenu();

            MenuItem addMenu = TreeViewUtils.CreateSubMenu(mContextMenu, "Add API Model", eImageType.Add);

            TreeViewUtils.AddSubMenuItem(addMenu, "Import API's", AddAPIModelFromDocument, null, eImageType.Download);
            TreeViewUtils.AddSubMenuItem(addMenu, "SOAP API Model", AddSoapAPIModel, null, eImageType.APIModel);
            TreeViewUtils.AddSubMenuItem(addMenu, "REST API Model", AddRESTAPIModel, null, eImageType.APIModel);
            TreeViewUtils.AddSubMenuItem(addMenu, "Convert Webservices Actions", WebServiceActionsConversionHandler, null, eImageType.Convert);
            if (mAPIModelFolder.IsRootFolder)
            {
                AddFolderNodeBasicManipulationsOptions(mContextMenu, "API Model", allowAddNew: false, allowDeleteFolder: false, allowRenameFolder: false, allowRefresh: false, allowDeleteAllItems: true);
            }
            else
            {
                AddFolderNodeBasicManipulationsOptions(mContextMenu, "API Model", allowAddNew: false, allowRefresh: false);
            }

            AddSourceControlOptions(mContextMenu);
        }
Пример #18
0
 public override void AddSourceControlOptions(ContextMenu CM, bool addDetailsOption = true, bool addLocksOption = true)
 {
     if (WorkSpace.Instance.Solution != null && WorkSpace.Instance.Solution.SourceControl != null)
     {
         MenuItem sourceControlMenu = TreeViewUtils.CreateSubMenu(CM, "Source Control");
         if (addDetailsOption)
         {
             TreeViewUtils.AddSubMenuItem(sourceControlMenu, "Get Info", SourceControlGetInfo, null, "@Info_16x16.png");
         }
         TreeViewUtils.AddSubMenuItem(sourceControlMenu, "Check-In Changes", SourceControlCheckIn, null, "@CheckIn2_16x16.png");
         if (WorkSpace.Instance.Solution.SourceControl.IsSupportingGetLatestForIndividualFiles)
         {
             TreeViewUtils.AddSubMenuItem(sourceControlMenu, "Get Latest Version", SourceControlGetLatestVersion, null, "@GetLatest2_16x16.png");
         }
         if (WorkSpace.Instance.Solution.ShowIndicationkForLockedItems && WorkSpace.Instance.Solution.SourceControl.IsSupportingLocks && addLocksOption)
         {
             TreeViewUtils.AddSubMenuItem(sourceControlMenu, "Lock Item", SourceControlLock, null, "@Lock_16x16.png");
             TreeViewUtils.AddSubMenuItem(sourceControlMenu, "UnLock Item", SourceControlUnlock, null, "@Unlock_16x16.png");
         }
         TreeViewUtils.AddSubMenuItem(sourceControlMenu, "Undo Changes", SourceControlUndoChanges, null, "@Undo_16x16.png");
     }
 }
Пример #19
0
        private void AddSolutionPlugInEditorsOptions(MenuItem ImportDocumentMenu, MenuItem CreateDocumentMenu)
        {
            ObservableList <PluginPackage> Plugins = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <PluginPackage>();

            foreach (PluginPackage pluginPackage in Plugins)
            {
                pluginPackage.PluginPackageOperations = new PluginPackageOperations(pluginPackage);
                if (string.IsNullOrEmpty(((PluginPackageOperations)pluginPackage.PluginPackageOperations).PluginPackageInfo.UIDLL))
                {
                    continue;
                }

                foreach (ITextEditor TE in PluginTextEditorHelper.GetTextFileEditors(pluginPackage))
                {
                    foreach (string extension in TE.Extensions)
                    {
                        String DocumentName = extension.Substring(1).ToUpper();
                        TreeViewUtils.AddSubMenuItem(CreateDocumentMenu, "Create " + DocumentName + " Document", CreateNewDocument, extension, "@Add_16x16.png");
                        TreeViewUtils.AddSubMenuItem(ImportDocumentMenu, "Import " + DocumentName + " Document", ImportNewDocument, extension, "@Import_16x16.png");
                    }
                }
            }
        }