private void stopAll_Click(object sender, System.Windows.RoutedEventArgs e) { try { var settingsjson = textBox.Text; var settings = JsonConvert.DeserializeObject <Options>(settingsjson); ConfigurationManagerStatic.RewriteConfiguration(settings, ConfigurationPath + SelectedCfg); statustextBlock.Text = "Saved " + ConfigurationPath + SelectedCfg; } catch (Exception) { statustextBlock.Text = "Failed to save " + ConfigurationPath + SelectedCfg; } }
/// <summary> /// CustomFormattedClass Constructor. /// </summary> public CSGOProcess() { moduleManager = new ModuleManager(); Logger = Log.GetLogger(this.GetType().Name.ToString()); Modules = new List <IModule <object> >(); moduleList = new List <string> { "AgaHackTools.Example.MemoryReadingModule", "AgaHackTools.Example.CSGO.Misc", "AgaHackTools.Example.Triggerbot", }; ConfigurationManagerStatic.DefaultConfig(modulesCfg, moduleList); // Construct. ConfigurationManager = new ConfigurationManager(); }
public void Load() { Logger.Info(AppDomain.CurrentDomain.BaseDirectory); Logger.Info("Getting startup modules!"); Configs = ConfigurationManagerStatic.GetConfiguration <Options>(csgoSettings); moduleList = ConfigurationManagerStatic.GetConfiguration <List <string> >(modulesCfg); Logger.Info("Loading modules!"); //Load IMemory var memoryModuleAssembly = moduleManager.GetInstance("", "AgaHackTools.Memory.dll", "ISmartMemory"); _memory = moduleManager.ActivateInstance <ISmartMemory>(memoryModuleAssembly, "csgo"); Logger.Info("Loaded: Memory implementation lib"); //Load ModuleResponsable for memoryUpdates foreach (var item in moduleList) { // for Load(item); } }