private void RefreshUI() { if (m_maxWantedImage != null) { m_maxWantedImage.fillAmount = (float)EthereumConverttion.GetPourcentOf(m_maxWanted, m_gaugeSize); } if (m_minimumWantedImage != null) { m_minimumWantedImage.fillAmount = (float)EthereumConverttion.GetPourcentOf(m_minimumWanted, m_gaugeSize); } if (m_setStateImage != null) { m_setStateImage.fillAmount = (float)EthereumConverttion.GetPourcentOf(m_setState, m_gaugeSize); } if (m_minValueText != null) { float pct = (float)EthereumConverttion.GetPourcentOf(m_minimumWanted, m_gaugeSize); m_minValueText.text = m_minimumWanted.ToString().ToUpper(); m_minValueText.rectTransform.anchorMin = new Vector2(0, pct); m_minValueText.rectTransform.anchorMax = new Vector2(0, pct); } if (m_maxValueText != null) { float pct = (float)EthereumConverttion.GetPourcentOf(m_maxWanted, m_gaugeSize); m_maxValueText.text = m_maxWanted.ToString().ToUpper(); m_maxValueText.rectTransform.anchorMin = new Vector2(0, pct); m_maxValueText.rectTransform.anchorMax = new Vector2(0, pct); } if (m_currentValueText != null) { float pct = (float)EthereumConverttion.GetPourcentOf(m_setState, m_gaugeSize); m_currentValueText.text = m_setState.ToString().ToUpper(); m_currentValueText.rectTransform.anchorMin = new Vector2(0, pct); m_currentValueText.rectTransform.anchorMax = new Vector2(0, pct); } }
public void Get(EtherType type, out double approximation) { EthereumConverttion.ApproximateConvert(m_value, out approximation, m_sourceType, type); }
public double GetValueInEth() { decimal.TryParse(m_weiValue, out decimal result); EthereumConverttion.ApproximateConvert(result, out decimal newValue, EtherType.Wei, EtherType.Ether); return((double)newValue); }
public override string ToString() { return(EthereumConverttion.ToString(this)); }
public void SetWith(EtherMinerOrgMinerInfo info) { if (info == null) { if (m_frameGeneral != null) { m_frameGeneral.SetWith(null); } if (m_hashRateEstimation != null) { m_hashRateEstimation.SetWith(0); } if (m_history != null) { m_history.SetWith(info.GetFameHistory()); } if (m_unconfirmed != null) { m_unconfirmed.text = ""; } if (m_unpaid != null) { m_unpaid.text = ""; } if (m_dollarPerMinute != null) { m_dollarPerMinute.text = ""; } if (m_bitcoinsPerMinute != null) { m_bitcoinsPerMinute.text = ""; } if (m_coinsPerMinute != null) { m_coinsPerMinute.text = ""; } if (m_activeWorker != null) { m_activeWorker.text = ""; } return; } if (m_hashRateEstimation != null) { m_hashRateEstimation.SetWith(info.GetFrameStatistic().GetCurrentHashRate()); } if (m_frameGeneral != null) { m_frameGeneral.SetWith(info.GetFrameStatistic()); } if (m_address != null) { m_address.text = info.GetWallet().GetAddress(); } if (m_dollarPerMinute != null) { m_dollarPerMinute.text = "" + info.GetUsdPerMinutes() * (60 * 24) + " $/day"; } if (m_coinsPerMinute != null) { m_coinsPerMinute.text = "" + info.GetCoinsPerMinutes() * (60 * 24) + " ETH/day"; } if (m_bitcoinsPerMinute != null) { m_bitcoinsPerMinute.text = "" + info.GetBitcoinPerMinute() * (60 * 24) + " BTC/day"; } if (m_activeWorker != null) { m_activeWorker.text = "" + info.GetActiveWorkers() + " workers"; } if (m_unconfirmed != null) { m_unconfirmed.text = "" + info.GetUnconfirmed() + " unconfirmed"; } if (m_unpaid != null) { EthereumConverttion.ApproximateConvert(info.GetUnpaidWai(), out decimal value, EtherType.Wei, EtherType.Ether); m_unpaid.text = "" + value + " ETH Unpaid"; } }