Exemplo n.º 1
0
 public Caractecistics(ValuesContainer val)
 {
     top = val;
     InitializeComponent();
     label2.Text        = top.Moda().ToString();
     label4.Text        = top.Mediana().ToString();
     label5.Text        = top.MidValue().ToString();
     label9.Text        = top.Deviaciya().ToString();
     label7.Text        = top.Rozmah().ToString();
     label15.Text       = top.Variansa().ToString();
     label13.Text       = top.Standart().ToString();
     label11.Text       = top.Variaciya().ToString();
     richTextBox1.Text += top.GetQuant();
     richTextBox2.Text += top.GetQuartile();
     richTextBox3.Text += top.GetDecel();
     label17.Text       = top.StartMoment(ReturnDeg1()).ToString();
     label18.Text       = top.CentralMoment(ReturnDeg2()).ToString();
     label21.Text       = top.GetAsymmetry().ToString();
     label19.Text       = top.GetExcess().ToString();
     label24.Text       = "";
     foreach (var v in top.diction.Keys)
     {
         label24.Text += Math.Round(v, 2) + " ";
     }
 }
Exemplo n.º 2
0
        public Graphic(ValuesContainer val)
        {
            InitializeComponent();
            //Graph
            chart1.Series[0].ChartType   = SeriesChartType.Line;
            chart1.Series[0].MarkerStyle = MarkerStyle.None;
            chart1.Series[0].Color       = Color.Red;
            chart1.Series[0].BorderWidth = 2;
            chart2.Series[0].Color       = Color.Green;
            chart2.Series[0].MarkerStyle = MarkerStyle.None;
            for (int i = 0; i < val.xList.Count; i++)
            {
                chart1.Series[0].Points.Add(new DataPoint(val.xList[i], val.yList[i]));
                chart2.Series[0].Points.Add(new DataPoint(val.xList[i], val.yList[i]));
            }
            //Function
            tableLayoutPanel1.RowCount    = val.xList.Count + 1;
            tableLayoutPanel1.ColumnCount = 2;
            double sumOfagain = val.yList[0];

            tableLayoutPanel1.Controls.Add(new Label()
            {
                Text = "0 ,", Anchor = (AnchorStyles.Left & AnchorStyles.Right), AutoSize = false, TextAlign = ContentAlignment.MiddleCenter
            }, 0, 0);
            tableLayoutPanel1.Controls.Add(new Label()
            {
                Text = " x<" + Math.Round(val.yList[0], 2), Anchor = (AnchorStyles.Left & AnchorStyles.Right), AutoSize = false, TextAlign = ContentAlignment.MiddleCenter
            }, 1, 0);
            for (int i = 0, j = 1; i < val.xList.Count; i++, j++)
            {
                double res = sumOfagain / val.SumOfY();
                tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
                tableLayoutPanel1.Controls.Add(new Label()
                {
                    Text = Math.Round(res, 2).ToString() + " ,", Anchor = (AnchorStyles.Left & AnchorStyles.Right), AutoSize = false, TextAlign = ContentAlignment.MiddleCenter
                }, 0, j);
                if (i == val.xList.Count - 1)
                {
                    tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
                    tableLayoutPanel1.Controls.Add(new Label()
                    {
                        Text = "x>=" + Math.Round(val.xList[i]), Anchor = (AnchorStyles.Left & AnchorStyles.Right), AutoSize = false, TextAlign = ContentAlignment.MiddleCenter
                    }, 1, j);
                    break;
                }
                tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
                tableLayoutPanel1.Controls.Add(new Label()
                {
                    Text = Math.Round(val.xList[i], 2) + "=<x<" + Math.Round(val.xList[i + 1]), Anchor = (AnchorStyles.Left & AnchorStyles.Right), AutoSize = false, TextAlign = ContentAlignment.MiddleCenter
                }, 1, j);
                if (j <= val.xList.Count - 1)
                {
                    sumOfagain += val.yList[j];
                }
                this.DialogResult = DialogResult.OK;
            }
        }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            SampleRead sample = new SampleRead();

            val = sample._val;
            sample.ShowDialog();
            if (sample.DialogResult == DialogResult.OK)
            {
                button2.Enabled = true;
            }
        }
Exemplo n.º 4
0
 public Table(ValuesContainer val)
 {
     copyVal = val;
     InitializeComponent();
     tableLayoutPanel1.Controls.Clear();
     tableLayoutPanel1.RowCount = 1;
     tableLayoutPanel1.Controls.Add(new Label()
     {
         Text = "X", Anchor = (AnchorStyles.Left & AnchorStyles.Right), AutoSize = false, TextAlign = ContentAlignment.MiddleCenter
     }, 0, 0);
     tableLayoutPanel1.ColumnCount = val._size + 1;
     for (int i = 0, j = 1; i < val._size; i++, j++)
     {
         string res = "";
         res = val.one_elem_list[(val._size * val.chosedIndex) + i].ToString();
         tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
         tableLayoutPanel1.Controls.Add(new Label()
         {
             Text = res, Anchor = (AnchorStyles.Left & AnchorStyles.Right), AutoSize = false, TextAlign = ContentAlignment.MiddleCenter
         }, j, 0);
         val.xList.Add(double.Parse(res));
     }
     button2.Enabled = false;
 }