Esempio n. 1
0
 private void Form_Load(object sender, EventArgs e)
 { // Load distribution & parameters names, and default values.
   try
   {
     // Create and show splash screen:
     this.Hide();
     distexSplash frmSplash = new distexSplash();
     frmSplash.Show();
     frmSplash.Update();
     // Now load our data while the splash is showing:
     if (boost_math.any_distribution.size() <= 0)
     {
       MessageBox.Show("Problem loading any distributions, size = " + boost_math.any_distribution.size().ToString());
     }
     for (int i = 0; i < boost_math.any_distribution.size(); ++i)
     {
       distribution.Items.Add(boost_math.any_distribution.distribution_name(i));
     }
     distribution.SelectedIndex = 0; // 1st in array, but could be any other.
     // All parameters are made zero by default, but updated from chosen distribution.
     parameter1.Text = boost_math.any_distribution.first_param_default(0).ToString();
     parameter2.Text = boost_math.any_distribution.second_param_default(0).ToString();
     parameter3.Text = boost_math.any_distribution.third_param_default(0).ToString();
     //
     // Sleep and then close splash;
     Thread.Sleep(3000);
     frmSplash.Close();
     this.Visible = true;
   }
   catch
   { //
     log.WriteEntry("DistexForm_load exception!");
     MessageBox.Show("Problem loading distributions, size = " + boost_math.any_distribution.size().ToString());
   }
 }
Esempio n. 2
0
 private void Form_Load(object sender, EventArgs e)
 { // Load distribution & parameters names, and default values.
   try
   {
     // Create and show splash screen:
     this.Hide();
     distexSplash frmSplash = new distexSplash();
     frmSplash.Show();
     frmSplash.Update();
     // Now load our data while the splash is showing:
     if (boost_math.any_distribution.size() <= 0)
     {
       MessageBox.Show("Problem loading any distributions, size = " + boost_math.any_distribution.size().ToString());
     }
     for (int i = 0; i < boost_math.any_distribution.size(); ++i)
     {
       distribution.Items.Add(boost_math.any_distribution.distribution_name(i));
     }
     distribution.SelectedIndex = 0; // 1st in array, but could be any other.
     // All parameters are made zero by default, but updated from chosen distribution.
     parameter1.Text = boost_math.any_distribution.first_param_default(0).ToString();
     parameter2.Text = boost_math.any_distribution.second_param_default(0).ToString();
     parameter3.Text = boost_math.any_distribution.third_param_default(0).ToString();
     //
     // Sleep and then close splash;
     Thread.Sleep(3000);
     frmSplash.Close();
     this.Visible = true;
   }
   catch
   { //
     log.WriteEntry("DistexForm_load exception!");
     MessageBox.Show("Problem loading distributions, size = " + boost_math.any_distribution.size().ToString());
   }
 }