Exemplo n.º 1
0
        private void importWatchOnlyAddressToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string text = InputBox.Show(Strings.Address, Strings.ImportWatchOnlyAddress);

            if (string.IsNullOrEmpty(text))
            {
                return;
            }
            using (StringReader reader = new StringReader(text))
            {
                while (true)
                {
                    string address = reader.ReadLine();
                    if (address == null)
                    {
                        break;
                    }
                    address = address.Trim();
                    if (string.IsNullOrEmpty(address))
                    {
                        continue;
                    }
                    UInt160 scriptHash;
                    try
                    {
                        scriptHash = Wallet.ToScriptHash(address);
                    }
                    catch (FormatException)
                    {
                        continue;
                    }
                    Program.CurrentWallet.AddWatchOnly(scriptHash);
                    AddAddressToListView(scriptHash, true);
                }
            }
        }
Exemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     remark = InputBox.Show(Strings.EnterRemarkMessage, Strings.EnterRemarkTitle, remark);
 }