private void AddsubFolders(RepositoryFolder <BusinessFlow> mRepositoryFolder, List <ITreeViewItem> Childrens)
 {
     try
     {
         foreach (RepositoryFolder <BusinessFlow> f in mRepositoryFolder.GetSubFolders())
         {
             BusinessFlowsFolderTreeItem BFFTI = new BusinessFlowsFolderTreeItem(f, mViewMode);
             Childrens.Add(BFFTI);
         }
     }
     catch (System.Exception excpt)
     {
         Console.WriteLine(excpt.Message);
     }
 }
        // TODO: remove after we move to RepositoryFolder
        private void AddsubFolders(string sDir, List <ITreeViewItem> Childrens)
        {
            try
            {
                foreach (string d in Directory.GetDirectories(Path))
                {
                    BusinessFlowsFolderTreeItem BFFTI = new BusinessFlowsFolderTreeItem(mViewMode);
                    string FolderName = System.IO.Path.GetFileName(d);

                    BFFTI.Folder = FolderName;
                    BFFTI.Path   = d;

                    Childrens.Add(BFFTI);
                }
            }
            catch (System.Exception excpt)
            {
                Console.WriteLine(excpt.Message);
            }
        }
Example #3
0
        List <ITreeViewItem> ITreeViewItem.Childrens()
        {
            List <ITreeViewItem> Childrens = new List <ITreeViewItem>();

            //Add Business Flows
            BusinessFlowsFolderTreeItem BFTVI;

            if (WorkSpace.Instance.BetaFeatures.BFUseSolutionRepositry)
            {
                BFTVI = new BusinessFlowsFolderTreeItem(WorkSpace.Instance.SolutionRepository.GetRepositoryItemRootFolder <BusinessFlow>());
                // need to get dicser for header?
            }
            else
            {
                BFTVI        = new BusinessFlowsFolderTreeItem();
                BFTVI.Folder = GingerDicser.GetTermResValue(eTermResKey.BusinessFlows);
                BFTVI.Path   = App.UserProfile.Solution.BusinessFlowsMainFolder;
            }

            BFTVI.IsGingerDefualtFolder = true;
            Childrens.Add(BFTVI);

            //if (App.UserProfile.UserTypeHelper.IsSupportAutomate)
            //{

            //    //Add Data Source
            //    DataSourceFolderTreeItem DSFTI = new DataSourceFolderTreeItem();
            //    DSFTI.Folder = "DataSource";
            //    DSFTI.Path = Path.Combine(App.UserProfile.Solution.Folder, @"DataSources\");
            //    DSFTI.IsGingerDefualtFolder = true;
            //    Childrens.Add(DSFTI);
            //}
            //Add Documents
            //DocumentsFolderTreeItem DFTI = new DocumentsFolderTreeItem();
            //DFTI.Folder = "Documents";
            //DFTI.Path = Path.Combine(App.UserProfile.Solution.Folder, @"Documents\");
            //DFTI.IsGingerDefualtFolder = true;
            //Childrens.Add(DFTI);

            //if (App.UserProfile.UserTypeHelper.IsSupportAutomate)
            //{
            //    //Add Plugins
            //    PlugInsFolderTreeItem PIFTI = new PlugInsFolderTreeItem();
            //    PIFTI.Folder = "PlugIns";
            //    PIFTI.Path = Path.Combine(App.UserProfile.Solution.Folder, @"PlugIns\");
            //    PIFTI.IsGingerDefualtFolder = true;
            //    Childrens.Add(PIFTI);
            //}

            //Add Shared Repository
            SharedRepositoryTreeItem SRTI = new SharedRepositoryTreeItem();

            SRTI.IsGingerDefualtFolder = true;
            Childrens.Add(SRTI);
            //TODO: move to Config check
            //if (App.UserProfile.UserTypeHelper.IsSupportReports)
            //{
            //    //Add Reports Repository
            //    ReportsTreeItem RTI = new ReportsTreeItem();
            //    RTI.IsGingerDefualtFolder = true;
            //    Childrens.Add(RTI);
            //}
            if (App.UserProfile.UserTypeHelper.IsSupportAutomate)
            {
                //Add Execution Results
                ExecutionResultsFolderTreeItem ERFTI = new ExecutionResultsFolderTreeItem();
                ERFTI.Folder = "Execution Results";
                ERFTI.Path   = Path.Combine(App.UserProfile.Solution.Folder, @"ExecutionResults\");
                ERFTI.IsGingerDefualtFolder = true;
                Childrens.Add(ERFTI);
            }
            return(Childrens);
        }