Esempio n. 1
0
        private void createMatrix_Click(object sender, EventArgs e)
        {
            //this.matrixTable.AcceptChanges();
            //this.dataSet1.AcceptChanges();

            int anzahl = this.matrixTable.Columns.Count;

            // DataTable table = this.dataSet1.Tables[0];

            for (int y = 0; y < anzahl; y++)
            {
                Double[] dRow = new Double[anzahl];
                for (int x = 0; x < anzahl; x++)
                {
                    string wert = String.Empty;
                    if (this.dataGridView1.Rows[y].Cells[x].Value != DBNull.Value)
                        wert = (string)this.dataGridView1.Rows[y].Cells[x].Value;

                    if (wert == null || wert == String.Empty || wert.Length == 0)
                    {
                        dRow[x] = PSEUDO;
                    }
                    else
                        dRow[x] = Convert.ToDouble(wert);
                }
                Row row = new Row(dRow);
                this.matrix.AddRow(row);
            }

            builder = new DotBuilder(matrix, anzahl);
            builder.Build(fake, matrix, start);

            this.mapleTextBox.Text =
                builder.getRestrictions(Convert.ToInt32(this.mengeTextBox.Text),
                                        Convert.ToInt32(this.quelleTextBox.Text),
                                        Convert.ToInt32(this.senkeTextBox.Text));

            this.tabControl1.SelectedTab = this.tabPage2;

            //Bild erstellen / Anzeigen
            PictureForm picForm = new PictureForm();

            this.createPicture("StartGraph");
            picForm.ShowPicture("StartGraph.jpg");

            picForm.Show();

            this.createPicture("start");
        }
Esempio n. 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            double[,] punkte = AnalyzeMapleOutput(this.mapleOutputTextBox.Text);

            this.mengeLbl.Text = mengeTextBox.Text;
            this.kostenLbl.Text = this.kosten.ToString();

            PictureForm picForm = new PictureForm();
            this.createPicture("OptimizedGraph");
            picForm.ShowPicture("OptimizedGraph.jpg");

            picForm.Show();
        }