示例#1
0
        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();
        }
示例#2
0
 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("Некоректні Дані", "Помилка"); }
 }
示例#3
0
 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("Некоректні Дані", "Помилка"); }
 }
示例#4
0
 public CyclWindow()
 {
     InitializeComponent();
     Console.WriteLine(MyAlgorithms.Cyclic(new double[] { 2.5, 6.3, 8 }));
 }