public void GetMyAddresses() { Newtonsoft.Json.Linq.JArray AddrList = this.Bitcoin.ListReceivedByAddress(1, true); this.MyAddressList = new List<AddressBookEntry>(); foreach (Newtonsoft.Json.Linq.JObject Item in AddrList) { AddressBookEntry TempItem = new AddressBookEntry(); TempItem.Address = Item["address"].ToString(); TempItem.Description = Item["account"].ToString(); this.MyAddressList.Add(TempItem); } this.MyAddressList = this.MyAddressList.OrderBy(E => E.Description).Reverse().ToList(); }
public void SaveAccount() { if (this.ReceiveMode) { this.Bitcoin.SetAccount(this.AddressBox.Text, this.AccountBox.Text); } else { if (this.ItemIndex < 0 || this.ItemIndex > this.DestAddressList.Count() - 1) { AddressBookEntry TempEntry = new AddressBookEntry(); TempEntry.Address = this.AddressBox.Text; TempEntry.Description = this.AccountBox.Text; this.DestAddressList.Add(TempEntry); this.SaveDestAddresses(); } else { this.DestAddressList.ElementAt(this.ItemIndex).Address = this.AddressBox.Text; this.DestAddressList.ElementAt(this.ItemIndex).Description = this.AccountBox.Text; this.SaveDestAddresses(); } } }