Shuxia Ning
2025-01-17 a0bce3b366451b3ca94e676eb98dd7b415375c14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System.Configuration;
using Yw.Untity;
 
namespace PBS.Desktop
{
    /// <summary>
    /// 用户设置
    /// </summary>
    internal sealed class UserLoginSettings : ApplicationSettingsBase
    {
        /// <summary>
        /// 登录名称
        /// </summary>
        [UserScopedSetting]
        public string LoginName
        {
            get { return (string)this[nameof(LoginName)]; }
            set { this[nameof(LoginName)] = value; }
        }
 
        /// <summary>
        /// 登录密码
        /// </summary>
        [UserScopedSetting]
        public string Password
        {
            get { return ((string)this[nameof(Password)])?.DecryptByBase64(); }
            set { this[nameof(Password)] = value?.EncryptByBase64(); }
        }
 
        /// <summary>
        /// 过期时间
        /// </summary>
        [UserScopedSetting]
        public DateTime? ExpireTime
        {
            get { return (DateTime?)(this[nameof(ExpireTime)]); }
            set { this[nameof(ExpireTime)] = value; }
        }
 
    }
}