【问题标题】:Am I running on an Emulator or a Device我是在模拟器还是设备上运行
【发布时间】:2010-12-21 22:09:16
【问题描述】:

有没有办法(希望使用托管代码)来确定我是在模拟器还是实际的物理设备上运行?

我正在寻找这样的东西:

public class BarcodeScannerFactory
{
  public override BarcodeScanner GetBarcodeScanner() 
  {
    if (IsARealDevice())    <---------------------------+
       return new SymbolBarcodeScanner();               |
    else                                                |
       return new FakeBarcodeScanner();                 |
  }                                                     |
}                                                       |
                                                        |
// This is the method I need to make    ----------------+

(注意:在我看来,Windows Phone 7 已与下面的大多数标签混为一谈。然而,这个问题是针对 Window Mobile 6.5 的。)

【问题讨论】:

    标签: windows-mobile compact-framework emulation


    【解决方案1】:

    你的意思是along these lines

    【讨论】:

    • 正是我需要的。谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-01-01
    • 2012-07-30
    • 1970-01-01
    • 2016-05-01
    • 1970-01-01
    • 2015-06-20
    • 1970-01-01
    相关资源
    最近更新 更多