示例#1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            MMW.ClientSize = ClientSize;
            MMW.WindowSize = Size;
            var size = ClientSize;

            var pos = PointToScreen(new System.Drawing.Point(0, 0));

            MMW.X = pos.X;
            MMW.Y = pos.Y;

            if (MMW.Configuration.Antialias == MMWConfiguration.AntialiasType.SSAAHalf)
            {
                size.Width  /= 2;
                size.Height /= 2;
            }
            else if (MMW.Configuration.Antialias == MMWConfiguration.AntialiasType.SSAAx2)
            {
                size.Width  *= 2;
                size.Height *= 2;
            }
            else if (MMW.Configuration.Antialias == MMWConfiguration.AntialiasType.SSAAx4)
            {
                size.Width  *= 4;
                size.Height *= 4;
            }
            MMW.RenderResolution = size;

            MMW.Window = this;

            MMW.Init();
        }