PageVersionMod.cs 79 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355
  1. using System;
  2. using System.CodeDom.Compiler;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.ComponentModel;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Runtime.CompilerServices;
  9. using System.Threading;
  10. using System.Windows;
  11. using System.Windows.Controls;
  12. using System.Windows.Controls.Primitives;
  13. using System.Windows.Input;
  14. using System.Windows.Markup;
  15. using System.Windows.Media;
  16. using Microsoft.VisualBasic;
  17. using Microsoft.VisualBasic.CompilerServices;
  18. using Microsoft.VisualBasic.FileIO;
  19. using PCL.My;
  20. namespace PCL
  21. {
  22. // Token: 0x0200010F RID: 271
  23. [DesignerGenerated]
  24. public class PageVersionMod : MyPageRight, IRefreshable, IComponentConnector
  25. {
  26. // Token: 0x06000AF6 RID: 2806 RVA: 0x0004C274 File Offset: 0x0004A474
  27. public PageVersionMod()
  28. {
  29. base.Loaded += delegate(object sender, RoutedEventArgs e)
  30. {
  31. this.PageOther_Loaded();
  32. };
  33. base.Initialized += delegate(object sender, EventArgs e)
  34. {
  35. this.LoaderInit();
  36. };
  37. base.MapBroadcaster(new MyPageRight.PageExitEventHandler(this.UnselectedAllWithAnimation));
  38. base.KeyDown += this.PageVersionMod_KeyDown;
  39. this.getterConfig = false;
  40. this.tokenConfig = new Dictionary<string, MyLocalModItem>();
  41. this.expressionConfig = 0;
  42. this.m_WriterConfig = new List<string>();
  43. this.m_RegistryConfig = PageVersionMod.FilterType.All;
  44. this.InitializeComponent();
  45. }
  46. // Token: 0x06000AF7 RID: 2807 RVA: 0x0004C304 File Offset: 0x0004A504
  47. public void PageOther_Loaded()
  48. {
  49. if (ModMain._ProcessIterator.taskIterator.initializerMap != FormMain.PageType.CompDetail)
  50. {
  51. this.PanBack.ScrollToHome();
  52. }
  53. checked
  54. {
  55. ModAnimation.AssetParser(ModAnimation.CalcParser() + 1);
  56. this.m_WriterConfig.Clear();
  57. this.ReloadModList(false);
  58. this.ChangeAllSelected(false);
  59. ModAnimation.AssetParser(ModAnimation.CalcParser() - 1);
  60. if (!this.getterConfig)
  61. {
  62. this.getterConfig = true;
  63. try
  64. {
  65. foreach (object obj in this.PanFilter.Children)
  66. {
  67. ((MyRadioButton)obj).LabText.Margin = new Thickness(-2.0, 0.0, 8.0, 0.0);
  68. }
  69. }
  70. finally
  71. {
  72. IEnumerator enumerator;
  73. if (enumerator is IDisposable)
  74. {
  75. (enumerator as IDisposable).Dispose();
  76. }
  77. }
  78. }
  79. }
  80. }
  81. // Token: 0x06000AF8 RID: 2808 RVA: 0x0004C3F0 File Offset: 0x0004A5F0
  82. public void ReloadModList(bool ForceReload = false)
  83. {
  84. if (this.LoaderRun(ForceReload ? ModLoader.LoaderFolderRunType.ForceRun : ModLoader.LoaderFolderRunType.RunOnUpdated))
  85. {
  86. ModBase.Log("[System] 已刷新 Mod 列表", ModBase.LogLevel.Normal, "出现错误");
  87. this.QueryReader(PageVersionMod.FilterType.All);
  88. this.PanBack.ScrollToHome();
  89. this.SearchBox.Text = "";
  90. }
  91. }
  92. // Token: 0x06000AF9 RID: 2809 RVA: 0x00007932 File Offset: 0x00005B32
  93. void IRefreshable.RefreshSelf()
  94. {
  95. PageVersionMod.Refresh();
  96. }
  97. // Token: 0x06000AFA RID: 2810 RVA: 0x0004C440 File Offset: 0x0004A640
  98. public static void Refresh()
  99. {
  100. try
  101. {
  102. ModComp.pool.Clear();
  103. ModComp.customer.Clear();
  104. File.Delete(ModBase.m_DecoratorRepository + "Cache\\LocalMod.json");
  105. ModBase.Log("[Mod] 由于点击刷新按钮,清理本地 Mod 信息缓存", ModBase.LogLevel.Normal, "出现错误");
  106. }
  107. catch (Exception ex)
  108. {
  109. ModBase.Log(ex, "强制刷新时清理本地 Mod 信息缓存失败", ModBase.LogLevel.Debug, "出现错误");
  110. }
  111. if (ModMain._ThreadRepository != null)
  112. {
  113. ModMain._ThreadRepository.ReloadModList(true);
  114. }
  115. ModMain.m_TestsRepository.ItemMod.Checked = true;
  116. ModMain.Hint("正在刷新……", ModMain.HintType.Info, false);
  117. }
  118. // Token: 0x06000AFB RID: 2811 RVA: 0x0004C4E4 File Offset: 0x0004A6E4
  119. private void LoaderInit()
  120. {
  121. base.PageLoaderInit(this.Load, this.PanLoad, this.PanAllBack, null, ModMod.m_Record, delegate(ModLoader.LoaderBase a0)
  122. {
  123. this.LoadUIFromLoaderOutput();
  124. }, null, false);
  125. }
  126. // Token: 0x06000AFC RID: 2812 RVA: 0x0000799F File Offset: 0x00005B9F
  127. private void Load_Click(object sender, MouseButtonEventArgs e)
  128. {
  129. if (ModMod.m_Record.State == ModBase.LoadState.Failed)
  130. {
  131. this.LoaderRun(ModLoader.LoaderFolderRunType.ForceRun);
  132. }
  133. }
  134. // Token: 0x06000AFD RID: 2813 RVA: 0x000079B6 File Offset: 0x00005BB6
  135. public bool LoaderRun(ModLoader.LoaderFolderRunType Type)
  136. {
  137. return ModLoader.LoaderFolderRun(ModMod.m_Record, PageVersionLeft._InstanceConfig.ChangeMapper() + "mods\\", Type, 0, "", false);
  138. }
  139. // Token: 0x06000AFE RID: 2814 RVA: 0x0004C520 File Offset: 0x0004A720
  140. private void LoadUIFromLoaderOutput()
  141. {
  142. try
  143. {
  144. if (Enumerable.Any<ModMod.McMod>(ModMod.m_Record.Output))
  145. {
  146. this.PanBack.Visibility = Visibility.Visible;
  147. this.PanEmpty.Visibility = Visibility.Collapsed;
  148. this.tokenConfig.Clear();
  149. try
  150. {
  151. foreach (ModMod.McMod mcMod in ModMod.m_Record.Output)
  152. {
  153. this.tokenConfig[mcMod.ConcatTests()] = this.McModListItem(mcMod);
  154. }
  155. }
  156. finally
  157. {
  158. List<ModMod.McMod>.Enumerator enumerator;
  159. ((IDisposable)enumerator).Dispose();
  160. }
  161. this.QueryReader(PageVersionMod.FilterType.All);
  162. this.SearchBox.Text = "";
  163. this.RefreshUI();
  164. }
  165. else
  166. {
  167. this.PanEmpty.Visibility = Visibility.Visible;
  168. this.PanBack.Visibility = Visibility.Collapsed;
  169. }
  170. }
  171. catch (Exception ex)
  172. {
  173. ModBase.Log(ex, "加载 Mod 列表 UI 失败", ModBase.LogLevel.Feedback, "出现错误");
  174. }
  175. }
  176. // Token: 0x06000AFF RID: 2815 RVA: 0x0004C624 File Offset: 0x0004A824
  177. private MyLocalModItem McModListItem(ModMod.McMod Entry)
  178. {
  179. checked
  180. {
  181. ModAnimation.AssetParser(ModAnimation.CalcParser() + 1);
  182. MyLocalModItem myLocalModItem = new MyLocalModItem();
  183. myLocalModItem.SnapsToDevicePixels = true;
  184. myLocalModItem.PopBroadcaster(Entry);
  185. myLocalModItem._Policy = new Action<MyLocalModItem, EventArgs>(this.McModContent);
  186. myLocalModItem.Checked = this.m_WriterConfig.Contains(Entry.ConcatTests());
  187. MyLocalModItem myLocalModItem2 = myLocalModItem;
  188. MyLocalModItem $VB$NonLocal_2 = myLocalModItem2;
  189. Entry.ViewMapper(delegate(ModMod.McMod a0)
  190. {
  191. $VB$NonLocal_2.Refresh();
  192. });
  193. myLocalModItem2.Refresh();
  194. ModAnimation.AssetParser(ModAnimation.CalcParser() - 1);
  195. return myLocalModItem2;
  196. }
  197. }
  198. // Token: 0x06000B00 RID: 2816 RVA: 0x0004C6AC File Offset: 0x0004A8AC
  199. private void McModContent(MyLocalModItem sender, EventArgs e)
  200. {
  201. sender2.RateBroadcaster(delegate(object sender, ModBase.RouteEventArgs e)
  202. {
  203. this.CheckChanged((MyLocalModItem)sender, e);
  204. });
  205. sender2.Click += ((PageVersionMod._Closure$__.$IR13-7 == null) ? (PageVersionMod._Closure$__.$IR13-7 = delegate(object sender, MouseButtonEventArgs e)
  206. {
  207. ((PageVersionMod._Closure$__.$I13-0 == null) ? (PageVersionMod._Closure$__.$I13-0 = delegate(MyLocalModItem ss, EventArgs ee)
  208. {
  209. ss.Checked = !ss.Checked;
  210. }) : PageVersionMod._Closure$__.$I13-0)((MyLocalModItem)sender, e);
  211. }) : PageVersionMod._Closure$__.$IR13-7);
  212. MyIconButton myIconButton = new MyIconButton
  213. {
  214. LogoScale = 1.05,
  215. Logo = "M889.018182 418.909091H884.363636V316.509091a93.090909 93.090909 0 0 0-99.607272-89.832727h-302.545455l-93.090909-76.334546A46.545455 46.545455 0 0 0 358.865455 139.636364H146.152727A93.090909 93.090909 0 0 0 46.545455 229.469091V837.818182a46.545455 46.545455 0 0 0 46.545454 46.545454 46.545455 46.545455 0 0 0 16.756364-3.258181 109.381818 109.381818 0 0 0 25.134545 3.258181h586.472727a85.178182 85.178182 0 0 0 87.04-63.301818l163.374546-302.545454a46.545455 46.545455 0 0 0 5.585454-21.876364A82.385455 82.385455 0 0 0 889.018182 418.909091z m-744.727273-186.181818h198.283636l93.09091 76.334545a46.545455 46.545455 0 0 0 29.323636 10.705455h319.301818a12.101818 12.101818 0 0 1 6.516364 0V418.909091H302.545455a85.178182 85.178182 0 0 0-87.04 63.301818L139.636364 622.778182V232.727273a19.549091 19.549091 0 0 1 6.516363 0z m578.094546 552.029091a27.461818 27.461818 0 0 0-2.792728 6.516363H154.530909l147.083636-272.290909a27.461818 27.461818 0 0 0 2.792728-6.981818h565.061818z",
  216. Tag = sender2
  217. };
  218. myIconButton.ToolTip = "打开文件位置";
  219. ToolTipService.SetPlacement(myIconButton, PlacementMode.Center);
  220. ToolTipService.SetVerticalOffset(myIconButton, 30.0);
  221. ToolTipService.SetHorizontalOffset(myIconButton, 2.0);
  222. myIconButton.Click += delegate(object sender, EventArgs e)
  223. {
  224. this.Open_Click((MyIconButton)sender, e);
  225. };
  226. MyIconButton myIconButton2 = new MyIconButton
  227. {
  228. LogoScale = 1.0,
  229. Logo = "M512 917.333333c223.861333 0 405.333333-181.472 405.333333-405.333333S735.861333 106.666667 512 106.666667 106.666667 288.138667 106.666667 512s181.472 405.333333 405.333333 405.333333z m0 106.666667C229.226667 1024 0 794.773333 0 512S229.226667 0 512 0s512 229.226667 512 512-229.226667 512-512 512z m-32-597.333333h64a21.333333 21.333333 0 0 1 21.333333 21.333333v320a21.333333 21.333333 0 0 1-21.333333 21.333333h-64a21.333333 21.333333 0 0 1-21.333333-21.333333V448a21.333333 21.333333 0 0 1 21.333333-21.333333z m0-192h64a21.333333 21.333333 0 0 1 21.333333 21.333333v64a21.333333 21.333333 0 0 1-21.333333 21.333333h-64a21.333333 21.333333 0 0 1-21.333333-21.333333v-64a21.333333 21.333333 0 0 1 21.333333-21.333333z",
  230. Tag = sender2
  231. };
  232. myIconButton2.ToolTip = "详情";
  233. ToolTipService.SetPlacement(myIconButton2, PlacementMode.Center);
  234. ToolTipService.SetVerticalOffset(myIconButton2, 30.0);
  235. ToolTipService.SetHorizontalOffset(myIconButton2, 2.0);
  236. myIconButton2.Click += this.Info_Click;
  237. sender2.MouseRightButtonUp += new MouseButtonEventHandler(this.Info_Click);
  238. MyIconButton myIconButton3 = new MyIconButton
  239. {
  240. LogoScale = 1.0,
  241. Logo = "M520.192 0C408.43 0 317.44 82.87 313.563 186.734H52.736c-29.038 0-52.663 21.943-52.663 49.079s23.625 49.152 52.663 49.152h58.075v550.473c0 103.35 75.118 187.757 167.717 187.757h472.43c92.599 0 167.716-83.894 167.716-187.757V285.477h52.59c29.038 0 52.59-21.943 52.663-49.08-0.073-27.135-23.625-49.151-52.663-49.151H726.235C723.237 83.017 631.955 0 520.192 0zM404.846 177.957c3.803-50.03 50.176-89.015 107.447-89.015 57.197 0 103.57 38.985 106.788 89.015H404.92zM284.379 933.669c-33.353 0-69.997-39.351-69.997-95.525v-549.01H833.39v549.522c0 56.247-36.645 95.525-69.998 95.525H284.379v-0.512z M357.23 800.695a48.274 48.274 0 0 0 47.616-49.006V471.7a48.274 48.274 0 0 0-47.543-49.08 48.274 48.274 0 0 0-47.69 49.006V751.69c0 27.282 20.846 49.006 47.617 49.006z m166.62 0a48.274 48.274 0 0 0 47.688-49.006V471.7a48.274 48.274 0 0 0-47.689-49.08 48.274 48.274 0 0 0-47.543 49.006V751.69c0 27.282 21.431 49.006 47.543 49.006z m142.92 0a48.274 48.274 0 0 0 47.543-49.006V471.7a48.274 48.274 0 0 0-47.543-49.08 48.274 48.274 0 0 0-47.616 49.006V751.69c0 27.282 20.773 49.006 47.543 49.006z",
  242. Tag = sender2
  243. };
  244. myIconButton3.ToolTip = "删除";
  245. ToolTipService.SetPlacement(myIconButton3, PlacementMode.Center);
  246. ToolTipService.SetVerticalOffset(myIconButton3, 30.0);
  247. ToolTipService.SetHorizontalOffset(myIconButton3, 2.0);
  248. myIconButton3.Click += delegate(object sender, EventArgs e)
  249. {
  250. this.Delete_Click((MyIconButton)sender, e);
  251. };
  252. MyIconButton myIconButton4 = new MyIconButton
  253. {
  254. LogoScale = 1.0,
  255. Logo = ((sender2.ExcludeBroadcaster().State == ModMod.McMod.McModState.Fine) ? "M508 990.4c-261.6 0-474.4-212-474.4-474.4S246.4 41.6 508 41.6s474.4 212 474.4 474.4S769.6 990.4 508 990.4zM508 136.8c-209.6 0-379.2 169.6-379.2 379.2 0 209.6 169.6 379.2 379.2 379.2s379.2-169.6 379.2-379.2C887.2 306.4 717.6 136.8 508 136.8zM697.6 563.2 318.4 563.2c-26.4 0-47.2-21.6-47.2-47.2 0-26.4 21.6-47.2 47.2-47.2l379.2 0c26.4 0 47.2 21.6 47.2 47.2C744.8 542.4 724 563.2 697.6 563.2z" : "M512 0a512 512 0 1 0 512 512A512 512 0 0 0 512 0z m0 921.6a409.6 409.6 0 1 1 409.6-409.6 409.6 409.6 0 0 1-409.6 409.6z M716.8 339.968l-256 253.44L328.192 460.8A51.2 51.2 0 0 0 256 532.992l168.448 168.96a51.2 51.2 0 0 0 72.704 0l289.28-289.792A51.2 51.2 0 0 0 716.8 339.968z"),
  256. Tag = sender2
  257. };
  258. myIconButton4.ToolTip = ((sender2.ExcludeBroadcaster().State == ModMod.McMod.McModState.Fine) ? "禁用" : "启用");
  259. ToolTipService.SetPlacement(myIconButton4, PlacementMode.Center);
  260. ToolTipService.SetVerticalOffset(myIconButton4, 30.0);
  261. ToolTipService.SetHorizontalOffset(myIconButton4, 2.0);
  262. myIconButton4.Click += delegate(object sender, EventArgs e)
  263. {
  264. this.ED_Click((MyIconButton)sender, e);
  265. };
  266. if (sender2.ExcludeBroadcaster().State == ModMod.McMod.McModState.Unavailable)
  267. {
  268. sender2.Buttons = new MyIconButton[]
  269. {
  270. myIconButton2,
  271. myIconButton,
  272. myIconButton3
  273. };
  274. return;
  275. }
  276. sender2.Buttons = new MyIconButton[]
  277. {
  278. myIconButton2,
  279. myIconButton,
  280. myIconButton4,
  281. myIconButton3
  282. };
  283. }
  284. // Token: 0x06000B01 RID: 2817 RVA: 0x0004C918 File Offset: 0x0004AB18
  285. public void RefreshUI()
  286. {
  287. PageVersionMod._Closure$__14-0 CS$<>8__locals1 = new PageVersionMod._Closure$__14-0(CS$<>8__locals1);
  288. checked
  289. {
  290. if (this.PanList != null)
  291. {
  292. CS$<>8__locals1.$VB$Local_ShowingMods = Enumerable.ToList<ModMod.McMod>(Enumerable.Where<ModMod.McMod>(this.InterruptReader() ? this._ProccesorConfig : (ModMod.m_Record.Output ?? new List<ModMod.McMod>()), (ModMod.McMod m) => this.CanPassFilter(m)));
  293. ModAnimation.AssetParser(ModAnimation.CalcParser() + 1);
  294. if (Enumerable.Any<ModMod.McMod>(CS$<>8__locals1.$VB$Local_ShowingMods))
  295. {
  296. this.PanList.Visibility = Visibility.Visible;
  297. this.PanList.Children.Clear();
  298. try
  299. {
  300. foreach (ModMod.McMod mcMod in CS$<>8__locals1.$VB$Local_ShowingMods)
  301. {
  302. MyLocalModItem myLocalModItem = this.tokenConfig[mcMod.ConcatTests()];
  303. myLocalModItem.Checked = this.m_WriterConfig.Contains(mcMod.ConcatTests());
  304. this.PanList.Children.Add(myLocalModItem);
  305. }
  306. goto IL_FF;
  307. }
  308. finally
  309. {
  310. List<ModMod.McMod>.Enumerator enumerator;
  311. ((IDisposable)enumerator).Dispose();
  312. }
  313. }
  314. this.PanList.Visibility = Visibility.Collapsed;
  315. IL_FF:
  316. ModAnimation.AssetParser(ModAnimation.CalcParser() - 1);
  317. this.m_WriterConfig = Enumerable.ToList<string>(Enumerable.Where<string>(this.m_WriterConfig, delegate(string m)
  318. {
  319. PageVersionMod._Closure$__14-1 CS$<>8__locals2 = new PageVersionMod._Closure$__14-1(CS$<>8__locals2);
  320. CS$<>8__locals2.$VB$Local_m = m;
  321. return Enumerable.Any<ModMod.McMod>(CS$<>8__locals1.$VB$Local_ShowingMods, (ModMod.McMod s) => Operators.CompareString(s.ConcatTests(), CS$<>8__locals2.$VB$Local_m, false) == 0);
  322. }));
  323. this.RefreshBars();
  324. }
  325. }
  326. }
  327. // Token: 0x06000B02 RID: 2818 RVA: 0x0004CA68 File Offset: 0x0004AC68
  328. public void RefreshBars()
  329. {
  330. int num = 0;
  331. int num2 = 0;
  332. int num3 = 0;
  333. int num4 = 0;
  334. int num5 = 0;
  335. int count;
  336. bool flag;
  337. checked
  338. {
  339. try
  340. {
  341. foreach (ModMod.McMod mcMod in (this.InterruptReader() ? this._ProccesorConfig : (ModMod.m_Record.Output ?? new List<ModMod.McMod>())))
  342. {
  343. num++;
  344. if (mcMod.SelectMapper())
  345. {
  346. num4++;
  347. }
  348. if (mcMod.State.Equals(ModMod.McMod.McModState.Fine))
  349. {
  350. num2++;
  351. }
  352. if (mcMod.State.Equals(ModMod.McMod.McModState.Disabled))
  353. {
  354. num3++;
  355. }
  356. if (mcMod.State.Equals(ModMod.McMod.McModState.Unavailable))
  357. {
  358. num5++;
  359. }
  360. }
  361. }
  362. finally
  363. {
  364. List<ModMod.McMod>.Enumerator enumerator;
  365. ((IDisposable)enumerator).Dispose();
  366. }
  367. this.BtnFilterAll.Text = (this.InterruptReader() ? "搜索结果" : "全部") + string.Format(" ({0})", num);
  368. this.BtnFilterCanUpdate.Text = string.Format("可更新 ({0})", num4);
  369. this.BtnFilterCanUpdate.Visibility = ((this.StartReader() == PageVersionMod.FilterType.CanUpdate || num4 > 0) ? Visibility.Visible : Visibility.Collapsed);
  370. this.BtnFilterEnabled.Text = string.Format("启用 ({0})", num2);
  371. this.BtnFilterEnabled.Visibility = ((this.StartReader() == PageVersionMod.FilterType.Enabled || (num2 > 0 && num2 < num)) ? Visibility.Visible : Visibility.Collapsed);
  372. this.BtnFilterDisabled.Text = string.Format("禁用 ({0})", num3);
  373. this.BtnFilterDisabled.Visibility = ((this.StartReader() == PageVersionMod.FilterType.Disabled || num3 > 0) ? Visibility.Visible : Visibility.Collapsed);
  374. this.BtnFilterError.Text = string.Format("错误 ({0})", num5);
  375. this.BtnFilterError.Visibility = ((this.StartReader() == PageVersionMod.FilterType.Unavailable || num5 > 0) ? Visibility.Visible : Visibility.Collapsed);
  376. count = this.m_WriterConfig.Count;
  377. if (flag = (count > 0))
  378. {
  379. this.LabSelect.Text = string.Format("已选择 {0} 个文件", count);
  380. }
  381. if (flag)
  382. {
  383. bool isEnabled = false;
  384. bool isEnabled2 = false;
  385. bool isEnabled3 = false;
  386. try
  387. {
  388. foreach (ModMod.McMod mcMod2 in ModMod.m_Record.Output)
  389. {
  390. if (this.m_WriterConfig.Contains(mcMod2.ConcatTests()))
  391. {
  392. if (mcMod2.SelectMapper())
  393. {
  394. isEnabled = true;
  395. }
  396. if (mcMod2.State == ModMod.McMod.McModState.Fine)
  397. {
  398. isEnabled2 = true;
  399. }
  400. else if (mcMod2.State == ModMod.McMod.McModState.Disabled)
  401. {
  402. isEnabled3 = true;
  403. }
  404. }
  405. }
  406. }
  407. finally
  408. {
  409. List<ModMod.McMod>.Enumerator enumerator2;
  410. ((IDisposable)enumerator2).Dispose();
  411. }
  412. this.BtnSelectDisable.IsEnabled = isEnabled2;
  413. this.BtnSelectEnable.IsEnabled = isEnabled3;
  414. this.BtnSelectUpdate.IsEnabled = isEnabled;
  415. }
  416. }
  417. if (ModAnimation.CalcParser() == 0)
  418. {
  419. this.PanListBack.Margin = new Thickness(0.0, 0.0, 0.0, (double)(flag ? 95 : 15));
  420. if (flag)
  421. {
  422. if (this.expressionConfig >= count)
  423. {
  424. this.expressionConfig = count;
  425. return;
  426. }
  427. this.expressionConfig = count;
  428. this.CardSelect.Visibility = Visibility.Visible;
  429. ModAnimation.AniStart(new ModAnimation.AniData[]
  430. {
  431. ModAnimation.AaOpacity(this.CardSelect, 1.0 - this.CardSelect.Opacity, 60, 0, null, false),
  432. ModAnimation.AaTranslateY(this.CardSelect, -27.0 - this.TransSelect.Y, 120, 0, new ModAnimation.AniEaseOutFluent(ModAnimation.AniEasePower.Weak), false),
  433. ModAnimation.AaTranslateY(this.CardSelect, 3.0, 150, 120, new ModAnimation.AniEaseInoutFluent(ModAnimation.AniEasePower.Weak, 0.5), false),
  434. ModAnimation.AaTranslateY(this.CardSelect, -1.0, 90, 270, new ModAnimation.AniEaseInoutFluent(ModAnimation.AniEasePower.Weak, 0.5), false)
  435. }, "Mod Sidebar", false);
  436. return;
  437. }
  438. else if (this.expressionConfig != 0)
  439. {
  440. this.expressionConfig = 0;
  441. ModAnimation.AniStart(new ModAnimation.AniData[]
  442. {
  443. ModAnimation.AaOpacity(this.CardSelect, -this.CardSelect.Opacity, 90, 0, null, false),
  444. ModAnimation.AaTranslateY(this.CardSelect, -10.0 - this.TransSelect.Y, 90, 0, new ModAnimation.AniEaseInFluent(ModAnimation.AniEasePower.Weak), false),
  445. ModAnimation.AaCode(delegate
  446. {
  447. this.CardSelect.Visibility = Visibility.Collapsed;
  448. }, 0, true)
  449. }, "Mod Sidebar", false);
  450. return;
  451. }
  452. }
  453. else
  454. {
  455. ModAnimation.AniStop("Mod Sidebar");
  456. this.expressionConfig = count;
  457. if (flag)
  458. {
  459. this.CardSelect.Visibility = Visibility.Visible;
  460. this.CardSelect.Opacity = 1.0;
  461. this.TransSelect.Y = -25.0;
  462. return;
  463. }
  464. this.CardSelect.Visibility = Visibility.Collapsed;
  465. this.CardSelect.Opacity = 0.0;
  466. this.TransSelect.Y = -10.0;
  467. }
  468. }
  469. // Token: 0x06000B03 RID: 2819 RVA: 0x0004CFA4 File Offset: 0x0004B1A4
  470. private void BtnManageOpen_Click(object sender, EventArgs e)
  471. {
  472. try
  473. {
  474. Directory.CreateDirectory(PageVersionLeft._InstanceConfig.ChangeMapper() + "mods\\");
  475. ModBase.OpenExplorer("\"" + PageVersionLeft._InstanceConfig.ChangeMapper() + "mods\\\"");
  476. }
  477. catch (Exception ex)
  478. {
  479. ModBase.Log(ex, "打开 Mods 文件夹失败", ModBase.LogLevel.Msgbox, "出现错误");
  480. }
  481. }
  482. // Token: 0x06000B04 RID: 2820 RVA: 0x000079DE File Offset: 0x00005BDE
  483. private void BtnManageSelectAll_Click(object sender, MouseButtonEventArgs e)
  484. {
  485. this.ChangeAllSelected(this.m_WriterConfig.Count < this.PanList.Children.Count);
  486. }
  487. // Token: 0x06000B05 RID: 2821 RVA: 0x0004D01C File Offset: 0x0004B21C
  488. private void BtnManageInstall_Click(object sender, MouseButtonEventArgs e)
  489. {
  490. string[] array = ModBase.SelectFiles("Mod 文件(*.jar;*.litemod;*.disabled;*.old)|*.jar;*.litemod;*.disabled;*.old", "选择要安装的 Mod");
  491. if (Enumerable.Any<string>(array))
  492. {
  493. PageVersionMod.InstallMods(array);
  494. }
  495. }
  496. // Token: 0x06000B06 RID: 2822 RVA: 0x0004D048 File Offset: 0x0004B248
  497. public static bool InstallMods(IEnumerable<string> FilePathList)
  498. {
  499. PageVersionMod._Closure$__20-0 CS$<>8__locals1 = new PageVersionMod._Closure$__20-0(CS$<>8__locals1);
  500. CS$<>8__locals1.$VB$Local_Extension = Enumerable.First<string>(FilePathList).AfterLast(".", false).ToLower();
  501. bool result;
  502. if (!Enumerable.Any<string>(new string[]
  503. {
  504. "jar",
  505. "litemod",
  506. "disabled",
  507. "old"
  508. }, (string t) => Operators.CompareString(t, CS$<>8__locals1.$VB$Local_Extension, false) == 0))
  509. {
  510. result = false;
  511. }
  512. else
  513. {
  514. ModBase.Log("[System] 文件为 jar/litemod 格式,尝试作为 Mod 安装", ModBase.LogLevel.Normal, "出现错误");
  515. if (Enumerable.First<string>(FilePathList).Contains(":\\$RECYCLE.BIN\\"))
  516. {
  517. ModMain.Hint("请先将文件从回收站还原,再尝试安装!", ModMain.HintType.Critical, true);
  518. result = true;
  519. }
  520. else
  521. {
  522. ModMinecraft.McVersion mcVersion = ModMinecraft.AddClient();
  523. if (ModMain._ProcessIterator._MethodIterator == FormMain.PageType.VersionSetup)
  524. {
  525. mcVersion = PageVersionLeft._InstanceConfig;
  526. }
  527. if (!(ModMain._ProcessIterator._MethodIterator == FormMain.PageType.VersionSelect) && mcVersion != null && mcVersion.RunThread())
  528. {
  529. if ((!(ModMain._ProcessIterator._MethodIterator == FormMain.PageType.VersionSetup) || ModMain._ProcessIterator.GetTests() != FormMain.PageSubType.SetupSystem) && ModMain.MyMsgBox(string.Format("是否要将这{0}文件作为 Mod 安装到 {1}?", (Enumerable.Count<string>(FilePathList) == 1) ? "个" : "些", mcVersion.Name), "Mod 安装确认", "确定", "取消", "", false, true, false, null, null, null) != 1)
  530. {
  531. goto IL_28A;
  532. }
  533. try
  534. {
  535. try
  536. {
  537. foreach (string text in FilePathList)
  538. {
  539. string text2 = ModBase.GetFileNameFromPath(text).Replace(".disabled", "");
  540. if (!text2.Contains("."))
  541. {
  542. text2 += ".jar";
  543. }
  544. ModBase.CopyFile(text, mcVersion.ChangeMapper() + "mods\\" + text2);
  545. }
  546. }
  547. finally
  548. {
  549. IEnumerator<string> enumerator;
  550. if (enumerator != null)
  551. {
  552. enumerator.Dispose();
  553. }
  554. }
  555. if (Enumerable.Count<string>(FilePathList) == 1)
  556. {
  557. ModMain.Hint(string.Format("已安装 {0}!", ModBase.GetFileNameFromPath(Enumerable.First<string>(FilePathList)).Replace(".disabled", "")), ModMain.HintType.Finish, true);
  558. }
  559. else
  560. {
  561. ModMain.Hint(string.Format("已安装 {0} 个 Mod!", Enumerable.Count<string>(FilePathList)), ModMain.HintType.Finish, true);
  562. }
  563. if (ModMain._ProcessIterator._MethodIterator == FormMain.PageType.VersionSetup && ModMain._ProcessIterator.GetTests() == FormMain.PageSubType.SetupSystem)
  564. {
  565. ModLoader.LoaderFolderRun(ModMod.m_Record, mcVersion.ChangeMapper() + "mods\\", ModLoader.LoaderFolderRunType.ForceRun, 0, "", false);
  566. }
  567. goto IL_28A;
  568. }
  569. catch (Exception ex)
  570. {
  571. ModBase.Log(ex, "复制 Mod 文件失败", ModBase.LogLevel.Msgbox, "出现错误");
  572. goto IL_28A;
  573. }
  574. }
  575. ModMain.Hint("若要安装 Mod,请先选择一个可以安装 Mod 的版本!", ModMain.HintType.Info, true);
  576. IL_28A:
  577. result = true;
  578. }
  579. }
  580. return result;
  581. }
  582. // Token: 0x06000B07 RID: 2823 RVA: 0x00007A03 File Offset: 0x00005C03
  583. private void BtnManageDownload_Click(object sender, MouseButtonEventArgs e)
  584. {
  585. PageDownloadMod.m_PageField = PageVersionLeft._InstanceConfig;
  586. ModMain._ProcessIterator.PageChange(FormMain.PageType.Download, FormMain.PageSubType.DownloadMod);
  587. }
  588. // Token: 0x06000B08 RID: 2824 RVA: 0x0004D318 File Offset: 0x0004B518
  589. public void CheckChanged(MyLocalModItem sender, ModBase.RouteEventArgs e)
  590. {
  591. if (ModAnimation.CalcParser() == 0)
  592. {
  593. string item = sender.ExcludeBroadcaster().ConcatTests();
  594. if (sender.Checked)
  595. {
  596. if (!this.m_WriterConfig.Contains(item))
  597. {
  598. this.m_WriterConfig.Add(item);
  599. }
  600. }
  601. else
  602. {
  603. this.m_WriterConfig.Remove(item);
  604. }
  605. this.RefreshBars();
  606. }
  607. }
  608. // Token: 0x06000B09 RID: 2825 RVA: 0x0004D370 File Offset: 0x0004B570
  609. private void ChangeAllSelected(bool Value)
  610. {
  611. checked
  612. {
  613. ModAnimation.AssetParser(ModAnimation.CalcParser() + 1);
  614. this.m_WriterConfig.Clear();
  615. try
  616. {
  617. foreach (MyLocalModItem myLocalModItem in this.tokenConfig.Values)
  618. {
  619. bool flag = Value && this.PanList.Children.Contains(myLocalModItem);
  620. myLocalModItem.Checked = flag;
  621. if (flag)
  622. {
  623. this.m_WriterConfig.Add(myLocalModItem.ExcludeBroadcaster().ConcatTests());
  624. }
  625. }
  626. }
  627. finally
  628. {
  629. Dictionary<string, MyLocalModItem>.ValueCollection.Enumerator enumerator;
  630. ((IDisposable)enumerator).Dispose();
  631. }
  632. ModAnimation.AssetParser(ModAnimation.CalcParser() - 1);
  633. this.RefreshBars();
  634. }
  635. }
  636. // Token: 0x06000B0A RID: 2826 RVA: 0x0004D424 File Offset: 0x0004B624
  637. private void UnselectedAllWithAnimation()
  638. {
  639. int num = ModAnimation.CalcParser();
  640. ModAnimation.AssetParser(0);
  641. this.ChangeAllSelected(false);
  642. ModAnimation.AssetParser(checked(ModAnimation.CalcParser() + num));
  643. }
  644. // Token: 0x06000B0B RID: 2827 RVA: 0x00007A21 File Offset: 0x00005C21
  645. private void PageVersionMod_KeyDown(object sender, KeyEventArgs e)
  646. {
  647. if (MyWpfExtension.ManageParser().Keyboard.CtrlKeyDown && e.Key == Key.A)
  648. {
  649. this.ChangeAllSelected(true);
  650. }
  651. }
  652. // Token: 0x06000B0C RID: 2828 RVA: 0x00007A45 File Offset: 0x00005C45
  653. private PageVersionMod.FilterType StartReader()
  654. {
  655. return this.m_RegistryConfig;
  656. }
  657. // Token: 0x06000B0D RID: 2829 RVA: 0x0004D450 File Offset: 0x0004B650
  658. private void QueryReader(PageVersionMod.FilterType value)
  659. {
  660. if (this.m_RegistryConfig != value)
  661. {
  662. this.m_RegistryConfig = value;
  663. switch (value)
  664. {
  665. case PageVersionMod.FilterType.All:
  666. this.BtnFilterAll.Checked = true;
  667. break;
  668. case PageVersionMod.FilterType.Enabled:
  669. this.BtnFilterEnabled.Checked = true;
  670. break;
  671. case PageVersionMod.FilterType.Disabled:
  672. this.BtnFilterDisabled.Checked = true;
  673. break;
  674. case PageVersionMod.FilterType.CanUpdate:
  675. this.BtnFilterCanUpdate.Checked = true;
  676. break;
  677. default:
  678. this.BtnFilterError.Checked = true;
  679. break;
  680. }
  681. this.RefreshUI();
  682. }
  683. }
  684. // Token: 0x06000B0E RID: 2830 RVA: 0x0004D4D0 File Offset: 0x0004B6D0
  685. private bool CanPassFilter(ModMod.McMod CheckingMod)
  686. {
  687. bool result;
  688. switch (this.StartReader())
  689. {
  690. case PageVersionMod.FilterType.All:
  691. result = true;
  692. break;
  693. case PageVersionMod.FilterType.Enabled:
  694. result = (CheckingMod.State == ModMod.McMod.McModState.Fine);
  695. break;
  696. case PageVersionMod.FilterType.Disabled:
  697. result = (CheckingMod.State == ModMod.McMod.McModState.Disabled);
  698. break;
  699. case PageVersionMod.FilterType.CanUpdate:
  700. result = CheckingMod.SelectMapper();
  701. break;
  702. case PageVersionMod.FilterType.Unavailable:
  703. result = (CheckingMod.State == ModMod.McMod.McModState.Unavailable);
  704. break;
  705. default:
  706. result = false;
  707. break;
  708. }
  709. return result;
  710. }
  711. // Token: 0x06000B0F RID: 2831 RVA: 0x00007A4D File Offset: 0x00005C4D
  712. private void ChangeFilter(MyRadioButton sender, bool raiseByMouse)
  713. {
  714. this.QueryReader((PageVersionMod.FilterType)Conversions.ToInteger(sender.Tag));
  715. this.RefreshUI();
  716. }
  717. // Token: 0x06000B10 RID: 2832 RVA: 0x00007A66 File Offset: 0x00005C66
  718. private void BtnSelectED_Click(MyIconTextButton sender, ModBase.RouteEventArgs e)
  719. {
  720. this.EDMods(Enumerable.Where<ModMod.McMod>(ModMod.m_Record.Output, (ModMod.McMod m) => this.m_WriterConfig.Contains(m.ConcatTests())), !sender.Equals(this.BtnSelectDisable));
  721. this.ChangeAllSelected(false);
  722. }
  723. // Token: 0x06000B11 RID: 2833 RVA: 0x0004D534 File Offset: 0x0004B734
  724. private void EDMods(IEnumerable<ModMod.McMod> ModList, bool IsEnable)
  725. {
  726. bool flag = true;
  727. try
  728. {
  729. foreach (ModMod.McMod $VB$Local_ModEntity in Enumerable.ToList<ModMod.McMod>(ModList))
  730. {
  731. PageVersionMod._Closure$__35-0 CS$<>8__locals1 = new PageVersionMod._Closure$__35-0(CS$<>8__locals1);
  732. CS$<>8__locals1.$VB$Local_ModEntity = $VB$Local_ModEntity;
  733. string text = null;
  734. if (CS$<>8__locals1.$VB$Local_ModEntity.State == ModMod.McMod.McModState.Fine && !IsEnable)
  735. {
  736. text = CS$<>8__locals1.$VB$Local_ModEntity.Path + (File.Exists(CS$<>8__locals1.$VB$Local_ModEntity.Path + ".old") ? ".old" : ".disabled");
  737. }
  738. else
  739. {
  740. if (CS$<>8__locals1.$VB$Local_ModEntity.State != ModMod.McMod.McModState.Disabled || !IsEnable)
  741. {
  742. continue;
  743. }
  744. text = CS$<>8__locals1.$VB$Local_ModEntity.CustomizeTests();
  745. }
  746. try
  747. {
  748. if (File.Exists(text))
  749. {
  750. if (!File.Exists(CS$<>8__locals1.$VB$Local_ModEntity.Path))
  751. {
  752. ModBase.Log("[Mod] Mod 的状态已被切换", ModBase.LogLevel.Debug, "出现错误");
  753. continue;
  754. }
  755. if (Operators.CompareString(ModBase.smethod_0(CS$<>8__locals1.$VB$Local_ModEntity.Path), ModBase.smethod_0(text), false) != 0)
  756. {
  757. ModMain.MyMsgBox(string.Format("目前同时存在启用和禁用的两个 Mod 文件:{0} - {1}{2} - {3}{4}{5}注意,这两个文件的内容并不相同。{6}在手动删除或重命名其中一个文件后,才能继续操作。", new object[]
  758. {
  759. "\r\n",
  760. text,
  761. "\r\n",
  762. CS$<>8__locals1.$VB$Local_ModEntity.Path,
  763. "\r\n",
  764. "\r\n",
  765. "\r\n"
  766. }), "存在文件冲突", "确定", "", "", false, true, false, null, null, null);
  767. continue;
  768. }
  769. }
  770. File.Delete(text);
  771. Microsoft.VisualBasic.FileSystem.Rename(CS$<>8__locals1.$VB$Local_ModEntity.Path, text);
  772. }
  773. catch (FileNotFoundException ex)
  774. {
  775. ModBase.Log(ex, string.Format("未找到需要重命名的 Mod({0})", CS$<>8__locals1.$VB$Local_ModEntity.Path ?? "null"), ModBase.LogLevel.Feedback, "出现错误");
  776. this.ReloadModList(true);
  777. return;
  778. }
  779. catch (Exception ex2)
  780. {
  781. ModBase.Log(ex2, string.Format("重命名 Mod 失败({0})", CS$<>8__locals1.$VB$Local_ModEntity.Path ?? "null"), ModBase.LogLevel.Debug, "出现错误");
  782. flag = false;
  783. }
  784. ModMod.McMod mcMod = new ModMod.McMod(text);
  785. mcMod.FromJson(CS$<>8__locals1.$VB$Local_ModEntity.ToJson());
  786. if (ModMod.m_Record.Output.Contains(CS$<>8__locals1.$VB$Local_ModEntity))
  787. {
  788. int index = ModMod.m_Record.Output.IndexOf(CS$<>8__locals1.$VB$Local_ModEntity);
  789. ModMod.m_Record.Output.RemoveAt(index);
  790. ModMod.m_Record.Output.Insert(index, mcMod);
  791. }
  792. if (this._ProccesorConfig != null && this._ProccesorConfig.Contains(CS$<>8__locals1.$VB$Local_ModEntity))
  793. {
  794. int index2 = this._ProccesorConfig.IndexOf(CS$<>8__locals1.$VB$Local_ModEntity);
  795. this._ProccesorConfig.Remove(CS$<>8__locals1.$VB$Local_ModEntity);
  796. this._ProccesorConfig.Insert(index2, mcMod);
  797. }
  798. MyLocalModItem myLocalModItem = this.McModListItem(mcMod);
  799. this.tokenConfig[CS$<>8__locals1.$VB$Local_ModEntity.ConcatTests()] = myLocalModItem;
  800. int num = this.PanList.Children.IndexOf(Enumerable.FirstOrDefault<MyLocalModItem>(Enumerable.OfType<MyLocalModItem>(this.PanList.Children), (MyLocalModItem i) => i.ExcludeBroadcaster() == CS$<>8__locals1.$VB$Local_ModEntity));
  801. if (num != -1)
  802. {
  803. this.PanList.Children.RemoveAt(num);
  804. this.PanList.Children.Insert(num, myLocalModItem);
  805. }
  806. }
  807. }
  808. finally
  809. {
  810. List<ModMod.McMod>.Enumerator enumerator;
  811. ((IDisposable)enumerator).Dispose();
  812. }
  813. if (flag)
  814. {
  815. this.RefreshBars();
  816. }
  817. else
  818. {
  819. ModMain.Hint("由于文件被占用,Mod 的状态切换失败,请尝试关闭正在运行的游戏后再试!", ModMain.HintType.Critical, true);
  820. this.ReloadModList(true);
  821. }
  822. this.LoaderRun(ModLoader.LoaderFolderRunType.UpdateOnly);
  823. }
  824. // Token: 0x06000B12 RID: 2834 RVA: 0x0004D910 File Offset: 0x0004BB10
  825. private void BtnSelectUpdate_Click()
  826. {
  827. List<ModMod.McMod> list = Enumerable.ToList<ModMod.McMod>(Enumerable.Where<ModMod.McMod>(ModMod.m_Record.Output, (ModMod.McMod m) => this.m_WriterConfig.Contains(m.ConcatTests()) && m.SelectMapper()));
  828. if (Enumerable.Any<ModMod.McMod>(list))
  829. {
  830. this.UpdateMods(list);
  831. this.ChangeAllSelected(false);
  832. }
  833. }
  834. // Token: 0x06000B13 RID: 2835 RVA: 0x0004D954 File Offset: 0x0004BB54
  835. public void UpdateMods(IEnumerable<ModMod.McMod> ModList)
  836. {
  837. PageVersionMod._Closure$__38-0 CS$<>8__locals1 = new PageVersionMod._Closure$__38-0(CS$<>8__locals1);
  838. CS$<>8__locals1.$VB$Local_ModList = ModList;
  839. if (Conversions.ToBoolean(Conversions.ToBoolean(Operators.NotObject(ModBase.m_IdentifierRepository.Get("HintUpdateMod", null))) || Enumerable.Count<ModMod.McMod>(CS$<>8__locals1.$VB$Local_ModList) >= 15))
  840. {
  841. if (ModMain.MyMsgBox(string.Format("新版本 Mod 可能不兼容旧存档或者其他 Mod,这可能导致游戏崩溃,甚至永久损坏存档!{0}如果你在游玩整合包,请千万不要自行更新 Mod!{1}{2}在更新前,请先备份存档,并检查 Mod 的更新日志。{3}如果更新后出现问题,你也可以在回收站找回更新前的 Mod。", new object[]
  842. {
  843. "\r\n",
  844. "\r\n",
  845. "\r\n",
  846. "\r\n"
  847. }), "Mod 更新警告", "我已了解风险,继续更新", "取消", "", true, true, false, null, null, null) != 1)
  848. {
  849. return;
  850. }
  851. ModBase.m_IdentifierRepository.Set("HintUpdateMod", true, false, null);
  852. }
  853. try
  854. {
  855. PageVersionMod._Closure$__38-1 CS$<>8__locals2 = new PageVersionMod._Closure$__38-1(CS$<>8__locals2);
  856. CS$<>8__locals2.$VB$NonLocal_$VB$Closure_2 = CS$<>8__locals1;
  857. CS$<>8__locals2.$VB$NonLocal_$VB$Closure_2.$VB$Local_ModList = Enumerable.ToList<ModMod.McMod>(CS$<>8__locals2.$VB$NonLocal_$VB$Closure_2.$VB$Local_ModList);
  858. List<ModNet.NetFile> list = new List<ModNet.NetFile>();
  859. CS$<>8__locals2.$VB$Local_FileCopyList = new Dictionary<string, string>();
  860. try
  861. {
  862. foreach (ModMod.McMod mcMod in CS$<>8__locals2.$VB$NonLocal_$VB$Closure_2.$VB$Local_ModList)
  863. {
  864. ModComp.CompFile updateFile = mcMod.UpdateFile;
  865. if (updateFile.ExcludeTests())
  866. {
  867. string text = mcMod._PropertyTest._BridgeRepository.Replace(".jar", "").Replace(".old", "").Replace(".disabled", "");
  868. string text2 = mcMod.UpdateFile._BridgeRepository.Replace(".jar", "").Replace(".old", "").Replace(".disabled", "");
  869. List<string> list2 = Enumerable.ToList<string>(text.Split(new char[]
  870. {
  871. '-'
  872. }));
  873. List<string> list3 = Enumerable.ToList<string>(text2.Split(new char[]
  874. {
  875. '-'
  876. }));
  877. bool flag = false;
  878. try
  879. {
  880. foreach (string item in Enumerable.ToList<string>(list2))
  881. {
  882. if (list3.Contains(item))
  883. {
  884. list2.Remove(item);
  885. list3.Remove(item);
  886. flag = true;
  887. }
  888. }
  889. }
  890. finally
  891. {
  892. List<string>.Enumerator enumerator2;
  893. ((IDisposable)enumerator2).Dispose();
  894. }
  895. if (flag && Enumerable.Any<string>(list2) && Enumerable.Any<string>(list3))
  896. {
  897. text = list2.Join("-");
  898. text2 = list3.Join("-");
  899. }
  900. string text3 = ModBase.m_DecoratorRepository + "DownloadedMods\\" + mcMod.FileName.Replace(text, text2);
  901. string value = ModBase.GetPathFromFullPath(mcMod.Path) + mcMod.FileName.Replace(text, text2);
  902. list.Add(updateFile.ToNetFile(text3));
  903. CS$<>8__locals2.$VB$Local_FileCopyList[text3] = value;
  904. }
  905. }
  906. }
  907. finally
  908. {
  909. IEnumerator<ModMod.McMod> enumerator;
  910. if (enumerator != null)
  911. {
  912. enumerator.Dispose();
  913. }
  914. }
  915. List<ModLoader.LoaderBase> list4 = new List<ModLoader.LoaderBase>();
  916. CS$<>8__locals2.$VB$Local_FinishedFileNames = new List<string>();
  917. list4.Add(new ModNet.LoaderDownload("下载新版 Mod 文件", list)
  918. {
  919. ProgressWeight = (double)Enumerable.Count<ModMod.McMod>(CS$<>8__locals2.$VB$NonLocal_$VB$Closure_2.$VB$Local_ModList) * 1.5
  920. });
  921. list4.Add(new ModLoader.LoaderTask<int, int>("替换旧版 Mod 文件", delegate(ModLoader.LoaderTask<int, int> a0)
  922. {
  923. base._Lambda$__0();
  924. }, null, ThreadPriority.Normal));
  925. CS$<>8__locals2.$VB$Local_Loader = new ModLoader.LoaderCombo<IEnumerable<ModMod.McMod>>("Mod 更新:" + PageVersionLeft._InstanceConfig.Name, list4);
  926. CS$<>8__locals2.$VB$Local_PathMods = PageVersionLeft._InstanceConfig.ChangeMapper() + "mods\\";
  927. CS$<>8__locals2.$VB$Local_Loader.OnStateChanged = delegate(ModLoader.LoaderBase a0)
  928. {
  929. base._Lambda$__1();
  930. };
  931. ModBase.Log(string.Format("[Mod] 开始更新 {0} 个 Mod:{1}", Enumerable.Count<ModMod.McMod>(CS$<>8__locals2.$VB$NonLocal_$VB$Closure_2.$VB$Local_ModList), CS$<>8__locals2.$VB$Local_PathMods), ModBase.LogLevel.Normal, "出现错误");
  932. PageVersionMod._RuleConfig.Add(CS$<>8__locals2.$VB$Local_PathMods);
  933. CS$<>8__locals2.$VB$Local_Loader.Start(null, false);
  934. ModLoader.LoaderTaskbarAdd<IEnumerable<ModMod.McMod>>(CS$<>8__locals2.$VB$Local_Loader);
  935. ModMain._ProcessIterator.BtnExtraDownload.ShowRefresh();
  936. ModMain._ProcessIterator.BtnExtraDownload.Ribble();
  937. this.ReloadModList(true);
  938. }
  939. catch (Exception ex)
  940. {
  941. ModBase.Log(ex, "初始化 Mod 更新失败", ModBase.LogLevel.Debug, "出现错误");
  942. }
  943. }
  944. // Token: 0x06000B14 RID: 2836 RVA: 0x00007A9F File Offset: 0x00005C9F
  945. private void BtnSelectDelete_Click()
  946. {
  947. this.DeleteMods(Enumerable.Where<ModMod.McMod>(ModMod.m_Record.Output, (ModMod.McMod m) => this.m_WriterConfig.Contains(m.ConcatTests())));
  948. this.ChangeAllSelected(false);
  949. }
  950. // Token: 0x06000B15 RID: 2837 RVA: 0x0004DDD4 File Offset: 0x0004BFD4
  951. private void DeleteMods(IEnumerable<ModMod.McMod> ModList)
  952. {
  953. try
  954. {
  955. bool flag = true;
  956. bool shiftKeyDown = MyWpfExtension.ManageParser().Keyboard.ShiftKeyDown;
  957. ModList = Enumerable.ToList<ModMod.McMod>(Enumerable.Select<string, ModMod.McMod>(Enumerable.Where<string>(Enumerable.Distinct<string>(Enumerable.SelectMany<ModMod.McMod, string>(ModList, (PageVersionMod._Closure$__.$I40-0 == null) ? (PageVersionMod._Closure$__.$I40-0 = delegate(ModMod.McMod Target)
  958. {
  959. IEnumerable<string> result;
  960. if (Target.State == ModMod.McMod.McModState.Fine)
  961. {
  962. result = new string[]
  963. {
  964. Target.Path,
  965. Target.Path + (File.Exists(Target.Path + ".old") ? ".old" : ".disabled")
  966. };
  967. }
  968. else
  969. {
  970. result = new string[]
  971. {
  972. Target.Path,
  973. Target.CustomizeTests()
  974. };
  975. }
  976. return result;
  977. }) : PageVersionMod._Closure$__.$I40-0)), (PageVersionMod._Closure$__.$I40-1 == null) ? (PageVersionMod._Closure$__.$I40-1 = ((string m) => File.Exists(m))) : PageVersionMod._Closure$__.$I40-1), (PageVersionMod._Closure$__.$I40-2 == null) ? (PageVersionMod._Closure$__.$I40-2 = ((string m) => new ModMod.McMod(m))) : PageVersionMod._Closure$__.$I40-2));
  978. try
  979. {
  980. IEnumerator<ModMod.McMod> enumerator = ModList.GetEnumerator();
  981. while (enumerator.MoveNext())
  982. {
  983. PageVersionMod._Closure$__40-0 CS$<>8__locals1 = new PageVersionMod._Closure$__40-0(CS$<>8__locals1);
  984. CS$<>8__locals1.$VB$Local_ModEntity = enumerator.Current;
  985. try
  986. {
  987. if (shiftKeyDown)
  988. {
  989. File.Delete(CS$<>8__locals1.$VB$Local_ModEntity.Path);
  990. }
  991. else
  992. {
  993. MyWpfExtension.ManageParser().FileSystem.DeleteFile(CS$<>8__locals1.$VB$Local_ModEntity.Path, UIOption.OnlyErrorDialogs, RecycleOption.SendToRecycleBin);
  994. }
  995. }
  996. catch (OperationCanceledException ex)
  997. {
  998. ModBase.Log(ex, "删除 Mod 被主动取消", ModBase.LogLevel.Debug, "出现错误");
  999. this.ReloadModList(true);
  1000. return;
  1001. }
  1002. catch (Exception ex2)
  1003. {
  1004. ModBase.Log(ex2, string.Format("删除 Mod 失败({0})", CS$<>8__locals1.$VB$Local_ModEntity.Path), ModBase.LogLevel.Msgbox, "出现错误");
  1005. flag = false;
  1006. }
  1007. this.m_WriterConfig.Remove(CS$<>8__locals1.$VB$Local_ModEntity.ConcatTests());
  1008. ModMod.m_Record.Output.Remove(CS$<>8__locals1.$VB$Local_ModEntity);
  1009. List<ModMod.McMod> proccesorConfig = this._ProccesorConfig;
  1010. if (proccesorConfig != null)
  1011. {
  1012. proccesorConfig.Remove(CS$<>8__locals1.$VB$Local_ModEntity);
  1013. }
  1014. this.tokenConfig.Remove(CS$<>8__locals1.$VB$Local_ModEntity.ConcatTests());
  1015. int num = this.PanList.Children.IndexOf(Enumerable.FirstOrDefault<MyLocalModItem>(Enumerable.OfType<MyLocalModItem>(this.PanList.Children), (MyLocalModItem i) => i.ExcludeBroadcaster().Equals(CS$<>8__locals1.$VB$Local_ModEntity)));
  1016. if (num >= 0)
  1017. {
  1018. this.PanList.Children.RemoveAt(num);
  1019. }
  1020. }
  1021. }
  1022. finally
  1023. {
  1024. IEnumerator<ModMod.McMod> enumerator;
  1025. if (enumerator != null)
  1026. {
  1027. enumerator.Dispose();
  1028. }
  1029. }
  1030. this.RefreshBars();
  1031. if (!flag)
  1032. {
  1033. ModMain.Hint("由于文件被占用,Mod 删除失败,请尝试关闭正在运行的游戏后再试!", ModMain.HintType.Critical, true);
  1034. this.ReloadModList(true);
  1035. }
  1036. else if (this.PanList.Children.Count == 0)
  1037. {
  1038. this.ReloadModList(true);
  1039. }
  1040. else
  1041. {
  1042. this.RefreshBars();
  1043. }
  1044. if (!flag)
  1045. {
  1046. return;
  1047. }
  1048. if (shiftKeyDown)
  1049. {
  1050. if (Enumerable.Count<ModMod.McMod>(ModList) == 1)
  1051. {
  1052. ModMain.Hint(string.Format("已彻底删除 {0}!", Enumerable.Single<ModMod.McMod>(ModList).FileName), ModMain.HintType.Finish, true);
  1053. }
  1054. else
  1055. {
  1056. ModMain.Hint(string.Format("已彻底删除 {0} 个文件!", Enumerable.Count<ModMod.McMod>(ModList)), ModMain.HintType.Finish, true);
  1057. }
  1058. }
  1059. else if (Enumerable.Count<ModMod.McMod>(ModList) == 1)
  1060. {
  1061. ModMain.Hint(string.Format("已将 {0} 删除到回收站!", Enumerable.Single<ModMod.McMod>(ModList).FileName), ModMain.HintType.Finish, true);
  1062. }
  1063. else
  1064. {
  1065. ModMain.Hint(string.Format("已将 {0} 个文件删除到回收站!", Enumerable.Count<ModMod.McMod>(ModList)), ModMain.HintType.Finish, true);
  1066. }
  1067. }
  1068. catch (OperationCanceledException ex3)
  1069. {
  1070. ModBase.Log(ex3, "删除 Mod 被主动取消", ModBase.LogLevel.Debug, "出现错误");
  1071. this.ReloadModList(true);
  1072. }
  1073. catch (Exception ex4)
  1074. {
  1075. ModBase.Log(ex4, "删除 Mod 出现未知错误", ModBase.LogLevel.Feedback, "出现错误");
  1076. this.ReloadModList(true);
  1077. }
  1078. this.LoaderRun(ModLoader.LoaderFolderRunType.UpdateOnly);
  1079. }
  1080. // Token: 0x06000B16 RID: 2838 RVA: 0x00007AC9 File Offset: 0x00005CC9
  1081. private void BtnSelectCancel_Click()
  1082. {
  1083. this.ChangeAllSelected(false);
  1084. }
  1085. // Token: 0x06000B17 RID: 2839 RVA: 0x0004E194 File Offset: 0x0004C394
  1086. public void Info_Click(object sender, EventArgs e)
  1087. {
  1088. checked
  1089. {
  1090. try
  1091. {
  1092. ModMod.McMod mcMod = ((MyLocalModItem)((sender is MyIconButton) ? NewLateBinding.LateGet(sender, null, "Tag", new object[0], null, null, null) : sender)).ExcludeBroadcaster();
  1093. if (mcMod.State == ModMod.McMod.McModState.Unavailable)
  1094. {
  1095. ModMain.MyMsgBox("无法读取此 Mod 的信息。\r\n\r\n详细的错误信息:" + ModBase.GetExceptionDetail(mcMod.SetupMapper(), false), "Mod 读取失败", "确定", "", "", false, true, false, null, null, null);
  1096. }
  1097. else if (mcMod.Comp != null)
  1098. {
  1099. ModMain._ProcessIterator.PageChange(new FormMain.PageStackData
  1100. {
  1101. initializerMap = FormMain.PageType.CompDetail,
  1102. m_SingletonMap = new object[]
  1103. {
  1104. mcMod.Comp,
  1105. new List<string>(),
  1106. PageVersionLeft._InstanceConfig.Version._ConnectionMap,
  1107. PageVersionLeft._InstanceConfig.Version.m_StructMap ? ModComp.CompModLoaderType.Forge : (PageVersionLeft._InstanceConfig.Version._ValMap ? ModComp.CompModLoaderType.NeoForge : (PageVersionLeft._InstanceConfig.Version._CandidateMap ? ModComp.CompModLoaderType.Fabric : ModComp.CompModLoaderType.Any))
  1108. }
  1109. }, FormMain.PageSubType.Default);
  1110. }
  1111. else
  1112. {
  1113. List<string> list = new List<string>();
  1114. if (mcMod.Description != null)
  1115. {
  1116. list.Add(mcMod.Description + "\r\n");
  1117. }
  1118. if (mcMod.NewMapper() != null)
  1119. {
  1120. list.Add("作者:" + mcMod.NewMapper());
  1121. }
  1122. list.Add(string.Concat(new string[]
  1123. {
  1124. "文件:",
  1125. mcMod.FileName,
  1126. "(",
  1127. ModBase.GetString(new FileInfo(mcMod.Path).Length),
  1128. ")"
  1129. }));
  1130. if (mcMod.Version != null)
  1131. {
  1132. list.Add("版本:" + mcMod.Version);
  1133. }
  1134. List<string> list2 = new List<string>();
  1135. if (mcMod.LoginMapper() != null)
  1136. {
  1137. list2.Add("Mod ID:" + mcMod.LoginMapper());
  1138. }
  1139. if (Enumerable.Any<KeyValuePair<string, string>>(mcMod.Dependencies))
  1140. {
  1141. list2.Add("依赖于:");
  1142. try
  1143. {
  1144. foreach (KeyValuePair<string, string> keyValuePair in mcMod.Dependencies)
  1145. {
  1146. list2.Add(" - " + keyValuePair.Key + ((keyValuePair.Value == null) ? "" : (",版本:" + keyValuePair.Value)));
  1147. }
  1148. }
  1149. finally
  1150. {
  1151. Dictionary<string, string>.Enumerator enumerator;
  1152. ((IDisposable)enumerator).Dispose();
  1153. }
  1154. }
  1155. if (Enumerable.Any<string>(list2))
  1156. {
  1157. list.Add("");
  1158. list.AddRange(list2);
  1159. }
  1160. string text = mcMod.Name.Replace(" ", "+");
  1161. string text2 = text.Substring(0, 1);
  1162. int num = Enumerable.Count<char>(text) - 1;
  1163. for (int i = 1; i <= num; i++)
  1164. {
  1165. bool flag = text[i - 1].ToString().ToLower().Equals(text[i - 1].ToString());
  1166. bool flag2 = text[i].ToString().ToLower().Equals(text[i].ToString());
  1167. if (flag && !flag2)
  1168. {
  1169. text2 += "+";
  1170. }
  1171. text2 += Conversions.ToString(text[i]);
  1172. }
  1173. text2 = text2.Replace("++", "+").Replace("pti+Fine", "ptiFine");
  1174. if (mcMod.AwakeMapper() == null)
  1175. {
  1176. if (ModMain.MyMsgBox(list.Join("\r\n"), mcMod.Name, "百科搜索", "返回", "", false, true, false, null, null, null) == 1)
  1177. {
  1178. ModBase.OpenWebsite("https://www.mcmod.cn/s?key=" + text2 + "&site=all&filter=0");
  1179. }
  1180. }
  1181. else
  1182. {
  1183. int num2 = ModMain.MyMsgBox(list.Join("\r\n"), mcMod.Name, "打开官网", "百科搜索", "返回", false, true, false, null, null, null);
  1184. if (num2 != 1)
  1185. {
  1186. if (num2 == 2)
  1187. {
  1188. ModBase.OpenWebsite("https://www.mcmod.cn/s?key=" + text2 + "&site=all&filter=0");
  1189. }
  1190. }
  1191. else
  1192. {
  1193. ModBase.OpenWebsite(mcMod.AwakeMapper());
  1194. }
  1195. }
  1196. }
  1197. }
  1198. catch (Exception ex)
  1199. {
  1200. ModBase.Log(ex, "获取 Mod 详情失败", ModBase.LogLevel.Feedback, "出现错误");
  1201. }
  1202. }
  1203. }
  1204. // Token: 0x06000B18 RID: 2840 RVA: 0x0004E60C File Offset: 0x0004C80C
  1205. public void Open_Click(MyIconButton sender, EventArgs e)
  1206. {
  1207. try
  1208. {
  1209. MyLocalModItem myLocalModItem = (MyLocalModItem)sender.Tag;
  1210. ModBase.OpenExplorer("/select,\"" + myLocalModItem.ExcludeBroadcaster().Path + "\"");
  1211. }
  1212. catch (Exception ex)
  1213. {
  1214. ModBase.Log(ex, "打开 Mod 文件位置失败", ModBase.LogLevel.Feedback, "出现错误");
  1215. }
  1216. }
  1217. // Token: 0x06000B19 RID: 2841 RVA: 0x0004E678 File Offset: 0x0004C878
  1218. public void Delete_Click(MyIconButton sender, EventArgs e)
  1219. {
  1220. MyLocalModItem myLocalModItem = (MyLocalModItem)sender.Tag;
  1221. this.DeleteMods(new ModMod.McMod[]
  1222. {
  1223. myLocalModItem.ExcludeBroadcaster()
  1224. });
  1225. }
  1226. // Token: 0x06000B1A RID: 2842 RVA: 0x0004E6A8 File Offset: 0x0004C8A8
  1227. public void ED_Click(MyIconButton sender, EventArgs e)
  1228. {
  1229. MyLocalModItem myLocalModItem = (MyLocalModItem)sender.Tag;
  1230. this.EDMods(new ModMod.McMod[]
  1231. {
  1232. myLocalModItem.ExcludeBroadcaster()
  1233. }, myLocalModItem.ExcludeBroadcaster().State == ModMod.McMod.McModState.Disabled);
  1234. }
  1235. // Token: 0x06000B1B RID: 2843 RVA: 0x00007AD2 File Offset: 0x00005CD2
  1236. public bool InterruptReader()
  1237. {
  1238. return !string.IsNullOrWhiteSpace(this.SearchBox.Text);
  1239. }
  1240. // Token: 0x06000B1C RID: 2844 RVA: 0x0004E6E4 File Offset: 0x0004C8E4
  1241. public void SearchRun()
  1242. {
  1243. if (this.InterruptReader())
  1244. {
  1245. List<ModBase.SearchEntry<ModMod.McMod>> list = new List<ModBase.SearchEntry<ModMod.McMod>>();
  1246. try
  1247. {
  1248. foreach (ModMod.McMod mcMod in ModMod.m_Record.Output)
  1249. {
  1250. List<KeyValuePair<string, double>> list2 = new List<KeyValuePair<string, double>>();
  1251. list2.Add(new KeyValuePair<string, double>(mcMod.Name, 1.0));
  1252. list2.Add(new KeyValuePair<string, double>(mcMod.FileName, 1.0));
  1253. if (mcMod.Version != null)
  1254. {
  1255. list2.Add(new KeyValuePair<string, double>(mcMod.Version, 0.2));
  1256. }
  1257. if (mcMod.Description != null && Operators.CompareString(mcMod.Description, "", false) != 0)
  1258. {
  1259. list2.Add(new KeyValuePair<string, double>(mcMod.Description, 0.4));
  1260. }
  1261. if (mcMod.Comp != null)
  1262. {
  1263. if (Operators.CompareString(mcMod.Comp.comparatorRepository, mcMod.Name, false) != 0)
  1264. {
  1265. list2.Add(new KeyValuePair<string, double>(mcMod.Comp.comparatorRepository, 1.0));
  1266. }
  1267. if (Operators.CompareString(mcMod.Comp.RemoveTests(), mcMod.Comp.comparatorRepository, false) != 0)
  1268. {
  1269. list2.Add(new KeyValuePair<string, double>(mcMod.Comp.RemoveTests(), 1.0));
  1270. }
  1271. if (Operators.CompareString(mcMod.Comp.mappingRepository, mcMod.Description, false) != 0)
  1272. {
  1273. list2.Add(new KeyValuePair<string, double>(mcMod.Comp.mappingRepository, 0.4));
  1274. }
  1275. list2.Add(new KeyValuePair<string, double>(string.Join("", mcMod.Comp.m_PoolRepository), 0.2));
  1276. }
  1277. list.Add(new ModBase.SearchEntry<ModMod.McMod>
  1278. {
  1279. m_DicError = mcMod,
  1280. helperError = list2
  1281. });
  1282. }
  1283. }
  1284. finally
  1285. {
  1286. List<ModMod.McMod>.Enumerator enumerator;
  1287. ((IDisposable)enumerator).Dispose();
  1288. }
  1289. this._ProccesorConfig = Enumerable.ToList<ModMod.McMod>(Enumerable.Select<ModBase.SearchEntry<ModMod.McMod>, ModMod.McMod>(ModBase.Search<ModMod.McMod>(list, this.SearchBox.Text, 6, 0.35), (PageVersionMod._Closure$__.$I49-0 == null) ? (PageVersionMod._Closure$__.$I49-0 = ((ModBase.SearchEntry<ModMod.McMod> r) => r.m_DicError)) : PageVersionMod._Closure$__.$I49-0));
  1290. }
  1291. this.RefreshUI();
  1292. }
  1293. // Token: 0x17000198 RID: 408
  1294. // (get) Token: 0x06000B1D RID: 2845 RVA: 0x00007AE7 File Offset: 0x00005CE7
  1295. // (set) Token: 0x06000B1E RID: 2846 RVA: 0x00007AEF File Offset: 0x00005CEF
  1296. internal virtual Grid PanAllBack { get; set; }
  1297. // Token: 0x17000199 RID: 409
  1298. // (get) Token: 0x06000B1F RID: 2847 RVA: 0x00007AF8 File Offset: 0x00005CF8
  1299. // (set) Token: 0x06000B20 RID: 2848 RVA: 0x00007B00 File Offset: 0x00005D00
  1300. internal virtual MyScrollViewer PanBack { get; set; }
  1301. // Token: 0x1700019A RID: 410
  1302. // (get) Token: 0x06000B21 RID: 2849 RVA: 0x00007B09 File Offset: 0x00005D09
  1303. // (set) Token: 0x06000B22 RID: 2850 RVA: 0x00007B11 File Offset: 0x00005D11
  1304. internal virtual StackPanel PanMain { get; set; }
  1305. // Token: 0x1700019B RID: 411
  1306. // (get) Token: 0x06000B23 RID: 2851 RVA: 0x00007B1A File Offset: 0x00005D1A
  1307. // (set) Token: 0x06000B24 RID: 2852 RVA: 0x0004E938 File Offset: 0x0004CB38
  1308. internal virtual MySearchBox SearchBox
  1309. {
  1310. [CompilerGenerated]
  1311. get
  1312. {
  1313. return this.m_ImporterConfig;
  1314. }
  1315. [CompilerGenerated]
  1316. set
  1317. {
  1318. MySearchBox.TextChangedEventHandler obj = delegate(object sender, EventArgs e)
  1319. {
  1320. this.SearchRun();
  1321. };
  1322. MySearchBox importerConfig = this.m_ImporterConfig;
  1323. if (importerConfig != null)
  1324. {
  1325. importerConfig.RegisterField(obj);
  1326. }
  1327. this.m_ImporterConfig = value;
  1328. importerConfig = this.m_ImporterConfig;
  1329. if (importerConfig != null)
  1330. {
  1331. importerConfig.ChangeField(obj);
  1332. }
  1333. }
  1334. }
  1335. // Token: 0x1700019C RID: 412
  1336. // (get) Token: 0x06000B25 RID: 2853 RVA: 0x00007B22 File Offset: 0x00005D22
  1337. // (set) Token: 0x06000B26 RID: 2854 RVA: 0x00007B2A File Offset: 0x00005D2A
  1338. internal virtual MyCard PanManage { get; set; }
  1339. // Token: 0x1700019D RID: 413
  1340. // (get) Token: 0x06000B27 RID: 2855 RVA: 0x00007B33 File Offset: 0x00005D33
  1341. // (set) Token: 0x06000B28 RID: 2856 RVA: 0x0004E97C File Offset: 0x0004CB7C
  1342. internal virtual MyButton BtnManageOpen
  1343. {
  1344. [CompilerGenerated]
  1345. get
  1346. {
  1347. return this.connectionConfig;
  1348. }
  1349. [CompilerGenerated]
  1350. set
  1351. {
  1352. MyButton.ClickEventHandler value2 = new MyButton.ClickEventHandler(this.BtnManageOpen_Click);
  1353. MyButton myButton = this.connectionConfig;
  1354. if (myButton != null)
  1355. {
  1356. myButton.Click -= value2;
  1357. }
  1358. this.connectionConfig = value;
  1359. myButton = this.connectionConfig;
  1360. if (myButton != null)
  1361. {
  1362. myButton.Click += value2;
  1363. }
  1364. }
  1365. }
  1366. // Token: 0x1700019E RID: 414
  1367. // (get) Token: 0x06000B29 RID: 2857 RVA: 0x00007B3B File Offset: 0x00005D3B
  1368. // (set) Token: 0x06000B2A RID: 2858 RVA: 0x0004E9C0 File Offset: 0x0004CBC0
  1369. internal virtual MyButton BtnManageInstall
  1370. {
  1371. [CompilerGenerated]
  1372. get
  1373. {
  1374. return this.m_ServerConfig;
  1375. }
  1376. [CompilerGenerated]
  1377. set
  1378. {
  1379. MyButton.ClickEventHandler value2 = new MyButton.ClickEventHandler(this.BtnManageInstall_Click);
  1380. MyButton serverConfig = this.m_ServerConfig;
  1381. if (serverConfig != null)
  1382. {
  1383. serverConfig.Click -= value2;
  1384. }
  1385. this.m_ServerConfig = value;
  1386. serverConfig = this.m_ServerConfig;
  1387. if (serverConfig != null)
  1388. {
  1389. serverConfig.Click += value2;
  1390. }
  1391. }
  1392. }
  1393. // Token: 0x1700019F RID: 415
  1394. // (get) Token: 0x06000B2B RID: 2859 RVA: 0x00007B43 File Offset: 0x00005D43
  1395. // (set) Token: 0x06000B2C RID: 2860 RVA: 0x0004EA04 File Offset: 0x0004CC04
  1396. internal virtual MyButton BtnManageDownload
  1397. {
  1398. [CompilerGenerated]
  1399. get
  1400. {
  1401. return this.m_ResolverConfig;
  1402. }
  1403. [CompilerGenerated]
  1404. set
  1405. {
  1406. MyButton.ClickEventHandler value2 = new MyButton.ClickEventHandler(this.BtnManageDownload_Click);
  1407. MyButton resolverConfig = this.m_ResolverConfig;
  1408. if (resolverConfig != null)
  1409. {
  1410. resolverConfig.Click -= value2;
  1411. }
  1412. this.m_ResolverConfig = value;
  1413. resolverConfig = this.m_ResolverConfig;
  1414. if (resolverConfig != null)
  1415. {
  1416. resolverConfig.Click += value2;
  1417. }
  1418. }
  1419. }
  1420. // Token: 0x170001A0 RID: 416
  1421. // (get) Token: 0x06000B2D RID: 2861 RVA: 0x00007B4B File Offset: 0x00005D4B
  1422. // (set) Token: 0x06000B2E RID: 2862 RVA: 0x0004EA48 File Offset: 0x0004CC48
  1423. internal virtual MyButton BtnManageSelectAll
  1424. {
  1425. [CompilerGenerated]
  1426. get
  1427. {
  1428. return this.statusConfig;
  1429. }
  1430. [CompilerGenerated]
  1431. set
  1432. {
  1433. MyButton.ClickEventHandler value2 = new MyButton.ClickEventHandler(this.BtnManageSelectAll_Click);
  1434. MyButton myButton = this.statusConfig;
  1435. if (myButton != null)
  1436. {
  1437. myButton.Click -= value2;
  1438. }
  1439. this.statusConfig = value;
  1440. myButton = this.statusConfig;
  1441. if (myButton != null)
  1442. {
  1443. myButton.Click += value2;
  1444. }
  1445. }
  1446. }
  1447. // Token: 0x170001A1 RID: 417
  1448. // (get) Token: 0x06000B2F RID: 2863 RVA: 0x00007B53 File Offset: 0x00005D53
  1449. // (set) Token: 0x06000B30 RID: 2864 RVA: 0x00007B5B File Offset: 0x00005D5B
  1450. internal virtual MyButton BtnManageCheck { get; set; }
  1451. // Token: 0x170001A2 RID: 418
  1452. // (get) Token: 0x06000B31 RID: 2865 RVA: 0x00007B64 File Offset: 0x00005D64
  1453. // (set) Token: 0x06000B32 RID: 2866 RVA: 0x00007B6C File Offset: 0x00005D6C
  1454. internal virtual MyCard PanListBack { get; set; }
  1455. // Token: 0x170001A3 RID: 419
  1456. // (get) Token: 0x06000B33 RID: 2867 RVA: 0x00007B75 File Offset: 0x00005D75
  1457. // (set) Token: 0x06000B34 RID: 2868 RVA: 0x00007B7D File Offset: 0x00005D7D
  1458. internal virtual StackPanel PanFilter { get; set; }
  1459. // Token: 0x170001A4 RID: 420
  1460. // (get) Token: 0x06000B35 RID: 2869 RVA: 0x00007B86 File Offset: 0x00005D86
  1461. // (set) Token: 0x06000B36 RID: 2870 RVA: 0x0004EA8C File Offset: 0x0004CC8C
  1462. internal virtual MyRadioButton BtnFilterAll
  1463. {
  1464. [CompilerGenerated]
  1465. get
  1466. {
  1467. return this.m_ValConfig;
  1468. }
  1469. [CompilerGenerated]
  1470. set
  1471. {
  1472. MyRadioButton.CheckEventHandler obj = delegate(object a0, bool a1)
  1473. {
  1474. this.ChangeFilter((MyRadioButton)a0, a1);
  1475. };
  1476. MyRadioButton valConfig = this.m_ValConfig;
  1477. if (valConfig != null)
  1478. {
  1479. valConfig.ResolveTests(obj);
  1480. }
  1481. this.m_ValConfig = value;
  1482. valConfig = this.m_ValConfig;
  1483. if (valConfig != null)
  1484. {
  1485. valConfig.LogoutTests(obj);
  1486. }
  1487. }
  1488. }
  1489. // Token: 0x170001A5 RID: 421
  1490. // (get) Token: 0x06000B37 RID: 2871 RVA: 0x00007B8E File Offset: 0x00005D8E
  1491. // (set) Token: 0x06000B38 RID: 2872 RVA: 0x0004EAD0 File Offset: 0x0004CCD0
  1492. internal virtual MyRadioButton BtnFilterEnabled
  1493. {
  1494. [CompilerGenerated]
  1495. get
  1496. {
  1497. return this.m_AttrConfig;
  1498. }
  1499. [CompilerGenerated]
  1500. set
  1501. {
  1502. MyRadioButton.CheckEventHandler obj = delegate(object a0, bool a1)
  1503. {
  1504. this.ChangeFilter((MyRadioButton)a0, a1);
  1505. };
  1506. MyRadioButton attrConfig = this.m_AttrConfig;
  1507. if (attrConfig != null)
  1508. {
  1509. attrConfig.ResolveTests(obj);
  1510. }
  1511. this.m_AttrConfig = value;
  1512. attrConfig = this.m_AttrConfig;
  1513. if (attrConfig != null)
  1514. {
  1515. attrConfig.LogoutTests(obj);
  1516. }
  1517. }
  1518. }
  1519. // Token: 0x170001A6 RID: 422
  1520. // (get) Token: 0x06000B39 RID: 2873 RVA: 0x00007B96 File Offset: 0x00005D96
  1521. // (set) Token: 0x06000B3A RID: 2874 RVA: 0x0004EB14 File Offset: 0x0004CD14
  1522. internal virtual MyRadioButton BtnFilterDisabled
  1523. {
  1524. [CompilerGenerated]
  1525. get
  1526. {
  1527. return this.candidateConfig;
  1528. }
  1529. [CompilerGenerated]
  1530. set
  1531. {
  1532. MyRadioButton.CheckEventHandler obj = delegate(object a0, bool a1)
  1533. {
  1534. this.ChangeFilter((MyRadioButton)a0, a1);
  1535. };
  1536. MyRadioButton myRadioButton = this.candidateConfig;
  1537. if (myRadioButton != null)
  1538. {
  1539. myRadioButton.ResolveTests(obj);
  1540. }
  1541. this.candidateConfig = value;
  1542. myRadioButton = this.candidateConfig;
  1543. if (myRadioButton != null)
  1544. {
  1545. myRadioButton.LogoutTests(obj);
  1546. }
  1547. }
  1548. }
  1549. // Token: 0x170001A7 RID: 423
  1550. // (get) Token: 0x06000B3B RID: 2875 RVA: 0x00007B9E File Offset: 0x00005D9E
  1551. // (set) Token: 0x06000B3C RID: 2876 RVA: 0x0004EB58 File Offset: 0x0004CD58
  1552. internal virtual MyRadioButton BtnFilterCanUpdate
  1553. {
  1554. [CompilerGenerated]
  1555. get
  1556. {
  1557. return this.advisorConfig;
  1558. }
  1559. [CompilerGenerated]
  1560. set
  1561. {
  1562. MyRadioButton.CheckEventHandler obj = delegate(object a0, bool a1)
  1563. {
  1564. this.ChangeFilter((MyRadioButton)a0, a1);
  1565. };
  1566. MyRadioButton myRadioButton = this.advisorConfig;
  1567. if (myRadioButton != null)
  1568. {
  1569. myRadioButton.ResolveTests(obj);
  1570. }
  1571. this.advisorConfig = value;
  1572. myRadioButton = this.advisorConfig;
  1573. if (myRadioButton != null)
  1574. {
  1575. myRadioButton.LogoutTests(obj);
  1576. }
  1577. }
  1578. }
  1579. // Token: 0x170001A8 RID: 424
  1580. // (get) Token: 0x06000B3D RID: 2877 RVA: 0x00007BA6 File Offset: 0x00005DA6
  1581. // (set) Token: 0x06000B3E RID: 2878 RVA: 0x0004EB9C File Offset: 0x0004CD9C
  1582. internal virtual MyRadioButton BtnFilterError
  1583. {
  1584. [CompilerGenerated]
  1585. get
  1586. {
  1587. return this.accountConfig;
  1588. }
  1589. [CompilerGenerated]
  1590. set
  1591. {
  1592. MyRadioButton.CheckEventHandler obj = delegate(object a0, bool a1)
  1593. {
  1594. this.ChangeFilter((MyRadioButton)a0, a1);
  1595. };
  1596. MyRadioButton myRadioButton = this.accountConfig;
  1597. if (myRadioButton != null)
  1598. {
  1599. myRadioButton.ResolveTests(obj);
  1600. }
  1601. this.accountConfig = value;
  1602. myRadioButton = this.accountConfig;
  1603. if (myRadioButton != null)
  1604. {
  1605. myRadioButton.LogoutTests(obj);
  1606. }
  1607. }
  1608. }
  1609. // Token: 0x170001A9 RID: 425
  1610. // (get) Token: 0x06000B3F RID: 2879 RVA: 0x00007BAE File Offset: 0x00005DAE
  1611. // (set) Token: 0x06000B40 RID: 2880 RVA: 0x00007BB6 File Offset: 0x00005DB6
  1612. internal virtual StackPanel PanList { get; set; }
  1613. // Token: 0x170001AA RID: 426
  1614. // (get) Token: 0x06000B41 RID: 2881 RVA: 0x00007BBF File Offset: 0x00005DBF
  1615. // (set) Token: 0x06000B42 RID: 2882 RVA: 0x00007BC7 File Offset: 0x00005DC7
  1616. internal virtual MyCard PanEmpty { get; set; }
  1617. // Token: 0x170001AB RID: 427
  1618. // (get) Token: 0x06000B43 RID: 2883 RVA: 0x00007BD0 File Offset: 0x00005DD0
  1619. // (set) Token: 0x06000B44 RID: 2884 RVA: 0x0004EBE0 File Offset: 0x0004CDE0
  1620. internal virtual MyButton BtnHintDownload
  1621. {
  1622. [CompilerGenerated]
  1623. get
  1624. {
  1625. return this._ManagerConfig;
  1626. }
  1627. [CompilerGenerated]
  1628. set
  1629. {
  1630. MyButton.ClickEventHandler value2 = new MyButton.ClickEventHandler(this.BtnManageDownload_Click);
  1631. MyButton managerConfig = this._ManagerConfig;
  1632. if (managerConfig != null)
  1633. {
  1634. managerConfig.Click -= value2;
  1635. }
  1636. this._ManagerConfig = value;
  1637. managerConfig = this._ManagerConfig;
  1638. if (managerConfig != null)
  1639. {
  1640. managerConfig.Click += value2;
  1641. }
  1642. }
  1643. }
  1644. // Token: 0x170001AC RID: 428
  1645. // (get) Token: 0x06000B45 RID: 2885 RVA: 0x00007BD8 File Offset: 0x00005DD8
  1646. // (set) Token: 0x06000B46 RID: 2886 RVA: 0x0004EC24 File Offset: 0x0004CE24
  1647. internal virtual MyButton BtnHintInstall
  1648. {
  1649. [CompilerGenerated]
  1650. get
  1651. {
  1652. return this._ModelConfig;
  1653. }
  1654. [CompilerGenerated]
  1655. set
  1656. {
  1657. MyButton.ClickEventHandler value2 = new MyButton.ClickEventHandler(this.BtnManageInstall_Click);
  1658. MyButton modelConfig = this._ModelConfig;
  1659. if (modelConfig != null)
  1660. {
  1661. modelConfig.Click -= value2;
  1662. }
  1663. this._ModelConfig = value;
  1664. modelConfig = this._ModelConfig;
  1665. if (modelConfig != null)
  1666. {
  1667. modelConfig.Click += value2;
  1668. }
  1669. }
  1670. }
  1671. // Token: 0x170001AD RID: 429
  1672. // (get) Token: 0x06000B47 RID: 2887 RVA: 0x00007BE0 File Offset: 0x00005DE0
  1673. // (set) Token: 0x06000B48 RID: 2888 RVA: 0x0004EC68 File Offset: 0x0004CE68
  1674. internal virtual MyButton BtnHintOpen
  1675. {
  1676. [CompilerGenerated]
  1677. get
  1678. {
  1679. return this.wrapperConfig;
  1680. }
  1681. [CompilerGenerated]
  1682. set
  1683. {
  1684. MyButton.ClickEventHandler value2 = new MyButton.ClickEventHandler(this.BtnManageOpen_Click);
  1685. MyButton myButton = this.wrapperConfig;
  1686. if (myButton != null)
  1687. {
  1688. myButton.Click -= value2;
  1689. }
  1690. this.wrapperConfig = value;
  1691. myButton = this.wrapperConfig;
  1692. if (myButton != null)
  1693. {
  1694. myButton.Click += value2;
  1695. }
  1696. }
  1697. }
  1698. // Token: 0x170001AE RID: 430
  1699. // (get) Token: 0x06000B49 RID: 2889 RVA: 0x00007BE8 File Offset: 0x00005DE8
  1700. // (set) Token: 0x06000B4A RID: 2890 RVA: 0x00007BF0 File Offset: 0x00005DF0
  1701. internal virtual MyCard PanLoad { get; set; }
  1702. // Token: 0x170001AF RID: 431
  1703. // (get) Token: 0x06000B4B RID: 2891 RVA: 0x00007BF9 File Offset: 0x00005DF9
  1704. // (set) Token: 0x06000B4C RID: 2892 RVA: 0x0004ECAC File Offset: 0x0004CEAC
  1705. internal virtual MyLoading Load
  1706. {
  1707. [CompilerGenerated]
  1708. get
  1709. {
  1710. return this.m_AttributeConfig;
  1711. }
  1712. [CompilerGenerated]
  1713. set
  1714. {
  1715. MyLoading.ClickEventHandler value2 = new MyLoading.ClickEventHandler(this.Load_Click);
  1716. MyLoading.StateChangedEventHandler obj = delegate(object a0, MyLoading.MyLoadingState a1, MyLoading.MyLoadingState a2)
  1717. {
  1718. this.UnselectedAllWithAnimation();
  1719. };
  1720. MyLoading attributeConfig = this.m_AttributeConfig;
  1721. if (attributeConfig != null)
  1722. {
  1723. attributeConfig.Click -= value2;
  1724. attributeConfig.InterruptField(obj);
  1725. }
  1726. this.m_AttributeConfig = value;
  1727. attributeConfig = this.m_AttributeConfig;
  1728. if (attributeConfig != null)
  1729. {
  1730. attributeConfig.Click += value2;
  1731. attributeConfig.PrintField(obj);
  1732. }
  1733. }
  1734. }
  1735. // Token: 0x170001B0 RID: 432
  1736. // (get) Token: 0x06000B4D RID: 2893 RVA: 0x00007C01 File Offset: 0x00005E01
  1737. // (set) Token: 0x06000B4E RID: 2894 RVA: 0x00007C09 File Offset: 0x00005E09
  1738. internal virtual MyCard CardSelect { get; set; }
  1739. // Token: 0x170001B1 RID: 433
  1740. // (get) Token: 0x06000B4F RID: 2895 RVA: 0x00007C12 File Offset: 0x00005E12
  1741. // (set) Token: 0x06000B50 RID: 2896 RVA: 0x00007C1A File Offset: 0x00005E1A
  1742. internal virtual TranslateTransform TransSelect { get; set; }
  1743. // Token: 0x170001B2 RID: 434
  1744. // (get) Token: 0x06000B51 RID: 2897 RVA: 0x00007C23 File Offset: 0x00005E23
  1745. // (set) Token: 0x06000B52 RID: 2898 RVA: 0x00007C2B File Offset: 0x00005E2B
  1746. internal virtual TextBlock LabSelect { get; set; }
  1747. // Token: 0x170001B3 RID: 435
  1748. // (get) Token: 0x06000B53 RID: 2899 RVA: 0x00007C34 File Offset: 0x00005E34
  1749. // (set) Token: 0x06000B54 RID: 2900 RVA: 0x0004ED0C File Offset: 0x0004CF0C
  1750. internal virtual MyIconTextButton BtnSelectUpdate
  1751. {
  1752. [CompilerGenerated]
  1753. get
  1754. {
  1755. return this._InfoConfig;
  1756. }
  1757. [CompilerGenerated]
  1758. set
  1759. {
  1760. MyIconTextButton.ClickEventHandler value2 = delegate(object sender, ModBase.RouteEventArgs e)
  1761. {
  1762. this.BtnSelectUpdate_Click();
  1763. };
  1764. MyIconTextButton infoConfig = this._InfoConfig;
  1765. if (infoConfig != null)
  1766. {
  1767. infoConfig.Click -= value2;
  1768. }
  1769. this._InfoConfig = value;
  1770. infoConfig = this._InfoConfig;
  1771. if (infoConfig != null)
  1772. {
  1773. infoConfig.Click += value2;
  1774. }
  1775. }
  1776. }
  1777. // Token: 0x170001B4 RID: 436
  1778. // (get) Token: 0x06000B55 RID: 2901 RVA: 0x00007C3C File Offset: 0x00005E3C
  1779. // (set) Token: 0x06000B56 RID: 2902 RVA: 0x0004ED50 File Offset: 0x0004CF50
  1780. internal virtual MyIconTextButton BtnSelectEnable
  1781. {
  1782. [CompilerGenerated]
  1783. get
  1784. {
  1785. return this.adapterConfig;
  1786. }
  1787. [CompilerGenerated]
  1788. set
  1789. {
  1790. MyIconTextButton.ClickEventHandler value2 = delegate(object sender, ModBase.RouteEventArgs e)
  1791. {
  1792. this.BtnSelectED_Click((MyIconTextButton)sender, e);
  1793. };
  1794. MyIconTextButton myIconTextButton = this.adapterConfig;
  1795. if (myIconTextButton != null)
  1796. {
  1797. myIconTextButton.Click -= value2;
  1798. }
  1799. this.adapterConfig = value;
  1800. myIconTextButton = this.adapterConfig;
  1801. if (myIconTextButton != null)
  1802. {
  1803. myIconTextButton.Click += value2;
  1804. }
  1805. }
  1806. }
  1807. // Token: 0x170001B5 RID: 437
  1808. // (get) Token: 0x06000B57 RID: 2903 RVA: 0x00007C44 File Offset: 0x00005E44
  1809. // (set) Token: 0x06000B58 RID: 2904 RVA: 0x0004ED94 File Offset: 0x0004CF94
  1810. internal virtual MyIconTextButton BtnSelectDisable
  1811. {
  1812. [CompilerGenerated]
  1813. get
  1814. {
  1815. return this.m_FacadeConfig;
  1816. }
  1817. [CompilerGenerated]
  1818. set
  1819. {
  1820. MyIconTextButton.ClickEventHandler value2 = delegate(object sender, ModBase.RouteEventArgs e)
  1821. {
  1822. this.BtnSelectED_Click((MyIconTextButton)sender, e);
  1823. };
  1824. MyIconTextButton facadeConfig = this.m_FacadeConfig;
  1825. if (facadeConfig != null)
  1826. {
  1827. facadeConfig.Click -= value2;
  1828. }
  1829. this.m_FacadeConfig = value;
  1830. facadeConfig = this.m_FacadeConfig;
  1831. if (facadeConfig != null)
  1832. {
  1833. facadeConfig.Click += value2;
  1834. }
  1835. }
  1836. }
  1837. // Token: 0x170001B6 RID: 438
  1838. // (get) Token: 0x06000B59 RID: 2905 RVA: 0x00007C4C File Offset: 0x00005E4C
  1839. // (set) Token: 0x06000B5A RID: 2906 RVA: 0x0004EDD8 File Offset: 0x0004CFD8
  1840. internal virtual MyIconTextButton BtnSelectDelete
  1841. {
  1842. [CompilerGenerated]
  1843. get
  1844. {
  1845. return this.m_ListConfig;
  1846. }
  1847. [CompilerGenerated]
  1848. set
  1849. {
  1850. MyIconTextButton.ClickEventHandler value2 = delegate(object sender, ModBase.RouteEventArgs e)
  1851. {
  1852. this.BtnSelectDelete_Click();
  1853. };
  1854. MyIconTextButton listConfig = this.m_ListConfig;
  1855. if (listConfig != null)
  1856. {
  1857. listConfig.Click -= value2;
  1858. }
  1859. this.m_ListConfig = value;
  1860. listConfig = this.m_ListConfig;
  1861. if (listConfig != null)
  1862. {
  1863. listConfig.Click += value2;
  1864. }
  1865. }
  1866. }
  1867. // Token: 0x170001B7 RID: 439
  1868. // (get) Token: 0x06000B5B RID: 2907 RVA: 0x00007C54 File Offset: 0x00005E54
  1869. // (set) Token: 0x06000B5C RID: 2908 RVA: 0x0004EE1C File Offset: 0x0004D01C
  1870. internal virtual MyIconTextButton BtnSelectCancel
  1871. {
  1872. [CompilerGenerated]
  1873. get
  1874. {
  1875. return this._MerchantConfig;
  1876. }
  1877. [CompilerGenerated]
  1878. set
  1879. {
  1880. MyIconTextButton.ClickEventHandler value2 = delegate(object sender, ModBase.RouteEventArgs e)
  1881. {
  1882. this.BtnSelectCancel_Click();
  1883. };
  1884. MyIconTextButton merchantConfig = this._MerchantConfig;
  1885. if (merchantConfig != null)
  1886. {
  1887. merchantConfig.Click -= value2;
  1888. }
  1889. this._MerchantConfig = value;
  1890. merchantConfig = this._MerchantConfig;
  1891. if (merchantConfig != null)
  1892. {
  1893. merchantConfig.Click += value2;
  1894. }
  1895. }
  1896. }
  1897. // Token: 0x06000B5D RID: 2909 RVA: 0x0004EE60 File Offset: 0x0004D060
  1898. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  1899. public void InitializeComponent()
  1900. {
  1901. if (!this.m_AuthenticationConfig)
  1902. {
  1903. this.m_AuthenticationConfig = true;
  1904. Uri resourceLocator = new Uri("/Plain Craft Launcher 2;component/pages/pageversion/pageversionmod.xaml", UriKind.Relative);
  1905. Application.LoadComponent(this, resourceLocator);
  1906. }
  1907. }
  1908. // Token: 0x06000B5E RID: 2910 RVA: 0x0000414E File Offset: 0x0000234E
  1909. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  1910. internal Delegate _CreateDelegate(Type delegateType, string handler)
  1911. {
  1912. return Delegate.CreateDelegate(delegateType, this, handler);
  1913. }
  1914. // Token: 0x06000B5F RID: 2911 RVA: 0x0004EE90 File Offset: 0x0004D090
  1915. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  1916. [EditorBrowsable(EditorBrowsableState.Never)]
  1917. public void System_Windows_Markup_IComponentConnector_Connect(int connectionId, object target)
  1918. {
  1919. if (connectionId == 1)
  1920. {
  1921. this.PanAllBack = (Grid)target;
  1922. return;
  1923. }
  1924. if (connectionId == 2)
  1925. {
  1926. this.PanBack = (MyScrollViewer)target;
  1927. return;
  1928. }
  1929. if (connectionId == 3)
  1930. {
  1931. this.PanMain = (StackPanel)target;
  1932. return;
  1933. }
  1934. if (connectionId == 4)
  1935. {
  1936. this.SearchBox = (MySearchBox)target;
  1937. return;
  1938. }
  1939. if (connectionId == 5)
  1940. {
  1941. this.PanManage = (MyCard)target;
  1942. return;
  1943. }
  1944. if (connectionId == 6)
  1945. {
  1946. this.BtnManageOpen = (MyButton)target;
  1947. return;
  1948. }
  1949. if (connectionId == 7)
  1950. {
  1951. this.BtnManageInstall = (MyButton)target;
  1952. return;
  1953. }
  1954. if (connectionId == 8)
  1955. {
  1956. this.BtnManageDownload = (MyButton)target;
  1957. return;
  1958. }
  1959. if (connectionId == 9)
  1960. {
  1961. this.BtnManageSelectAll = (MyButton)target;
  1962. return;
  1963. }
  1964. if (connectionId == 10)
  1965. {
  1966. this.BtnManageCheck = (MyButton)target;
  1967. return;
  1968. }
  1969. if (connectionId == 11)
  1970. {
  1971. this.PanListBack = (MyCard)target;
  1972. return;
  1973. }
  1974. if (connectionId == 12)
  1975. {
  1976. this.PanFilter = (StackPanel)target;
  1977. return;
  1978. }
  1979. if (connectionId == 13)
  1980. {
  1981. this.BtnFilterAll = (MyRadioButton)target;
  1982. return;
  1983. }
  1984. if (connectionId == 14)
  1985. {
  1986. this.BtnFilterEnabled = (MyRadioButton)target;
  1987. return;
  1988. }
  1989. if (connectionId == 15)
  1990. {
  1991. this.BtnFilterDisabled = (MyRadioButton)target;
  1992. return;
  1993. }
  1994. if (connectionId == 16)
  1995. {
  1996. this.BtnFilterCanUpdate = (MyRadioButton)target;
  1997. return;
  1998. }
  1999. if (connectionId == 17)
  2000. {
  2001. this.BtnFilterError = (MyRadioButton)target;
  2002. return;
  2003. }
  2004. if (connectionId == 18)
  2005. {
  2006. this.PanList = (StackPanel)target;
  2007. return;
  2008. }
  2009. if (connectionId == 19)
  2010. {
  2011. this.PanEmpty = (MyCard)target;
  2012. return;
  2013. }
  2014. if (connectionId == 20)
  2015. {
  2016. this.BtnHintDownload = (MyButton)target;
  2017. return;
  2018. }
  2019. if (connectionId == 21)
  2020. {
  2021. this.BtnHintInstall = (MyButton)target;
  2022. return;
  2023. }
  2024. if (connectionId == 22)
  2025. {
  2026. this.BtnHintOpen = (MyButton)target;
  2027. return;
  2028. }
  2029. if (connectionId == 23)
  2030. {
  2031. this.PanLoad = (MyCard)target;
  2032. return;
  2033. }
  2034. if (connectionId == 24)
  2035. {
  2036. this.Load = (MyLoading)target;
  2037. return;
  2038. }
  2039. if (connectionId == 25)
  2040. {
  2041. this.CardSelect = (MyCard)target;
  2042. return;
  2043. }
  2044. if (connectionId == 26)
  2045. {
  2046. this.TransSelect = (TranslateTransform)target;
  2047. return;
  2048. }
  2049. if (connectionId == 27)
  2050. {
  2051. this.LabSelect = (TextBlock)target;
  2052. return;
  2053. }
  2054. if (connectionId == 28)
  2055. {
  2056. this.BtnSelectUpdate = (MyIconTextButton)target;
  2057. return;
  2058. }
  2059. if (connectionId == 29)
  2060. {
  2061. this.BtnSelectEnable = (MyIconTextButton)target;
  2062. return;
  2063. }
  2064. if (connectionId == 30)
  2065. {
  2066. this.BtnSelectDisable = (MyIconTextButton)target;
  2067. return;
  2068. }
  2069. if (connectionId == 31)
  2070. {
  2071. this.BtnSelectDelete = (MyIconTextButton)target;
  2072. return;
  2073. }
  2074. if (connectionId == 32)
  2075. {
  2076. this.BtnSelectCancel = (MyIconTextButton)target;
  2077. return;
  2078. }
  2079. this.m_AuthenticationConfig = true;
  2080. }
  2081. // Token: 0x040005A1 RID: 1441
  2082. private bool getterConfig;
  2083. // Token: 0x040005A2 RID: 1442
  2084. public Dictionary<string, MyLocalModItem> tokenConfig;
  2085. // Token: 0x040005A3 RID: 1443
  2086. private int expressionConfig;
  2087. // Token: 0x040005A4 RID: 1444
  2088. public List<string> m_WriterConfig;
  2089. // Token: 0x040005A5 RID: 1445
  2090. private PageVersionMod.FilterType m_RegistryConfig;
  2091. // Token: 0x040005A6 RID: 1446
  2092. public static List<string> _RuleConfig = new List<string>();
  2093. // Token: 0x040005A7 RID: 1447
  2094. private List<ModMod.McMod> _ProccesorConfig;
  2095. // Token: 0x040005A8 RID: 1448
  2096. [AccessedThroughProperty("PanAllBack")]
  2097. [CompilerGenerated]
  2098. private Grid setterConfig;
  2099. // Token: 0x040005A9 RID: 1449
  2100. [AccessedThroughProperty("PanBack")]
  2101. [CompilerGenerated]
  2102. private MyScrollViewer factoryConfig;
  2103. // Token: 0x040005AA RID: 1450
  2104. [AccessedThroughProperty("PanMain")]
  2105. [CompilerGenerated]
  2106. private StackPanel exporterConfig;
  2107. // Token: 0x040005AB RID: 1451
  2108. [AccessedThroughProperty("SearchBox")]
  2109. [CompilerGenerated]
  2110. private MySearchBox m_ImporterConfig;
  2111. // Token: 0x040005AC RID: 1452
  2112. [AccessedThroughProperty("PanManage")]
  2113. [CompilerGenerated]
  2114. private MyCard m_WorkerConfig;
  2115. // Token: 0x040005AD RID: 1453
  2116. [AccessedThroughProperty("BtnManageOpen")]
  2117. [CompilerGenerated]
  2118. private MyButton connectionConfig;
  2119. // Token: 0x040005AE RID: 1454
  2120. [AccessedThroughProperty("BtnManageInstall")]
  2121. [CompilerGenerated]
  2122. private MyButton m_ServerConfig;
  2123. // Token: 0x040005AF RID: 1455
  2124. [AccessedThroughProperty("BtnManageDownload")]
  2125. [CompilerGenerated]
  2126. private MyButton m_ResolverConfig;
  2127. // Token: 0x040005B0 RID: 1456
  2128. [AccessedThroughProperty("BtnManageSelectAll")]
  2129. [CompilerGenerated]
  2130. private MyButton statusConfig;
  2131. // Token: 0x040005B1 RID: 1457
  2132. [AccessedThroughProperty("BtnManageCheck")]
  2133. [CompilerGenerated]
  2134. private MyButton _RoleConfig;
  2135. // Token: 0x040005B2 RID: 1458
  2136. [AccessedThroughProperty("PanListBack")]
  2137. [CompilerGenerated]
  2138. private MyCard structConfig;
  2139. // Token: 0x040005B3 RID: 1459
  2140. [AccessedThroughProperty("PanFilter")]
  2141. [CompilerGenerated]
  2142. private StackPanel _PrinterConfig;
  2143. // Token: 0x040005B4 RID: 1460
  2144. [AccessedThroughProperty("BtnFilterAll")]
  2145. [CompilerGenerated]
  2146. private MyRadioButton m_ValConfig;
  2147. // Token: 0x040005B5 RID: 1461
  2148. [AccessedThroughProperty("BtnFilterEnabled")]
  2149. [CompilerGenerated]
  2150. private MyRadioButton m_AttrConfig;
  2151. // Token: 0x040005B6 RID: 1462
  2152. [AccessedThroughProperty("BtnFilterDisabled")]
  2153. [CompilerGenerated]
  2154. private MyRadioButton candidateConfig;
  2155. // Token: 0x040005B7 RID: 1463
  2156. [AccessedThroughProperty("BtnFilterCanUpdate")]
  2157. [CompilerGenerated]
  2158. private MyRadioButton advisorConfig;
  2159. // Token: 0x040005B8 RID: 1464
  2160. [CompilerGenerated]
  2161. [AccessedThroughProperty("BtnFilterError")]
  2162. private MyRadioButton accountConfig;
  2163. // Token: 0x040005B9 RID: 1465
  2164. [CompilerGenerated]
  2165. [AccessedThroughProperty("PanList")]
  2166. private StackPanel queueConfig;
  2167. // Token: 0x040005BA RID: 1466
  2168. [AccessedThroughProperty("PanEmpty")]
  2169. [CompilerGenerated]
  2170. private MyCard m_EventConfig;
  2171. // Token: 0x040005BB RID: 1467
  2172. [CompilerGenerated]
  2173. [AccessedThroughProperty("BtnHintDownload")]
  2174. private MyButton _ManagerConfig;
  2175. // Token: 0x040005BC RID: 1468
  2176. [CompilerGenerated]
  2177. [AccessedThroughProperty("BtnHintInstall")]
  2178. private MyButton _ModelConfig;
  2179. // Token: 0x040005BD RID: 1469
  2180. [AccessedThroughProperty("BtnHintOpen")]
  2181. [CompilerGenerated]
  2182. private MyButton wrapperConfig;
  2183. // Token: 0x040005BE RID: 1470
  2184. [CompilerGenerated]
  2185. [AccessedThroughProperty("PanLoad")]
  2186. private MyCard _BaseConfig;
  2187. // Token: 0x040005BF RID: 1471
  2188. [CompilerGenerated]
  2189. [AccessedThroughProperty("Load")]
  2190. private MyLoading m_AttributeConfig;
  2191. // Token: 0x040005C0 RID: 1472
  2192. [CompilerGenerated]
  2193. [AccessedThroughProperty("CardSelect")]
  2194. private MyCard _CodeConfig;
  2195. // Token: 0x040005C1 RID: 1473
  2196. [CompilerGenerated]
  2197. [AccessedThroughProperty("TransSelect")]
  2198. private TranslateTransform prototypeConfig;
  2199. // Token: 0x040005C2 RID: 1474
  2200. [AccessedThroughProperty("LabSelect")]
  2201. [CompilerGenerated]
  2202. private TextBlock _AnnotationConfig;
  2203. // Token: 0x040005C3 RID: 1475
  2204. [AccessedThroughProperty("BtnSelectUpdate")]
  2205. [CompilerGenerated]
  2206. private MyIconTextButton _InfoConfig;
  2207. // Token: 0x040005C4 RID: 1476
  2208. [CompilerGenerated]
  2209. [AccessedThroughProperty("BtnSelectEnable")]
  2210. private MyIconTextButton adapterConfig;
  2211. // Token: 0x040005C5 RID: 1477
  2212. [AccessedThroughProperty("BtnSelectDisable")]
  2213. [CompilerGenerated]
  2214. private MyIconTextButton m_FacadeConfig;
  2215. // Token: 0x040005C6 RID: 1478
  2216. [AccessedThroughProperty("BtnSelectDelete")]
  2217. [CompilerGenerated]
  2218. private MyIconTextButton m_ListConfig;
  2219. // Token: 0x040005C7 RID: 1479
  2220. [AccessedThroughProperty("BtnSelectCancel")]
  2221. [CompilerGenerated]
  2222. private MyIconTextButton _MerchantConfig;
  2223. // Token: 0x040005C8 RID: 1480
  2224. private bool m_AuthenticationConfig;
  2225. // Token: 0x02000110 RID: 272
  2226. private enum FilterType
  2227. {
  2228. // Token: 0x040005CA RID: 1482
  2229. All,
  2230. // Token: 0x040005CB RID: 1483
  2231. Enabled,
  2232. // Token: 0x040005CC RID: 1484
  2233. Disabled,
  2234. // Token: 0x040005CD RID: 1485
  2235. CanUpdate,
  2236. // Token: 0x040005CE RID: 1486
  2237. Unavailable
  2238. }
  2239. }
  2240. }