public static void ReloadConfig(bool silent = false) { AutoSort.ReloadConfig(); config.LoadConfig(); if (!silent) { Main.NewText("Inventory Enhancements Configuration Reloaded!", 0, 200, 160); } if (!char.IsLetter(config.SortKey) && config.SortHotkeyEnabled == true) { Main.NewText("The key \"" + config.SortKey + "\" is not a valid binding. It must be a letter. Reverting to Z", 200, 20, 20); config.SortKey = 'Z'; } if (!char.IsLetter(config.QSKey) && config.QSHotkeyEnabled == true) { Main.NewText("The key \"" + config.QSKey + "\" is not a valid binding. It must be a letter. Reverting to C", 200, 20, 20); config.QSKey = 'C'; } if (!char.IsLetter(config.HotbarSwapKey) && config.HotbarSwapKeyEnabled == true) { Main.NewText("The key \"" + config.HotbarSwapKey + "\" is not a valid binding. It must be a letter. Reverting to X", 200, 20, 20); config.HotbarSwapKey = 'X'; } if (!char.IsLetter(config.CAKey) && config.CAHotkeyEnabled == true) { Main.NewText("The key \"" + config.CAKey + "\" is not a valid binding. It must be a letter. Reverting to V", 200, 20, 20); config.CAKey = 'V'; } config.SaveConfig(); }
public static void Init(object sender, EventArgs e) { config = new Config(); config.LoadConfig(); }
public static void Init(object sender, EventArgs e) { config = new Config(); config.LoadConfig(); }