Ejemplo n.º 1
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            ThinNeo.NEP6.NEP6Account acc = this.nep6_listOut.SelectedItem as ThinNeo.NEP6.NEP6Account;
            if (acc == null)
            {
                return;
            }
            if (acc.nep2key == null)
            {
                return;
            }
            var pass = Dialog_Input_password.ShowDialog(null);

            if (pass != null)
            {
                try
                {
                    var prikey = acc.GetPrivate(nep6wallet.scrypt, pass);
                    labelPri.Content = ThinNeo.Helper.GetWifFromPrivateKey(prikey);
                }
                catch
                {
                    labelPri.Content = "密码错误或者其他错误";
                }
            }
        }
Ejemplo n.º 2
0
        public static string ShowDialog(Window owner)
        {
            var d = new Dialog_Input_password();

            d.Owner = owner;

            if (d.ShowDialog() == true)
            {
                return(d.password);
            }
            return(null);
        }