示例#1
0
 /// <summary>
 /// Loads the config file.
 /// </summary>
 protected void LoadConfigurationFile()
 {
     if (HasUnsavedChanges)
     {
         XanBotLogger.WriteLine("§4A request to reload the config file was made, but there were unsaved manual changes in the config file made via code. The config file will not be reloaded, which may have adverse effects!", true);
         return;
     }
     string[] lines = BaseHandler.GetLinesOfFile(ConfigFileName);
     foreach (string line in lines)
     {
         string[] values      = line.Split(' ');
         string   index       = values[0];
         string   stringValue = line.Substring(index.Length + 1).Replace("\n", "").Replace("\r", "");
         ConfigValues[index] = stringValue;
     }
 }