示例#1
0
 public void ParseData(string data)
 {
     if (Properties.Length > 0)
     {
         JObject obj = JsonConvert.DeserializeObject <JObject>(data);
         if (obj != null)
         {
             for (int i = 0; i < Properties.Length; i++)
             {
                 Properties[i].InputData = DevilCfg.ReguexTypeValue(Properties[i].TypeName, obj.Value <string>(Properties[i].PropertyName), Properties[i].DefaultValue);
             }
         }
     }
     UpdatePropertiesInfo();
 }
示例#2
0
 public bool ReguexData()
 {
     if (mIsDataDirty)
     {
         mIsDataDirty = false;
         string reg   = DevilCfg.ReguexTypeValue(TypeName, mInputData, DefaultValue);
         bool   dirty = reg != mInputData;
         if (dirty)
         {
             mInputData = reg;
         }
         else
         {
             DefaultValue = reg;
         }
         return(dirty);
     }
     else
     {
         return(false);
     }
 }