示例#1
0
 public void Load()
 {
     if (System.IO.File.Exists("address.sim.save.txt"))
     {
         try
         {
             var lines = System.IO.File.ReadAllText("address.sim.save.txt").Split('\n');
             foreach (var line in lines)
             {
                 var            lp = line.Split(new string[] { "||" }, StringSplitOptions.None);
                 NeoDun.Address a  = new Address();
                 a.type        = (AddressType)Enum.Parse(typeof(AddressType), lp[0]);
                 a.AddressText = lp[1];
                 a.privatekey  = SignTool.DecodeBase58(lp[2]);
                 this.addresses.Add(a);
             }
             Console.WriteLine("addresses isEmpty" + this.addresses.IsEmpty);
         }
         catch
         {
         }
     }
     else
     {
         Console.WriteLine("address.sim.save.txt is null");
     }
 }
示例#2
0
 public byte[] GetAddbytes()
 {
     if (type == AddressType.Neo)
     {
         return(SignTool.DecodeBase58(this.AddressText));
     }
     return(null);
 }