Пример #1
0
 public void SetProperty(string originalName, string newName, string currentValue, DataStructures.GameData.Property property)
 {
     _setting      = true;
     OriginalName  = originalName;
     PropertyName  = newName;
     PropertyValue = currentValue;
     Property      = property;
     OnSetProperty();
     _setting = false;
 }
Пример #2
0
        private void AddSmartEditControl(DataStructures.GameData.Property property, string propertyName, string value)
        {
            ClearSmartEditControls();
            var ctrl = _dumbEditControl;

            if (property != null && _smartEditControls.ContainsKey(property.VariableType))
            {
                ctrl = _smartEditControls[property.VariableType];
            }
            var prop = _values.FirstOrDefault(x => x.OriginalKey == propertyName);

            ctrl.EditingEntityData = Objects.Select(x => x.GetEntityData()).Where(x => x != null).ToList();
            ctrl.SetProperty(propertyName, prop == null ? propertyName : prop.NewKey, value, property);
            SmartEditControlPanel.Controls.Add(ctrl);
        }