예제 #1
0
        //addassetid
        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            string[] result = GetNep5Info();
            var      nep5   = new Tools.Nep5Info();

            nep5.name     = result[0];
            nep5.symbol   = result[1];
            nep5.decimals = int.Parse(result[2]);
            Tools.CoinTool.assetNep5[assetid.Text] = nep5;
            updateNep5List();
        }
예제 #2
0
 public static void LoadNep5()
 {
     try
     {
         var str     = System.IO.File.ReadAllText("nep5config.json", System.Text.Encoding.UTF8);
         var mapInfo = MyJson.Parse(str).AsDict();
         foreach (var item in mapInfo)
         {
             var newitem = new Nep5Info();
             assetNep5[item.Key] = newitem;
             newitem.name        = item.Value.AsDict()["name"].AsString();
             newitem.symbol      = item.Value.AsDict()["symbol"].AsString();
             newitem.decimals    = item.Value.AsDict()["decimals"].AsInt();
         }
     }
     catch
     {
     }
 }