コード例 #1
0
ファイル: FormMain.cs プロジェクト: Ring-r/opt
        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();
        }
コード例 #2
0
ファイル: FormMain.cs プロジェクト: Ring-r/opt
        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();
            }
        }