示例#1
0
        private void DepsListView_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (DepsListView.SelectedItems.Count != 0)
            {
                if (DepsListView.SelectedItems[0] != null)
                {
                    if (DepsListView.Items[DepsListView.SelectedIndices[0]].SubItems[0].Text == ComponentTypeWrapper.Library.ToString())
                    {
                        LibraryWrapper l = PK.Wrapper.FindLibraryByName(DepsListView.Items[DepsListView.SelectedIndices[0]].SubItems[1].Text);
                        if (l != null)
                        {
                            this.ShowDependencyDescription(ComponentWrapper.GetComponentWrapper(l));
                        }
                    }

                    if (DepsListView.Items[DepsListView.SelectedIndices[0]].SubItems[0].Text == ComponentTypeWrapper.LibraryCategory.ToString())
                    {
                        LibraryCategoryWrapper lc = PK.Wrapper.FindLibraryCategoryByName(DepsListView.Items[DepsListView.SelectedIndices[0]].SubItems[1].Text);
                        if (lc != null)
                        {
                            this.ShowDependencyDescription(ComponentWrapper.GetComponentWrapper(lc));
                        }
                    }
                }
                else
                {
                    DepsInfoRTB.Clear();
                }
            }
            else
            {
                DepsInfoRTB.Clear();
            }
        }
示例#2
0
        public override bool OnApplyChanges()
        {
            DepsInfoRTB.Clear();
            Lib.Dependencies.Clear();
            foreach (ListViewItem item in DepsListView.Items)
            {
                if (item.Text == ComponentTypeWrapper.Library.ToString())
                {
                    LibraryWrapper l = PK.Wrapper.FindLibraryByName(item.SubItems[1].Text);
                    if (l != null)
                    {
                        Lib.Dependencies.Add(ComponentWrapper.GetComponentWrapper(l));
                    }
                }

                if (item.Text == ComponentTypeWrapper.LibraryCategory.ToString())
                {
                    LibraryCategoryWrapper lc = PK.Wrapper.FindLibraryCategoryByName(item.SubItems[1].Text);
                    if (lc != null)
                    {
                        Lib.Dependencies.Add(ComponentWrapper.GetComponentWrapper(lc));
                    }
                }
            }

            return(true);
        }
示例#3
0
        private void ShowDependencyDescription(ComponentWrapper dep)
        {
            DepsInfoRTB.Clear();

            switch (dep.ComponentType)
            {
            case ComponentTypeWrapper.Library:
                LibraryWrapper lib = PK.Wrapper.FindLibrary(dep);
                if (lib != null)
                {
                    DepsInfoRTB.AppendText("Library\r\n");
                    DepsInfoRTB.AppendText("Name              : " + lib.Name.ToString() + "\r\n");
                    DepsInfoRTB.AppendText("Description       : " + lib.Description.ToString() + "\r\n");
                    DepsInfoRTB.AppendText("Documentation     : " + lib.Documentation.ToString() + "\r\n");
                    DepsInfoRTB.AppendText("Groups            : " + lib.Groups.ToString() + "\r\n");
                    DepsInfoRTB.AppendText("Guid              : " + lib.Guid.ToString() + "\r\n");
                    DepsInfoRTB.AppendText("ProjectPath       : " + lib.ProjectPath.ToString() + "\r\n");
                }
                break;

            case ComponentTypeWrapper.LibraryCategory:
                LibraryCategoryWrapper LibCat = PK.Wrapper.FindLibraryCategory(dep.Guid);
                DepsInfoRTB.AppendText("Library Category \r\n");
                DepsInfoRTB.AppendText("Name              : " + LibCat.Name.ToString() + "\r\n");
                DepsInfoRTB.AppendText("Description       : " + LibCat.Description.ToString() + "\r\n");
                DepsInfoRTB.AppendText("Documentation     : " + LibCat.Documentation.ToString() + "\r\n");
                DepsInfoRTB.AppendText("Groups            : " + LibCat.Groups.ToString() + "\r\n");
                DepsInfoRTB.AppendText("Guid              : " + LibCat.Guid.ToString() + "\r\n");
                DepsInfoRTB.AppendText("ProjectPath       : " + LibCat.ProjectPath.ToString() + "\r\n");
                break;

            case ComponentTypeWrapper.Feature:
            case ComponentTypeWrapper.MFAssembly:
            case ComponentTypeWrapper.MFSolution:
            case ComponentTypeWrapper.Processor:
            case ComponentTypeWrapper.OperatingSystem:
            case ComponentTypeWrapper.BuildTool:
            case ComponentTypeWrapper.ISA:
            case ComponentTypeWrapper.BuildParameter:
            case ComponentTypeWrapper.Unknown:
            default:
                DepsInfoRTB.AppendText("ComponentType       : " + dep.ComponentType.ToString() + "\r\n");
                DepsInfoRTB.AppendText("Name                : " + dep.Name + "\r\n");
                DepsInfoRTB.AppendText("Conditional         : " + dep.Conditional + "\r\n");
                DepsInfoRTB.AppendText("ProjectPath         : " + dep.ProjectPath + "\r\n");
                DepsInfoRTB.AppendText("Guid                : " + dep.Guid.ToString() + "\r\n");
                DepsInfoRTB.AppendText("RefCount            : " + dep.RefCount.ToString() + "\r\n");
                DepsInfoRTB.AppendText("RefCountSpecified   : " + dep.RefCountSpecified.ToString() + "\r\n");
                DepsInfoRTB.AppendText("VersionDependency   : " + dep.VersionDependency.ToString() + "\r\n");
                break;
            }
        }
示例#4
0
 private void ShowDescription(ComponentWrapper component)
 {
     DepsInfoRTB.Clear();
     DepsInfoRTB.Text = component.BriefDescription;
 }