コード例 #1
0
        static void Main(string[] args)
        {
            Console.Title = "Mactown Server Communication Interface";
            Console.WriteLine("MSCI v1.0");
            GameInterface   = new Game();
            ServerInterface = new GCPS();
            GCSInterface    = new GCS();
            ServerInterface.OnGameDataArrived += ServerInterface_OnGameDataArrived;

            // test
            //GameInterface.AddPlayer(0, "Arsslen");
            //GameInterface.CreatePacketStore(0);
            //GameInterface.AddToken(0, "000000000000000000000000000000");
            // END
            Console.WriteLine("Starting Game Server...");
            AsyncExec a1 = new AsyncExec(ServerInterface.Start);

            a1.BeginInvoke(null, null);
            Console.WriteLine("Starting GCS Server...");
            AsyncExec a2 = new AsyncExec(GCSInterface.StartLocalServer);

            a2.BeginInvoke(null, null);
            Console.WriteLine("Monitoring...");
            Streamer.Initialize();
            while (Console.ReadLine() != "quit")
            {
                Console.WriteLine("To Exit type : quit");
            }

            GCSInterface.Disconnect();
        }
コード例 #2
0
 public Home()
 {
     InitializeComponent();
     try
     {
         Region                        = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 20, 20));
         GigSpace.MainForm             = this;
         GigSpace.MessageArrived      += new OnNotif(GigSpace_MessageArrived);
         GigSpace.NotificationArrived += new OnNotif(GigSpace_NotificationArrived);
         // Run Thread
         AsyncExec exec = new AsyncExec(GigSpace.Run);
         exec.BeginInvoke(null, null);
     }
     catch
     {
     }
 }