|
| 1 | +using System; |
| 2 | +using System.CodeDom.Compiler; |
| 3 | +using System.Collections.Generic; |
| 4 | +using System.Diagnostics; |
| 5 | +using System.Reflection; |
| 6 | +using System.Resources; |
| 7 | +using System.Threading; |
| 8 | +using System.Windows; |
| 9 | +using <PrivateImplementationDetails>{0817497A-5D09-4424-A2DC-C72ADD256165}; |
| 10 | +using libthemes.Themes; |
| 11 | +using SFVipPlayer.Extensions; |
| 12 | +using SFVipPlayer.Helpers; |
| 13 | + |
| 14 | +namespace SFVipPlayer |
| 15 | +{ |
| 16 | + // Token: 0x02000006 RID: 6 |
| 17 | + public partial class App : Application |
| 18 | + { |
| 19 | + // Token: 0x1700000A RID: 10 |
| 20 | + // (get) Token: 0x0600001A RID: 26 RVA: 0x00002159 File Offset: 0x00000359 |
| 21 | + // (set) Token: 0x0600001B RID: 27 RVA: 0x00002161 File Offset: 0x00000361 |
| 22 | + public string[] StartupArgs { get; set; } |
| 23 | + |
| 24 | + // Token: 0x0600001C RID: 28 RVA: 0x0000216A File Offset: 0x0000036A |
| 25 | + public App() |
| 26 | + { |
| 27 | + App.Instance = this; |
| 28 | + App._loadedAssemblies = new Dictionary<string, Assembly>(); |
| 29 | + App._keyName = 55277722-7CFD-4E2E-A571-21B17BE1EBDA.a(); |
| 30 | + AppDomain.CurrentDomain.AssemblyResolve += App.CurrentDomain_AssemblyResolve; |
| 31 | + DispatcherHelper.Initialize(); |
| 32 | + } |
| 33 | + |
| 34 | + // Token: 0x0600001D RID: 29 RVA: 0x000021A8 File Offset: 0x000003A8 |
| 35 | + private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) |
| 36 | + { |
| 37 | + Assembly assembly = null; |
| 38 | + string name = new AssemblyName(args.Name).Name; |
| 39 | + if (name != null && !App._loadedAssemblies.TryGetValue(name, out assembly) && name == App._keyName) |
| 40 | + { |
| 41 | + assembly = Assembly.Load(((byte[])new ResourceManager(55277722-7CFD-4E2E-A571-21B17BE1EBDA.B(), typeof(App).Assembly).GetResourceSet(Thread.CurrentThread.CurrentCulture, true, true).GetObject(name)).LoadAssemblyImage()); |
| 42 | + App._loadedAssemblies.Add(name, assembly); |
| 43 | + } |
| 44 | + return assembly; |
| 45 | + } |
| 46 | + |
| 47 | + // Token: 0x0600001E RID: 30 RVA: 0x00002234 File Offset: 0x00000434 |
| 48 | + protected override void OnStartup(StartupEventArgs e) |
| 49 | + { |
| 50 | + this.StartupArgs = e.Args; |
| 51 | + base.OnStartup(e); |
| 52 | + StyleManager.SetAppTheme(base.Resources, ThemesStyle.Blue); |
| 53 | + } |
| 54 | + |
| 55 | + // Token: 0x0400000E RID: 14 |
| 56 | + public static App Instance; |
| 57 | + |
| 58 | + // Token: 0x0400000F RID: 15 |
| 59 | + private static IDictionary<string, Assembly> _loadedAssemblies; |
| 60 | + |
| 61 | + // Token: 0x04000010 RID: 16 |
| 62 | + private static string _keyName; |
| 63 | + } |
| 64 | +} |
0 commit comments