|
- global using CommunityToolkit.Mvvm.ComponentModel;
- global using CommunityToolkit.Mvvm.DependencyInjection;
- global using CommunityToolkit.Mvvm.Input;
- global using BPASmartClient.Helper;
- global using System;
- global using System.Collections.Generic;
- global using System.Linq;
- global using System.Text;
- global using System.Threading.Tasks;
- global using BPASmart.Model;
-
- namespace BPASmart.UserManagement.ViewModel
- {
- public class MainWindowViewModel:ObservableObject
- {
- public MainWindowViewModel()
- {
- Json<LocalUser>.Read();
-
- if (Json<LocalUser>.Data.HighGradeUsers.FirstOrDefault(p => p.UserID == "1") == null)
- {
- Json<LocalUser>.Data.HighGradeUsers.Insert(0, new UserManager()
- {
- UserID = "1",
- UserName = "admin",
- Password = AESHelper.Encrypt("admin") ,
- userPower = UserPower.管理员权限
- });
- }
- if (Json<LocalUser>.Data.HighGradeUsers.FirstOrDefault(p => p.UserID == "0") == null)
- {
- Json<LocalUser>.Data.HighGradeUsers.Insert(0, new UserManager()
- {
- UserID = "0",
- UserName = "developer",
- Password = AESHelper.Encrypt("developer"),
- userPower = UserPower.开发者权限
- });
- }
- }
- }
- }
|