private List <RemodelItemList> MakeUpgradeList(IEnumerable <XElement> List)
        {
            var tempList = List;
            List <RemodelItemList> ItemList = new List <RemodelItemList>();

            foreach (var item in tempList)
            {
                //초기화
                RemodelItemList ItemContent = new RemodelItemList
                {
                    ItemName = item.Element("SlotItemName").Value
                };
                //우선 장비명을 번역
                ItemContent.ItemName = KanColleClient.Current.Translations.GetTranslation(ItemContent.ItemName, TranslationType.Equipment, false);
                //슬롯 아이템 Master목록에서 해당되는 아이콘을 찾아 삽입
                foreach (var slotitem in KanColleClient.Current.Master.SlotItems)
                {
                    if (slotitem.Value.Name == ItemContent.ItemName)
                    {
                        ItemContent.IconType = slotitem.Value.IconType;
                    }
                }


                ItemContent.Ships = new List <ShipInfo>(TrimShipList(MakeShipList(item, true)));

                if (ItemContent.Ships.Count > 0)
                {
                    ItemList.Add(ItemContent);
                }
            }
            return(ItemList);
        }
        private List <RemodelItemList> MakeUseItemList(IEnumerable <XElement> List)
        {
            var tempList = List;

            List <RemodelItemList> ItemList = new List <RemodelItemList>();

            foreach (var item in tempList)
            {
                //초기화
                RemodelItemList ItemContent = new RemodelItemList
                {
                    ItemName = item.Element("SlotItemName").Value
                };
                //우선 장비명을 번역
                ItemContent.ItemName = KanColleClient.Current.Translations.GetTranslation(ItemContent.ItemName, TranslationType.Equipment, false);
                //슬롯 아이템 Master목록에서 해당되는 아이콘을 찾아 삽입
                foreach (var slotitem in KanColleClient.Current.Master.SlotItems)
                {
                    if (slotitem.Value.Name == ItemContent.ItemName)
                    {
                        ItemContent.IconType = slotitem.Value.IconType;
                    }
                }
                //개수시 필요한 아이템 개수 목록을 작성
                StringBuilder equipCombine = new StringBuilder();
                if (item.Element("StartEquip") != null)
                {
                    equipCombine.Append(item.Element("StartEquip").Value);
                }
                if (item.Element("MidEquip") != null)
                {
                    equipCombine.Append("/");
                    equipCombine.Append(item.Element("MidEquip").Value);
                }
                if (item.Element("LastEquip") != null)
                {
                    equipCombine.Append("/");
                    equipCombine.Append(item.Element("LastEquip").Value);
                }
                if (equipCombine.ToString().Count() > 0)
                {
                    ItemContent.UseEquip = equipCombine.ToString();
                }

                ItemList.Add(ItemContent);
            }
            return(ItemList);
        }
        private List <RemodelItemList> MakeDefaultList(IEnumerable <XElement> List, int Position)
        {
            var PosElement = "Position";

            List <RemodelItemList> ItemList = new List <RemodelItemList>();


            //리스트를 Position에 따라 필터링
            var tempList = List.Where(f => f.Element(PosElement).Value.Equals(Position.ToString())).ToList();

            //XML리스트를 List<RemodelItemList>의 형태로 재작성
            foreach (var item in tempList)
            {
                //초기화
                RemodelItemList ItemContent = new RemodelItemList
                {
                    ItemName = item.Element("SlotItemName").Value
                };
                //우선 장비명을 번역
                ItemContent.ItemName = KanColleClient.Current.Translations.GetTranslation(ItemContent.ItemName, TranslationType.Equipment, false);
                //슬롯 아이템 Master목록에서 해당되는 아이콘을 찾아 삽입
                foreach (var slotitem in KanColleClient.Current.Master.SlotItems)
                {
                    if (slotitem.Value.Name == ItemContent.ItemName)
                    {
                        ItemContent.IconType = slotitem.Value.IconType;
                    }
                }
                if (item.Element("ToolTip") != null)
                {
                    ItemContent.ToolTipString = item.Element("ToolTip").Value;
                }
                else
                {
                    ItemContent.ToolTipString = "특이사항 없음";
                }
                ItemContent.Ships = new List <ShipInfo>(MakeShipList(item));


                ItemList.Add(ItemContent);
            }

            return(ItemList);
        }
        private List <RemodelItemList> MakeUpList(IEnumerable <XElement> remodellist, WeekDayFlag today)
        {
            List <RemodelItemList> templist = new List <RemodelItemList>();

            foreach (var item in remodellist)
            {
                var temp = new RemodelItemList();
                temp.Ships = new List <ShipInfo>();

                if (WeekDaySetter(Convert.ToInt32(item.Element("AllWeekdays").Value)).HasFlag(today))
                {
                    if (item.Element("SlotItemName") != null)
                    {
                        temp.ItemName = KanColleClient.Current.Translations.GetTranslation(item.Element("SlotItemName").Value, TranslationType.Equipment);
                        foreach (var slotitem in KanColleClient.Current.Master.SlotItems)
                        {
                            if (slotitem.Value.Name == temp.ItemName)
                            {
                                temp.IconType = slotitem.Value.IconType;
                            }
                        }
                    }
                    int  shipCount = 1;
                    bool Checker   = true;
                    try
                    {
                        List <ShipInfo> ShipList = new List <ShipInfo>();
                        while (Checker)
                        {
                            string shipname = "ShipName" + shipCount.ToString();
                            string weekdays = "WeekDays" + shipCount.ToString();
                            string upgrade  = "Upgrade" + shipCount.ToString();

                            ShipInfo ship = new ShipInfo();

                            if (item.Element(shipname) != null)
                            {
                                ship.ShipName = KanColleClient.Current.Translations.GetTranslation(item.Element(shipname).Value, TranslationType.Ships);
                                ship.Weekday  = WeekDaySetter(Convert.ToInt32(item.Element(weekdays).Value));
                            }
                            if (item.Element(upgrade) != null)
                            {
                                ship.Upgrade = KanColleClient.Current.Translations.GetTranslation(item.Element(upgrade).Value, TranslationType.Equipment);

                                foreach (var slotitem in KanColleClient.Current.Master.SlotItems)
                                {
                                    if (slotitem.Value.Name == ship.Upgrade)
                                    {
                                        ship.UpgradeIconType = slotitem.Value.IconType;
                                    }
                                }
                            }
                            shipCount++;
                            if (ship.ShipName == null && ship.Upgrade != null)
                            {
                                ship.Weekday |= WeekDayFlag.NotNeedShip;
                            }
                            if (ship != null)
                            {
                                if (ship.Weekday.HasFlag(today) || ship.Weekday.HasFlag(WeekDayFlag.NotNeedShip))
                                {
                                    ShipList.Add(ship);
                                }
                                if (ship.ShipName == null && ship.Upgrade == null && ship.UpgradeIconType == null && ship.Weekday.HasFlag(WeekDayFlag.None))
                                {
                                    Checker = false;
                                }
                            }
                            else
                            {
                                Checker = false;
                            }
                        }
                        if (ShipList != null)
                        {
                            foreach (var shipinfo in ShipList)
                            {
                                temp.Ships.Add(shipinfo);
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        Debug.WriteLine(ex);
                    }
                    if (item.Element("AllWeekdays") != null)
                    {
                        temp.TotalWeekday = WeekDaySetter(Convert.ToInt32(item.Element("AllWeekdays").Value));
                    }
                    if (item.Element("ToolTip") != null)
                    {
                        temp.ToolTipString = item.Element("ToolTip").Value;
                    }
                    else
                    {
                        temp.ToolTipString = "특이사항 없음";
                    }
                    StringBuilder equipCombine = new StringBuilder();
                    if (item.Element("StartEquip") != null)
                    {
                        equipCombine.Append(item.Element("StartEquip").Value);
                    }
                    if (item.Element("MidEquip") != null)
                    {
                        equipCombine.Append("/");
                        equipCombine.Append(item.Element("MidEquip").Value);
                    }
                    if (item.Element("LastEquip") != null)
                    {
                        equipCombine.Append("/");
                        equipCombine.Append(item.Element("LastEquip").Value);
                    }
                    if (equipCombine != null)
                    {
                        temp.UseEquip = equipCombine.ToString();
                    }

                    if (temp.TotalWeekday.HasFlag(today))
                    {
                        templist.Add(temp);
                        if (temp.Ships != null)
                        {
                            foreach (var context in temp.Ships)
                            {
                                if (context.Upgrade != null)
                                {
                                    tempimp.Add(temp);
                                    break;
                                }
                            }
                        }
                        if (temp.UseEquip != null)
                        {
                            tempUse.Add(temp);
                        }
                    }
                }
            }
            return(templist);
        }
        private List<RemodelItemList> MakeUseItemList(IEnumerable<XElement> List)
        {
            var tempList = List;

            List<RemodelItemList> ItemList = new List<RemodelItemList>();

            foreach (var item in tempList)
            {
                //초기화
                RemodelItemList ItemContent = new RemodelItemList
                {
                    ItemName = item.Element("SlotItemName").Value
                };
                //우선 장비명을 번역
                ItemContent.ItemName = KanColleClient.Current.Translations.GetTranslation(ItemContent.ItemName, TranslationType.Equipment, false);
                //슬롯 아이템 Master목록에서 해당되는 아이콘을 찾아 삽입
                foreach (var slotitem in KanColleClient.Current.Master.SlotItems)
                {
                    if (slotitem.Value.Name == ItemContent.ItemName)
                        ItemContent.IconType = slotitem.Value.IconType;
                }
                //개수시 필요한 아이템 개수 목록을 작성
                StringBuilder equipCombine = new StringBuilder();
                if (item.Element("StartEquip") != null)
                {
                    equipCombine.Append(item.Element("StartEquip").Value);
                }
                if (item.Element("MidEquip") != null)
                {
                    equipCombine.Append("/");
                    equipCombine.Append(item.Element("MidEquip").Value);
                }
                if (item.Element("LastEquip") != null)
                {
                    equipCombine.Append("/");
                    equipCombine.Append(item.Element("LastEquip").Value);
                }
                if (equipCombine.ToString().Count() > 0)
                    ItemContent.UseEquip = equipCombine.ToString();

                ItemList.Add(ItemContent);
            }
            return ItemList;
        }
        private List<RemodelItemList> MakeUpgradeList(IEnumerable<XElement> List)
        {
            var tempList = List;
            List<RemodelItemList> ItemList = new List<RemodelItemList>();
            foreach (var item in tempList)
            {
                //초기화
                RemodelItemList ItemContent = new RemodelItemList
                {
                    ItemName = item.Element("SlotItemName").Value
                };
                //우선 장비명을 번역
                ItemContent.ItemName = KanColleClient.Current.Translations.GetTranslation(ItemContent.ItemName, TranslationType.Equipment, false);
                //슬롯 아이템 Master목록에서 해당되는 아이콘을 찾아 삽입
                foreach (var slotitem in KanColleClient.Current.Master.SlotItems)
                {
                    if (slotitem.Value.Name == ItemContent.ItemName)
                        ItemContent.IconType = slotitem.Value.IconType;
                }

                ItemContent.Ships = new List<ShipInfo>(TrimShipList(MakeShipList(item, true)));

                if (ItemContent.Ships.Count > 0) ItemList.Add(ItemContent);
            }
            return ItemList;
        }
        private List<RemodelItemList> MakeDefaultList(IEnumerable<XElement> List, int Position)
        {
            var PosElement = "Position";

            List<RemodelItemList> ItemList = new List<RemodelItemList>();

            //리스트를 Position에 따라 필터링
            var tempList = List.Where(f => f.Element(PosElement).Value.Equals(Position.ToString())).ToList();
            //XML리스트를 List<RemodelItemList>의 형태로 재작성
            foreach (var item in tempList)
            {
                //초기화
                RemodelItemList ItemContent = new RemodelItemList
                {
                    ItemName = item.Element("SlotItemName").Value
                };
                //우선 장비명을 번역
                ItemContent.ItemName = KanColleClient.Current.Translations.GetTranslation(ItemContent.ItemName, TranslationType.Equipment, false);
                //슬롯 아이템 Master목록에서 해당되는 아이콘을 찾아 삽입
                foreach (var slotitem in KanColleClient.Current.Master.SlotItems)
                {
                    if (slotitem.Value.Name == ItemContent.ItemName)
                        ItemContent.IconType = slotitem.Value.IconType;
                }
                if (item.Element("ToolTip") != null)
                    ItemContent.ToolTipString = item.Element("ToolTip").Value;
                else
                {
                    ItemContent.ToolTipString = "특이사항 없음";
                }
                ItemContent.Ships = new List<ShipInfo>(MakeShipList(item));

                ItemList.Add(ItemContent);
            }

            return ItemList;
        }