private void InventoryProgress(object sender, DoWorkEventArgs e) { int[] parameters = e.Argument as int[]; int invApp = parameters[0]; int invCount = 0; if (!LoadOnSale) { invCount = SteamParseSite.ParseInventory(SteamParsing.SendGet(string.Format(SteamLibrary._jsonInv, MyUserID, SteamLibrary.GetAppFromIndex(invApp, true).AppID), cookieCont, false, true)); } else { invCount = SteamParseSite.ParseOnSale(SteamParsing.SendGet(SteamLibrary._market, cookieCont, false, true)); } if (invCount > 0) { doMessage(flag.Inventory_Loaded, 0, string.Empty, true); } else { doMessage(flag.Inventory_Loaded, 1, string.Empty, true); } }
private void button7_Click(object sender, EventArgs e) { if (SteamParsing.InventList.Count == 0) { MessageBox.Show("Please load inventory first!", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (InvenLV.SelectedItems.Count == 0) { MessageBox.Show("Please select one item!", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } else { int app = comboBox1.SelectedIndex; SteamAutoFunction.SellingList.Clear(); for (int i = 0; i < InvenLV.SelectedItems.Count; i++) { var ouritem = SteamParsing.InventList[InvenLV.SelectedItems[i].Index]; if ((ouritem.Marketable) && (!ouritem.BuyPrice.Equals("0"))) { SteamAutoFunction.SellingList.Add(new SteamLibrary.ItemToSell(ouritem.AssetId, SteamLibrary.CalcWithFee(ouritem.BuyPrice), SteamLibrary.GetAppFromIndex(app, false))); } } if (SteamAutoFunction.SellingList.Count != 0) { if (SteamAutoFunction.IsRemove) { StatusLabel1.Text = "Removing"; StatusPB.Image = Properties.Resources.icon1; } else { StatusLabel1.Text = "Add to sell"; StatusPB.Image = Properties.Resources.icon1; } //steam_srch.sellDelay = Convert.ToInt32(sellDelayBox.Text); //steam_srch.isDelayRand = randomDelayBox.Checked; SteamAuto.SellThreadExcute(); } else { MessageBox.Show("Select items to sell first!", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }