private void CheckTypeIfNeeded(ORMTypes typeToLookAt) { if ((_definitionObject.ORMTypes & typeToLookAt) == typeToLookAt) { CheckTreeNodeItem(tvModelElements.Nodes, typeToLookAt.ToString()); } }
/// <summary> /// Used when adding a CustomPropertyGroup to the machine. Looks to see if the specified typeToLookFor /// is in the typesValue and if so adds the XML to the types node. /// </summary> /// <param name="typesValue">The existing types already specified.</param> /// <param name="typeToLookFor">The type we're looking for.</param> /// <param name="ORMTypesNode">The types node to add the type to if needed.</param> private void AddORMTypeToGroupIfNeeded(ORMTypes typesValue, ORMTypes typeToLookFor, XmlNode ORMTypesNode) { if ((typesValue & typeToLookFor) == typeToLookFor) { XmlNode newOrmType = _loadedDoc.CreateElement("ORMType", CustomPropertiesDomainModel.XmlNamespace); XmlAttribute nameAttrib = CustomPropertiesManager.LoadedDocument.CreateAttribute("name"); nameAttrib.Value = typeToLookFor.ToString(); ORMTypesNode.AppendChild(newOrmType); newOrmType.Attributes.Append(nameAttrib); } }