Esempio n. 1
0
 public double GetValueInEth()
 {
     decimal.TryParse(m_weiValue, out decimal result);
     EthereumConverttion.ApproximateConvert(result, out decimal newValue, EtherType.Wei, EtherType.Ether);
     return((double)newValue);
 }
Esempio n. 2
0
 public void Get(EtherType type, out double approximation)
 {
     EthereumConverttion.ApproximateConvert(m_value, out approximation, m_sourceType, type);
 }
Esempio n. 3
0
    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";
        }
    }