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;
		}
Example #2
0
        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);
        }
Example #3
0
 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();
     }
 }
Example #4
0
 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();
     }
 }