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

📄 platformapis.cs

📁 在mobile上面实现iphone的ui
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace iPhoneUI
{
    // These structures, enumerations and p/invoke signatures come from
    // wingdi.h in the Windows Mobile 5.0 Pocket PC SDK

    public struct BlendFunction
    {
        public byte BlendOp;
        public byte BlendFlags;
        public byte SourceConstantAlpha;
        public byte AlphaFormat;
    }

    public enum BlendOperation : byte
    {
        AC_SRC_OVER = 0x00
    }

    public enum BlendFlags : byte
    {
        Zero = 0x00
    }

    public enum SourceConstantAlpha : byte
    {
        Transparent = 0x00,
        Opaque = 0xFF
    }

    public enum AlphaFormat : byte
    {
        AC_SRC_ALPHA = 0x01
    }

    public class PlatformAPIs
    {
        [Flags()]
        public enum FullScreenFlags : int
        {
            SwHide = 0,
            ShowTaskbar = 0x1,
            HideTaskbar = 0x2,
            ShowSipButton = 0x4,
            HideSipButton = 0x8,
            SwRestore = 9,
            ShowStartIcon = 0x10,
            HideStartIcon = 0x20

        }

        public enum ShowWindowFlags : int
        {
            SW_HIDE = 0x00,
            SW_SHOW = 0x0001 
        }


        [DllImport("coredll.dll")]
        extern public static Int32 AlphaBlend(IntPtr hdcDest, Int32 xDest, Int32 yDest, Int32 cxDest, Int32 cyDest, IntPtr hdcSrc, Int32 xSrc, Int32 ySrc, Int32 cxSrc, Int32 cySrc, BlendFunction blendFunction);

        [DllImport("aygshell.dll", SetLastError = true)]
        extern public static bool SHFullScreen(IntPtr hwnd, int state);

        [DllImport("coredll.dll", SetLastError = true)]
        extern public static IntPtr FindWindowW(string lpClass, string lpWindow);

        [DllImport("coredll.dll", EntryPoint = "GetForegroundWindow", SetLastError = true)]
        extern public static IntPtr GetForegroundWindow();

        [DllImport("coredll.dll", EntryPoint = "EnableWindow")]
        extern public static bool EnableWindow(IntPtr hwnd, bool bEnable);

        [DllImport("coredll.dll", CharSet = CharSet.Auto)] 
        extern public static bool ShowWindow(IntPtr hwnd, int nCmdShow);
        

    }
}

⌨️ 快捷键说明

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