/********************************************************************** *********************************************************************/ void DrawConnectionsNetwork3() { bool[,] visitedEgdes = DijkstraAlgorithm.GetVisistedEdges(); DrawConnection(routerX, routerU, visitedEgdes[currentStep, 1]); DrawConnection(routerX, routerW, visitedEgdes[currentStep, 11]); DrawConnection(routerX, routerY, visitedEgdes[currentStep, 12]); DrawConnection(routerU, routerV, visitedEgdes[currentStep, 0]); DrawConnection(routerV, routerX, visitedEgdes[currentStep, 8]); DrawConnection(routerV, routerW, visitedEgdes[currentStep, 10]); //DrawConnections(canvas, routerV, routerY); DrawConnection(routerW, routerY, visitedEgdes[currentStep, 13]); DrawConnection(routerW, routerZ, visitedEgdes[currentStep, 4]); DrawConnection(routerZ, routerY, visitedEgdes[currentStep, 5]); SKPoint p = new SKPoint(xPercent(0.15f), yPercent(0.6f)); SKPath curveUY = new SKPath(); curveUY.MoveTo(routerU); curveUY.CubicTo(routerU, p, routerY); if (visitedEgdes[currentStep, 3]) { canvas.DrawPath(curveUY, sk_Visited); } else { if (currentStep != maxStep) { canvas.DrawPath(curveUY, sk_RouterContour); } } }
/********************************************************************** *********************************************************************/ void DrawConnectionsNetwork1() { bool[,] visitedEgdes = DijkstraAlgorithm.GetVisistedEdges(); DrawConnection(routerX, routerU, visitedEgdes[currentStep, 1]); DrawConnection(routerX, routerW, visitedEgdes[currentStep, 11]); DrawConnection(routerX, routerY, visitedEgdes[currentStep, 12]); DrawConnection(routerU, routerV, visitedEgdes[currentStep, 0]); //DrawConnections(canvas, routerV, routerX); DrawConnection(routerV, routerW, visitedEgdes[currentStep, 10]); DrawConnection(routerV, routerY, visitedEgdes[currentStep, 9]); //DrawConnections(canvas, routerW, routerY); DrawConnection(routerW, routerZ, visitedEgdes[currentStep, 4]); DrawConnection(routerZ, routerY, visitedEgdes[currentStep, 5]); }
/********************************************************************** *********************************************************************/ void DrawConnectionsNetwork4() { bool[,] visitedEgdes = DijkstraAlgorithm.GetVisistedEdges(); DrawConnection(routerX, routerU, visitedEgdes[currentStep, 1]); //DrawConnections(canvas, routerX, routerW); DrawConnection(routerX, routerY, visitedEgdes[currentStep, 12]); DrawConnection(routerU, routerV, visitedEgdes[currentStep, 0]); DrawConnection(routerV, routerX, visitedEgdes[currentStep, 8]); DrawConnection(routerV, routerW, visitedEgdes[currentStep, 10]); //DrawConnections(canvas, routerV, routerY); DrawConnection(routerW, routerY, visitedEgdes[currentStep, 13]); DrawConnection(routerW, routerZ, visitedEgdes[currentStep, 4]); DrawConnection(routerZ, routerY, visitedEgdes[currentStep, 5]); SKPoint p = new SKPoint(xPercent(0.15f), -yPercent(0.1f)); SKPath curveUW = new SKPath(); curveUW.MoveTo(routerU); curveUW.CubicTo(routerU, p, routerW); if (visitedEgdes[currentStep, 2]) { canvas.DrawPath(curveUW, sk_Visited); } else { if (currentStep != maxStep) { canvas.DrawPath(curveUW, sk_RouterContour); } } SKPoint p2 = new SKPoint(xPercent(0.15f), yPercent(0.6f)); SKPath curveUY = new SKPath(); curveUY.MoveTo(routerU); curveUY.CubicTo(routerU, p2, routerY); if (visitedEgdes[currentStep, 3]) { canvas.DrawPath(curveUY, sk_Visited); } else { if (currentStep != maxStep) { canvas.DrawPath(curveUY, sk_RouterContour); } } SKPoint p3 = new SKPoint(xPercent(0.85f), -yPercent(0.1f)); SKPath curveZV = new SKPath(); curveZV.MoveTo(routerZ); curveZV.CubicTo(routerZ, p3, routerV); if (visitedEgdes[currentStep, 6]) { canvas.DrawPath(curveZV, sk_Visited); } else { if (currentStep != maxStep) { canvas.DrawPath(curveZV, sk_RouterContour); } } SKPoint p4 = new SKPoint(xPercent(0.85f), yPercent(0.6f)); SKPath curveZX = new SKPath(); curveZX.MoveTo(routerZ); curveZX.CubicTo(routerZ, p4, routerX); if (visitedEgdes[currentStep, 7]) { canvas.DrawPath(curveZX, sk_Visited); } else { if (currentStep != maxStep) { canvas.DrawPath(curveZX, sk_RouterContour); } } }