Skip to content

Commit

Permalink
Fixed actual price loading
Browse files Browse the repository at this point in the history
For TF2 inventory and "your price"
  • Loading branch information
Maxx53 committed May 12, 2014
1 parent 0744102 commit 78b9f00
Show file tree
Hide file tree
Showing 10 changed files with 2,520 additions and 2,394 deletions.
72 changes: 33 additions & 39 deletions scr/SCMBot/Main.Designer.cs

Large diffs are not rendered by default.

69 changes: 62 additions & 7 deletions scr/SCMBot/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ private void LoadSettings(bool loadtabs)
settingsForm.searchResBox.Text = settings.searchRes;
settingsForm.numThreadsBox.Value = settings.numThreads;
settingsForm.ignoreBox.Checked = settings.ignoreWarn;
settingsForm.actualBox.Checked = settings.loadActual;

settingsForm.playSndCheckBox.Checked = settings.playSnd;

settingsForm.resDelayBox.Text = settings.sellDelay.ToString();
Expand Down Expand Up @@ -206,6 +208,8 @@ private void SaveSettings(bool savetabs)
settings.sellDelay = Convert.ToInt32(settingsForm.resDelayBox.Text);
settings.searchRes = settingsForm.searchResBox.Text;
settings.ignoreWarn = settingsForm.ignoreBox.Checked;
settings.loadActual = settingsForm.actualBox.Checked;

settings.playSnd = settingsForm.playSndCheckBox.Checked;

settings.delayVal = steam_srch.mainDelay;
Expand Down Expand Up @@ -581,6 +585,33 @@ public void Event_Message(object sender, string message, int searchId, flag myfl
textBox1.Text = sweet;
textBox1.ReadOnly = false;
break;
case flag.ActPrice:
string sweet2 = MainScanItem.LogItem.DoFracture(message);

if (isFirstTab)
{
scanItems[searchId].Steam.scanInput.ResellPrice = sweet2;
scanItems[searchId].Steam.scanInput.ResellType = 2;
if (scanListView.SelectedIndices[0] == searchId)
{
BindToControls(scanListView);
}
}
else
{

steam_srch.recentInputList[searchId].ResellPrice = sweet2;
steam_srch.recentInputList[searchId].ResellType = 2;

if (recentListView.SelectedIndices[0] == searchId)
{
BindToControls(recentListView);
}

}

break;

case flag.Items_Sold:
if (searchId != 1)
{
Expand Down Expand Up @@ -1072,10 +1103,6 @@ private void InventoryList_ColumnClick(object sender, ColumnClickEventArgs e)
//((ListView)sender).Sort();
}

private void InventoryList_Click(object sender, EventArgs e)
{

}

private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
Expand Down Expand Up @@ -2004,9 +2031,13 @@ private void InventoryList_SelectedIndexChanged(object sender, EventArgs e)

if (currPr == Strings.None)
{
steam_srch.GetPriceTread(ourItem.MarketName, lit.Index);
textBox1.Text = Strings.Loading;
textBox1.ReadOnly = true;
if (settings.loadActual)
{
var url = string.Format("{0}{1}/{2}/render/", SteamSite._lists, SteamSite.GetUrlApp(steam_srch.invApp, false).App, Uri.EscapeDataString(ourItem.MarketName));
steam_srch.GetPriceTread(url, lit.Index, true);
textBox1.Text = Strings.Loading;
textBox1.ReadOnly = true;
}
}
else
if (currPr == Strings.NFS)
Expand All @@ -2021,6 +2052,30 @@ private void InventoryList_SelectedIndexChanged(object sender, EventArgs e)
else pictureBox3.Image = null;
}


private void resellComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
if (settings.loadActual)
{
if ((resellComboBox.SelectedIndex == 2) && (steam_srch.Logged))
{
if (isFirstTab)
{
var ourItem = scanItems[scanListView.SelectedIndices[0]].Steam.scanInput;
steam_srch.GetPriceTread(ourItem.Link, scanListView.SelectedIndices[0], false);
}
else
{
var ourItem = steam_srch.recentInputList[recentListView.SelectedIndices[0]];
steam_srch.GetPriceTread(ourItem.Link, recentListView.SelectedIndices[0], false);
}

resellPriceBox.Text = Strings.Loading;
}
}
}


private void pictureBox3_Click(object sender, EventArgs e)
{
if ((steam_srch.inventList.Count != 0) && (InventoryList.SelectedIndices.Count != 0))
Expand Down
Loading

0 comments on commit 78b9f00

Please sign in to comment.