public static bool getString(string label, string defaultValue, ref string newValue) { GetString gs = new GetString(); gs.la.Content = label; gs.tb.Text = defaultValue; bool ret = false; if (gs.ShowDialog().Value) { newValue = gs.tb.Text; ret = true; } else { newValue = ""; } return ret; }
public static bool getString(string label, string defaultValue, ref string newValue) { GetString gs = new GetString(); gs.la.Content = label; gs.tb.Text = defaultValue; bool ret = false; if (gs.ShowDialog().Value) { newValue = gs.tb.Text; ret = true; } else { newValue = ""; } return(ret); }