PageLoginNideSkin.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  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.Input;
  8. using System.Windows.Markup;
  9. using Microsoft.VisualBasic;
  10. using Microsoft.VisualBasic.CompilerServices;
  11. namespace PCL
  12. {
  13. // Token: 0x020000FA RID: 250
  14. [DesignerGenerated]
  15. public class PageLoginNideSkin : Grid, IComponentConnector
  16. {
  17. // Token: 0x0600099C RID: 2460 RVA: 0x00006E6D File Offset: 0x0000506D
  18. public PageLoginNideSkin()
  19. {
  20. base.Loaded += this.PageLoginLegacy_Loaded;
  21. this.InitializeComponent();
  22. this.Skin.callbackMapper = PageLaunchLeft.m_AdapterMapper;
  23. }
  24. // Token: 0x0600099D RID: 2461 RVA: 0x00006E9E File Offset: 0x0000509E
  25. private void PageLoginLegacy_Loaded(object sender, RoutedEventArgs e)
  26. {
  27. this.Skin.callbackMapper.Start(null, false);
  28. }
  29. // Token: 0x0600099E RID: 2462 RVA: 0x00049490 File Offset: 0x00047690
  30. public void Reload(bool KeepInput)
  31. {
  32. this.TextName.Text = Conversions.ToString(ModBase.m_IdentifierRepository.Get("CacheNideName", null));
  33. this.TextEmail.Text = Conversions.ToString(ModBase.m_IdentifierRepository.Get("CacheNideUsername", null));
  34. this.TextEmail.Visibility = (Conversions.ToBoolean(ModBase.m_IdentifierRepository.Get("UiLauncherEmail", null)) ? Visibility.Collapsed : Visibility.Visible);
  35. }
  36. // Token: 0x0600099F RID: 2463 RVA: 0x00049504 File Offset: 0x00047704
  37. public static ModLaunch.McLoginServer GetLoginData()
  38. {
  39. string str = Conversions.ToString(Information.IsNothing(ModMinecraft.AddClient()) ? ModBase.m_IdentifierRepository.Get("CacheNideServer", null) : ModBase.m_IdentifierRepository.Get("VersionServerNide", ModMinecraft.AddClient()));
  40. return new ModLaunch.McLoginServer(ModLaunch.McLoginType.Nide)
  41. {
  42. m_SerializerMap = "Nide",
  43. m_IssuerMap = Conversions.ToString(ModBase.m_IdentifierRepository.Get("CacheNideUsername", null)),
  44. _IndexerMap = Conversions.ToString(ModBase.m_IdentifierRepository.Get("CacheNidePass", null)),
  45. m_WatcherMap = "统一通行证",
  46. Type = ModLaunch.McLoginType.Nide,
  47. interpreterMap = "https://auth.mc-user.com:233/" + str + "/authserver"
  48. };
  49. }
  50. // Token: 0x060009A0 RID: 2464 RVA: 0x000495B8 File Offset: 0x000477B8
  51. private void PageLoginNideSkin_MouseEnter(object sender, MouseEventArgs e)
  52. {
  53. ModAnimation.AniStart(new ModAnimation.AniData[]
  54. {
  55. ModAnimation.AaOpacity(this.BtnEdit, 1.0 - this.BtnEdit.Opacity, 80, 0, null, false),
  56. ModAnimation.AaHeight(this.BtnEdit, 25.5 - this.BtnEdit.Height, 140, 0, new ModAnimation.AniEaseOutFluent(ModAnimation.AniEasePower.Middle), false),
  57. ModAnimation.AaHeight(this.BtnEdit, -1.5, 50, 140, new ModAnimation.AniEaseInFluent(ModAnimation.AniEasePower.Middle), false),
  58. ModAnimation.AaOpacity(this.BtnExit, 1.0 - this.BtnExit.Opacity, 80, 0, null, false),
  59. ModAnimation.AaHeight(this.BtnExit, 25.5 - this.BtnExit.Height, 140, 0, new ModAnimation.AniEaseOutFluent(ModAnimation.AniEasePower.Middle), false),
  60. ModAnimation.AaHeight(this.BtnExit, -1.5, 50, 140, new ModAnimation.AniEaseInFluent(ModAnimation.AniEasePower.Middle), false)
  61. }, "PageLoginNideSkin Button", false);
  62. }
  63. // Token: 0x060009A1 RID: 2465 RVA: 0x000496E8 File Offset: 0x000478E8
  64. private void PageLoginNideSkin_MouseLeave(object sender, MouseEventArgs e)
  65. {
  66. ModAnimation.AniStart(new ModAnimation.AniData[]
  67. {
  68. ModAnimation.AaOpacity(this.BtnEdit, -this.BtnEdit.Opacity, 120, 0, new ModAnimation.AniEaseOutFluent(ModAnimation.AniEasePower.Middle), false),
  69. ModAnimation.AaHeight(this.BtnEdit, 14.0 - this.BtnEdit.Height, 120, 0, new ModAnimation.AniEaseInFluent(ModAnimation.AniEasePower.Middle), false),
  70. ModAnimation.AaOpacity(this.BtnExit, -this.BtnExit.Opacity, 120, 0, new ModAnimation.AniEaseOutFluent(ModAnimation.AniEasePower.Middle), false),
  71. ModAnimation.AaHeight(this.BtnExit, 14.0 - this.BtnExit.Height, 120, 0, new ModAnimation.AniEaseInFluent(ModAnimation.AniEasePower.Middle), false)
  72. }, "PageLoginNideSkin Button", false);
  73. }
  74. // Token: 0x060009A2 RID: 2466 RVA: 0x00006EB2 File Offset: 0x000050B2
  75. private void BtnEdit_Click(object sender, EventArgs e)
  76. {
  77. ModBase.OpenWebsite("https://login.mc-user.com:233/account/changepw");
  78. }
  79. // Token: 0x060009A3 RID: 2467 RVA: 0x00006EBE File Offset: 0x000050BE
  80. public static void ExitLogin()
  81. {
  82. ModBase.m_IdentifierRepository.Set("CacheNideAccess", "", false, null);
  83. ModLaunch.dispatcherTests.Input = null;
  84. ModMain.recordIterator.RefreshPage(false, true);
  85. }
  86. // Token: 0x060009A4 RID: 2468 RVA: 0x000497B8 File Offset: 0x000479B8
  87. private void Skin_Click(object sender, MouseButtonEventArgs e)
  88. {
  89. ModBase.OpenWebsite(Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject("https://login.mc-user.com:233/", Information.IsNothing(ModMinecraft.AddClient()) ? ModBase.m_IdentifierRepository.Get("CacheNideServer", null) : ModBase.m_IdentifierRepository.Get("VersionServerNide", ModMinecraft.AddClient())), "/skin")));
  90. }
  91. // Token: 0x17000155 RID: 341
  92. // (get) Token: 0x060009A5 RID: 2469 RVA: 0x00006EED File Offset: 0x000050ED
  93. // (set) Token: 0x060009A6 RID: 2470 RVA: 0x00049818 File Offset: 0x00047A18
  94. internal virtual Grid PanData
  95. {
  96. [CompilerGenerated]
  97. get
  98. {
  99. return this._RoleClient;
  100. }
  101. [CompilerGenerated]
  102. set
  103. {
  104. MouseEventHandler value2 = new MouseEventHandler(this.PageLoginNideSkin_MouseEnter);
  105. MouseEventHandler value3 = new MouseEventHandler(this.PageLoginNideSkin_MouseLeave);
  106. Grid roleClient = this._RoleClient;
  107. if (roleClient != null)
  108. {
  109. roleClient.MouseEnter -= value2;
  110. roleClient.MouseLeave -= value3;
  111. }
  112. this._RoleClient = value;
  113. roleClient = this._RoleClient;
  114. if (roleClient != null)
  115. {
  116. roleClient.MouseEnter += value2;
  117. roleClient.MouseLeave += value3;
  118. }
  119. }
  120. }
  121. // Token: 0x17000156 RID: 342
  122. // (get) Token: 0x060009A7 RID: 2471 RVA: 0x00006EF5 File Offset: 0x000050F5
  123. // (set) Token: 0x060009A8 RID: 2472 RVA: 0x00006EFD File Offset: 0x000050FD
  124. internal virtual TextBlock TextName { get; set; }
  125. // Token: 0x17000157 RID: 343
  126. // (get) Token: 0x060009A9 RID: 2473 RVA: 0x00006F06 File Offset: 0x00005106
  127. // (set) Token: 0x060009AA RID: 2474 RVA: 0x00006F0E File Offset: 0x0000510E
  128. internal virtual TextBlock TextEmail { get; set; }
  129. // Token: 0x17000158 RID: 344
  130. // (get) Token: 0x060009AB RID: 2475 RVA: 0x00006F17 File Offset: 0x00005117
  131. // (set) Token: 0x060009AC RID: 2476 RVA: 0x00049878 File Offset: 0x00047A78
  132. internal virtual MyIconButton BtnEdit
  133. {
  134. [CompilerGenerated]
  135. get
  136. {
  137. return this.m_ValClient;
  138. }
  139. [CompilerGenerated]
  140. set
  141. {
  142. MyIconButton.ClickEventHandler value2 = new MyIconButton.ClickEventHandler(this.BtnEdit_Click);
  143. MyIconButton valClient = this.m_ValClient;
  144. if (valClient != null)
  145. {
  146. valClient.Click -= value2;
  147. }
  148. this.m_ValClient = value;
  149. valClient = this.m_ValClient;
  150. if (valClient != null)
  151. {
  152. valClient.Click += value2;
  153. }
  154. }
  155. }
  156. // Token: 0x17000159 RID: 345
  157. // (get) Token: 0x060009AD RID: 2477 RVA: 0x00006F1F File Offset: 0x0000511F
  158. // (set) Token: 0x060009AE RID: 2478 RVA: 0x000498BC File Offset: 0x00047ABC
  159. internal virtual MyIconButton BtnExit
  160. {
  161. [CompilerGenerated]
  162. get
  163. {
  164. return this.m_AttrClient;
  165. }
  166. [CompilerGenerated]
  167. set
  168. {
  169. MyIconButton.ClickEventHandler value2 = (PageLoginNideSkin._Closure$__.$IR27-1 == null) ? (PageLoginNideSkin._Closure$__.$IR27-1 = delegate(object sender, EventArgs e)
  170. {
  171. PageLoginNideSkin.ExitLogin();
  172. }) : PageLoginNideSkin._Closure$__.$IR27-1;
  173. MyIconButton attrClient = this.m_AttrClient;
  174. if (attrClient != null)
  175. {
  176. attrClient.Click -= value2;
  177. }
  178. this.m_AttrClient = value;
  179. attrClient = this.m_AttrClient;
  180. if (attrClient != null)
  181. {
  182. attrClient.Click += value2;
  183. }
  184. }
  185. }
  186. // Token: 0x1700015A RID: 346
  187. // (get) Token: 0x060009AF RID: 2479 RVA: 0x00006F27 File Offset: 0x00005127
  188. // (set) Token: 0x060009B0 RID: 2480 RVA: 0x00049918 File Offset: 0x00047B18
  189. internal virtual MySkin Skin
  190. {
  191. [CompilerGenerated]
  192. get
  193. {
  194. return this.m_CandidateClient;
  195. }
  196. [CompilerGenerated]
  197. set
  198. {
  199. MySkin.ClickEventHandler value2 = new MySkin.ClickEventHandler(this.Skin_Click);
  200. MySkin candidateClient = this.m_CandidateClient;
  201. if (candidateClient != null)
  202. {
  203. candidateClient.Click -= value2;
  204. }
  205. this.m_CandidateClient = value;
  206. candidateClient = this.m_CandidateClient;
  207. if (candidateClient != null)
  208. {
  209. candidateClient.Click += value2;
  210. }
  211. }
  212. }
  213. // Token: 0x060009B1 RID: 2481 RVA: 0x0004995C File Offset: 0x00047B5C
  214. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  215. public void InitializeComponent()
  216. {
  217. if (!this.m_AdvisorClient)
  218. {
  219. this.m_AdvisorClient = true;
  220. Uri resourceLocator = new Uri("/Plain Craft Launcher 2;component/pages/pagelaunch/pageloginnideskin.xaml", UriKind.Relative);
  221. Application.LoadComponent(this, resourceLocator);
  222. }
  223. }
  224. // Token: 0x060009B2 RID: 2482 RVA: 0x0000414E File Offset: 0x0000234E
  225. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  226. internal Delegate _CreateDelegate(Type delegateType, string handler)
  227. {
  228. return Delegate.CreateDelegate(delegateType, this, handler);
  229. }
  230. // Token: 0x060009B3 RID: 2483 RVA: 0x0004998C File Offset: 0x00047B8C
  231. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  232. [EditorBrowsable(EditorBrowsableState.Never)]
  233. public void System_Windows_Markup_IComponentConnector_Connect(int connectionId, object target)
  234. {
  235. if (connectionId == 1)
  236. {
  237. this.PanData = (Grid)target;
  238. return;
  239. }
  240. if (connectionId == 2)
  241. {
  242. this.TextName = (TextBlock)target;
  243. return;
  244. }
  245. if (connectionId == 3)
  246. {
  247. this.TextEmail = (TextBlock)target;
  248. return;
  249. }
  250. if (connectionId == 4)
  251. {
  252. this.BtnEdit = (MyIconButton)target;
  253. return;
  254. }
  255. if (connectionId == 5)
  256. {
  257. this.BtnExit = (MyIconButton)target;
  258. return;
  259. }
  260. if (connectionId == 6)
  261. {
  262. this.Skin = (MySkin)target;
  263. return;
  264. }
  265. this.m_AdvisorClient = true;
  266. }
  267. // Token: 0x04000503 RID: 1283
  268. [AccessedThroughProperty("PanData")]
  269. [CompilerGenerated]
  270. private Grid _RoleClient;
  271. // Token: 0x04000504 RID: 1284
  272. [AccessedThroughProperty("TextName")]
  273. [CompilerGenerated]
  274. private TextBlock m_StructClient;
  275. // Token: 0x04000505 RID: 1285
  276. [CompilerGenerated]
  277. [AccessedThroughProperty("TextEmail")]
  278. private TextBlock _PrinterClient;
  279. // Token: 0x04000506 RID: 1286
  280. [AccessedThroughProperty("BtnEdit")]
  281. [CompilerGenerated]
  282. private MyIconButton m_ValClient;
  283. // Token: 0x04000507 RID: 1287
  284. [AccessedThroughProperty("BtnExit")]
  285. [CompilerGenerated]
  286. private MyIconButton m_AttrClient;
  287. // Token: 0x04000508 RID: 1288
  288. [CompilerGenerated]
  289. [AccessedThroughProperty("Skin")]
  290. private MySkin m_CandidateClient;
  291. // Token: 0x04000509 RID: 1289
  292. private bool m_AdvisorClient;
  293. }
  294. }