public VendorBuyTabViewModel() { IncomingPacketHandlers.VendorBuyDisplayEvent += OnVendorBuyDisplayEvent; VendorBuyManager manager = VendorBuyManager.GetInstance(); manager.Items = Items; }
public static void SetVendorBuyAutoBuy(string listName, string onOff = "toggle") { VendorBuyManager manager = VendorBuyManager.GetInstance(); VendorBuyAgentEntry entry = manager.Items.FirstOrDefault(e => e.Name.Trim().ToLower().Equals(listName.Trim().ToLower())); if (entry == null) { UOC.SystemMessage(Strings.Invalid_VendorBuy_list_name___, (int)UOC.SystemMessageHues.Red); return; } switch (onOff.Trim().ToLower()) { case "on": entry.Enabled = true; break; case "off": entry.Enabled = false; break; case "toggle": entry.Enabled = !entry.Enabled; break; default: UOC.SystemMessage(Strings.Invalid_state_name___on____off___or__toggle____); break; } }