예제 #1
0
        public void TestDeserialiseMerlinStatic()
        {
            FileStream smallMazeFile = new FileStream(@"C:\Users\Philip\Desktop\HoverGame\HOVER\MAZES\MAZE1.MAZ", FileMode.Open);
            var classRegistry = new MfcClassRegistry();
            classRegistry.RegisterClass("CMerlinStatic", typeof(CMerlinStatic));
            classRegistry.RegisterClass("CMerlinLocation", typeof(CMerlinLocation));

            MfcDeserialiser archive = new MfcDeserialiser(smallMazeFile, classRegistry);
            Maze maze = new Maze();
            maze.Deserialise(archive);
        }
예제 #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            FileStream smallMazeFile = new FileStream(@"C:\Users\Philip\Desktop\HoverGame\HOVER\MAZES\small.MAZ", FileMode.Open);
            var classRegistry = new MfcClassRegistry();
            classRegistry.AutoRegisterClasses(typeof(Maze).Assembly);

            MfcDeserialiser archive = new MfcDeserialiser(smallMazeFile, classRegistry);
            Maze maze = new Maze();
            maze.Deserialise(archive);

            var form = new HoverForm(maze);
            MainLoop renderFrame = form.RunFrame;
            MessagePump.Run(form, renderFrame);
        }