routine的加载
发布时间:2020-12-14 05:58:50 所属栏目:Windows 来源:网络整理
导读:? // 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 = routin
? // 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; } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 如何在runonce-Key中运行powershell脚本?
- 使用CMake复制Qt4的DLL
- windows – f#中的缩进问题(vs2010 beta1)
- .net – 什么时候需要Windows SDK for MSBuild?
- Windows Server 2016-增强IPAM
- 如果WiX中不存在则复制
- vs调试程序缺少 msvcp140d.dll 解决方法
- windows-server-2003 – 热修复Win2003终端服务中任务栏(多
- tfs2012 – Microsoft.VSTS.Actions中可用的值
- windows-server-2008 – Windows AD域名更改的最佳时机
推荐文章
站长推荐
- windows-sbs-2008 – 我的公司已经超出了SBS / E
- 如何在Windows服务中运行APScheduler …我几乎就
- 使用与客户端相同的.NET版本替换COM注册的.dll时
- windows – 将RoboCopy与FtpUse结合使用
- 单元测试 – 使用Microsoft Fakes和静态通用方法
- windows – 如何在行继续之后正确转义引用的命令
- 反思 – 在Windows Phone 7上获取装配版本
- windows-server-2008 – Ping主机名有效但nslook
- windows – 如何在GoSublime的命令shell中退出“
- active-directory – 部署XP计算机无法使用Prest
热点阅读