public AddressControl GetPublicAddressControl(PublicAddress data, ref string strError)
        {
            AddressControl addrControl = null;
            addrControl = new AddressControl();
            addrControl.AddressObject = data;

            try
            {
                switch (data.CoinName)
                {
                    case PublicAddress.ChosenCoin.Anoncoin:
                    case PublicAddress.ChosenCoin.Dogecoin:
                    case PublicAddress.ChosenCoin.Bitcoin:
                    case PublicAddress.ChosenCoin.Mooncoin:
                    case PublicAddress.ChosenCoin.FedoraCoin:
                    case PublicAddress.ChosenCoin.Zetacoin:
                    case PublicAddress.ChosenCoin.Coino:
                    case PublicAddress.ChosenCoin.Devcoin:
                    case PublicAddress.ChosenCoin.Feathercoin:
                    case PublicAddress.ChosenCoin.Infinitecoin:
                    case PublicAddress.ChosenCoin.LeafCoin:
                    case PublicAddress.ChosenCoin.DigiByte:
                    case PublicAddress.ChosenCoin.Vertcoin:
                    case PublicAddress.ChosenCoin.Ixcoin:
                    case PublicAddress.ChosenCoin.Megacoin:
                    case PublicAddress.ChosenCoin.Netcoin:
                    case PublicAddress.ChosenCoin.Animecoin:
                    case PublicAddress.ChosenCoin.Auroracoin:
                        addrControl.AddressObject.Balance = GetBalanceAPI(data.CoinName, addrControl.AddressObject.Address);
                        break;
                    case PublicAddress.ChosenCoin.Litecoin:
                    case PublicAddress.ChosenCoin.Digitalcoin:
                    case PublicAddress.ChosenCoin.Quark:
                        addrControl.AddressObject.Balance = GetBalanceJSON(data.CoinName, addrControl.AddressObject.Address);
                        break;
                    case PublicAddress.ChosenCoin.Worldcoin:
                    case PublicAddress.ChosenCoin.Peercoin:
                    case PublicAddress.ChosenCoin.Namecoin:
                    case PublicAddress.ChosenCoin.Novacoin:
                    case PublicAddress.ChosenCoin.YBcoin:
                        addrControl.AddressObject.Balance = GetBalanceAPI2(data.CoinName, addrControl.AddressObject.Address);
                        break;

                }
            }
            catch (Exception ex)
            {
                strError = ex.Message;
            }

            return addrControl;
        }
        private void UpdateExistingAddress(AddressControl newAddrControl)
        {
            bool alreadyThere = false;
            foreach (AddressControl addrControl in flpControls.Controls)
            {
                if (addrControl.AddressObject.Address == newAddrControl.AddressObject.Address)
                {
                    alreadyThere = true;
                    addrControl.AddressObject = newAddrControl.AddressObject;
                    addrControl.RefreshUI();
                }
            }

            if (!alreadyThere)
                flpControls.Controls.Add(newAddrControl);
        }