Ejemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     Request request = new Request()
     {
         A = textBoxA.Text,
         M = textBoxM.Text,
         Ro = textBoxR.Text
     };
     Distribution distribution = DistributionFactory.GetDistribution(comboBox1.SelectedIndex);
     try
     {
         distribution.Generate(request);
         var statistics = new Statistics(distribution.DistributionList);
         distribution.Draw(chart1);
         expValue.Text = statistics.ExpectedValue.ToString();
         dispersion.Text = statistics.Dispersion.ToString();
         standardDeviation.Text = statistics.StandardDeviation.ToString();
         uniformity.Text = statistics.IndirectUniformity.ToString();
         period.Text = (distribution as Lemer).Period.ToString();
         aperiodicity.Text = (distribution as Lemer).Period.ToString();
     }
     catch
     {
         MessageBox.Show("Введите корректные данные.");
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 显示统计信息界面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click_2(object sender, EventArgs e)
        {
            Form Statis = new Statistics();

            Statis.Show();
        }