コード例 #1
0
 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;
 }
コード例 #2
0
        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();
            }
        }