public void WizardEvent(WizardEventArgs WizardEventArgs)
 {
     switch (WizardEventArgs.EventType)
     {
     case EventType.Init:
         ImportGherkinFeatureWizard wiz = (ImportGherkinFeatureWizard)WizardEventArgs.Wizard;
         FolderLabel.Content = wiz.Folder;
         break;
     }
 }
 public void WizardEvent(WizardEventArgs WizardEventArgs)
 {
     switch (WizardEventArgs.EventType)
     {
     case EventType.Active:
         ImportGherkinFeatureWizard wiz = (ImportGherkinFeatureWizard)WizardEventArgs.Wizard;
         if (wiz.featureTargetFolder != null)
         {
             TargetFeatureFolderLabel.Content = ((DocumentsFolderTreeItem)wiz.featureTargetFolder).NodePath();
         }
         if (wiz.bizFlowTargetFolder != null)
         {
             TargetBFFolderLabel.Content = ((BusinessFlowsFolderTreeItem)wiz.bizFlowTargetFolder).NodePath();
         }
         break;
     }
 }
 public void WizardEvent(WizardEventArgs WizardEventArgs)
 {
     switch (WizardEventArgs.EventType)
     {
     case EventType.Init:
         ImportGherkinFeatureWizard wiz = (ImportGherkinFeatureWizard)WizardEventArgs.Wizard;
         if (wiz.mContext == ImportGherkinFeatureFilePage.eImportGherkinFileContext.DocumentsFolder)
         {
             FolderLabel.Content = ((DocumentsFolderTreeItem)wiz.featureTargetFolder).NodePath();
         }
         else if (wiz.mContext == ImportGherkinFeatureFilePage.eImportGherkinFileContext.BusinessFlowFolder)
         {
             FolderLabel.Content = ((BusinessFlowsFolderTreeItem)wiz.bizFlowTargetFolder).NodePath();
         }
         break;
     }
 }
Beispiel #4
0
        public void WizardEvent(WizardEventArgs WizardEventArgs)
        {
            switch (WizardEventArgs.EventType)
            {
            case EventType.Init:
                wiz = (ImportGherkinFeatureWizard)WizardEventArgs.Wizard;
                if (mContext == eImportGherkinFileContext.DocumentsFolder)
                {
                    BusinessFlowsFolderTreeItem bfsFolder = new BusinessFlowsFolderTreeItem(WorkSpace.Instance.SolutionRepository.GetRepositoryItemRootFolder <BusinessFlow>(), eBusinessFlowsTreeViewMode.ReadOnly);

                    mTargetFolderSelectionPage = new SingleItemTreeViewSelectionPage(GingerDicser.GetTermResValue(eTermResKey.BusinessFlows), eImageType.BusinessFlow, bfsFolder, SingleItemTreeViewSelectionPage.eItemSelectionType.Folder, true);
                }
                else if (mContext == eImportGherkinFileContext.BusinessFlowFolder)
                {
                    DocumentsFolderTreeItem documentsFolderRoot = new DocumentsFolderTreeItem();
                    documentsFolderRoot.IsGingerDefualtFolder = true;
                    documentsFolderRoot.Path   = Path.Combine(WorkSpace.Instance.SolutionRepository.SolutionFolder, "Documents");
                    documentsFolderRoot.Folder = "Documents";
                    mTargetFolderSelectionPage = new SingleItemTreeViewSelectionPage("Documents", eImageType.File, documentsFolderRoot, SingleItemTreeViewSelectionPage.eItemSelectionType.Folder, true);
                }
                mTargetFolderSelectionPage.xTreeView.xTreeViewTree.ValidationRules.Add(UCTreeView.eUcTreeValidationRules.NoItemSelected);

                mTargetFolderSelectionPage.OnSelect += MTargetFolderSelectionPage_OnSelectItem;

                TargetPath.Content = mTargetFolderSelectionPage;
                break;

            case EventType.LeavingForNextPage:
                if (mContext == eImportGherkinFileContext.BusinessFlowFolder)
                {
                    wiz.featureTargetFolder = (ITreeViewItem)mTargetFolder;
                }
                else
                {
                    wiz.bizFlowTargetFolder = (ITreeViewItem)mTargetFolder;
                }
                break;
            }
        }