PageDownloadNeoForge.cs 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. using System;
  2. using System.CodeDom.Compiler;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Linq;
  6. using System.Runtime.CompilerServices;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Markup;
  10. using System.Windows.Media;
  11. using Microsoft.VisualBasic.CompilerServices;
  12. namespace PCL
  13. {
  14. // Token: 0x020000EC RID: 236
  15. [DesignerGenerated]
  16. public class PageDownloadNeoForge : MyPageRight, IComponentConnector
  17. {
  18. // Token: 0x0600088D RID: 2189 RVA: 0x00006680 File Offset: 0x00004880
  19. public PageDownloadNeoForge()
  20. {
  21. base.Initialized += delegate(object sender, EventArgs e)
  22. {
  23. this.LoaderInit();
  24. };
  25. base.Loaded += delegate(object sender, RoutedEventArgs e)
  26. {
  27. this.Init();
  28. };
  29. this.InitializeComponent();
  30. }
  31. // Token: 0x0600088E RID: 2190 RVA: 0x00045F80 File Offset: 0x00044180
  32. private void LoaderInit()
  33. {
  34. base.PageLoaderInit(this.Load, this.PanLoad, this.PanMain, this.CardTip, ModDownload.m_AnnotationTests, delegate(ModLoader.LoaderBase a0)
  35. {
  36. this.Load_OnFinish();
  37. }, null, true);
  38. }
  39. // Token: 0x0600088F RID: 2191 RVA: 0x000066B3 File Offset: 0x000048B3
  40. private void Init()
  41. {
  42. this.PanBack.ScrollToHome();
  43. }
  44. // Token: 0x06000890 RID: 2192 RVA: 0x00045FC0 File Offset: 0x000441C0
  45. private void Load_OnFinish()
  46. {
  47. try
  48. {
  49. Dictionary<string, List<ModDownload.DlNeoForgeListEntry>> dictionary = Enumerable.ToDictionary<IGrouping<string, ModDownload.DlNeoForgeListEntry>, string, List<ModDownload.DlNeoForgeListEntry>>(Enumerable.OrderByDescending<IGrouping<string, ModDownload.DlNeoForgeListEntry>, string>(Enumerable.GroupBy<ModDownload.DlNeoForgeListEntry, string>(ModDownload.m_AnnotationTests.Output.Value, (PageDownloadNeoForge._Closure$__.$I3-0 == null) ? (PageDownloadNeoForge._Closure$__.$I3-0 = ((ModDownload.DlNeoForgeListEntry d) => d._TestsMap)) : PageDownloadNeoForge._Closure$__.$I3-0), (PageDownloadNeoForge._Closure$__.$I3-1 == null) ? (PageDownloadNeoForge._Closure$__.$I3-1 = ((IGrouping<string, ModDownload.DlNeoForgeListEntry> g) => g.Key)) : PageDownloadNeoForge._Closure$__.$I3-1), (PageDownloadNeoForge._Closure$__.$I3-2 == null) ? (PageDownloadNeoForge._Closure$__.$I3-2 = ((IGrouping<string, ModDownload.DlNeoForgeListEntry> g) => g.Key)) : PageDownloadNeoForge._Closure$__.$I3-2, (PageDownloadNeoForge._Closure$__.$I3-3 == null) ? (PageDownloadNeoForge._Closure$__.$I3-3 = ((IGrouping<string, ModDownload.DlNeoForgeListEntry> g) => Enumerable.ToList<ModDownload.DlNeoForgeListEntry>(g))) : PageDownloadNeoForge._Closure$__.$I3-3);
  50. this.PanMain.Children.Clear();
  51. try
  52. {
  53. foreach (KeyValuePair<string, List<ModDownload.DlNeoForgeListEntry>> keyValuePair in dictionary)
  54. {
  55. if (Enumerable.Any<ModDownload.DlNeoForgeListEntry>(keyValuePair.Value))
  56. {
  57. MyCard myCard = new MyCard();
  58. myCard.Title = keyValuePair.Key + " (" + Conversions.ToString(keyValuePair.Value.Count) + ")";
  59. myCard.Margin = new Thickness(0.0, 0.0, 0.0, 15.0);
  60. myCard.CreateParser(13);
  61. MyCard myCard2 = myCard;
  62. StackPanel stackPanel = new StackPanel
  63. {
  64. Margin = new Thickness(20.0, 40.0, 18.0, 0.0),
  65. VerticalAlignment = VerticalAlignment.Top,
  66. RenderTransform = new TranslateTransform(0.0, 0.0),
  67. Tag = keyValuePair.Value
  68. };
  69. myCard2.Children.Add(stackPanel);
  70. myCard2._Stub = stackPanel;
  71. myCard2.IsSwaped = true;
  72. this.PanMain.Children.Add(myCard2);
  73. }
  74. }
  75. }
  76. finally
  77. {
  78. Dictionary<string, List<ModDownload.DlNeoForgeListEntry>>.Enumerator enumerator;
  79. ((IDisposable)enumerator).Dispose();
  80. }
  81. }
  82. catch (Exception ex)
  83. {
  84. ModBase.Log(ex, "可视化 NeoForge 版本列表出错", ModBase.LogLevel.Feedback, "出现错误");
  85. }
  86. }
  87. // Token: 0x1700011A RID: 282
  88. // (get) Token: 0x06000891 RID: 2193 RVA: 0x000066C0 File Offset: 0x000048C0
  89. // (set) Token: 0x06000892 RID: 2194 RVA: 0x000066C8 File Offset: 0x000048C8
  90. internal virtual MyScrollViewer PanBack { get; set; }
  91. // Token: 0x1700011B RID: 283
  92. // (get) Token: 0x06000893 RID: 2195 RVA: 0x000066D1 File Offset: 0x000048D1
  93. // (set) Token: 0x06000894 RID: 2196 RVA: 0x000066D9 File Offset: 0x000048D9
  94. internal virtual MyCard CardTip { get; set; }
  95. // Token: 0x1700011C RID: 284
  96. // (get) Token: 0x06000895 RID: 2197 RVA: 0x000066E2 File Offset: 0x000048E2
  97. // (set) Token: 0x06000896 RID: 2198 RVA: 0x000066EA File Offset: 0x000048EA
  98. internal virtual MyButton BtnWeb { get; set; }
  99. // Token: 0x1700011D RID: 285
  100. // (get) Token: 0x06000897 RID: 2199 RVA: 0x000066F3 File Offset: 0x000048F3
  101. // (set) Token: 0x06000898 RID: 2200 RVA: 0x000066FB File Offset: 0x000048FB
  102. internal virtual StackPanel PanMain { get; set; }
  103. // Token: 0x1700011E RID: 286
  104. // (get) Token: 0x06000899 RID: 2201 RVA: 0x00006704 File Offset: 0x00004904
  105. // (set) Token: 0x0600089A RID: 2202 RVA: 0x0000670C File Offset: 0x0000490C
  106. internal virtual MyCard PanLoad { get; set; }
  107. // Token: 0x1700011F RID: 287
  108. // (get) Token: 0x0600089B RID: 2203 RVA: 0x00006715 File Offset: 0x00004915
  109. // (set) Token: 0x0600089C RID: 2204 RVA: 0x0000671D File Offset: 0x0000491D
  110. internal virtual MyLoading Load { get; set; }
  111. // Token: 0x0600089D RID: 2205 RVA: 0x00046224 File Offset: 0x00044424
  112. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  113. public void InitializeComponent()
  114. {
  115. if (!this.m_ExceptionReader)
  116. {
  117. this.m_ExceptionReader = true;
  118. Uri resourceLocator = new Uri("/Plain Craft Launcher 2;component/pages/pagedownload/pagedownloadneoforge.xaml", UriKind.Relative);
  119. Application.LoadComponent(this, resourceLocator);
  120. }
  121. }
  122. // Token: 0x0600089E RID: 2206 RVA: 0x0000414E File Offset: 0x0000234E
  123. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  124. internal Delegate _CreateDelegate(Type delegateType, string handler)
  125. {
  126. return Delegate.CreateDelegate(delegateType, this, handler);
  127. }
  128. // Token: 0x0600089F RID: 2207 RVA: 0x00046254 File Offset: 0x00044454
  129. [EditorBrowsable(EditorBrowsableState.Never)]
  130. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  131. public void System_Windows_Markup_IComponentConnector_Connect(int connectionId, object target)
  132. {
  133. if (connectionId == 1)
  134. {
  135. this.PanBack = (MyScrollViewer)target;
  136. return;
  137. }
  138. if (connectionId == 2)
  139. {
  140. this.CardTip = (MyCard)target;
  141. return;
  142. }
  143. if (connectionId == 3)
  144. {
  145. this.BtnWeb = (MyButton)target;
  146. return;
  147. }
  148. if (connectionId == 4)
  149. {
  150. this.PanMain = (StackPanel)target;
  151. return;
  152. }
  153. if (connectionId == 5)
  154. {
  155. this.PanLoad = (MyCard)target;
  156. return;
  157. }
  158. if (connectionId == 6)
  159. {
  160. this.Load = (MyLoading)target;
  161. return;
  162. }
  163. this.m_ExceptionReader = true;
  164. }
  165. // Token: 0x040004A2 RID: 1186
  166. [CompilerGenerated]
  167. [AccessedThroughProperty("PanBack")]
  168. private MyScrollViewer valueReader;
  169. // Token: 0x040004A3 RID: 1187
  170. [AccessedThroughProperty("CardTip")]
  171. [CompilerGenerated]
  172. private MyCard m_ObjectReader;
  173. // Token: 0x040004A4 RID: 1188
  174. [AccessedThroughProperty("BtnWeb")]
  175. [CompilerGenerated]
  176. private MyButton m_BridgeReader;
  177. // Token: 0x040004A5 RID: 1189
  178. [CompilerGenerated]
  179. [AccessedThroughProperty("PanMain")]
  180. private StackPanel itemReader;
  181. // Token: 0x040004A6 RID: 1190
  182. [CompilerGenerated]
  183. [AccessedThroughProperty("PanLoad")]
  184. private MyCard m_ReponseReader;
  185. // Token: 0x040004A7 RID: 1191
  186. [CompilerGenerated]
  187. [AccessedThroughProperty("Load")]
  188. private MyLoading m_GlobalReader;
  189. // Token: 0x040004A8 RID: 1192
  190. private bool m_ExceptionReader;
  191. }
  192. }