|
| static void | Initialize () |
| |
| static void | KeyUpEvent (object o, KeyEventArgs e) |
| |
| static void | KeyDownEvent (object o, KeyEventArgs e) |
| |
| static void | KeyPressEvent (object o, KeyPressEventArgs e) |
| |
| static void | ScrollEvent (object o, MouseEventArgs args) |
| |
| static void | Paint (object o, PaintEventArgs e) |
| |
| static void | Render (object o, PaintEventArgs e) |
| |
| static void | MouseMove (object o, PointD e, MouseEventArgs buts) |
| |
| static void | MouseUp (object o, PointD e, MouseEventArgs buts) |
| |
| static void | MouseDown (object o, PointD e, MouseEventArgs buts) |
| |
Definition at line 36 of file Plugin.cs.
◆ Initialize()
| static void BioCore.Plugins.Initialize |
( |
| ) |
|
|
static |
Definition at line 38 of file Plugin.cs.
39 {
40 Directory.CreateDirectory("Plugins");
41 foreach (string s in Directory.GetFiles("Plugins"))
42 {
43 if (!s.EndsWith(
".dll") ||
Plugin.
Plugins.ContainsKey(Path.GetFileName(s)))
44 continue;
45
46 Assembly pluginAssembly = Assembly.LoadFile(Environment.CurrentDirectory + "/" + s);
47
48 var pluginType = pluginAssembly.GetTypes().FirstOrDefault(t => typeof(IPlugin).IsAssignableFrom(t) && !t.IsInterface);
49 if (pluginType != null)
50 {
51
52 IPlugin pluginInstance = Activator.CreateInstance(pluginType) as IPlugin;
54 if (pluginInstance.ContextMenu)
56 else
58 }
59 else
60 {
61 Console.WriteLine("No plugin found in the assembly: " + s);
62 }
63 }
64 }
static void AddMenu(string menu)
static void AddContextMenu(string menu)
static Dictionary< string, IPlugin > Plugins
◆ KeyDownEvent()
| static void BioCore.Plugins.KeyDownEvent |
( |
object | o, |
|
|
KeyEventArgs | e ) |
|
static |
Definition at line 72 of file Plugin.cs.
73 {
75 {
76 p.KeyDownEvent(o, e);
77 }
78 }
◆ KeyPressEvent()
| static void BioCore.Plugins.KeyPressEvent |
( |
object | o, |
|
|
KeyPressEventArgs | e ) |
|
static |
Definition at line 79 of file Plugin.cs.
80 {
82 {
83 p.KeyPressEvent(o, e);
84 }
85 }
◆ KeyUpEvent()
| static void BioCore.Plugins.KeyUpEvent |
( |
object | o, |
|
|
KeyEventArgs | e ) |
|
static |
Definition at line 65 of file Plugin.cs.
66 {
68 {
69 p.KeyUpEvent(o, e);
70 }
71 }
◆ MouseDown()
| static void BioCore.Plugins.MouseDown |
( |
object | o, |
|
|
PointD | e, |
|
|
MouseEventArgs | buts ) |
|
static |
Definition at line 121 of file Plugin.cs.
122 {
124 {
125 p.MouseDown(o, e, buts);
126 }
127 }
◆ MouseMove()
| static void BioCore.Plugins.MouseMove |
( |
object | o, |
|
|
PointD | e, |
|
|
MouseEventArgs | buts ) |
|
static |
Definition at line 107 of file Plugin.cs.
108 {
110 {
111 p.MouseMove(o, e, buts);
112 }
113 }
◆ MouseUp()
| static void BioCore.Plugins.MouseUp |
( |
object | o, |
|
|
PointD | e, |
|
|
MouseEventArgs | buts ) |
|
static |
Definition at line 114 of file Plugin.cs.
115 {
117 {
118 p.MouseUp(o, e, buts);
119 }
120 }
◆ Paint()
| static void BioCore.Plugins.Paint |
( |
object | o, |
|
|
PaintEventArgs | e ) |
|
static |
Definition at line 93 of file Plugin.cs.
94 {
96 {
97 p.Paint(o, e);
98 }
99 }
◆ Render()
| static void BioCore.Plugins.Render |
( |
object | o, |
|
|
PaintEventArgs | e ) |
|
static |
Definition at line 100 of file Plugin.cs.
101 {
103 {
104 p.Render(o, e);
105 }
106 }
◆ ScrollEvent()
| static void BioCore.Plugins.ScrollEvent |
( |
object | o, |
|
|
MouseEventArgs | args ) |
|
static |
Definition at line 86 of file Plugin.cs.
87 {
89 {
90 p.ScrollEvent(o, args);
91 }
92 }
The documentation for this class was generated from the following file: