Пример #1
0
        private void AddsubFolders(string sDir, List <ITreeViewItem> Childrens)
        {
            try
            {
                foreach (string d in Directory.GetDirectories(Path))
                {
                    SharedActionsFolderTreeItem FolderItem = new SharedActionsFolderTreeItem();
                    string FolderName = System.IO.Path.GetFileName(d);

                    FolderItem.Folder = FolderName;
                    FolderItem.Path   = d;

                    Childrens.Add(FolderItem);
                }
            }
            catch (System.Exception excpt)
            {
                Console.WriteLine(excpt.Message);
            }
        }
Пример #2
0
        List <ITreeViewItem> ITreeViewItem.Childrens()
        {
            List <ITreeViewItem> Childrens = new List <ITreeViewItem>();

            //Add Activities Groups
            SharedActivitiesGroupsFolderTreeItem SAGFTI = new SharedActivitiesGroupsFolderTreeItem();

            SAGFTI.Folder = GingerDicser.GetTermResValue(eTermResKey.ActivitiesGroups);
            SAGFTI.Path   = App.UserProfile.Solution.Folder + @"\SharedRepository\ActivitiesGroups\";
            SAGFTI.IsGingerDefualtFolder = true;
            Childrens.Add(SAGFTI);

            //Add Activities
            SharedActivitiesFolderTreeItem SAFTI = new SharedActivitiesFolderTreeItem();

            SAFTI.Folder = GingerDicser.GetTermResValue(eTermResKey.Activities);
            SAFTI.Path   = App.UserProfile.Solution.Folder + @"\SharedRepository\Activities\";
            SAFTI.IsGingerDefualtFolder = true;
            Childrens.Add(SAFTI);

            // Add Actions
            SharedActionsFolderTreeItem SAcFTI = new SharedActionsFolderTreeItem();

            SAcFTI.Folder = "Actions";
            SAcFTI.Path   = App.UserProfile.Solution.Folder + @"\SharedRepository\Actions\";
            SAcFTI.IsGingerDefualtFolder = true;
            Childrens.Add(SAcFTI);

            //Add Variables
            SharedVariablesFolderTreeItem SVFTI = new SharedVariablesFolderTreeItem();

            SVFTI.Folder = GingerDicser.GetTermResValue(eTermResKey.Variables);
            SVFTI.Path   = App.UserProfile.Solution.Folder + @"\SharedRepository\Variables\";
            SVFTI.IsGingerDefualtFolder = true;
            Childrens.Add(SVFTI);

            return(Childrens);
        }