コード例 #1
0
        private void ButtonClick(object sender, EventArgs e)
        {
            vertexDraws.Clear();

            edgeDraws.Clear();

            initialGraph.CreateVertexes();

            initialGraph.FillingMatrix(matrix);

            initialGraph.CreateEdges();

            drawForm = new StartForm.DrawForm(vertexDraws, edgeDraws, matrix, startForm, inputCountForm, matrixGraph, initialGraph.UpdateAdjacencyList(matrix));

            inputCountForm.Hide();

            drawForm.ShowDialog();

            inputCountForm.Close();
        }
コード例 #2
0
        public void ButtonClick(object sender, EventArgs e)
        {
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                loadGraph = deserializeGraph.LoadGraph(ofd.FileName);

                matrix = converter.ConvertToListListCellBox(loadGraph);

                adjacencyList = converter.ConvertToAdjacencyList(matrix);

                DrawingLoadedEdges(matrix);
                DrawingLoadedVertexs(matrix);

                inputCountVertexForm = new InputCountVertexForm(startForm);

                drawForm = new StartForm.DrawForm(vertexDraws, edgeDraws, matrix, startForm, inputCountVertexForm, matrixGraph, adjacencyList);

                startForm.Hide();

                drawForm.ShowDialog();

                startForm.Close();
            }
        }