Exemplo n.º 1
0
 public void AddDecimal(DecimalData typeData)
 {
     m_hidden[typeData.TypeId] = false;
     m_decimals.Add(typeData.TypeId, typeData);
     m_types.Add(typeData.TypeId, new TypeData((name, id, defaultValue, document) => new DecimalParameter(name, id, typeData.TypeId, m_decimals[typeData.TypeId].Definition(), defaultValue), typeData.Name));
     Modified.Execute(typeData.TypeId);
 }
Exemplo n.º 2
0
 public void RenameType(ParameterType guid, string name)
 {
     m_types[guid].Name = name;
     if (IsInteger(guid))
     {
         IntegerData data = m_integers[guid];
         data             = new IntegerData(name, data.TypeId, data.Max, data.Min);
         m_integers[guid] = data;
     }
     else if (IsDecimal(guid))
     {
         DecimalData data = m_decimals[guid];
         data             = new DecimalData(name, data.TypeId, data.Max, data.Min);
         m_decimals[guid] = data;
     }
     else if (IsLocalizedString(guid))
     {
         LocalizedStringData data = m_localizedStrings[guid];
         data = new LocalizedStringData(name, data.TypeId /*, data.File*/);
         m_localizedStrings[guid] = data;
     }
     else if (IsEnum(guid))
     {
         var data = m_enums[guid];
         m_enums[guid] = Tuple.Create(name, data.Item2);
     }
     else if (IsDynamicEnum(guid))
     {
         DynamicEnumerationData data = m_dynamicEnums[guid];
         data = new DynamicEnumerationData(name, data.TypeId);
         m_dynamicEnums[guid] = data;
     }
     else if (IsLocalDynamicEnum(guid))
     {
         LocalDynamicEnumerationData data = m_localDynamicEnums[guid];
         data = new LocalDynamicEnumerationData(name, data.TypeId);
         m_localDynamicEnums[guid] = data;
     }
     Modified.Execute(guid);
 }
Exemplo n.º 3
0
 public void ModifyDecimal(DecimalData typeData)
 {
     m_types[typeData.TypeId]    = new TypeData((name, id, defaultValue, document) => new DecimalParameter(name, id, typeData.TypeId, m_decimals[typeData.TypeId].Definition(), defaultValue), typeData.Name);
     m_decimals[typeData.TypeId] = typeData;
     Modified.Execute(typeData.TypeId);
 }