public static string GetString(string title, string startValue) { var form = new InputForm { Text = title }; form.TextBox.Text = startValue; if (form.ShowDialog() != DialogResult.OK) return null; return form.TextBox.Text; }
public static string GetString(string title, string startValue) { var form = new InputForm { Text = title }; form.TextBox.Text = startValue; if (form.ShowDialog() != DialogResult.OK) { return(null); } return(form.TextBox.Text); }
private void OrderModifyBtn_Click(object sender, EventArgs e) { try { var order = GetSelectedOrder(); var price = InputForm.GetPrice("New Price", order.Price); if (price != null) { order.Modify(price); } } catch (Exception ex) { ex.PrintError(); } }
private void AddInstrumentBtn_Click(object sender, EventArgs e) { try { var symbol = InputForm.GetString("Instrument Symbol", ""); if (symbol != null && symbol != "") { var instrument = Bossa.Instruments[symbol]; UpdateInstrumentInfo(instrument); } } catch (Exception ex) { ex.PrintError(); } }