Пример #1
0
        private void buttonNext_Click(object sender, EventArgs e)
        {
            switch (comboBoxDistr.SelectedItem.ToString())
            {
                case "Равномерный":
                    DistrUniform du = new DistrUniform(
                        (double)numericUpDownParam1.Value,
                        (double)numericUpDownParam2.Value);

                    RandomProcess.Inst.Stochastic = du;

                    break;

                case "Экспоненциальный":
                    DistrExpon de = new DistrExpon(
                        (double)numericUpDownParam1.Value);

                    RandomProcess.Inst.Stochastic = de;
                    break;

                case "Нормальный":
                    DistrNormal dn = new DistrNormal(
                        (double)numericUpDownParam2.Value,
                        (double)numericUpDownParam1.Value);

                    RandomProcess.Inst.Stochastic = dn;
                    break;
            }

            RandomProcess.Inst.Generate();

            Hide();
            if ((new FormModelingDistr().ShowDialog(this)) == DialogResult.OK)
                Show();
        }
Пример #2
0
        private void buttonNext_Click(object sender, EventArgs e)
        {
            switch (comboBoxDistr.SelectedItem.ToString())
            {
            case "Равномерный":
                DistrUniform du = new DistrUniform(
                    (double)numericUpDownParam1.Value,
                    (double)numericUpDownParam2.Value);

                RandomProcess.Inst.Stochastic = du;

                break;

            case "Экспоненциальный":
                DistrExpon de = new DistrExpon(
                    (double)numericUpDownParam1.Value);

                RandomProcess.Inst.Stochastic = de;
                break;

            case "Нормальный":
                DistrNormal dn = new DistrNormal(
                    (double)numericUpDownParam2.Value,
                    (double)numericUpDownParam1.Value);

                RandomProcess.Inst.Stochastic = dn;
                break;
            }

            RandomProcess.Inst.Generate();

            Hide();
            if ((new FormModelingDistr().ShowDialog(this)) == DialogResult.OK)
            {
                Show();
            }
        }