Beispiel #1
0
        public MainForm()
        {
            InitializeComponent();
            creator = new FractalCreator(fractalData, genSettings, colorSettings);
            genSettings.Resolution = pbFractalImage.Size;

            // --------------- FractalMap -------------------------
            fractalMap           = new FractalCreator(fractalMapData, genSetMap, mapColorSettings);
            genSetMap.Resolution = pbMapFractal.Size;

            pbMapFractal.Image = fractalMap.Create();
            // ----------------------------------------------------

            tbIterCount.Value = genSettings.IterationCount;
            tbR.Value         = colorSettings.R;
            tbG.Value         = colorSettings.G;
            tbB.Value         = colorSettings.B;

            cbCalcAlg.SelectedIndex           = 0;
            cbColorAlg.SelectedIndex          = 0;
            cbQualFac.SelectedIndex           = 0;
            cbFractalType.SelectedIndex       = 0;
            cbResolutionForSave.SelectedIndex = 0;

            lblIterCount.Text  = $"Число итераций = {genSettings.IterationCount}";
            lblPosXCenter.Text = $"Центр X: {fractalData.CenterX}";
            lblPosYCenter.Text = $"Центр Y: {fractalData.CenterY}";
            lblSizeArea.Text   = $"Увеличение: {fractalData.SizeArea}";

            lblStatus.Text = "Готово";
        }
Beispiel #2
0
        private async void cbFractalType_SelectionChangeCommitted(object sender, EventArgs e)
        {
            fractalData.FractalType = GetFractalType();

            lblPosXCenter.Text = $"Центр X: {fractalData.CenterX}";
            lblPosYCenter.Text = $"Центр Y: {fractalData.CenterY}";
            lblSizeArea.Text   = $"Увеличение: {fractalData.SizeArea}";

            ProgramStatusBusy();

            pbFractalImage.Image = await creator.CreateAsync();

            // --------------- FractalMap --------------------
            fractalMapData.FractalType = GetFractalType();
            pbMapFractal.Image         = fractalMap.Create();
            // -----------------------------------------------

            ProgramStatusDone();
        }