Push Changes from Techcrafters Repo

This commit is contained in:
2026-03-05 14:37:43 +01:00
parent d2665d17fa
commit 9636ff0457
215 changed files with 5052 additions and 14150 deletions

View File

@@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace InfineonHMI.Common;
public static class Users
{
private static User CurrentUser { get; set; }
public static ObservableCollection<User> UsersCollection { get; set; }
public static void setCurrentUser(User u)
{
CurrentUser = new User(u);
}
public static User getCurrentUser()
{
if (CurrentUser == null)
CurrentUser = new User("undefined", "undef", 0);
return CurrentUser;
}
}
public class User
{
public string? UserName { get; set; }
public string PasswordHash { get; set; }
public int UserLevel { get; set; }
public User()
{
}
public User(User u)
{
UserName = u.UserName;
PasswordHash = u.PasswordHash;
UserLevel = u.UserLevel;
}
public User(string name, string hash, int level)
{
UserName = name;
PasswordHash = hash;
UserLevel = level;
}
}