public Home() { InitializeComponent(); ac = new ApiConnect(); ApiSettings saved = ac.readSettings(); if (saved.OrganizationID != null) { ac.setup(saved); if (saved.Enviorment == 1) { currency = "BTC"; } ac.currency = currency; refreshBalance(); refreshOrders(false); ac.getPools(true); timer = new System.Threading.Timer( e => runBot(), null, TimeSpan.Zero, TimeSpan.FromSeconds(60)); } }
private void button1_Click(object sender, EventArgs e) { this.button2.Enabled = false; this.label5.Visible = false; //error this.label6.Visible = false; //success ApiSettings current = formSettings(); ac.setup(current); if (ac.settingsOk()) { this.label6.Visible = true; this.button2.Enabled = true; } else { this.label5.Visible = true; } }