Example #1
0
        public override void update()
        {
            CswNbtMetaDataObjectClass ChemicalOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass(CswEnumNbtObjectClass.ChemicalClass);

            foreach (CswNbtMetaDataNodeType ChemicalNT in ChemicalOC.getNodeTypes())
            {
                CswNbtMetaDataNodeTypeProp GHSNTP = ChemicalNT.getNodeTypePropByObjectClassProp(CswNbtObjClassChemical.PropertyName.Jurisdiction);
                if (null != GHSNTP)
                {
                    GHSNTP.updateLayout(CswEnumNbtLayoutType.Preview, true);
                }
            }
            CswNbtMetaDataObjectClass GHSOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass(CswEnumNbtObjectClass.GHSClass);

            foreach (CswNbtMetaDataNodeType GHSNT in GHSOC.getNodeTypes())
            {
                CswNbtMetaDataNodeTypeProp PictosNTP = GHSNT.getNodeTypePropByObjectClassProp(CswNbtObjClassGHS.PropertyName.Pictograms);
                foreach (CswNbtMetaDataNodeTypeProp GHSNTP in GHSNT.getNodeTypeProps())
                {
                    if (null != PictosNTP && GHSNTP.PropId == PictosNTP.PropId)
                    {
                        GHSNTP.updateLayout(CswEnumNbtLayoutType.Preview, true);
                    }
                    else
                    {
                        GHSNTP.removeFromLayout(CswEnumNbtLayoutType.Preview);
                    }
                }
            }
        }
Example #2
0
        public override void update()
        {
            CswNbtMetaDataObjectClass GHSOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass(CswEnumNbtObjectClass.GHSClass);

            foreach (CswNbtMetaDataNodeType GHSNT in GHSOC.getNodeTypes())
            {
                CswNbtMetaDataNodeTypeProp AddClassCodesNTP = GHSNT.getNodeTypePropByObjectClassProp(CswNbtObjClassGHS.PropertyName.AddClassCodes);
                AddClassCodesNTP.updateLayout(CswEnumNbtLayoutType.Add, true, TabGroup: "Classification");
                AddClassCodesNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, GHSNT.getFirstNodeTypeTab().TabId, TabGroup: "Classification");

                CswNbtMetaDataNodeTypeProp AddLabelCodesNTP = GHSNT.getNodeTypePropByObjectClassProp(CswNbtObjClassGHS.PropertyName.AddLabelCodes);
                AddLabelCodesNTP.updateLayout(CswEnumNbtLayoutType.Add, true, TabGroup: "Labeling");
                AddLabelCodesNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, GHSNT.getFirstNodeTypeTab().TabId, TabGroup: "Labeling");
            }
        }
Example #3
0
        public override void update()
        {
            CswNbtMetaDataObjectClass ChemicalOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.ChemicalClass );
            foreach( CswNbtMetaDataNodeType ChemicalNT in ChemicalOC.getNodeTypes() )
            {
                CswNbtMetaDataNodeTypeProp NodetypeProp = ChemicalNT.getNodeTypePropByObjectClassProp( CswNbtObjClassChemical.PropertyName.AddLabelCodes );
                //NodetypeProp.Hidden = true;
                NodetypeProp.removeFromAllLayouts();
            }

            // Add material to name template for ghs nodetypes
            CswNbtMetaDataObjectClass GHSOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.GHSClass );
            foreach( CswNbtMetaDataNodeType GHSNT in GHSOC.getNodeTypes() )
            {
                CswNbtMetaDataNodeTypeProp JurisdictionNTP = GHSNT.getNodeTypePropByObjectClassProp( CswNbtObjClassGHS.PropertyName.Jurisdiction );
                CswNbtMetaDataNodeTypeProp MaterialNTP = GHSNT.getNodeTypePropByObjectClassProp( CswNbtObjClassGHS.PropertyName.Material );
                GHSNT.setNameTemplateText( CswNbtMetaData.MakeTemplateEntry( JurisdictionNTP.PropName ) + " " + CswNbtMetaData.MakeTemplateEntry( MaterialNTP.PropName ) );
            }

        } // update()