コード例 #1
0
        private void NewReceipt(AccountKey extendedKey)
        {
            try
            {
                int?addressIndex            = 0;
                ReceiptKeyWindow newReceipt = new ReceiptKeyWindow(tcBitcoin.NewChangeKey(extendedKey.KeyName, extendedKey.HDPath, CoinChangeType.Receipt, ref addressIndex));
                newReceipt.KeyNamespace = extendedKey.KeyNamespace;

                if (newReceipt.ShowDialog() == true)
                {
                    if (tcBitcoin.AddReceiptKey(extendedKey.KeyName, newReceipt.PaymentAddress, (int)addressIndex, newReceipt.Note))
                    {
                        if (tabAccountDetails.SelectedItem != pageReceiptKeys)
                        {
                            tabAccountDetails.SelectedItem = pageReceiptKeys;
                        }
                        else
                        {
                            RefreshReceiptKeys();
                        }
                    }
                }
            }
            catch (Exception err)
            {
                MessageBox.Show($"{err.Message}", $"{err.Source}.{err.TargetSite.Name}", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }