Esempio n. 1
0
        public override void SetEngineInstanceBaseProperties()
        {
            base.SetEngineInstanceBaseProperties();

            if (!UIManager.Exists("VUINodeTextLabel"))
            {
                DynamicPropertyCollectionType newType = UIManager.CreateNewType("VUINodeTextLabel", DynamicPropertyCollectionType.DynamicPropertyCollectionFlags_e.None);
                UIManager.AddCollectionType(newType);
            }
        }
Esempio n. 2
0
 public EntityPropertyCollection(ISceneObject owner, DynamicPropertyCollectionType collectionType)
     : base(owner, collectionType)
 {
 }
Esempio n. 3
0
 public override DynamicPropertyCollectionType CreateNewType(string uniqueName, DynamicPropertyCollectionType.DynamicPropertyCollectionFlags_e flags)
 {
     return new EntityPropertyCollectionType(uniqueName, flags);
 }
Esempio n. 4
0
        void LoadPropertyTemplateFile(string xmlFilename, DynamicPropertyCollectionType target)
        {
            xmlFilename = EditorManager.Project.MakeAbsolute(xmlFilename);
              IShapeFactory factory = EditorManager.ShapeFactory;
              try
              {
            XmlDocument doc = new XmlDocument();
            XmlTextReader xmlReader = new XmlTextReader(xmlFilename);
            xmlReader.WhitespaceHandling = WhitespaceHandling.None;
            doc.Load(xmlReader);
            xmlReader.Close();

            IEnumerator nodes = doc.DocumentElement.GetEnumerator();
            while (nodes.MoveNext())
            {
              XmlElement node = nodes.Current as XmlElement;
              if (node == null)
            continue;
              if (node.Name != "property")
            continue;
              string propName = node.GetAttribute("name");
              string typeName = node.GetAttribute("type");
              string defaultStr = node.GetAttribute("default");
              string description = node.GetAttribute("description");
              if (string.IsNullOrEmpty(propName) || string.IsNullOrEmpty(typeName))
            continue;
              Type t;
              // some convenience type conversions
              if (string.Compare(typeName, "float", true) == 0) t = typeof(float);
              else if (string.Compare(typeName, "int", true) == 0) t = typeof(int);
              else if (string.Compare(typeName, "string", true) == 0) t = typeof(string);
              else t = SerializationHelper.GetType(typeName);
              if (t==null)
            continue;
              object defaultVal = SerializationHelper.GetObjectFromStringData(t, defaultStr);
              DynamicPropertyType newType = new DynamicPropertyType(propName, t, defaultVal, description, null);
              target.Add(newType);
            }
              }
              catch (Exception ex)
              {
            EditorManager.DumpException(ex);

              }
        }
Esempio n. 5
0
 public UIPropertyCollection(ISceneObject owner, DynamicPropertyCollectionType collectionType)
     : base(owner, collectionType)
 {
 }