Пример #1
0
        private void polyByY(object sender, RoutedEventArgs e)
        {
            var str = qy.Text;
            var s   = ParseModule.parseAll(str);

            var    res = ComputingModule.calculatePolynom(s, int.Parse(y.Text));
            Thread t   = new Thread(() => MessageBox.Show(res.ToString(), "My App"));

            t.Start();
            this.res = res;
        }
Пример #2
0
        private void polySumByXY(object sender, RoutedEventArgs e)
        {
            var str = this.px.Text;
            var s   = ParseModule.parseAll(str);
            var px  = ComputingModule.calculatePolynom(s, 2);

            var str1 = this.qy.Text;
            var s1   = ParseModule.parseAll(str1);
            var yx   = ComputingModule.calculatePolynom(s1, int.Parse(y.Text));

            var qByXPlusY = ComputingModule.calculatePolynom(s1, int.Parse(y.Text) + int.Parse(x.Text));

            var pByQtop = ComputingModule.calculatePolynom(s, int.Parse(qByXPlusY.ToString()));

            var sum = px * yx - pByQtop;

            Thread t = new Thread(() => MessageBox.Show(sum.ToString(), "My App"));

            t.Start();
            this.res = res;
        }