Exemple #1
0
        public Multiplayer()
        {
            InitializeComponent();
            //For Keyboard
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

            _rawinput = new RawInput(Handle, true);

            _rawinput.AddMessageFilter();   // Adding a message filter will cause keypresses to be handled
            Win32.DeviceAudit();            // Writes a file DeviceAudit.txt to the current directory

            _rawinput.KeyPressed += OnKeyPressed;
            //Keyboard End

            wr = new WordsReader();
            Timelimit.Start();
            Gameflow.Start();
            NextLevel();

            /*
             * THREAD TEST
             *
             *
             */
        }
Exemple #2
0
 /// <summary>
 /// 延长房间分钟数
 /// </summary>
 /// <param name="minute_"></param>
 public void ProlongTimelimit(int minute_)
 {
     if (minute_ <= 0)
     {
         throw new Exception("延长时间应正数");
     }
     Timelimit = Timelimit.AddMinutes(minute_);
 }