deliverysignatureformfactory.cs

来自「微软的行业应用解决方案示例」· CS 代码 · 共 32 行

CS
32
字号
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace HardwareDistributor.UI
{
    /// <summary>
    /// create and hand over appropriate instance of the Deleivery signature form
    /// depending upon the platform.
    /// for Professional Devices, we allow for real signatures with stylus vectore input
    /// but for smartphone, entry is only via keypad
    /// </summary>
    class DeliverySignatureFormFactory
    {
        //accepts input parameters required by the base form
        public static DeliverySignatureBase GetDeliverySignatureForm(Guid orderId, int customerId)
        {
            //figure out device platform and return correct instance
            switch (Microsoft.WindowsCE.Forms.SystemSettings.Platform)
            {
                case Microsoft.WindowsCE.Forms.WinCEPlatform.PocketPC :
                    return new DeliverySignatureProfessional(orderId, customerId);
                case Microsoft.WindowsCE.Forms.WinCEPlatform.Smartphone:
                    return new DeliverySignatureStandard(orderId, customerId);
                default :
                    return new DeliverySignatureProfessional(orderId, customerId);
            }
        }
    }
}

⌨️ 快捷键说明

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