예제 #1
0
            public bool MoveDown(PropertyDataListItem item)
            {
                int index = _Properties.IndexOf(item);

                if (index >= 0)
                {
                    var selected = _Properties[index];
                    _Properties.RemoveAt(index);
                    _Properties.Insert(index + 1, selected);
                    RebuildProperties();
                    return(true);
                }
                return(false);
            }
예제 #2
0
 private void LoadProperties()
 {
     _Properties = new List <PropertyDataListItem>();
     if (Data.Properties == null)
     {
         Data.Properties = new PropertyData[0];
     }
     for (int i = 0; i < Data.Properties.Length; i++)
     {
         PropertyDataListItem property = null;
         if (Data.Properties[i].Type == PropertyType.Primitive)
         {
             property = new PrimitivePropertyDataListItem(Editor, (PrimitivePropertyData)Data.Properties[i]);
         }
         else
         {
             property = new ClassPropertyDataListItem(Editor, (ClassPropertyData)Data.Properties[i]);
         }
         _Properties.Add(property);
     }
 }