Esempio n. 1
0
        private void OpenTButton_Click(object sender, EventArgs e)
        {
            if (openTFileDialog.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }

            ResetPivotPoints();
            ResetTriangulation();
            ResetShading();

            TExtension.Open(pivotPoints, openTFileDialog.FileName);
            SimpleIterativeTriangulation.Run(pivotPoints, triangulationSectionsList, trianglesHashSet);
            VerticesAverageBrightnessShader.Run(rebuiltImageBitmap, trianglesHashSet);
            rebuiltImagePictureBox.Image = rebuiltImageBitmap;

            // Выставляем элементы формы
            showHideImageGroupBox.Enabled         = false;
            showHidePPointsGroupBox.Enabled       = false;
            showHideGridGroupBox.Enabled          = false;
            pPointsControlsGroupBox.Enabled       = false;
            triangulationControlsGroupBox.Enabled = false;
            shadingControlsGroupBox.Enabled       = false;
            label8.Text  = "";
            label9.Text  = "";
            label10.Text = "";
            label13.Text = pivotPoints.Count.ToString();
            label14.Text = trianglesHashSet.Count.ToString();
            standartDeviationLabel.Text   = "";
            saveInPngButton.Enabled       = true;
            saveInTButton.Enabled         = false;
            originalImagePictureBox.Image = null;
        }
Esempio n. 2
0
        private void SaveInTButton_Click(object sender, EventArgs e)
        {
            if (saveTFileDialog.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }

            TExtension.Save(pivotPoints, saveTFileDialog.FileName);
        }