Repository navigation
Expand file tree
/
Copy pathPluginBase.cs
More file actions
executable file
·58 lines (51 loc) · 1.51 KB
/
Copy pathPluginBase.cs
File metadata and controls
executable file
·58 lines (51 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using Command;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows.Media;
namespace Plugin
{
public class PluginBase
{
public PluginBase()
{
Background = new SolidColorBrush(Color.FromRgb(194, 194, 194));
}
public string Name { get; set; }
public IExecutor Executor { get; protected set; }
protected bool _isUsed;
public bool IsUsed
{
get
{
return _isUsed;
}
set
{
if(IExecutorUsedChangedEvent!=null&&Executor!=null)
{
IExecutorUsedChangedEvent(Executor,value);
}
_isUsed = value;
if (value)
{
((SolidColorBrush)Background).Color = Color.FromRgb(72, 72, 72);
}
else
{
((SolidColorBrush)Background).Color = Color.FromRgb(194, 194, 194);
}
}
}
public string Description { set; get; }
public Brush Background { get;protected set; }
public virtual UserControl GetControl()
{
return null;
}
public delegate void IExecutorUsedChanged(IExecutor ie, bool value);
public event IExecutorUsedChanged IExecutorUsedChangedEvent;
}
}