diff --git a/scr/SCMBot/Main.cs b/scr/SCMBot/Main.cs index 733dc56..ba9a923 100644 --- a/scr/SCMBot/Main.cs +++ b/scr/SCMBot/Main.cs @@ -202,8 +202,6 @@ private void LoadSettings(bool loadtabs) settingsForm.stopFundsBox.Text = MainScanItem.LogItem.DoFracture(settings.StopFunds.ToString()); stopfundsVal = settings.StopFunds; - settingsForm.FeeCheckBox.Checked = settings.withFee; - settingsForm.playSndCheckBox.Checked = settings.playSnd; settingsForm.resDelayBox.Text = settings.resellDelay.ToString(); @@ -330,8 +328,6 @@ private void SaveSettings(bool savetabs) settings.StopFunds = Convert.ToInt32(SteamSite.GetSweetPrice(settingsForm.stopFundsBox.Text)); stopfundsVal = settings.StopFunds; - settings.withFee = settingsForm.FeeCheckBox.Checked; - settings.Language = settingsForm.intLangComboBox.SelectedItem.ToString(); settings.formParams = new MainFormParams(lastFrmSize, lastFrmPos, this.WindowState, @@ -1211,12 +1207,26 @@ private void button1_Click(object sender, EventArgs e) if (comboBox3.SelectedIndex == 8) { steam_srch.LoadOnSale = true; + SellButton.Text = Strings.RemSell; + steam_srch.isRemove = true; + textBox1.Clear(); + textBox3.Clear(); + textBox1.ReadOnly = true; + textBox3.ReadOnly = true; + button2.Enabled = false; } else { steam_srch.LoadOnSale = false; steam_srch.invApp = comboBox3.SelectedIndex; + SellButton.Text = Strings.Sell; + steam_srch.isRemove = false; + textBox1.ReadOnly = false; + textBox3.ReadOnly = false; } + + SellButton.Enabled = false; + InventoryList.Items.Clear(); steam_srch.loadInventory(); } else @@ -1247,11 +1257,7 @@ private void SellButton_Click(object sender, EventArgs e) var ouritem = filteredInvList[InventoryList.CheckedItems[i].Index]; if ((ouritem.Marketable) && (ouritem.Price != "0")) { - string truePrice = ouritem.Price; - - if (settings.withFee) - truePrice = CalcWithFee(truePrice); - steam_srch.toSellList.Add(new SteamSite.ItemToSell(ouritem.AssetId, truePrice)); + steam_srch.toSellList.Add(new SteamSite.ItemToSell(ouritem.AssetId, CalcWithFee(ouritem.Price))); } } @@ -1445,22 +1451,7 @@ private void searchBox_KeyUp(object sender, KeyEventArgs e) private void comboBox3_SelectedIndexChanged(object sender, EventArgs e) { - if (comboBox3.SelectedIndex == 8) - { - SellButton.Text = Strings.RemSell; - steam_srch.isRemove = true; - textBox1.Clear(); - textBox1.ReadOnly = true; - button2.Enabled = false; - } - else - { - SellButton.Text = Strings.Sell; - steam_srch.isRemove = false; - textBox1.ReadOnly = false; - } - SellButton.Enabled = false; } diff --git a/scr/SCMBot/Properties/Settings.Designer.cs b/scr/SCMBot/Properties/Settings.Designer.cs index 9bf8e4a..e7ddd59 100644 --- a/scr/SCMBot/Properties/Settings.Designer.cs +++ b/scr/SCMBot/Properties/Settings.Designer.cs @@ -316,21 +316,6 @@ public bool ignoreWarn } } - [global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))] - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("true")] - public bool withFee - { - get - { - return ((bool)(this["withFee"])); - } - set - { - this["withFee"] = value; - } - } [global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))] [global::System.Configuration.UserScopedSettingAttribute()] diff --git a/scr/SCMBot/SettingsFrm.Designer.cs b/scr/SCMBot/SettingsFrm.Designer.cs index b5c2aab..bad457a 100644 --- a/scr/SCMBot/SettingsFrm.Designer.cs +++ b/scr/SCMBot/SettingsFrm.Designer.cs @@ -57,7 +57,6 @@ private void InitializeComponent() this.tabPage1 = new System.Windows.Forms.TabPage(); this.button2 = new System.Windows.Forms.Button(); this.tabPage2 = new System.Windows.Forms.TabPage(); - this.FeeCheckBox = new System.Windows.Forms.CheckBox(); this.stopFundsBox = new System.Windows.Forms.TextBox(); this.label15 = new System.Windows.Forms.Label(); this.actualBox = new System.Windows.Forms.CheckBox(); @@ -270,7 +269,6 @@ private void InitializeComponent() // // tabPage2 // - this.tabPage2.Controls.Add(this.FeeCheckBox); this.tabPage2.Controls.Add(this.stopFundsBox); this.tabPage2.Controls.Add(this.label15); this.tabPage2.Controls.Add(this.actualBox); @@ -284,12 +282,6 @@ private void InitializeComponent() this.tabPage2.Name = "tabPage2"; this.tabPage2.UseVisualStyleBackColor = true; // - // FeeCheckBox - // - resources.ApplyResources(this.FeeCheckBox, "FeeCheckBox"); - this.FeeCheckBox.Name = "FeeCheckBox"; - this.FeeCheckBox.UseVisualStyleBackColor = true; - // // stopFundsBox // resources.ApplyResources(this.stopFundsBox, "stopFundsBox"); @@ -434,7 +426,6 @@ private void InitializeComponent() public System.Windows.Forms.CheckBox keepLogBox; public System.Windows.Forms.TextBox stopFundsBox; private System.Windows.Forms.Label label15; - public System.Windows.Forms.CheckBox FeeCheckBox; public System.Windows.Forms.CheckBox scanHtlmBox; private System.Windows.Forms.CheckBox randomDelayBox; private System.Windows.Forms.Label label17; diff --git a/scr/SCMBot/SettingsFrm.cs b/scr/SCMBot/SettingsFrm.cs index b13a68b..6c14f1f 100644 --- a/scr/SCMBot/SettingsFrm.cs +++ b/scr/SCMBot/SettingsFrm.cs @@ -63,5 +63,7 @@ private void SettingsFrm_Load(object sender, EventArgs e) } + + } } diff --git a/scr/SCMBot/SettingsFrm.resx b/scr/SCMBot/SettingsFrm.resx index 6cb0615..9a36138 100644 --- a/scr/SCMBot/SettingsFrm.resx +++ b/scr/SCMBot/SettingsFrm.resx @@ -279,7 +279,7 @@ tabPage2 - 4 + 3 True @@ -310,7 +310,7 @@ tabPage2 - 6 + 5 True @@ -340,7 +340,7 @@ tabPage2 - 8 + 7 True @@ -367,7 +367,7 @@ tabPage2 - 9 + 8 True @@ -394,7 +394,7 @@ tabPage2 - 5 + 4 russian @@ -490,7 +490,7 @@ tabPage2 - 7 + 6 233, 208 @@ -840,6 +840,18 @@ 1 + + 67, 90 + + + 113, 25 + + + 33 + + + Import cookie + button2 @@ -879,17 +891,14 @@ 0 - - FeeCheckBox - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 136, 121 - - tabPage2 + + 85, 20 - - 0 + + 70 stopFundsBox @@ -901,7 +910,25 @@ tabPage2 - 1 + 0 + + + True + + + NoControl + + + 19, 124 + + + 111, 13 + + + 69 + + + Stop Buying Items at: label15 @@ -913,7 +940,22 @@ tabPage2 - 2 + 1 + + + True + + + 17, 98 + + + 107, 17 + + + 68 + + + Load actual price actualBox @@ -925,7 +967,7 @@ tabPage2 - 3 + 2 4, 24 @@ -954,6 +996,21 @@ 1 + + True + + + 109, 118 + + + 70, 17 + + + 66 + + + Keep Log + keepLogBox @@ -1185,162 +1242,6 @@ 0 - - 67, 90 - - - 113, 25 - - - 33 - - - Import cookie - - - button2 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage1 - - - 0 - - - True - - - 136, 98 - - - 150, 17 - - - 72 - - - Sell by your price with fee - - - FeeCheckBox - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage2 - - - 0 - - - 136, 121 - - - 85, 20 - - - 70 - - - stopFundsBox - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage2 - - - 1 - - - True - - - NoControl - - - 19, 124 - - - 111, 13 - - - 69 - - - Stop Buying Items at: - - - label15 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage2 - - - 2 - - - True - - - 17, 98 - - - 107, 17 - - - 68 - - - Load actual price - - - actualBox - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage2 - - - 3 - - - True - - - 109, 118 - - - 70, 17 - - - 66 - - - Keep Log - - - keepLogBox - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage3 - - - 0 - True diff --git a/scr/SCMBot/SettingsFrm.ru-RU.resx b/scr/SCMBot/SettingsFrm.ru-RU.resx index 9c98d6c..5b47d03 100644 --- a/scr/SCMBot/SettingsFrm.ru-RU.resx +++ b/scr/SCMBot/SettingsFrm.ru-RU.resx @@ -119,7 +119,7 @@ - 79, 17 + 80, 17 Автологин @@ -128,7 +128,7 @@ 17, 44 - 45, 13 + 44, 13 Пароль @@ -137,7 +137,7 @@ 20, 18 - 38, 13 + 37, 13 Логин @@ -149,7 +149,7 @@ 20, 69 - 132, 13 + 134, 13 Задержка перепродажи: @@ -170,7 +170,7 @@ 19, 19 - 38, 13 + 37, 13 Язык: @@ -206,7 +206,7 @@ на странице - 113, 13 + 114, 13 Результатов поиска: @@ -215,7 +215,7 @@ 135, 41 - 38, 13 + 37, 13 Язык: @@ -245,23 +245,17 @@ строк - 108, 13 + 110, 13 Очищать лог после: - 191, 13 + 188, 13 * Требуется перезапуск программы - - 136, 13 - - - Параллельных запросов: - Логин @@ -275,7 +269,7 @@ 22, 108 - 172, 17 + 168, 17 Продажа с учетом комиссии @@ -287,7 +281,7 @@ 19, 127 - 182, 13 + 181, 13 Не покупать при балансе меньше: @@ -296,7 +290,7 @@ 22, 89 - 168, 17 + 174, 17 Загружать актуальную цену @@ -308,7 +302,7 @@ 150, 118 - 76, 17 + 75, 17 Вести лог @@ -316,8 +310,35 @@ Сеть + + 156, 13 + + + Задержка между запросами: + + + 217, 18 + + + 18, 13 + + + мс + + + 166, 15 + + + 239, 17 + + + 75, 17 + + + Случайно + - 196, 17 + 189, 17 Сканировать HTML вместо JSON diff --git a/scr/SCMBot/SteamUtils.cs b/scr/SCMBot/SteamUtils.cs index 10e9144..39786ce 100644 --- a/scr/SCMBot/SteamUtils.cs +++ b/scr/SCMBot/SteamUtils.cs @@ -1012,17 +1012,16 @@ public int ParseOnSale(string content, CurrInfoLst currLst) string appidRaw = Regex.Match(currmatch, "(?<=market_listing_item_name_link)(.*)(?=)").ToString(); string pageLnk = Regex.Match(appidRaw, "(?<=href=\")(.*)(?=\">)").ToString(); - - string captainPrice = Regex.Match(currmatch, "(?<=market_listing_price\">)(.*)(?= )", RegexOptions.Singleline).ToString().Trim(); - - captainPrice = Regex.Replace(captainPrice, currLst.GetAscii(), string.Empty); + string captainPrice = Regex.Match(currmatch, "(?<=This is the price the buyer pays.\">)(.*)(?=This is how much you will receive)", RegexOptions.Singleline).ToString().Trim(); + + captainPrice = GetSweetPrice(Regex.Replace(captainPrice, currLst.GetAscii(), string.Empty)); string[] LinkName = Regex.Match(currmatch, "(?<=_name_link\" href=\")(.*)(?=
)").ToString().Split(new string[] { "\">" }, StringSplitOptions.None); string ItemType = Regex.Match(currmatch, "(?<=_listing_game_name\">)(.*)(?=)").ToString(); - inventList.Add(new InventItem(listId, LinkName[1], ItemType, GetSweetPrice(captainPrice), ImgLink, string.Empty, true, true, pageLnk)); + inventList.Add(new InventItem(listId, LinkName[1], ItemType, captainPrice, ImgLink, string.Empty, true, true, pageLnk)); }