public void Calc(object sender, RoutedEventArgs e) { if (aListBox.Items.IsEmpty) { MessageBox.Show("Додайте число"); return; } var a = aListBox.Items.Cast <double>(); ResTextBox.Text = MyAlgorithms.Cyclic(a.ToArray <double>()).ToString(); }
public void Calc(object sender, RoutedEventArgs e) { try { double a = Double.Parse(aTextBox.Text); double c = Double.Parse(cTextBox.Text); double result = MyAlgorithms.Linear(a, c); ResTextBox.Text = result.ToString(); } catch (Exception ex) { MessageBox.Show("Некоректні Дані", "Помилка"); } }
public void Calc(object sender, RoutedEventArgs e) { try { double x = Double.Parse(xTextBox.Text); double b = Double.Parse(bTextBox.Text); double c = Double.Parse(cTextBox.Text); double k = Double.Parse(kTextBox.Text); double result = MyAlgorithms.Branched(x, b, c, k); ResTextBox.Text = result.ToString(); } catch (Exception ex) { MessageBox.Show("Некоректні Дані", "Помилка"); } }
public CyclWindow() { InitializeComponent(); Console.WriteLine(MyAlgorithms.Cyclic(new double[] { 2.5, 6.3, 8 })); }