public void doStartPoolChecking() { new Thread(() => { isPoolChecking = true; while (this != null && isPoolChecking && !string.IsNullOrEmpty(Config.configAccount)) { Pool mPool = new PoolBLL().get(Config.configPool); if (mPool != null && !string.IsNullOrEmpty(mPool.poolApiUrl)) { int indexOfDot = Config.configAccount.IndexOf("."); ResultPoolApiWallet mResultPoolApiWallet = new PoolApi().getWallet( mPool.poolApiUrl, indexOfDot > -1 ? Config.configAccount.Substring(0, Config.configAccount.IndexOf(".")) : Config.configAccount, Config.configCoin ); if (mResultPoolApiWallet != null) { BeginInvoke(new Action(() => { lbUnpaidCount.Text = mResultPoolApiWallet.unpaid; lbPaidIn24hCount.Text = mResultPoolApiWallet.paid24h; lbEarnedCount.Text = mResultPoolApiWallet.total; })); } } else { isPoolChecking = false; } Thread.Sleep(120 * 1000); } }).Start(); }
private void UploadHashsTimer_Elapsed(object sender, ElapsedEventArgs e) { try { PoolApi.SaveHashRates(); } catch (Exception ex) { LogHelper.Error(ex.ToString()); } }
private void SaveHashRates() { PoolApi.SaveHashRates(); }
private void SaveBlockRates() { PoolApi.SaveBlockRates(); }