123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- using HistoryDLL.Json;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- namespace HistoryDLL
- {
- public class WholeDataBuffer
- {
- public string year = "1";
- public MonthClass monthclassList = new MonthClass();
- public WholeDataBuffer(string Year, string Month, List<string> DataList)
- {
- // TODO: Complete member initialization
- year = Year;
- try
- {
- monthclassList.month = Month;
- monthclassList.titleLan1 = DataList[0];
- monthclassList.titleLan2 = DataList[1];
- monthclassList.Language1 = DataList[2];
- monthclassList.Language2 = DataList[3];
- monthclassList.imagepath = DataList[4];
- }
- catch (Exception)
- {
- MessageBox.Show("Loading xml file Failure.");
- }
- }
- }
- public class XmlData
- {
- public string yearlan1 = "1";
- public string yearlan2 = "1";
- public string yearlan3 = "1";
- public string yearlan4 = "1";
- public List<MonthClass> monthclassList = new List<MonthClass>();
- public XmlData()
- { }
- public XmlData(EventGroup eventGroup)
- {
- yearlan1 = eventGroup.YearLan1;
- yearlan2 = eventGroup.YearLan2;
- yearlan3 = eventGroup.YearLan3;
- yearlan4 = eventGroup.YearLan4;
- for (int index = 0; index < eventGroup.ListDates.Count; index++)
- {
- MonthClass monthclass = new MonthClass(eventGroup.ListDates[index]);
- monthclassList.Add(monthclass);
- }
- }
- }
- public class MonthClass
- {
- public string month = "0";
- public string titleLan1 = "";
- public string titleLan2 = "";
- public string titleLan3 = "";
- public string titleLan4 = "";
- public string Language1 = "";
- public string Language2 = "";
- public string Language3 = "";
- public string Language4 = "";
- public string imagepath = "";
- public MonthClass()
- { }
- public MonthClass(ListDate listDate)
- {
- month = listDate.Month;
- titleLan1 = listDate.TitleLan1;
- titleLan2 = listDate.TitleLan2;
- titleLan3 = listDate.TitleLan3;
- titleLan4 = listDate.TitleLan4;
- Language1 = listDate.Script1;
- Language2 = listDate.Script2;
- Language3 = listDate.Script3;
- Language4 = listDate.Script4;
- imagepath = listDate.ImagePath;
- }
- }
- //儲存被點擊的資料
- public class TouchInfo
- {
- public int TouchIndex;
- public int IndexofEvent;
- public int IndexofPic;
- public TouchInfo(int index, int indexofevent, int indexofpic)
- {
- TouchIndex = index;
- IndexofEvent = indexofevent;
- IndexofPic = indexofpic;
- }
- }
- }
|