Sic.Framework-Nanjing-Baishi/MECF.Framework.UI.Client/ClientBase/BaseModel.cs

45 lines
855 B
C#
Raw Normal View History

2023-04-13 11:51:03 +08:00
using Caliburn.Micro.Core;
namespace MECF.Framework.UI.Client.ClientBase
{
public class BaseModel : Screen
{
#region Variables
protected readonly IEventAggregator EventAggregator;
private int _permission = 0;
#endregion
#region Constructors
protected BaseModel()
2023-04-13 11:51:03 +08:00
{
EventAggregator = IoC.Get<IEventAggregator>();
EventAggregator?.Subscribe(this);
}
2023-04-13 11:51:03 +08:00
#endregion
2023-04-13 11:51:03 +08:00
#region Properties
2023-04-13 11:51:03 +08:00
public int Permission
{
get => _permission;
2023-04-13 11:51:03 +08:00
set
{
if (_permission != value)
2023-04-13 11:51:03 +08:00
{
_permission = value;
NotifyOfPropertyChange();
2023-04-13 11:51:03 +08:00
}
}
}
#endregion
2023-04-13 11:51:03 +08:00
2023-04-13 11:51:03 +08:00
}
}