namespace Hearthbuddy
{
    // Token: 0x02000022 RID: 34
    public class App : System.Windows.Application

// Hearthbuddy.App
// Token: 0x0600012B RID: 299 RVA: 0x00086C08 File Offset: 0x00084E08
protected override void OnStartup(StartupEventArgs e)
{
string text = "";
try
{
this.method_1();
}
catch (Exception exception)
{
App.ilog_0.Error("An exception occurred", exception);
try
{
this.method_2();
}
catch (Exception exception2)
{
App.ilog_0.Error("An exception occurred", exception2);
Logger.OpenLogFile();
Application.Current.Shutdown();
return;
}
}
try
{
App.ilog_0.Info("Now setting up JitProfiles...");
string text2 = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "JitProfiles");
if (!Directory.Exists(text2))
{
Directory.CreateDirectory(text2);
}
ProfileOptimization.SetProfileRoot(text2);
ProfileOptimization.StartProfile("JitProfile.jpf");
App.ilog_0.Info("JitProfiles successfully setup!");
}
catch (Exception exception3)
{
App.ilog_0.Error("An exception occurred", exception3);
}
base.Dispatcher.UnhandledException += this.method_4;
AppDomain.CurrentDomain.UnhandledException += this.method_3;
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture;
App.ilog_0.Info("Now beginning pre-start tasks.");
try
{
App.ilog_0.Info("Now checking prerequisites...");
this.method_0();
App.ilog_0.Info("Prerequisite check complete!");
}
catch (Exception arg)
{
App.ilog_0.ErrorFormat("{0}", arg);
Logger.OpenLogFile();
base.Shutdown();
return;
}
try
{
if (!File.Exists("DONOTDELETE.bin"))
{
App.ilog_0.Error("The file [DONOTDELETE.bin] does not exist. Please reinstall Hearthbuddy.");
Logger.OpenLogFile();
base.Shutdown();
return;
}
if (!Class7.smethod_4(out text))
{
App.ilog_0.Error("GetImageFileName failed.");
Logger.OpenLogFile();
base.Shutdown();
return;
}
if (new Uri(text).IsUnc)
{
App.ilog_0.Error("Hearthbuddy can no longer be ran from an UNC path. Please install Hearthbuddy to the current PC.");
Logger.OpenLogFile();
base.Shutdown();
return;
}
File.ReadAllBytes(text);
File.ReadAllBytes("DONOTDELETE.bin");
App.smethod_0(text);
}
catch (Exception arg2)
{
App.ilog_0.ErrorFormat("{0}", arg2);
Logger.OpenLogFile();
base.Shutdown();
return;
}
try
{
Class6 @class = new Class7().method_0("Hearthbuddy");
switch (@class.Enum1_0)
{
case Enum1.Success:
CodeCompiler.smethod_0(@class.String_0);
break;
case Enum1.Relaunch:
if (CommandLine.Arguments.Exists("noautolaunch"))
{
App.ilog_0.Info("Now exiting for manual relaunch.");
base.Shutdown();
}
else
{
App.ilog_0.Info("Now relaunching.");
Process.Start(@class.String_1, string.Join(" ", Environment.GetCommandLineArgs().Skip().Select(new Func<string, string>(App.Class11.Instance9.method_1))));
base.Shutdown();
}
return;
case Enum1.Error:
App.ilog_0.ErrorFormat("An error was encountered: {0}", @class.String_2);
Logger.OpenLogFile();
base.Shutdown();
return;
}
}
catch (Exception arg3)
{
App.ilog_0.ErrorFormat("Could not rename ourself on startup: {0}", arg3);
Logger.OpenLogFile();
base.Shutdown();
return;
}
try
{
if (!App.smethod_1(text))
{
App.ilog_0.ErrorFormat("An error occurred while trying to replace the process.", Array.Empty<object>());
Logger.OpenLogFile();
base.Shutdown();
return;
}
}
catch (Exception arg4)
{
App.ilog_0.ErrorFormat("Could not replace ourself on startup: {0}", arg4);
Logger.OpenLogFile();
base.Shutdown();
return;
}
App.ilog_0.Info("Pre-start tasks successfully completed.");
base.OnStartup(e);
}

最新文章

  1. 用CIL写程序:你好,沃尔德
  2. 从源代码构建 Go 开发环境
  3. Android 缓存
  4. Could not load file or assembly &#39;Microsoft.Office.Interop.Word, Version=14.0
  5. UVa 1635 (唯一分解定理) Irrelevant Elements
  6. 【转】于request.getSession(true/false/null)的区别
  7. 算法 python实现(三) 快速排序
  8. js中的模块化编写思维
  9. 用newLISP读取Hive的元数据
  10. c++自带倒置数组函数
  11. 基于文本图形(ncurses)的文本搜索工具 ncgrep
  12. vivo4.0系统怎么不ROOT激活Xposed框架的教程
  13. Android 项目中用得最多最火的第三方框架可能都在这里了
  14. React Native &amp; ES6 &amp; emoji
  15. mysql错误:The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement解决方法
  16. 【Git】(2)---checkout、branch、log、diff、.gitignore
  17. maven 项目连接mysql8.0版本时的注意事项
  18. spring redis @Cacheable注解使用部分错误及无效原因
  19. SSM项目问题中遇到 GET请求中有中文的情况
  20. maven 内置变量

热门文章

  1. LEANGOO成员
  2. (备忘)Window7下安装Python2.6及Django1.4
  3. Linux目录结构以及一些常见操作
  4. Git---初入开源代码管理库的学习过程003
  5. 常量和iota
  6. JavaScript教程——数据类型概述
  7. 扫描局域网ip存活
  8. 一段有关线搜索的从python到matlab的代码
  9. GLSLPROGRAM METALPROGRAM unity
  10. FlexPaper的深入了解和应用