Example #1
0
        public void SerializationEdgeWeightTest_Weight_AreEqual()
        {
            int expected = 228;
            int actual   = deserializeGraph.LoadGraph("TestSeving.json").Vertexs[0].Nodes[0].Weight;

            Assert.AreEqual(expected, actual);
        }
        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();
            }
        }