// Hearthbuddy.Windows.MainWindow
// Token: 0x06000245 RID: 581 RVA: 0x0008C318 File Offset: 0x0008A518
[CompilerGenerated]
private void method_27()
{
List<IRoutine> routines = RoutineManager.Routines;
this.comboBox_1.ItemsSource = routines;
if (CommandLine.Arguments.Exists("routine"))
{
MainWindow.Class28 @class = new MainWindow.Class28();
@class.string_0 = CommandLine.Arguments.Single("routine");
IRoutine routine = routines.FirstOrDefault(new Func<IRoutine, bool>(@class.method_0));
if (routine != null)
{
this.comboBox_1.SelectedItem = routine;
}
}
else if (!string.IsNullOrEmpty(MainSettings.Instance.LastRoutine))
{
MainWindow.Class29 class2 = new MainWindow.Class29();
class2.string_0 = MainSettings.Instance.LastRoutine;
IRoutine routine2 = routines.FirstOrDefault(new Func<IRoutine, bool>(class2.method_0));
if (routine2 != null)
{
this.comboBox_1.SelectedItem = routine2;
}
}
if (this.comboBox_1.SelectedItem == null)
{
this.comboBox_1.SelectedItem = routines.FirstOrDefault<IRoutine>();
}
this.method_14();
}
// Triton.Bot.RoutineManager
// Token: 0x060011D3 RID: 4563 RVA: 0x000B7424 File Offset: 0x000B5624
public static bool Load()
{
try
{
string routinesPath = RoutineManager.RoutinesPath;
if (RoutineManager.Routines != null)
{
RoutineManager.ilog_0.ErrorFormat("[Load] This function can only be called once.", Array.Empty<object>());
return false;
}
if (!Directory.Exists(routinesPath))
{
Directory.CreateDirectory(routinesPath);
}
AssemblyLoader<IRoutine> assemblyLoader = new AssemblyLoader<IRoutine>(routinesPath, false);
RoutineManager.Routines = new List<IRoutine>();
foreach (IRoutine routine in assemblyLoader.Instances.AsReadOnly())
{
try
{
Utility.smethod_0(routine);
routine.Initialize();
RoutineManager.Routines.Add(routine);
}
catch (Exception exception)
{
RoutineManager.ilog_0.Debug("[Load] Exception thrown when initializing " + routine.Name + ". Routine will not be loaded.", exception);
Utility.smethod_1(routine);
routine.Deinitialize();
}
}
return true;
}
catch (Exception arg)
{
RoutineManager.ilog_0.ErrorFormat("[Load] An exception occurred: {0}.", arg);
}
return false;
}

最新文章

  1. 有关bootstrap之排版
  2. Jser 设计模式系列之面向对象 - 接口封装与继承
  3. JavaScript写在Html页面的&lt;head&gt;&lt;/head&gt;中
  4. 电量/信号的显示 imageLevel
  5. vs2010编辑器中找不到System.Web.Extensions.dll
  6. 2.在程序中如何实现Cookie信息的设置,读取和删除
  7. C#可扩展编程之MEF学习
  8. 第一章 git指令与设置
  9. HDU 2896 AC自动机 裸题
  10. 与《YII框架》不得不说的故事—5篇目录
  11. ORA-01092 ORA-12432: LBAC error: zllegnp:OCIStmtExecute 故障一例
  12. 数字是否可以被3和5同时整除,use if and % (21.9.2017)
  13. Ext JS 6开发实例(三) :主界面设计
  14. 第七课 路径与列表 html5学习2
  15. 【原创】从Rest到Graphql
  16. php中使用sphinx搜索引擎
  17. robotframework使用中的一些注意事项
  18. 解决Eclipse中“诡异”的错误:找不到或无法加载主类
  19. Shellcode入门
  20. ID基本操作(出血的定义)(置入图片)(添加页面)5.15

热门文章

  1. sql server统计总成绩和排名
  2. nginx: [emerg] directive &quot;upstream&quot; has no opening &quot;{&quot; in /application/nginx-1.6.3/conf/nginx.conf:13 ...
  3. ubuntu18.04 安装idea
  4. Formal Analysis of the TLS Handshake Protocol -----论文整理
  5. (转)大厂常问到的14个Java面试题
  6. websocket搭建的聊天室
  7. NXP LPC系列学习笔记汇总(持续更新中)
  8. EntityFramework 两个参数连续(中间有空格)问题
  9. Python3入门与进阶【笔记】
  10. 2019牛客多校B Beauty Values——思维题