public DataEditor() { ChampionTags = new Collection <SortTag>(); ItemTags = new Collection <SortTag>(); Config = new Config(); Items = new Items(); Champions = new Champions(); Maps = new Maps(); VisSelected = Visibility.Collapsed; ItemSets = new ItemSets(); SortItemName = ""; SortChampionName = ""; IsChanged = false; }
public void ReadItemSets() { #if DEBUG Log.Info("Read item sets."); #endif if (File.Exists(SavePath)) { ItemSets = JsonConvert.DeserializeObject <ItemSets>(File.ReadAllText(SavePath)); foreach (ItemSet i in ItemSets.Sets) { i.Deserialized(Champions.Data); } } else { #if DEBUG Log.Warning("Not found item sets (" + SavePath + "). Create new item sets."); #endif ItemSets = new ItemSets(); } }