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 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 monthclassList = new List(); 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; } } }