public static string ShowDialog(Window owner, string label, string defvalue = "") { var d = new Dialog_Input(); d.Owner = owner; d.showtext = label; d.text = defvalue; if (d.ShowDialog() == true) { return(d.text); } return(null); }
//import WIF private void Button_Click(object sender, RoutedEventArgs e) { var wif = Dialog_Input.ShowDialog(this, "input WIF"); if (wif != null) { this.privatekey = null; try { this.privatekey = ThinNeo.Helper.GetPrivateKeyFromWIF(wif); } catch (Exception err) { MessageBox.Show("error:" + err.Message); } } update_labelAccount(); }