public static double GetPourcentOf(IEtherValue value, IEtherValue max) { value.Get(EtherType.Wei, out decimal v); max.Get(EtherType.Wei, out decimal m); if (m == 0) { return(0); } return((double)(v / m)); }
public static string ToString(IEtherValue ethereumDoubleValue, EtherType wantedType, string decimalFormat = "{0:0.00} {1}") { ethereumDoubleValue.Get(out EtherType currentValueType, out double currentvalue); ApproximateConvert(currentvalue, out double resultvalue, currentValueType, wantedType); return(string.Format(decimalFormat, resultvalue, wantedType)); }
public static string ToString(IEtherValue ethereumDoubleValue, string decimalFormat = "{0:0.00} {1}") { ethereumDoubleValue.Get(out EtherType t, out double d); return(string.Format(decimalFormat, d, t)); }
public void SetWith(IEtherValue value) { m_setState.SetWith(value); RefreshUI(); }
public void SetWith(IEtherValue value) { value.Get(out EtherType t, out decimal v); this.m_sourceType = t; this.m_value = (double)v; }