Esempio n. 1
0
 protected void UpdateTree()
 {
     if (this.OnUpdateTree())
     {
         SetupTree(_treeView, InventoryBrowserModel.GetModel(this.References.GetNodes()), false);
     }
 }
Esempio n. 2
0
        private void ShowDescription(object sender, ComponentWrapper component)
        {
            if (sender == _treeView)
            {
                ReferenceData refData = this.References[component];

                DescriptionTB.Clear();

                if (refData.Wrapper is FeatureWrapper)
                {
                    ShowDescription(refData.Wrapper as FeatureWrapper);
                }

                if (refData.Wrapper is LibraryWrapper)
                {
                    ShowDescription(refData.Wrapper as LibraryWrapper);
                }

                if (refData.Wrapper is LibraryCategoryWrapper)
                {
                    ShowDescription(refData.Wrapper as LibraryCategoryWrapper);
                }

                SetupTree(_dependTreeView, InventoryBrowserModel.GetModel(this.References.GetDependsFrom(component)), true);
                SetupTree(_referencedByTreeView, InventoryBrowserModel.GetModel(this.References.GetRequiredBy(component)), true);
            }
            else
            {
                //_treeView.SetSelectedComponent(component);
            }
        }
Esempio n. 3
0
 private void RecursiveCheckComponent(ComponentWrapper component)
 {
     if (this.References.RecursiveCheckComponent(component))
     {
         _treeView.SetModel(InventoryBrowserModel.GetModel(this.References.GetNodes()), false);
     }
 }
Esempio n. 4
0
 protected override void RefreshControl()
 {
     if (this.Wrapper.StubLibrary != null)
     {
         if (!string.IsNullOrEmpty(this.Wrapper.StubLibrary.Guid))
         {
             SetModel(InventoryBrowserModel.GetModel(this.Wrapper.StubLibrary));
         }
     }
 }
Esempio n. 5
0
 protected override void RefreshControl()
 {
     if (this.Wrapper.ISASpecific != null)
     {
         if (!string.IsNullOrEmpty(this.Wrapper.ISASpecific.Guid))
         {
             SetModel(InventoryBrowserModel.GetModel(this.Wrapper.ISASpecific));
         }
     }
 }
Esempio n. 6
0
        public SolutionProjectsPage(WizardParams Params)
            : base(Params)
        {
            InitializeComponent();

            if (PK.Wrapper.GetProjectTemplates().Count == 0)
            {
                PK.Wrapper.LoadTemplateProjects();
            }

            _treeView.NodeControls.Clear();
            NodeCheckBox checkBox = _treeView.AddCheckBoxControl("Checked");

            checkBox.IsVisibleValueNeeded     += new EventHandler <NodeControlValueEventArgs>(checkBox_IsVisibleValueNeeded);
            checkBox.IsEditEnabledValueNeeded += new EventHandler <NodeControlValueEventArgs>(checkBox_IsVisibleValueNeeded);
            _treeView.AddIconControl("Icon");
            _treeView.AddTextBoxControl("Name");

            List <ComponentWrapper> nativeProjects = new List <ComponentWrapper>();
            List <ComponentWrapper> clrProjects    = new List <ComponentWrapper>();

            foreach (ProjectWrapper project in PK.Wrapper.GetProjectTemplates())
            {
                ComponentWrapper component = ComponentWrapper.GetComponentWrapper(project);
                if (project.IsClrProject)
                {
                    clrProjects.Add(component);
                }
                else
                {
                    nativeProjects.Add(component);
                }
            }

            Collection <RootNode> roots = new Collection <RootNode>();

            roots.Add(new RootNode(null, "Native Projects", nativeProjects.ToArray()));
            roots.Add(new RootNode(null, "CLR Projects", clrProjects.ToArray()));
            _treeView.SetModel(InventoryBrowserModel.GetModel(roots), true);
        }
 protected override void RefreshControl()
 {
     this.SetModel(InventoryBrowserModel.GetModel(this.Wrapper.FeatureAssociations));
 }
Esempio n. 8
0
        void Wrapper_ElementFindedEvent(object sender, PortingKitWrapper.ElementFindedEventArgs e)
        {
            Collection <ComponentNode> nodes = new Collection <ComponentNode>();

            if (e.ComponentDescriptor.Component != null)
            {
                componentList.Add(e.ComponentDescriptor.Component);
            }
            foreach (ComponentWrapper component in componentList)
            {
                nodes.Add(new ComponentNode(component, null));
            }
            _treeView.SetModel(InventoryBrowserModel.GetModel(nodes), false);
            //if (e.ComponentDescriptor.Component != null)
            //{
            //    ListViewItem it = new ListViewItem(GetComponentName(e.ComponentDescriptor));
            //    it.Tag = e.ComponentDescriptor;
            //    switch (e.ComponentDescriptor.Component.ComponentType)
            //    {
            //        case ComponentTypeWrapper.Library:
            //            it.ImageIndex = (int)MFTreeNodeBase.ImageKeysEnum.Library;
            //            break;
            //        case ComponentTypeWrapper.Feature:
            //            it.ImageIndex = (int)MFTreeNodeBase.ImageKeysEnum.Feature;
            //            break;
            //        case ComponentTypeWrapper.MFAssembly:
            //            break;
            //        case ComponentTypeWrapper.MFSolution:
            //            it.ImageIndex = (int)MFTreeNodeBase.ImageKeysEnum.Solution;
            //            break;
            //        case ComponentTypeWrapper.Processor:
            //            it.ImageIndex = (int)MFTreeNodeBase.ImageKeysEnum.Processor;
            //            break;
            //        case ComponentTypeWrapper.OperatingSystem:
            //            break;
            //        case ComponentTypeWrapper.BuildTool:
            //            break;
            //        case ComponentTypeWrapper.ISA:
            //            it.ImageIndex = (int)MFTreeNodeBase.ImageKeysEnum.ISA;
            //            break;
            //        case ComponentTypeWrapper.BuildParameter:
            //            break;
            //        case ComponentTypeWrapper.LibraryCategory:
            //            it.ImageIndex = (int)MFTreeNodeBase.ImageKeysEnum.LibraryCategory;
            //            break;
            //        case ComponentTypeWrapper.Unknown:
            //            break;
            //        default:
            //            break;
            //    }
            //    AddItemInList(it);
            //}
            //else if (e.ComponentDescriptor.File != null)
            //{

            //    ListViewItem it = null;

            //    if (e.ComponentDescriptor.Line == null)
            //        it = new ListViewItem(GetComponentName(e.ComponentDescriptor));
            //    else
            //    {
            //        //it = new ListViewItem(GetComponentName(e.ComponentDescriptor) + ":      " + e.ComponentDescriptor.Line.Text.Trim());
            //        it = new ListViewItem(GetComponentName(e.ComponentDescriptor) + ":      ");
            //        it.SubItems.Add(e.ComponentDescriptor.Line.Text.Trim());
            //    }

            //    it.Tag = e.ComponentDescriptor;
            //    it.ImageIndex = (int)MFSourceFileTreeNode.FileName2ImageKey(e.ComponentDescriptor.File.File);
            //    AddItemInList(it);
            //}
        }
 protected override void RefreshControl()
 {
     SetModel(InventoryBrowserModel.GetModel(this.Wrapper.FeatureDependencies));
 }
Esempio n. 10
0
 protected override void RefreshControl()
 {
     this.SetModel(InventoryBrowserModel.GetModel(this.Wrapper.ComponentDependencies));
 }