コード例 #1
0
        private void UI_Load(object sender, EventArgs e)
        {
            StartServer();
            InvokerMainThread = InvokeOnMainThread;
            var messageFilter = new MessageFilter();

            Application.AddMessageFilter(messageFilter);
            GUI = new ServerGameUI(this, messageFilter, true)
            {
                TopLevel   = false,
                ControlBox = false,
                Bounds     = new Rectangle(0, 0, panelGameUI.Width, panelGameUI.Height),
                Dock       = DockStyle.Fill
            };
            panelGameUI.Controls.Add(GUI);
            // Decomment these lines when at the final version
            GUI.Show();
            //GUI.Controller.EnableDrawing = false;
        }
コード例 #2
0
 public ServerMainController(ServerGameUI ServerGameUI, MessageFilter MessageFilter, bool EnableStepping, bool EnableDrawing, bool Online) : base(ServerGameUI, MessageFilter, EnableStepping, EnableDrawing, Online)
 {
     this.ServerGameUI = ServerGameUI;
     //
     lastShootUpdateTime = DateTime.Now.AddMilliseconds(-shootUpdateInterval);
 }