demo4/demo4_true/ModelsMy/ClientAuth.cs

30 lines
692 B
C#
Raw Normal View History

2025-01-28 16:06:43 +00:00
using System;
using System.IO;
using Avalonia.Media.Imaging;
using demo4_true.Models;
namespace demo4_true.ModelsMy;
public class ClientAuth: Client
{
public int Id { get; set; }
public string Password { get; set; } = null!;
public int Role { get; set; }
public string FIO { get; set; } = null!;
public string PhotoPath { get; set; } = null!;
public Bitmap? Image
{
get
{
try
{
string absolutePath = Path.Combine(AppContext.BaseDirectory, PhotoPath);
return new Bitmap(absolutePath);
}
catch
{
return null;
}
}
}
}