?? device.cs.svn-base
字號:
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.IO;
namespace Aspecto
{
public class Device
{
public static bool IsPhone
{
get
{
return File.Exists("\\windows\\phone.dll");
}
}
/// <summary>
/// Returns a string which identifies the device platform.
/// </summary>
/// <remarks>Valid values include:-
/// <list type="bullet">
/// <item><term>PocketPC</term><description>Pocket PC device or Emulator</description></item>
/// <item><term>SmartPhone</term><description>Smartphone 2003 Device or Emulator</description></item>
/// <item><term>CEPC platform</term><description>Windows CE.NET Emulator</description></item></list>
/// Additional platform types will have other names.
/// Useful when writing library code targetted at multiple platforms.</remarks>
public static string PlatformName
{
get
{
StringBuilder builder1 = new StringBuilder(0x80);
Coredll.GetSystemParameterString(0x101, (uint)(builder1.Capacity * 2), builder1, false);
return builder1.ToString().ToLower();
}
}
public static PlatformType PlatformType
{
get
{
PlatformType type = PlatformType.Unknown;
string text1 = PlatformName;
if (text1 == "smartphone")
{
type = PlatformType.Smartphone;
}
else if (text1 == "pocketpc")
{
type = PlatformType.PocketPC;
}
return type;
}
}
}
public enum PlatformType
{
Unknown = -1,
PocketPC = 0,
Smartphone = 1,
WindowsCE = 2
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -