public MenuGroup_SCPractice(StageDataPackage StageData) : base(StageData) { MenuSelectIndex = 0; MenuItemList = new List <BaseMenuItem>(); List <SpellCardHistory> all = StageData.PData.SC_History.FindAll((a => a.MyPlaneFullName == "ReimuA")); for (int index = 0; index < all.Count; ++index) { List <BaseMenuItem> menuItemList = MenuItemList; SCMenuItem scMenuItem1 = new SCMenuItem(StageData, all[index].Index.ToString().PadRight(3)) { Description = (all[index].Rank.ToString().PadLeft(10) + all[index].Recorded.ToString().PadLeft(2) + "/" + all[index].History.ToString().PadLeft(2)).PadLeft(40), TxtureObject = StageData.TextureObjectDictionary["欧" + all[index].Name], DefaultColor = all[index].Recorded > 0 ? Color.SkyBlue : Color.White }; SCMenuItem scMenuItem2 = scMenuItem1; menuItemList.Add(scMenuItem2); } int num1 = 100; int num2 = 100; foreach (BaseMenuItem menuItem in MenuItemList) { menuItem.TransparentValueF = 0.0f; menuItem.Position = new PointF(num1, 90f); menuItem.DestPoint = new PointF(num1, num2); menuItem.MaxVelocity = 10000f; num2 += deltaY; } MenuItemList[MenuSelectIndex].Selected = true; MenuTitlePos1 = new PointF(140f, -30f); MenuTitlePos2 = new PointF(140f, -150f); BaseMenuItem baseMenuItem = new BaseMenuItem(StageData, "MenuTitle_MusicRoom") { Position = MenuTitlePos2 }; MenuTilte = baseMenuItem; TransparentValueF = 0.0f; TransparentVelocity = 5f; TxtureObject = TextureObjectDictionary["MenuBackground"]; Scale = 0.625f; Rectangle boundRect = BoundRect; double num3 = (boundRect.Width / 2); boundRect = BoundRect; double num4 = (boundRect.Height / 2); OriginalPosition = new PointF((float)num3, (float)num4); AngleDegree = 90.0; ColorValue = Color.SlateBlue; DescriptionBox descriptionBox = new DescriptionBox(StageData) { MaxTransparent = 0, OffsetX = 50 }; DescriptionBox = descriptionBox; }
private void AddNewScorePage() { ScorePageList.Clear(); List <ScoreHistory> all1 = StageData.PData.S_History.FindAll(new Predicate <ScoreHistory>(FindScore)); List <SpellCardHistory> all2 = StageData.PData.SC_History.FindAll(new Predicate <SpellCardHistory>(FindSC)); List <ClearHistory> all3 = StageData.PData.C_History.FindAll(new Predicate <ClearHistory>(FindClear)); switch (ScorePageIndex) { case 0: for (int index = 0; index < all1.Count; ++index) { ScorePageList.Add(new DescriptionMenuItem(StageData, (index + 1).ToString().PadRight(2)) { Description = all1[index].Data2DrawString(), DefaultColor = Color.FromArgb(230 - 15 * index, 230 - 12 * index, byte.MaxValue) }); } int num1 = 50; int num2 = 130; int num3 = 0; using (List <DescriptionMenuItem> .Enumerator enumerator = ScorePageList.GetEnumerator()) { while (enumerator.MoveNext()) { BaseMenuItem current = enumerator.Current; current.DestPoint = new PointF(num1, num2); current.Position = new PointF((num1 + num3), 100f); num2 += 20; } break; } case 1: int num4; for (int index = 0; index < 10; ++index) { if (all2[index].History > 0) { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num4 = all2[index].Index; string Name = num4.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num4 = all2[index].Recorded; string str1 = num4.ToString().PadLeft(2); num4 = all2[index].History; string str2 = num4.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["欧" + all2[index].Name]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } else { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num4 = all2[index].Index; string Name = num4.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num4 = all2[index].Recorded; string str1 = num4.ToString().PadLeft(2); num4 = all2[index].History; string str2 = num4.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["???"]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } } int num5 = 80; int num6 = 130; int num7 = 0; using (List <DescriptionMenuItem> .Enumerator enumerator = ScorePageList.GetEnumerator()) { while (enumerator.MoveNext()) { BaseMenuItem current = enumerator.Current; current.DestPoint = new PointF(num5, num6); current.Position = new PointF((num5 + num7), 100f); num6 += 20; } break; } case 2: int num8; for (int index = 10; index < 20; ++index) { if (all2[index].History > 0) { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num8 = all2[index].Index; string Name = num8.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num8 = all2[index].Recorded; string str1 = num8.ToString().PadLeft(2); num8 = all2[index].History; string str2 = num8.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["欧" + all2[index].Name]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } else { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num8 = all2[index].Index; string Name = num8.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num8 = all2[index].Recorded; string str1 = num8.ToString().PadLeft(2); num8 = all2[index].History; string str2 = num8.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["???"]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } } int num9 = 80; int num10 = 130; int num11 = 0; using (List <DescriptionMenuItem> .Enumerator enumerator = ScorePageList.GetEnumerator()) { while (enumerator.MoveNext()) { BaseMenuItem current = enumerator.Current; current.DestPoint = new PointF(num9, num10); current.Position = new PointF((num9 + num11), 100f); num10 += 20; } break; } case 3: int num12; for (int index = 20; index < Math.Min(all2.Count, 30); ++index) { if (all2[index].History > 0) { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num12 = all2[index].Index; string Name = num12.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num12 = all2[index].Recorded; string str1 = num12.ToString().PadLeft(2); num12 = all2[index].History; string str2 = num12.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["欧" + all2[index].Name]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } else { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num12 = all2[index].Index; string Name = num12.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num12 = all2[index].Recorded; string str1 = num12.ToString().PadLeft(2); num12 = all2[index].History; string str2 = num12.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["???"]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } } int num13 = 80; int num14 = 130; int num15 = 0; using (List <DescriptionMenuItem> .Enumerator enumerator = ScorePageList.GetEnumerator()) { while (enumerator.MoveNext()) { BaseMenuItem current = enumerator.Current; current.DestPoint = new PointF(num13, num14); current.Position = new PointF((num13 + num15), 100f); num14 += 20; } break; } case 4: int num16; for (int index = 30; index < Math.Min(all2.Count, 40); ++index) { if (all2[index].History > 0) { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num16 = all2[index].Index; string Name = num16.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num16 = all2[index].Recorded; string str1 = num16.ToString().PadLeft(2); num16 = all2[index].History; string str2 = num16.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["欧" + all2[index].Name]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } else { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num16 = all2[index].Index; string Name = num16.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num16 = all2[index].Recorded; string str1 = num16.ToString().PadLeft(2); num16 = all2[index].History; string str2 = num16.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["???"]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } } int num17 = 80; int num18 = 130; int num19 = 0; using (List <DescriptionMenuItem> .Enumerator enumerator = ScorePageList.GetEnumerator()) { while (enumerator.MoveNext()) { BaseMenuItem current = enumerator.Current; current.DestPoint = new PointF(num17, num18); current.Position = new PointF((num17 + num19), 100f); num18 += 20; } break; } case 5: int num20; for (int index = 40; index < Math.Min(all2.Count, 50); ++index) { if (all2[index].History > 0) { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num20 = all2[index].Index; string Name = num20.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num20 = all2[index].Recorded; string str1 = num20.ToString().PadLeft(2); num20 = all2[index].History; string str2 = num20.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["欧" + all2[index].Name]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } else { List <DescriptionMenuItem> scorePageList = ScorePageList; StageDataPackage stageData = StageData; num20 = all2[index].Index; string Name = num20.ToString().PadRight(3); SCMenuItem scMenuItem1 = new SCMenuItem(stageData, Name); SCMenuItem scMenuItem2 = scMenuItem1; num20 = all2[index].Recorded; string str1 = num20.ToString().PadLeft(2); num20 = all2[index].History; string str2 = num20.ToString().PadLeft(2); string str3 = (str1 + "/" + str2).PadLeft(40); scMenuItem2.Description = str3; scMenuItem1.TxtureObject = StageData.TextureObjectDictionary["???"]; scMenuItem1.DefaultColor = all2[index].Recorded > 0 ? Color.SkyBlue : Color.White; SCMenuItem scMenuItem3 = scMenuItem1; scorePageList.Add(scMenuItem3); } } int num21 = 80; int num22 = 130; int num23 = 0; using (List <DescriptionMenuItem> .Enumerator enumerator = ScorePageList.GetEnumerator()) { while (enumerator.MoveNext()) { BaseMenuItem current = enumerator.Current; current.DestPoint = new PointF(num21, num22); current.Position = new PointF((num21 + num23), 100f); num22 += 20; } break; } } int num24 = 215; int num25 = 350; ClearHistoryList = new List <BaseMenuItem>(); List <BaseMenuItem> clearHistoryList1 = ClearHistoryList; SCMenuItem scMenuItem4 = new SCMenuItem(StageData, "") { OriginalPosition = new PointF(num24, num25), DestPoint = new PointF(num24, num25), Scale = 1f, OffX = 0, OffY = -5, TxtureObject = StageData.TextureObjectDictionary["History_游戏次数"], Description = all3[0].StartTimes.ToString().PadLeft(18, ' '), DefaultColor = Color.FromArgb(230, 230, byte.MaxValue) }; SCMenuItem scMenuItem5 = scMenuItem4; clearHistoryList1.Add(scMenuItem5); int num26 = num25 + 24; long playingTime = all3[0].PlayingTime; string str4 = ((playingTime / 216000L)).ToString("d2") + ":" + ((playingTime % 216000L / 3600L)).ToString("d2") + ":" + ((playingTime % 3600L / 60L)).ToString("d2"); List <BaseMenuItem> clearHistoryList2 = ClearHistoryList; SCMenuItem scMenuItem6 = new SCMenuItem(StageData, "") { OriginalPosition = new PointF(num24, num26), DestPoint = new PointF(num24, num26), Scale = 1f, OffX = 0, OffY = -5, TxtureObject = StageData.TextureObjectDictionary["History_游戏时间"], Description = str4.PadLeft(18, ' '), DefaultColor = Color.FromArgb(230, 230, byte.MaxValue) }; SCMenuItem scMenuItem7 = scMenuItem6; clearHistoryList2.Add(scMenuItem7); int num27 = num26 + 24; List <BaseMenuItem> clearHistoryList3 = ClearHistoryList; SCMenuItem scMenuItem8 = new SCMenuItem(StageData, "") { OriginalPosition = new PointF(num24, num27), DestPoint = new PointF(num24, num27), Scale = 1f, OffX = 0, OffY = -5, TxtureObject = StageData.TextureObjectDictionary["History_通关次数"] }; SCMenuItem scMenuItem9 = scMenuItem8; int num28 = all3[0].ClearTimes; string str5 = num28.ToString().PadLeft(18, ' '); scMenuItem9.Description = str5; scMenuItem8.DefaultColor = Color.FromArgb(230, 230, byte.MaxValue); SCMenuItem scMenuItem10 = scMenuItem8; clearHistoryList3.Add(scMenuItem10); int num29 = num27 + 24; List <BaseMenuItem> clearHistoryList4 = ClearHistoryList; SCMenuItem scMenuItem11 = new SCMenuItem(StageData, "") { OriginalPosition = new PointF(num24, num29), DestPoint = new PointF(num24, num29), Scale = 1f, OffX = 0, OffY = -5, TxtureObject = StageData.TextureObjectDictionary["History_无续关通关次数"] }; SCMenuItem scMenuItem12 = scMenuItem11; num28 = all3[0].NoContinueClearTimes; string str6 = num28.ToString().PadLeft(18, ' '); scMenuItem12.Description = str6; scMenuItem11.DefaultColor = Color.FromArgb(230, 230, byte.MaxValue); SCMenuItem scMenuItem13 = scMenuItem11; clearHistoryList4.Add(scMenuItem13); int num30 = num29 + 24; int num31 = num24 - 70; List <BaseMenuItem> clearHistoryList5 = ClearHistoryList; BaseMenuItem baseMenuItem1 = new BaseMenuItem(StageData, "History_切换") { OriginalPosition = new PointF(num31, num30), DestPoint = new PointF(num31, num30), Scale = 1f, Selected = true }; BaseMenuItem baseMenuItem2 = baseMenuItem1; clearHistoryList5.Add(baseMenuItem2); List <BaseMenuItem> clearHistoryList6 = ClearHistoryList; BaseMenuItem baseMenuItem3 = new BaseMenuItem(StageData, "History_Arrow") { OriginalPosition = new PointF(70f, 95f), DestPoint = new PointF(70f, 95f), Selected = true }; BaseMenuItem baseMenuItem4 = baseMenuItem3; clearHistoryList6.Add(baseMenuItem4); List <BaseMenuItem> clearHistoryList7 = ClearHistoryList; BaseMenuItem baseMenuItem5 = new BaseMenuItem(StageData, "History_Arrow") { OriginalPosition = new PointF(322f, 112f), DestPoint = new PointF(322f, 112f), Selected = true, AngleDegree = 180.0 }; BaseMenuItem baseMenuItem6 = baseMenuItem5; clearHistoryList7.Add(baseMenuItem6); List <BaseMenuItem> clearHistoryList8 = ClearHistoryList; BaseMenuItem baseMenuItem7 = new BaseMenuItem(StageData, "History_Arrow") { OriginalPosition = new PointF(480f, 89f), DestPoint = new PointF(480f, 89f), Selected = true, AngleDegree = 90.0 }; BaseMenuItem baseMenuItem8 = baseMenuItem7; clearHistoryList8.Add(baseMenuItem8); List <BaseMenuItem> clearHistoryList9 = ClearHistoryList; BaseMenuItem baseMenuItem9 = new BaseMenuItem(StageData, "History_Arrow") { OriginalPosition = new PointF(464f, 119f), DestPoint = new PointF(464f, 119f), Selected = true, AngleDegree = -90.0 }; BaseMenuItem baseMenuItem10 = baseMenuItem9; clearHistoryList9.Add(baseMenuItem10); }