1
This commit is contained in:
@@ -22,6 +22,11 @@ namespace BITKit
|
||||
[CustomType(typeof(IValidHandle))]
|
||||
public sealed class ValidHandle: IValidHandle
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Allow:{enableHandle}\nElements:{string.Join("\n",objs)}\nDisableElements:{string.Join("\n",disableObjs)}";
|
||||
}
|
||||
|
||||
public ValidHandle() {}
|
||||
public ValidHandle(Action<bool> boolDelegate)
|
||||
{
|
||||
@@ -36,11 +41,18 @@ namespace BITKit
|
||||
public bool Allow => this;
|
||||
|
||||
private bool enableHandle;
|
||||
private readonly List<object> objs = new List<object>();
|
||||
private readonly List<object> disableObjs = new List<object>();
|
||||
/// <summary>
|
||||
/// ⚠️Dont operate this field directly
|
||||
/// </summary>
|
||||
public readonly List<object> objs = new List<object>();
|
||||
/// <summary>
|
||||
/// ⚠️Dont operate this field directly
|
||||
/// </summary>
|
||||
public readonly List<object> disableObjs = new List<object>();
|
||||
private bool tempEnable;
|
||||
private Action<bool> EventOnEnableChanged;
|
||||
|
||||
|
||||
public void AddElement(object obj)
|
||||
{
|
||||
if (objs.Contains(obj))
|
||||
|
Reference in New Issue
Block a user