chr
2024-08-12 e9d7a5ef4c17e4804fb988dd193ff7d1fa36d52b
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
using PdmSwPlugin.Common.Setting;
using System.Collections.Generic;
 
namespace PdmSwPlugin.Common.Entity.System
{
    public class PdmUser : NotifyBase
    {
        public static PdmUser LoginUser { get; private set; }
 
        public static bool HasLogin()
        {
            return LoginUser != null;
        }
 
        public static void SetLoginUser(PdmUser user)
        {
            LoginUser = user;
            CustomerSetting.Set(user?.setting);
            YwtUserSetting.Load(true);
        }
 
 
        private string _id;
 
        public string id
        {
            get { return _id; }
            set { RaiseAndSetIfChanged(ref _id, value); }
        }
 
        private string _username;
 
        public string username
        {
            get { return _username; }
            set { RaiseAndSetIfChanged(ref _username, value); }
        }
 
        private string _password;
 
        public string password
        {
            get { return _password; }
            set { RaiseAndSetIfChanged(ref _password, value); }
        }
 
        private string _realname;
 
        public string realname
        {
            get { return _realname; }
            set { RaiseAndSetIfChanged(ref _realname, value); }
        }
 
        private string _token;
 
        public string token
        {
            get { return _token; }
            set { RaiseAndSetIfChanged(ref _token, value); }
        }
 
        private HashSet<string> _permissions = new HashSet<string>();
 
        public HashSet<string> permissions
        {
            get { return _permissions; }
            set { RaiseAndSetIfChanged(ref _permissions, value); }
        }
 
        private string _appId;
        public string appId
        {
            get { return _appId; }
            set { RaiseAndSetIfChanged(ref _appId, value); }
        }
 
        private string _pluginVersion;
        public string pluginVersion
        {
            get { return _pluginVersion; }
            set { RaiseAndSetIfChanged(ref _pluginVersion, value); }
        }
 
        public Dictionary<string, string> setting;
    }
}