private void CheckComponent(ComponentWrapper OwnerComponent, string text, ComponentWrapper component)
        {
            ComponentMessageObject CMO = new ComponentMessageObject();

            CMO.Component = OwnerComponent;

            ComponentsChecked++;
            switch (component.ComponentType)
            {
                #region Library
            case ComponentTypeWrapper.Library:
                if (!CheckComponentGUID(component, text, CMO))
                {
                    return;
                }

                LibraryWrapper LW = PK.Wrapper.FindLibrary(component.Guid);
                if (LW == null)
                {
                    CanTFindComponentsReference(component, text, CMO);
                    return;
                }
                CompareComponentName(component, LW.Name, text, CMO);
                CompareComponentProjectPath(component, LW.ProjectPath, text, CMO);
                break;

                #endregion
                #region Feature
            case ComponentTypeWrapper.Feature:
                if (!CheckComponentGUID(component, text, CMO))
                {
                    return;
                }

                FeatureWrapper FW = PK.Wrapper.FindFeature(component.Guid);
                if (FW == null)
                {
                    CanTFindComponentsReference(component, text, CMO);
                    return;
                }
                CompareComponentName(component, FW.Name, text, CMO);
                CompareComponentProjectPath(component, FW.ProjectPath, text, CMO);
                break;

                #endregion
                #region Assembly
            case ComponentTypeWrapper.MFAssembly:
                if (!CheckComponentGUID(component, text, CMO))
                {
                    return;
                }

                AssemblyWrapper AW = PK.Wrapper.FindAssembly(component.Guid);
                if (AW == null)
                {
                    CanTFindComponentsReference(component, text, CMO);
                    return;
                }
                CompareComponentName(component, AW.Name, text, CMO);
                CompareComponentProjectPath(component, AW.ProjectPath, text, CMO);
                break;

                #endregion
            case ComponentTypeWrapper.MFSolution:
                break;

                #region Processors
            case ComponentTypeWrapper.Processor:
                if (!CheckComponentGUID(component, text, CMO))
                {
                    return;
                }

                ProcessorWrapper PW = PK.Wrapper.FindProcessor(component.Guid);
                if (PW == null)
                {
                    CanTFindComponentsReference(component, text, CMO);
                    return;
                }
                CompareComponentName(component, PW.Name, text, CMO);
                CompareComponentProjectPath(component, PW.ProjectPath, text, CMO);
                break;

                #endregion
            case ComponentTypeWrapper.OperatingSystem:
                break;

            case ComponentTypeWrapper.BuildTool:
                break;

                #region ISA
            case ComponentTypeWrapper.ISA:
                if (!CheckComponentGUID(component, text, CMO))
                {
                    return;
                }

                ISAWrapper IW = PK.Wrapper.FindISA(component.Guid);
                if (IW == null)
                {
                    CanTFindComponentsReference(component, text, CMO);
                    return;
                }
                CompareComponentName(component, IW.Name, text, CMO);
                break;

                #endregion
            case ComponentTypeWrapper.BuildParameter:
                break;

                #region LibraryCategory
            case ComponentTypeWrapper.LibraryCategory:
                if (!CheckComponentGUID(component, text, CMO))
                {
                    return;
                }

                LibraryCategoryWrapper LCW = PK.Wrapper.FindLibraryCategory(component.Guid);
                if (LCW == null)
                {
                    CanTFindComponentsReference(component, text, CMO);
                    return;
                }

                CompareComponentName(component, LCW.Name, text, CMO);

                CompareComponentProjectPath(component, LCW.ProjectPath, text, CMO);
                break;

                #endregion
                #region Unknown
            case ComponentTypeWrapper.Unknown:
                WEMessage UMessage = new WEMessage();
                UMessage.Message       = text + "Component with \"Type\": " + GetStringByComponentType(component.ComponentType);
                UMessage.MessageObject = CMO;
                this.OnWarning(UMessage);
                break;

                #endregion
            default:
                break;
            }
        }
Beispiel #2
0
 public MFISATreeNode(ISAWrapper isa)
     : base(isa.Name, ImageKeysEnum.ISA)
 {
     this.Isa = isa;
     this.Tag = isa;
 }
Beispiel #3
0
 public MFISATreeNode(ISAWrapper isa)
     : base(isa.Name, ImageKeysEnum.ISA)
 {
     this.Isa = isa;
     this.Tag = isa;
 }