private void UpdateInvalidSharesTextBlock()
 {
     this.Dispatcher.Invoke(() =>
     {
         string totalInvalidShares         = NumberFormating.ThousandsSeparator(StartingInvalidSharesCount + SessionInvalidSharesCount);
         string sessionInvalidShares       = NumberFormating.ThousandsSeparator(SessionInvalidSharesCount);
         textBlock_invalidShares.Text      = string.Format(InvalidSharesLabelPlaceholder, sessionInvalidShares);
         textBlock_totalInvalidShares.Text = totalInvalidShares;
     });
 }
 private void SetLabelHashRate(decimal hashrate)
 {
     this.Dispatcher.Invoke(() =>
     {
         if (hashrate > GData.SettingsManager.Settings.Statistics.RecordHashRate)
         {
             GData.SettingsManager.Settings.Statistics.RecordHashRate = hashrate;
         }
         textBlock_hashrate.Text = string.Format(HashRateLabelPlaceholder, NumberFormating.ThousandsSeparator(Math.Round(hashrate, 0, MidpointRounding.ToEven)));
     });
 }
Example #3
0
 private void UpdateLabels()
 {
     this.UpdateMiningTimes();
     textBlock_totalValidShares.Text   = string.Format(TotalValidSharesLabelPlaceholder, NumberFormating.AbbreviateNumber(AddressStats.ValidShares), this.GetPlural(AddressStats.ValidShares));
     textBlock_totalInvalidShares.Text = string.Format(TotalInvalidSharesLabelPlaceholder, NumberFormating.AbbreviateNumber(AddressStats.InvalidShares), this.GetPlural(AddressStats.InvalidShares));
     textBlock_recordHashrate.Text     = string.Format(RecordHashrateLabelPlaceholder, string.Format(RecordHashrateLabelPlaceholder, NumberFormating.AbbreviateNumber(GData.SettingsManager.Settings.Statistics.RecordHashRate, true, true)));
     textBlock_totalHashes.Text        = string.Format(TotalHashesLabelPlaceholder, NumberFormating.AbbreviateNumber(AddressStats.TotalHashes), this.GetPlural(AddressStats.TotalHashes, true));
     textBlock_totalXmrPaid.Text       = string.Format(TotalXmrPaidLabelPlaceholder, AddressStats.AmountPaid / 12);
     textBlock_xmrPrice.Text           = string.Format(XmrPriceLabelPlaceholder, this.GetCurrencyChar(), GetXmrPrice.GetPrice().ToString("0.00"));
 }