Exemple #1
0
        List <ITreeViewItem> ITreeViewItem.Childrens()
        {
            List <ITreeViewItem> Childrens = new List <ITreeViewItem>();

            //Add Plugins
            ObservableList <PlugInWrapper> PlugIns = new ObservableList <PlugInWrapper>();

            PlugIns = App.LocalRepository.GetSolutionPlugIns(specificFolderPath: Path);

            foreach (PlugInWrapper PIW in PlugIns)
            {
                if (PIW.PlugInType == PlugInWrapper.ePluginType.Embedded)
                {
                    PlugInEmbeddedTreeItem EmbeddedTreeItem = new PlugInEmbeddedTreeItem();
                    EmbeddedTreeItem.PlugInWrapper = PIW;
                    Childrens.Add(EmbeddedTreeItem);
                }
                if (PIW.PlugInType == PlugInWrapper.ePluginType.System)
                {
                    PlugInSystemTreeItem SystemTreeItem = new PlugInSystemTreeItem();
                    SystemTreeItem.PlugInWrapper = PIW;
                    Childrens.Add(SystemTreeItem);
                }
            }
            return(Childrens);
        }
Exemple #2
0
        private void AddNewPlugIn(bool IsEmbeddedPlugin)
        {
            PlugInWrapper PW = Ginger.PlugInsLib.PlugInsIntegration.AddNewPlugIn(IsEmbeddedPlugin, App.UserProfile.Solution.Folder.ToUpper());

            if (PW != null)
            {
                ITreeViewItem PTI;
                if (IsEmbeddedPlugin)
                {
                    PTI = new PlugInEmbeddedTreeItem();
                    ((PlugInEmbeddedTreeItem)PTI).PlugInWrapper = PW;
                }
                else
                {
                    PTI = new PlugInSystemTreeItem();
                    ((PlugInSystemTreeItem)PTI).PlugInWrapper = PW;
                }
                ITreeViewItem addTreeViewItem = mTreeView.Tree.AddChildItemAndSelect(this, PTI);
                App.LocalRepository.AddItemToCache(PW);
                mTreeView.Tree.RefreshHeader(addTreeViewItem);
            }

            App.AutomateTabGingerRunner.PlugInsList = App.LocalRepository.GetSolutionPlugIns();
        }