Bitcoin_WPF.MainWindow.tbnWalletAddr_Click C# (CSharp) Method

tbnWalletAddr_Click() private method

private tbnWalletAddr_Click ( object sender, RoutedEventArgs e ) : void
sender object
e RoutedEventArgs
return void
        private void tbnWalletAddr_Click(object sender, RoutedEventArgs e)
        {
            const int LS = 10;
            try
            {
                string tx = "";
                WriteText("--- Minimal 0 confirmation to show ---");
                foreach (var x in WL.getWalletAddress())
                {
                    tx += ($"{x.AddressStr} Balance: {BitcoinLib.Bitcoin.BTCtoDecimal(x.Balance).PadLeft(LS, ' ')} T. Received: {BitcoinLib.Bitcoin.BTCtoDecimal(x.TotalReceived).PadLeft(LS, ' ')} Label: {x.Label}\r\n");
                }
                WriteText(tx);

                tx = "";
                WriteText("--- Minimal 12 confirmation to show ---");
                foreach (var x in WL.getWalletAddress(12))
                {
                    tx += ($"{x.AddressStr} Balance: {BitcoinLib.Bitcoin.BTCtoDecimal(x.Balance).PadLeft(LS, ' ')} T. Received: {BitcoinLib.Bitcoin.BTCtoDecimal(x.TotalReceived).PadLeft(LS, ' ')} Label: {x.Label}\r\n");
                }
                WriteText(tx);
            }
            catch (Exception ex)
            {
                WriteText($"ERROR: {ex.Message}");
            }
        }