コード例 #1
0
        static void Main(string[] args)
        {
            Path path = new Path();

            path.AddPoints(new Points3d(1, 2, 3));
            path.AddPoints(new Points3d(4, 5, 6));
            path.AddPoints(new Points3d(7, 8, 9));
            PathStorage.Save("../../Paths.txt", path);

            Path loadedPath = PathStorage.Load("../../Paths.txt");
        }
コード例 #2
0
        static void Main()
        {
            var p1 = new Point3D(2, 1, 4);

            Console.WriteLine("Point 1: {0}", p1);
            Console.WriteLine("Point O: {0}", Point3D.O);

            Console.WriteLine();
            Console.WriteLine("Distance between points 1 and O: {0}", Distance.GetDistance(p1, Point3D.O));

            var path1 = new Path(p1, Point3D.O);

            Console.WriteLine();
            Console.WriteLine("Path to save: {0}", path1);

            PathStorage.Save(path1, "MyPath");
            Console.WriteLine();
            Console.WriteLine("Loaded path: {0}", PathStorage.Load("MyPath"));
        }