Пример #1
0
 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));
 }
Пример #2
0
 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));
 }
Пример #3
0
 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));
 }
Пример #4
0
 public void SetWith(IEtherValue value)
 {
     m_setState.SetWith(value);
     RefreshUI();
 }
Пример #5
0
 public void SetWith(IEtherValue value)
 {
     value.Get(out EtherType t, out decimal v);
     this.m_sourceType = t;
     this.m_value      = (double)v;
 }