Example #1
0
        static void Main()
        {
            
            var point = new Point(2.3, 1, 0);
            var secPoint = new Point(1, 2, 5);
            var thirdPoint = new Point(3, 2, 2);

            Console.WriteLine(point.ToString());
            Console.WriteLine(Point.O);

            Console.WriteLine(DistanceBnTwoPoints.CalcDistTwoPoints(point, Point.O));

            var path = new Path();
            path.AddPointsPath(point);
            path.AddPointsPath(Point.O);
            path.AddPointsPath(secPoint);
            path.AddPointsPath(thirdPoint);

            PathStorage.SavePath(path);
            var pathLoad = PathStorage.LoadPath();

            foreach (var p in pathLoad.Points)
            {
                Console.WriteLine(p);
            }

            Console.WriteLine(new string('-', 59));

        }
Example #2
0
        static void Main()
        {
            Point3D x = new Point3D(1, 1, 1);
            Point3D y = new Point3D(2, 2, 2);
            Point3D z = new Point3D(3, 3, 3);
            Path newPath = new Path();
            newPath.AddPoint(x);
            newPath.AddPoint(y);
            newPath.AddPoint(z);
            Console.WriteLine("Path before serialization:");
            Console.WriteLine(newPath.ToString());

            PathStorage.SavePath(newPath);
            Path list = PathStorage.LoadPath();
            Console.WriteLine("Path after deserialization:");
            Console.WriteLine(newPath.ToString());
        }