Esempio n. 1
0
        public FormMain()
        {
            InitializeComponent();

            random = new Random();

            filename = "example_input_data.txt";

            ReadFromFile(filename);

            polygon = null;

            placing = new PlacingOpt(polygons, strip_vector);
            placing.FillPoint();

            Text = "Размещение многоугольников (" + filename + ")";

            thread = null;
            thread_start = new ParameterizedThreadStart(MethodInThread);

            settings = new FormSettings.SettingsClass();
        }
Esempio n. 2
0
        private void загрузитьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openFileDialog.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                filename = openFileDialog.FileName;

                ReadFromFile(filename);

                placing = new PlacingOpt(polygons, strip_vector);
                placing.FillPoint();

                Text = "Размещение многоугольников (" + filename + ")";

                pictureBox.Invalidate();
            }
        }