Exemplo n.º 1
0
        public void UpdateAppSubType(string name)
        {
            AppSubType t = AppSubType.ToObject(name);

            char[] temp = _value.ToCharArray();
            temp.SetValue((int)t, 12);
            _value = temp.ToString();
        }
Exemplo n.º 2
0
        protected string Generate(AppType style, AppSubType orientation)
        {
            string header  = orientation == AppSubType.NonSingle ? "G" : "S";
            string date    = DateTime.Now.ToString("yyyyMMdd");
            string s       = "0" + (int)style;
            string o       = "0" + (int)orientation;
            string random4 = DateTime.UtcNow.Ticks.ToString().Substring(13, 4);

            return(header + date + s + o + random4);
        }
Exemplo n.º 3
0
        public static string ToLabel(this AppSubType subType, AppType type)
        {
            switch (subType)
            {
            case AppSubType.Single:
                return(type == AppType.Visa ? "单人" : "单认证");

            case AppSubType.NonSingle:
            default:
                return(type == AppType.Visa ? "团体" : "双认证");
            }
        }
Exemplo n.º 4
0
        public static AppSubType ToObject(this AppSubType subType, string name)
        {
            switch (name)
            {
            case "单人":
            case "单认证":
                return(AppSubType.Single);

            case "团体":
            case "双认证":
            default:
                return(AppSubType.NonSingle);
            }
        }
Exemplo n.º 5
0
 public void UpdateAppSubType(AppSubType subType)
 {
     char[] temp = _value.ToCharArray();
     temp.SetValue((int)subType, 12);
     _value = temp.ToString();
 }
Exemplo n.º 6
0
 public static Identifier New(AppType style, AppSubType orien)
 {
     return new Identifier(style,orien);
 }
Exemplo n.º 7
0
 public Identifier(string value)
 {
     _value = value;
     _appType = GetAppType(value);
     _appSubType = GetAppSubType(value);
 }
Exemplo n.º 8
0
 public Identifier(AppType appType, AppSubType orien)
 {
     _appType = appType;
     _appSubType = orien;
     _value = Generate(appType, orien);
 }
Exemplo n.º 9
0
        protected string Generate(AppType style, AppSubType orientation)
        {
            string header = orientation == AppSubType.NonSingle ? "G" : "S";
            string date = DateTime.Now.ToString("yyyyMMdd");
            string s = "0" + (int) style;
            string o = "0" + (int) orientation;
            string random4 = DateTime.UtcNow.Ticks.ToString().Substring(13, 4);

            return header + date + s + o+random4;
        }
Exemplo n.º 10
0
 public void UpdateAppSubType(AppSubType subType)
 {
     char[] temp = _value.ToCharArray();
     temp.SetValue((int)subType, 12);
     _value = temp.ToString();
 }
Exemplo n.º 11
0
 public Identifier(string value)
 {
     _value      = value;
     _appType    = GetAppType(value);
     _appSubType = GetAppSubType(value);
 }
Exemplo n.º 12
0
 public Identifier(AppType appType, AppSubType orien)
 {
     _appType    = appType;
     _appSubType = orien;
     _value      = Generate(appType, orien);
 }
Exemplo n.º 13
0
 public static Identifier New(AppType style, AppSubType orien)
 {
     return(new Identifier(style, orien));
 }