/// <summary> /// (re)loads settings /// </summary> public void LoadSettings(bool constructor) { _currentSpec = null; BlacklistedInventoryItems.Clear(); NextPulse = DateTime.Now + TimeSpan.FromSeconds(1); // try { base.LoadFromXML(XElement.Load(GetSettingsPath(SettingsType.Settings, UsePVP))); } catch (Exception) { } var _path = GetSettingsPath(SettingsType.Weights, UsePVP); EquipMe.Log("Loading weights from: {0}", _path); var newset = EquipMe.LoadWeightSetFromXML(_path); if (newset != null) { WeightSet_Current = newset; } else { SaveSettings(); } }
private void button4_Click(object sender, EventArgs e) { foreach (var item in StyxWoW.Me.Inventory.Equipped.Items) { if (item == null) { continue; } EquipMe.Log("Equipped: {0}, score: {1}, inv type: {2}, wep class: {3}", item.Name, EquipMe.CalcScore(item), item.ItemInfo.InventoryType, item.ItemInfo.WeaponClass); } foreach (var item in StyxWoW.Me.BagItems) { if (item == null) { continue; } EquipMe.Log("Bag: {0}, score: {1}, inv type: {2}, wep class: {3}", item.Name, EquipMe.CalcScore(item), item.ItemInfo.InventoryType, item.ItemInfo.WeaponClass); } }
private void button3_Click(object sender, EventArgs e) { try { var ofd = new OpenFileDialog(); ofd.InitialDirectory = Logging.ApplicationPath; if (ofd.ShowDialog() == DialogResult.OK) { EquipMe.Log("Loading new weightset data from: {0}", ofd.FileName); var loadedset = EquipMe.LoadWeightSetFromXML(ofd.FileName); if (loadedset == null) { return; } EquipMeSettings.Instance.WeightSet_Current = loadedset; } } catch (Exception ex) { EquipMe.Log("Error loading weighset, exception\n{0}", ex); } }
private void button2_Click(object sender, EventArgs e) { EquipMe.Log("Reloading settings from file"); EquipMeSettings.Instance.LoadSettings(); UpdatePropertyGrids(); }
private void button1_Click(object sender, EventArgs e) { EquipMe.Log("Updating weights from wowhead"); EquipMe.UpdateWowhead(); UpdatePropertyGrids(); }