public void InitFromData(DataT data) { if (IsAdditionalLoad && SHSavedData.FileExists(Filename)) { Init(data, JsonConvert.DeserializeObject <DataT>(SHSavedData.LoadSaveData(Filename))); } else { Init(data, null); } }
public void Load() { string data = SHSavedData.LoadSaveData(Filename); if (string.IsNullOrEmpty(data) == false) { Init(JsonConvert.DeserializeObject <DataT>(data), null); } else { throw new System.Exception(Filename); } }