Beispiel #1
0
        public void RegisterInterface(IUpdate iUpdate)
        {
            BeginPaint    = new BeginPaintDelegate(iUpdate.BeginPaint);
            EndPaint      = new EndPaintDelegate(iUpdate.EndPaint);
            SetBounds     = new SetBoundsDelegate(iUpdate.SetBounds);
            Synchronize   = new SynchronizeDelegate(iUpdate.Synchronize);
            DesktopResize = new DesktopResizeDelegate(iUpdate.DesktopResize);
            BitmapUpdate  = new BitmapUpdateDelegate(iUpdate.BitmapUpdate);
            Palette       = new PaletteDelegate(iUpdate.Palette);
            PlaySound     = new PlaySoundDelegate(iUpdate.PlaySound);
            SurfaceBits   = new SurfaceBitsDelegate(iUpdate.SurfaceBits);

            update->BeginPaint    = Marshal.GetFunctionPointerForDelegate(BeginPaint);
            update->EndPaint      = Marshal.GetFunctionPointerForDelegate(EndPaint);
            update->SetBounds     = Marshal.GetFunctionPointerForDelegate(SetBounds);
            update->Synchronize   = Marshal.GetFunctionPointerForDelegate(Synchronize);
            update->DesktopResize = Marshal.GetFunctionPointerForDelegate(DesktopResize);
            update->BitmapUpdate  = Marshal.GetFunctionPointerForDelegate(BitmapUpdate);
            update->Palette       = Marshal.GetFunctionPointerForDelegate(Palette);
            update->PlaySound     = Marshal.GetFunctionPointerForDelegate(PlaySound);
            update->SurfaceBits   = Marshal.GetFunctionPointerForDelegate(SurfaceBits);
        }
Beispiel #2
0
        public void RegisterInterface(IUpdate iUpdate)
        {
            BeginPaint = new BeginPaintDelegate(iUpdate.BeginPaint);
            EndPaint = new EndPaintDelegate(iUpdate.EndPaint);
            SetBounds = new SetBoundsDelegate(iUpdate.SetBounds);
            Synchronize = new SynchronizeDelegate(iUpdate.Synchronize);
            DesktopResize = new DesktopResizeDelegate(iUpdate.DesktopResize);
            BitmapUpdate = new BitmapUpdateDelegate(iUpdate.BitmapUpdate);
            Palette = new PaletteDelegate(iUpdate.Palette);
            PlaySound = new PlaySoundDelegate(iUpdate.PlaySound);
            SurfaceBits = new SurfaceBitsDelegate(iUpdate.SurfaceBits);

            update->BeginPaint = Marshal.GetFunctionPointerForDelegate(BeginPaint);
            update->EndPaint = Marshal.GetFunctionPointerForDelegate(EndPaint);
            update->SetBounds = Marshal.GetFunctionPointerForDelegate(SetBounds);
            update->Synchronize = Marshal.GetFunctionPointerForDelegate(Synchronize);
            update->DesktopResize = Marshal.GetFunctionPointerForDelegate(DesktopResize);
            update->BitmapUpdate = Marshal.GetFunctionPointerForDelegate(BitmapUpdate);
            update->Palette = Marshal.GetFunctionPointerForDelegate(Palette);
            update->PlaySound = Marshal.GetFunctionPointerForDelegate(PlaySound);
            update->SurfaceBits = Marshal.GetFunctionPointerForDelegate(SurfaceBits);
        }