private void UpdateGlobalRate() { var totalRate = MinersManager.GetTotalRate(); if (ConfigManager.GeneralConfig.AutoScaleBTCValues && totalRate < 0.1) { toolStripStatusLabelBTCDayText.Text = "mBTC/" + International.GetText(ConfigManager.GeneralConfig.TimeUnit.ToString()); toolStripStatusLabelGlobalRateValue.Text = (totalRate * 1000 * _factorTimeUnit).ToString("F5", CultureInfo.InvariantCulture); } else { toolStripStatusLabelBTCDayText.Text = "BTC/" + International.GetText(ConfigManager.GeneralConfig.TimeUnit.ToString()); toolStripStatusLabelGlobalRateValue.Text = (totalRate * _factorTimeUnit).ToString("F6", CultureInfo.InvariantCulture); } toolStripStatusLabelBTCDayValue.Text = ExchangeRateApi .ConvertToActiveCurrency((totalRate * _factorTimeUnit * Globals.BitcoinUsdRate)) .ToString("F2", CultureInfo.InvariantCulture); toolStripStatusLabelBalanceText.Text = (ExchangeRateApi.ActiveDisplayCurrency + "/") + International.GetText( ConfigManager.GeneralConfig.TimeUnit.ToString()) + " " + International.GetText("Form_Main_balance") + ":"; }
private void UpdateGlobalRate() { double TotalRate = MinersManager.GetTotalRate(); if (ConfigManager.GeneralConfig.AutoScaleBTCValues && TotalRate < 0.1) { toolStripStatusLabelBTCDayText.Text = "mBTC/" + International.GetText("Day"); toolStripStatusLabelGlobalRateValue.Text = (TotalRate * 1000).ToString("F5", CultureInfo.InvariantCulture); } else { toolStripStatusLabelBTCDayText.Text = "BTC/" + International.GetText("Day"); toolStripStatusLabelGlobalRateValue.Text = (TotalRate).ToString("F6", CultureInfo.InvariantCulture); } toolStripStatusLabelBTCDayValue.Text = ExchangeRateAPI.ConvertToActiveCurrency((TotalRate * Globals.BitcoinUSDRate)).ToString("F2", CultureInfo.InvariantCulture); }