RF_Wince1/RF_Client/FrmInputBox.cs

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace RF_Client
{
    /// <summary>
    /// 文本录入类型
    /// </summary>
    public enum InputType   {iptString = 0 ,iptInteger = 1,iptNumber = 2,iptPassword = 9 }
    public partial class FrmInputBox : Form
    {
        #region 私有变量
            private InputType _InPutTextType = InputType.iptString ;
            private string _Prompt = string.Empty;
            private string _Title = string.Empty;
            private bool _ResultIsOK = false;
            private string  _ResultValue = string.Empty;
        #endregion

        #region 私有方法
            private bool ValueIsOK(string sValue, InputType typeX)
            {
                bool bOK = true;
                switch (typeX)
                {
                    case InputType.iptInteger:
                        try
                        {
                            int iX = int.Parse(sValue.Trim());
                        }
                        catch (Exception err)
                        {
                            bOK = false;
                        }
                        break;
                    case InputType.iptNumber :
                        try
                        {
                            double iX = double.Parse(sValue.Trim());
                        }
                        catch (Exception err)
                        {
                            bOK = false;
                        }
                        break;     
                    default :
                        bOK = true;
                        break;
                }
                return bOK;
            }
        #endregion

        #region 公有方法

后面还有 163 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。