示例#1
0
文件: Calculations.cs 项目: Pemek/WMH
        public Calculations(WMH.Model.Graph _graph, double _width, double _height)
        {
            graph    = _graph;
            biggestX = graph.findBiggestX();
            biggestY = graph.findBiggestY();

            Width  = _width;
            Height = _height;
        }
示例#2
0
        public void drawGraph(WMH.Model.Graph graph)
        {
            try
            {
                canvasBackground.Children.Clear();
                Height = canvasBackground.Height;
                Width  = canvasBackground.Width;
                double biggestX = 100; // graph.findBiggestX();
                double biggestY = 100; // graph.findBiggestY();

                //drawEdges(graph, biggestX, biggestY);
                drawVertexs(graph, biggestX, biggestY);
            }
            catch (Exception)
            {
                throw;
            }
        }