private void CalculateEarnings()
		{
			if (MoneroInfo != null)
			{
				float xmrEarnings = 0;
				switch (comboBox_times.SelectedIndex)
				{
					case 0: // Hourly
						xmrEarnings = this.GetEarnings(Times.Hourly);
						break;
					case 1: // Daily
						xmrEarnings = this.GetEarnings(Times.Daily);
						break;
					case 2: // Weekly
						xmrEarnings = this.GetEarnings(Times.Weekly);
						break;
					case 3: // Monthly
						xmrEarnings = this.GetEarnings(Times.Monthly);
						break;
					case 4: // Yearly
						xmrEarnings = this.GetEarnings(Times.Yearly);
						break;
				}

				float currencyEarnings = xmrEarnings * (float)GetXmrPrice.GetPrice();

				this.SetCalculations(xmrEarnings, currencyEarnings);
			}
		}
예제 #2
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"));
 }