⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gdslideeffect.cs.svn-base

📁 这是一个windows mobile程序能够实现窗体运货效果非常不错
💻 SVN-BASE
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Aspecto.GapiDrawNet;
using System.Drawing;

namespace Aspecto.FlowFX
{
    [Obsolete("Use PocketFrog (Pf) Effects")]
    public class GdSlideEffect : GapiDrawEffect
    {
        public override void Swap(FlowForm lastForm, FlowForm nextForm, bool opening)
        {
            base.Swap(lastForm,nextForm,opening);
            int multiplier = opening ? -1 : 1;
            GapiSurface surface = TakeScreenShot(-lastForm.Bounds.Y);

            GapiSurface surface2 = new GapiSurface(surface.GapiDraw);
            surface2.CreateSurface(surface);

            GDRect gr;
            if (opening)
                gr = new GDRect(0, nextForm.Bounds.Y, surface2.Width, nextForm.Bounds.Y + nextForm.Height);
            else
                gr = new GDRect(0, lastForm.Bounds.Y, surface2.Width, lastForm.Bounds.Y + lastForm.Height);

            surface2.FillRect(gr, GapiUtility.RGB(nextForm.BackColor));

            gapiDisplay.BackBuffer.SetClipper(0, 0, gapiDisplay.BackBuffer.Width, gapiDisplay.BackBuffer.Height);
            int frame = 1;
            while (frame < Screen.PrimaryScreen.Bounds.Width)
            {
                gapiDisplay.BackBuffer.Blt(surface, frame * multiplier, 0);
                gapiDisplay.BackBuffer.Blt(surface2, (frame * multiplier) + (surface.Width * multiplier * -1), 0);
                gapiDisplay.Flip();
                frame += Math.Max(1, (int)(Math.Abs(frame) * 0.4));
            }
            surface.Dispose();
            surface2.Dispose();
            DrawStartBar();
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -