private void button2_Click(object sender, EventArgs e)
        {
            Search_Min_Error n    = new Search_Min_Error();
            Form1            main = this.Owner as Form1;

            Search_Min_Error.Cursor_Value2(main.MyAllSensors, main.pixel, main.chart1, comboBox1.Text);
            TwoPoint    = n.HELP1(Search_Min_Error.help1);
            label2.Text = n.HELP1(Search_Min_Error.help1) + "\n" + n.HELP2(Search_Min_Error.help2);

            try
            {
                AddOtrezok(OnePoint, TwoPoint);
                label6.Text = myOtrezok.Min().ToString();
                label8.Text = myOtrezok.Max().ToString();
                double sr = myOtrezok.Average();
                label10.Text = sr.ToString();
                double sum = 0;

                for (int i = 0; i < myOtrezok.Count; i++)
                {
                    sum = sum + Math.Pow(myOtrezok[i] - sr, 2);
                }

                double standOtklon = Math.Sqrt(sum / myOtrezok.Count);
                label12.Text = standOtklon.ToString();
                myOtrezok.Clear();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 2
0
        private void button4_Click(object sender, EventArgs e)
        {
            Search_Min_Error n    = new Search_Min_Error();
            Form1            main = this.Owner as Form1;

            Search_Min_Error.Cursor_Value1(main.MyAllSensors, main.pixel, main.chart1, comboBox1.Text, comboBox2.Text);
            label24.Text = n.HELP1(Search_Min_Error.help1);
            label26.Text = n.HELP2(Search_Min_Error.help2);
            label25.Text = n.HELP3(Search_Min_Error.help3);
        }
        private void button1_Click(object sender, EventArgs e)
        {
            label1.Text = "";
            Search_Min_Error n    = new Search_Min_Error();
            Form1            main = this.Owner as Form1;

            Search_Min_Error.Cursor_Value2(main.MyAllSensors, main.pixel, main.chart1, comboBox1.Text);
            OnePoint    = n.HELP1(Search_Min_Error.help1);
            label1.Text = OnePoint + "\n" + n.HELP2(Search_Min_Error.help2);
            //     OnePoint =
            //       label2.Text = n.HELP2(Search_Min_Error.help2);
            //  label3.Text = n.HELP3(Search_Min_Error.help3);
        }