コード例 #1
0
 internal void ApplyWindowParams(WindowParameters parameters)
 {
     if (InvokeRequired)
     {
         Invoke(new Action(() => { ApplyWndParams(parameters); }));
     }
     else
     {
         ApplyWndParams(parameters);
     }
 }
コード例 #2
0
        private void ApplyWndParams(WindowParameters parameters)
        {
            if (parameters.Width == 0)
            {
                parameters.Width = 800;
            }
            if (parameters.Height == 0)
            {
                parameters.Height = 600;
            }

            wndParams  = parameters;
            Text       = WindowParameters.Title;
            ClientSize = new Size(WindowParameters.Width, WindowParameters.Height);
        }
コード例 #3
0
        }                        // Hidden constructor

        /// <summary>
        /// Creates new <see cref="GameWindow"/> instance with specified window parameters
        /// </summary>
        /// <param name="parameters">Window parameters for window</param>
        public GameWindow(WindowParameters parameters)
        {
            ApplyWindowParams(parameters);
            ResizeRedraw = true;
            Current      = this;
        }