PageVersionLeft.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  1. using System;
  2. using System.CodeDom.Compiler;
  3. using System.ComponentModel;
  4. using System.Runtime.CompilerServices;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Markup;
  8. using Microsoft.VisualBasic;
  9. using Microsoft.VisualBasic.CompilerServices;
  10. namespace PCL
  11. {
  12. // Token: 0x0200010D RID: 269
  13. [DesignerGenerated]
  14. public class PageVersionLeft : MyPageLeft, IComponentConnector
  15. {
  16. // Token: 0x06000AD7 RID: 2775 RVA: 0x000078E4 File Offset: 0x00005AE4
  17. public PageVersionLeft()
  18. {
  19. base.Loaded += delegate(object sender, RoutedEventArgs e)
  20. {
  21. this.RefreshModDisabled();
  22. };
  23. this._StateConfig = FormMain.PageSubType.Default;
  24. this.InitializeComponent();
  25. }
  26. // Token: 0x06000AD8 RID: 2776 RVA: 0x0004BE04 File Offset: 0x0004A004
  27. public void RefreshModDisabled()
  28. {
  29. if (PageVersionLeft._InstanceConfig != null && PageVersionLeft._InstanceConfig.RunThread())
  30. {
  31. this.ItemMod.Visibility = Visibility.Visible;
  32. this.ItemModDisabled.Visibility = Visibility.Collapsed;
  33. return;
  34. }
  35. this.ItemMod.Visibility = Visibility.Collapsed;
  36. this.ItemModDisabled.Visibility = Visibility.Visible;
  37. }
  38. // Token: 0x06000AD9 RID: 2777 RVA: 0x0000790C File Offset: 0x00005B0C
  39. private void PageCheck(MyListItem sender, ModBase.RouteEventArgs e)
  40. {
  41. if (sender.Tag != null)
  42. {
  43. this.PageChange(checked((FormMain.PageSubType)Math.Round(ModBase.Val(RuntimeHelpers.GetObjectValue(sender.Tag)))));
  44. }
  45. }
  46. // Token: 0x06000ADA RID: 2778 RVA: 0x0004BE58 File Offset: 0x0004A058
  47. public object PageGet(FormMain.PageSubType ID = (FormMain.PageSubType)(-1))
  48. {
  49. if (ID == (FormMain.PageSubType)(-1))
  50. {
  51. ID = this._StateConfig;
  52. }
  53. object result;
  54. switch (ID)
  55. {
  56. case FormMain.PageSubType.Default:
  57. if (ModMain.m_MapperRepository == null)
  58. {
  59. ModMain.m_MapperRepository = new PageVersionOverall();
  60. }
  61. result = ModMain.m_MapperRepository;
  62. break;
  63. case FormMain.PageSubType.DownloadInstall:
  64. if (Information.IsNothing(ModMain.composerRepository))
  65. {
  66. ModMain.composerRepository = new PageVersionSetup();
  67. }
  68. result = ModMain.composerRepository;
  69. break;
  70. case FormMain.PageSubType.SetupSystem:
  71. if (ModMain._ThreadRepository == null)
  72. {
  73. ModMain._ThreadRepository = new PageVersionMod();
  74. }
  75. result = ModMain._ThreadRepository;
  76. break;
  77. case FormMain.PageSubType.SetupLink:
  78. if (ModMain._PropertyRepository == null)
  79. {
  80. ModMain._PropertyRepository = new PageVersionModDisabled();
  81. }
  82. result = ModMain._PropertyRepository;
  83. break;
  84. default:
  85. throw new Exception("未知的版本设置子页面种类:" + Conversions.ToString((int)ID));
  86. }
  87. return result;
  88. }
  89. // Token: 0x06000ADB RID: 2779 RVA: 0x0004BF08 File Offset: 0x0004A108
  90. public void PageChange(FormMain.PageSubType ID)
  91. {
  92. checked
  93. {
  94. if (this._StateConfig != ID)
  95. {
  96. ModAnimation.AssetParser(ModAnimation.CalcParser() + 1);
  97. try
  98. {
  99. PageVersionLeft.PageChangeRun((MyPageRight)this.PageGet(ID));
  100. this._StateConfig = ID;
  101. }
  102. catch (Exception ex)
  103. {
  104. ModBase.Log(ex, "切换分页面失败(ID " + Conversions.ToString((int)ID) + ")", ModBase.LogLevel.Feedback, "出现错误");
  105. }
  106. finally
  107. {
  108. ModAnimation.AssetParser(ModAnimation.CalcParser() - 1);
  109. }
  110. }
  111. }
  112. }
  113. // Token: 0x06000ADC RID: 2780 RVA: 0x0004BF9C File Offset: 0x0004A19C
  114. private static void PageChangeRun(MyPageRight Target)
  115. {
  116. ModAnimation.AniStop("FrmMain PageChangeRight");
  117. if (Target.Parent != null)
  118. {
  119. Target.SetValue(ContentPresenter.ContentProperty, null);
  120. }
  121. ModMain._ProcessIterator._GetterIterator = Target;
  122. ((MyPageRight)ModMain._ProcessIterator.PanMainRight.Child).PageOnExit();
  123. ModAnimation.AniStart(new ModAnimation.AniData[]
  124. {
  125. ModAnimation.AaCode((PageVersionLeft._Closure$__.$I8-0 == null) ? (PageVersionLeft._Closure$__.$I8-0 = delegate()
  126. {
  127. ((MyPageRight)ModMain._ProcessIterator.PanMainRight.Child).PageOnForceExit();
  128. ModMain._ProcessIterator.PanMainRight.Child = ModMain._ProcessIterator._GetterIterator;
  129. ModMain._ProcessIterator._GetterIterator.Opacity = 0.0;
  130. }) : PageVersionLeft._Closure$__.$I8-0, 130, false),
  131. ModAnimation.AaCode((PageVersionLeft._Closure$__.$I8-1 == null) ? (PageVersionLeft._Closure$__.$I8-1 = delegate()
  132. {
  133. ModMain._ProcessIterator._GetterIterator.Opacity = 1.0;
  134. ModMain._ProcessIterator._GetterIterator.PageOnEnter();
  135. }) : PageVersionLeft._Closure$__.$I8-1, 30, true)
  136. }, "PageLeft PageChange", false);
  137. }
  138. // Token: 0x06000ADD RID: 2781 RVA: 0x00007932 File Offset: 0x00005B32
  139. public void Refresh(object sender, EventArgs e)
  140. {
  141. PageVersionMod.Refresh();
  142. }
  143. // Token: 0x06000ADE RID: 2782 RVA: 0x0004C068 File Offset: 0x0004A268
  144. public void Reset(object sender, EventArgs e)
  145. {
  146. if (ModMain.MyMsgBox("是否要初始化该版本的版本独立设置?该操作不可撤销。", "初始化确认", "确定", "取消", "", true, true, false, null, null, null) == 1)
  147. {
  148. if (Information.IsNothing(ModMain.composerRepository))
  149. {
  150. ModMain.composerRepository = new PageVersionSetup();
  151. }
  152. ModMain.composerRepository.Reset();
  153. this.ItemSetup.Checked = true;
  154. }
  155. }
  156. // Token: 0x17000193 RID: 403
  157. // (get) Token: 0x06000ADF RID: 2783 RVA: 0x00007939 File Offset: 0x00005B39
  158. // (set) Token: 0x06000AE0 RID: 2784 RVA: 0x00007941 File Offset: 0x00005B41
  159. internal virtual StackPanel PanItem { get; set; }
  160. // Token: 0x17000194 RID: 404
  161. // (get) Token: 0x06000AE1 RID: 2785 RVA: 0x0000794A File Offset: 0x00005B4A
  162. // (set) Token: 0x06000AE2 RID: 2786 RVA: 0x0004C0C8 File Offset: 0x0004A2C8
  163. internal virtual MyListItem ItemOverall
  164. {
  165. [CompilerGenerated]
  166. get
  167. {
  168. return this.templateConfig;
  169. }
  170. [CompilerGenerated]
  171. set
  172. {
  173. IMyRadio.CheckEventHandler value2 = delegate(object sender, ModBase.RouteEventArgs e)
  174. {
  175. this.PageCheck((MyListItem)sender, e);
  176. };
  177. MyListItem myListItem = this.templateConfig;
  178. if (myListItem != null)
  179. {
  180. myListItem.Check -= value2;
  181. }
  182. this.templateConfig = value;
  183. myListItem = this.templateConfig;
  184. if (myListItem != null)
  185. {
  186. myListItem.Check += value2;
  187. }
  188. }
  189. }
  190. // Token: 0x17000195 RID: 405
  191. // (get) Token: 0x06000AE3 RID: 2787 RVA: 0x00007952 File Offset: 0x00005B52
  192. // (set) Token: 0x06000AE4 RID: 2788 RVA: 0x0004C10C File Offset: 0x0004A30C
  193. internal virtual MyListItem ItemSetup
  194. {
  195. [CompilerGenerated]
  196. get
  197. {
  198. return this.methodConfig;
  199. }
  200. [CompilerGenerated]
  201. set
  202. {
  203. IMyRadio.CheckEventHandler value2 = delegate(object sender, ModBase.RouteEventArgs e)
  204. {
  205. this.PageCheck((MyListItem)sender, e);
  206. };
  207. MyListItem myListItem = this.methodConfig;
  208. if (myListItem != null)
  209. {
  210. myListItem.Check -= value2;
  211. }
  212. this.methodConfig = value;
  213. myListItem = this.methodConfig;
  214. if (myListItem != null)
  215. {
  216. myListItem.Check += value2;
  217. }
  218. }
  219. }
  220. // Token: 0x17000196 RID: 406
  221. // (get) Token: 0x06000AE5 RID: 2789 RVA: 0x0000795A File Offset: 0x00005B5A
  222. // (set) Token: 0x06000AE6 RID: 2790 RVA: 0x0004C150 File Offset: 0x0004A350
  223. internal virtual MyListItem ItemMod
  224. {
  225. [CompilerGenerated]
  226. get
  227. {
  228. return this._TaskConfig;
  229. }
  230. [CompilerGenerated]
  231. set
  232. {
  233. IMyRadio.CheckEventHandler value2 = delegate(object sender, ModBase.RouteEventArgs e)
  234. {
  235. this.PageCheck((MyListItem)sender, e);
  236. };
  237. MyListItem taskConfig = this._TaskConfig;
  238. if (taskConfig != null)
  239. {
  240. taskConfig.Check -= value2;
  241. }
  242. this._TaskConfig = value;
  243. taskConfig = this._TaskConfig;
  244. if (taskConfig != null)
  245. {
  246. taskConfig.Check += value2;
  247. }
  248. }
  249. }
  250. // Token: 0x17000197 RID: 407
  251. // (get) Token: 0x06000AE7 RID: 2791 RVA: 0x00007962 File Offset: 0x00005B62
  252. // (set) Token: 0x06000AE8 RID: 2792 RVA: 0x0004C194 File Offset: 0x0004A394
  253. internal virtual MyListItem ItemModDisabled
  254. {
  255. [CompilerGenerated]
  256. get
  257. {
  258. return this.consumerConfig;
  259. }
  260. [CompilerGenerated]
  261. set
  262. {
  263. IMyRadio.CheckEventHandler value2 = delegate(object sender, ModBase.RouteEventArgs e)
  264. {
  265. this.PageCheck((MyListItem)sender, e);
  266. };
  267. MyListItem myListItem = this.consumerConfig;
  268. if (myListItem != null)
  269. {
  270. myListItem.Check -= value2;
  271. }
  272. this.consumerConfig = value;
  273. myListItem = this.consumerConfig;
  274. if (myListItem != null)
  275. {
  276. myListItem.Check += value2;
  277. }
  278. }
  279. }
  280. // Token: 0x06000AE9 RID: 2793 RVA: 0x0004C1D8 File Offset: 0x0004A3D8
  281. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  282. public void InitializeComponent()
  283. {
  284. if (!this.m_ConfigurationConfig)
  285. {
  286. this.m_ConfigurationConfig = true;
  287. Uri resourceLocator = new Uri("/Plain Craft Launcher 2;component/pages/pageversion/pageversionleft.xaml", UriKind.Relative);
  288. Application.LoadComponent(this, resourceLocator);
  289. }
  290. }
  291. // Token: 0x06000AEA RID: 2794 RVA: 0x0000414E File Offset: 0x0000234E
  292. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  293. internal Delegate _CreateDelegate(Type delegateType, string handler)
  294. {
  295. return Delegate.CreateDelegate(delegateType, this, handler);
  296. }
  297. // Token: 0x06000AEB RID: 2795 RVA: 0x0004C208 File Offset: 0x0004A408
  298. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  299. [EditorBrowsable(EditorBrowsableState.Never)]
  300. public void System_Windows_Markup_IComponentConnector_Connect(int connectionId, object target)
  301. {
  302. if (connectionId == 1)
  303. {
  304. this.PanItem = (StackPanel)target;
  305. return;
  306. }
  307. if (connectionId == 2)
  308. {
  309. this.ItemOverall = (MyListItem)target;
  310. return;
  311. }
  312. if (connectionId == 3)
  313. {
  314. this.ItemSetup = (MyListItem)target;
  315. return;
  316. }
  317. if (connectionId == 4)
  318. {
  319. this.ItemMod = (MyListItem)target;
  320. return;
  321. }
  322. if (connectionId == 5)
  323. {
  324. this.ItemModDisabled = (MyListItem)target;
  325. return;
  326. }
  327. this.m_ConfigurationConfig = true;
  328. }
  329. // Token: 0x04000596 RID: 1430
  330. public static ModMinecraft.McVersion _InstanceConfig = null;
  331. // Token: 0x04000597 RID: 1431
  332. public FormMain.PageSubType _StateConfig;
  333. // Token: 0x04000598 RID: 1432
  334. [AccessedThroughProperty("PanItem")]
  335. [CompilerGenerated]
  336. private StackPanel callbackConfig;
  337. // Token: 0x04000599 RID: 1433
  338. [AccessedThroughProperty("ItemOverall")]
  339. [CompilerGenerated]
  340. private MyListItem templateConfig;
  341. // Token: 0x0400059A RID: 1434
  342. [AccessedThroughProperty("ItemSetup")]
  343. [CompilerGenerated]
  344. private MyListItem methodConfig;
  345. // Token: 0x0400059B RID: 1435
  346. [AccessedThroughProperty("ItemMod")]
  347. [CompilerGenerated]
  348. private MyListItem _TaskConfig;
  349. // Token: 0x0400059C RID: 1436
  350. [AccessedThroughProperty("ItemModDisabled")]
  351. [CompilerGenerated]
  352. private MyListItem consumerConfig;
  353. // Token: 0x0400059D RID: 1437
  354. private bool m_ConfigurationConfig;
  355. }
  356. }