PageOtherHelpDetail.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. using System;
  2. using System.CodeDom.Compiler;
  3. using System.ComponentModel;
  4. using System.Runtime.CompilerServices;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Markup;
  8. using Microsoft.VisualBasic.CompilerServices;
  9. namespace PCL
  10. {
  11. // Token: 0x02000103 RID: 259
  12. [DesignerGenerated]
  13. public class PageOtherHelpDetail : MyPageRight, IRefreshable, IComponentConnector
  14. {
  15. // Token: 0x06000A46 RID: 2630 RVA: 0x00007453 File Offset: 0x00005653
  16. public PageOtherHelpDetail()
  17. {
  18. base.Loaded += this.PageOtherHelpDetail_Loaded;
  19. this.InitializeComponent();
  20. }
  21. // Token: 0x06000A47 RID: 2631 RVA: 0x00007474 File Offset: 0x00005674
  22. public void Refresh()
  23. {
  24. this.Init(new ModMain.HelpEntry(this._DefinitionClient._DescriptorMap));
  25. }
  26. // Token: 0x06000A48 RID: 2632 RVA: 0x0000748D File Offset: 0x0000568D
  27. private void PageOtherHelpDetail_Loaded(object sender, RoutedEventArgs e)
  28. {
  29. this.PanBack.ScrollToTop();
  30. }
  31. // Token: 0x06000A49 RID: 2633 RVA: 0x0004AB24 File Offset: 0x00048D24
  32. public bool Init(ModMain.HelpEntry Entry)
  33. {
  34. string text = "<StackPanel xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:local=\"clr-namespace:PCL;assembly=Plain Craft Launcher 2\">" + Entry.testsError + "</StackPanel>";
  35. bool result;
  36. try
  37. {
  38. if (string.IsNullOrEmpty(Entry.testsError))
  39. {
  40. throw new Exception("帮助 xaml 文件为空");
  41. }
  42. this._DefinitionClient = Entry;
  43. this.PanCustom.Children.Clear();
  44. text = ModMain.HelpArgumentReplace(text);
  45. this.PanCustom.Children.Add((UIElement)ModBase.GetObjectFromXML(text));
  46. result = true;
  47. }
  48. catch (Exception ex)
  49. {
  50. ModBase.Log("[System] 自定义信息内容:\r\n" + text, ModBase.LogLevel.Normal, "出现错误");
  51. ModBase.Log(ex, "加载帮助 xaml 文件失败", ModBase.LogLevel.Msgbox, "出现错误");
  52. result = false;
  53. }
  54. return result;
  55. }
  56. // Token: 0x1700017F RID: 383
  57. // (get) Token: 0x06000A4A RID: 2634 RVA: 0x0000749A File Offset: 0x0000569A
  58. // (set) Token: 0x06000A4B RID: 2635 RVA: 0x000074A2 File Offset: 0x000056A2
  59. internal virtual MyScrollViewer PanBack { get; set; }
  60. // Token: 0x17000180 RID: 384
  61. // (get) Token: 0x06000A4C RID: 2636 RVA: 0x000074AB File Offset: 0x000056AB
  62. // (set) Token: 0x06000A4D RID: 2637 RVA: 0x000074B3 File Offset: 0x000056B3
  63. internal virtual StackPanel PanCustom { get; set; }
  64. // Token: 0x06000A4E RID: 2638 RVA: 0x0004ABE8 File Offset: 0x00048DE8
  65. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  66. public void InitializeComponent()
  67. {
  68. if (!this.m_ParserConfig)
  69. {
  70. this.m_ParserConfig = true;
  71. Uri resourceLocator = new Uri("/Plain Craft Launcher 2;component/pages/pageother/pageotherhelpdetail.xaml", UriKind.Relative);
  72. Application.LoadComponent(this, resourceLocator);
  73. }
  74. }
  75. // Token: 0x06000A4F RID: 2639 RVA: 0x0000414E File Offset: 0x0000234E
  76. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  77. internal Delegate _CreateDelegate(Type delegateType, string handler)
  78. {
  79. return Delegate.CreateDelegate(delegateType, this, handler);
  80. }
  81. // Token: 0x06000A50 RID: 2640 RVA: 0x000074BC File Offset: 0x000056BC
  82. [EditorBrowsable(EditorBrowsableState.Never)]
  83. [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
  84. public void System_Windows_Markup_IComponentConnector_Connect(int connectionId, object target)
  85. {
  86. if (connectionId == 1)
  87. {
  88. this.PanBack = (MyScrollViewer)target;
  89. return;
  90. }
  91. if (connectionId == 2)
  92. {
  93. this.PanCustom = (StackPanel)target;
  94. return;
  95. }
  96. this.m_ParserConfig = true;
  97. }
  98. // Token: 0x04000550 RID: 1360
  99. public ModMain.HelpEntry _DefinitionClient;
  100. // Token: 0x04000551 RID: 1361
  101. [CompilerGenerated]
  102. [AccessedThroughProperty("PanBack")]
  103. private MyScrollViewer _StrategyClient;
  104. // Token: 0x04000552 RID: 1362
  105. [CompilerGenerated]
  106. [AccessedThroughProperty("PanCustom")]
  107. private StackPanel procClient;
  108. // Token: 0x04000553 RID: 1363
  109. private bool m_ParserConfig;
  110. }
  111. }