예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            int count = (int)numericUpDown1.Value;

            nV = new object[count];
            for (int i = 0; i < nV.Length; i++)
            {
                nV[i] = nameVertex[i];
            }
            DialogSwitch dialog = new DialogSwitch();
            var          type   = dialog.ShowDialog(this);

            inputMatrix.Dispose();
            if (type == DialogResult.OK)
            {
                isDigraph = false;
                //Матрица тексбоксов NxN, гдe a(i, j) = a(j, i)
                MatrixTextboxN matrix = new MatrixTextboxN(tLine, tColumn, tItem);
                matrix.Create(nV, nV);
                matrix.SetEventTextChange();
                inputMatrix = matrix;
            }
            else if (type == DialogResult.Yes)
            {
                isDigraph = true;
                //Матрица тексбоксов NxN
                MatrixTextbox matrix = new MatrixTextbox(tLine, tColumn, tItem);
                matrix.Create(nV, nV);
                inputMatrix = matrix;
            }
            else
            {
                return;
            }
            Clear();
        }
예제 #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     graphics    = panel1.CreateGraphics();
     inputMatrix = new MatrixTextbox(tLine, tColumn, tItem);
 }