Esempio 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("Введите корректные данные.");
     }
 }