fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using Newtonsoft.Json;
  11. using System.Net;
  12. using System.Web;
  13. using System.IO;
  14.  
  15.  
  16. namespace Steam_Trading_Calculator
  17. {
  18. public partial class Form1 : Form
  19. {
  20. int skinValue;
  21. double keyPrice;
  22. double skinOP;
  23. double keyValue;
  24. double sellValue;
  25. double profit;
  26. double pKeys;
  27. double keyProfit;
  28. double keyStockValue;
  29. double value90;
  30. double key90;
  31. string inputString;
  32.  
  33.  
  34.  
  35. public Form1()
  36.  
  37.  
  38. {
  39. InitializeComponent();
  40. }
  41.  
  42.  
  43.  
  44.  
  45. private void richTextBox1_TextChanged(object sender, EventArgs e)
  46. {
  47.  
  48. }
  49. private void SCP() {
  50. using (WebClient webClient = new System.Net.WebClient())
  51. {
  52.  
  53. string json = webClient.DownloadString("http://c...content-available-to-author-only...k.tf/api/IGetMarketPrices/v1/?key=REPLACEDKEY4REDDIT&appid=730");
  54. Form1 form = JsonConvert.DeserializeObject<Form1>(json);
  55. test.Text = form.response;
  56. }
  57. }
  58. private void label1_Click(object sender, EventArgs e)
  59. {
  60.  
  61. }
  62.  
  63. private void inputText_TextChanged(object sender, EventArgs e)
  64. {
  65.  
  66. Values(skinValue);
  67. }
  68. private void inputText_KeyPress(object sender, KeyPressEventArgs e) {
  69. if (Char.IsControl(e.KeyChar)) return;
  70. }
  71. private void Values(int skinValue) {
  72. //http://s...content-available-to-author-only...y.com/market/priceoverview/?currency=3&appid=730&market_hash_name=
  73.  
  74. //Better option: http://c...content-available-to-author-only...k.tf/api/IGetMarketPrices/v1/?key=563c1b92dea9e9ed0c7f7676&appid=730
  75.  
  76.  
  77. //Add this to the beginning of a market listing.
  78. string inputString = this.inputText.Text;
  79. if (this.inputText.Text.Length > 0)
  80. {
  81. if (this.inputText.Text.Length < 10)
  82. {
  83. skinValue = int.Parse(inputText.Text);
  84. double skinDouble = Convert.ToDouble(skinValue);
  85. // MessageBox.Show(skinValue.ToString());
  86. skinOP = skinDouble * 0.80;
  87. // MessageBox.Show(skinOP.ToString());
  88. marketValue.Text = "$" + skinOP.ToString();
  89. marketValue.Visible = true;
  90. keyStockValue = skinValue / 2.5;
  91. kStockValue.Text = Math.Ceiling(keyStockValue).ToString() + "k";
  92. keyValue = skinOP / 2.5;
  93. kValue.Text = Math.Round(keyValue).ToString() + "k";
  94. sellValue = skinValue * .85;
  95. sValue.Text = "$" + sellValue.ToString();
  96. profit = sellValue - skinOP;
  97. pValue.Text = "$" + profit.ToString();
  98. pKeys = sellValue / 2.5;
  99. pKeyValue.Text = Math.Floor(pKeys).ToString() + "k";
  100. keyProfit = pKeys - keyValue;
  101. kProfitValue.Text = Math.Floor(keyProfit).ToString() + "k";
  102. value90 = skinValue * .90;
  103. mValue90.Text = "$" + value90.ToString();
  104. key90 = value90 / 2.5;
  105. kValue90.Text = Math.Floor(key90).ToString() + "k";
  106.  
  107. SCP();
  108.  
  109.  
  110. }
  111. }
  112. }
  113. private void retrieveInput_Click(object sender, EventArgs e)
  114. {
  115.  
  116.  
  117. // MessageBox.Show(skinValue.ToString());
  118. Values(skinValue);
  119. }
  120.  
  121.  
  122. private void label123_Click(object sender, EventArgs e)
  123. {
  124.  
  125. }
  126.  
  127. private void label6_Click(object sender, EventArgs e)
  128. {
  129.  
  130. }
  131.  
  132. private void pValue_Click(object sender, EventArgs e)
  133. {
  134.  
  135. }
  136.  
  137. private void sValue_Click(object sender, EventArgs e)
  138. {
  139.  
  140. }
  141.  
  142. private void pKeyValue_Click(object sender, EventArgs e)
  143. {
  144.  
  145. }
  146.  
  147. private void profitLabel_Click(object sender, EventArgs e)
  148. {
  149.  
  150. }
  151.  
  152. private void label5_Click(object sender, EventArgs e)
  153. {
  154.  
  155. }
  156.  
  157. private void kValue_Click(object sender, EventArgs e)
  158. {
  159.  
  160. }
  161.  
  162. private void label4_Click(object sender, EventArgs e)
  163. {
  164.  
  165. }
  166.  
  167. private void button1_Click(object sender, EventArgs e)
  168. {
  169. inputText.Text = "";
  170. }
  171. }
  172. }
  173.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(4,14): error CS0234: The type or namespace name `Data' does not exist in the namespace `System'. Are you missing `System.Data' assembly reference?
prog.cs(9,22): error CS0234: The type or namespace name `Forms' does not exist in the namespace `System.Windows'. Are you missing `System.Windows.Forms' assembly reference?
prog.cs(10,7): error CS0246: The type or namespace name `Newtonsoft' could not be found. Are you missing an assembly reference?
prog.cs(18,34): error CS0246: The type or namespace name `Form' could not be found. Are you missing an assembly reference?
prog.cs(68,56): error CS0246: The type or namespace name `KeyPressEventArgs' could not be found. Are you missing an assembly reference?
Compilation failed: 5 error(s), 0 warnings
stdout
Standard output is empty