Пример #1
0
        /// <summary>
        /// Событие нажатия на кнопку Рассчитать
        /// </summary>
        private void createPlotButton_Click(object sender, EventArgs e)
        {
            if (CheckData())
            {
                FillMatrix();
                Step1();
                Step2();
                Step3();

                int[,] d    = new int[stateCount, stepCount + 1];
                double[,] v = new double[stateCount, stepCount + 1];
                for (int i = 0; i < stateCount; i++)
                {
                    for (int j = 0; j < stepCount + 1; j++)
                    {
                        v[i, j] = vir[j, i];
                        d[i, j] = vi[j, i];
                    }
                }

                StrategyStepList stepList   = new StrategyStepList(stepCount, d, v);
                PlotWindow       plotWindow = new PlotWindow(stepCount + 1, stepList);
                plotWindow.Show();
            }
            else
            {
                MessageBox.Show("Все поля должны быть заполнены!", "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Пример #2
0
        public PlotWindow(int stepCount, StrategyStepList _strategyStepList)
        {
            InitializeComponent();

            StepCount        = stepCount;
            strategyStepList = _strategyStepList;
            plotPictureBox.Refresh();
            initState = 0;
            FillDataGrids();
        }