private void ButtonBuyLimit_Click(object sender, RoutedEventArgs e) { int volume; try { volume = Convert.ToInt32(TextBoxVolumeFast.Text); } catch (Exception) { MessageBox.Show("В графе объём не правильное значение"); return; } decimal price; try { price = Convert.ToDecimal(TextBoxPrice.Text); } catch (Exception) { MessageBox.Show("В графе цена не правильное значение"); return; } if (price == 0) { MessageBox.Show("В графе цена не правильное значение"); return; } _strategyKeeper.BotBuyLimit(volume, price); }
private void ButtonBuyLimit_Click(object sender, RoutedEventArgs e) { decimal volume; try { volume = TextBoxVolumeFast.Text.ToDecimal(); } catch (Exception) { MessageBox.Show(OsLocalization.Trader.Label49); return; } decimal price; try { price = TextBoxPrice.Text.ToDecimal(); } catch (Exception) { MessageBox.Show(OsLocalization.Trader.Label50); return; } if (price == 0) { MessageBox.Show(OsLocalization.Trader.Label50); return; } _strategyKeeper.BotBuyLimit(volume, price); }
private void ButtonBuyLimit_Click(object sender, RoutedEventArgs e) { decimal volume; try { volume = Decimal.Parse(TextBoxVolumeFast.Text.Replace(",", CultureInfo.InvariantCulture.NumberFormat.NumberDecimalSeparator), CultureInfo.InvariantCulture); } catch (Exception) { MessageBox.Show(OsLocalization.Trader.Label49); return; } decimal price; try { price = Convert.ToDecimal(TextBoxPrice.Text.Replace(",", CultureInfo.InvariantCulture.NumberFormat.NumberDecimalSeparator), CultureInfo.InvariantCulture); } catch (Exception) { MessageBox.Show(OsLocalization.Trader.Label50); return; } if (price == 0) { MessageBox.Show(OsLocalization.Trader.Label50); return; } _strategyKeeper.BotBuyLimit(volume, price); }