Пример #1
0
        public void Load()
        {
            string str;

            try
            {
                using (StreamReader sr = new StreamReader("EventDen.json"))
                {
                    str = sr.ReadToEnd();
                }
            }
            catch (Exception)
            {
                // エラー
                return;
            }

            EventDenList tmp = null;

            try
            {
                tmp = JsonConvert.DeserializeObject <EventDenList>(str);
            }
            catch (Exception)
            {
                // エラー
                return;
            }

            if (tmp != null)
            {
                EventList = new Dictionary <string, EventDen>(tmp.EventList);

                IsValid = true;
            }
        }
Пример #2
0
 public RaidData()
 {
     m_EventDenList = new EventDenList();
     m_EventDenList.Load();
 }