添加项目文件。
This commit is contained in:
37
UIShare/GlobalVariable/GlobalInfo.cs
Normal file
37
UIShare/GlobalVariable/GlobalInfo.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace UIShare.GlobalVariable
|
||||
{
|
||||
public class GlobalInfo:BindableBase
|
||||
{
|
||||
public event EventHandler? ScopeChanged;
|
||||
public Dictionary<string,ScopedContext> ContextDic { get; set; }
|
||||
public Dictionary<string,StepRunning> StepRunningDic { get; set; }
|
||||
public String UserName { get; set; } = "Not Logged in";
|
||||
public bool IsAdmin { get; set; } = true;
|
||||
private string _currentScope = "default";
|
||||
public string CurrentScope
|
||||
{
|
||||
get => _currentScope;
|
||||
set
|
||||
{
|
||||
if (_currentScope != value)
|
||||
{
|
||||
_currentScope = value;
|
||||
ScopeChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
public GlobalInfo()
|
||||
{
|
||||
ContextDic = new();
|
||||
StepRunningDic = new();
|
||||
CurrentScope = "default";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user