Beispiel #1
0
        public void LoadSettings(string path)
        {
            if (Settings != null)
            {
                throw new Exception("Settings already loaded");
            }

            Settings = new BotSettings(path);
            Settings.Load();
        }
Beispiel #2
0
 /// <summary>
 /// Iterate over each TextBox on the control and
 /// LOAD it's value from the corresponding value in the
 /// BotSettings dictionary
 /// </summary>
 private void LoadFromSettings()
 {
     BotSettings.Load();
     foreach (var control in thisGrid.Children)
     {
         if (control.GetType() == typeof(TextBox))
         {
             TextBox temp = ((TextBox)control);
             temp.Text = BotSettings._settings[(temp.Name)].Value;
         }
     }
 }
Beispiel #3
0
        public void LoadSettings(string path)
        {
            if (Settings != null)
                throw new Exception("Settings already loaded");

            Settings = new BotSettings(path);
            Settings.Load();
        }
        public void LoadBotSettings(string path)
        {
            var configFile = Path.Combine(path, "bot.json");

            _botSettings.Load(configFile);
        }