Пример #1
0
        public PipeClient(string handle, NxSim game)
        {
            PipeStream pipeClient = new AnonymousPipeClientStream(PipeDirection.In, handle);

            sr        = new StreamReader(pipeClient);
            ev        = EventWaitHandle.OpenExisting("NxPipe");
            this.game = game;
        }
Пример #2
0
        static void Main(string[] args)
        {
            var game = new NxSim();

            if (args.Length > 0)
            {
                PipeClient pc = new PipeClient(args[0], game);
                Thread     t  = new Thread(
                    new ParameterizedThreadStart(pc.Listen)
                    );
                t.IsBackground = true;
                t.Start();
            }
            using (game)
                game.Run();
        }