1 |
< |
using System; |
1 |
> |
//#define PLUGIN_ENABLED // when defined the plugin is enabled, otherwise it will not be shown |
2 |
> |
using System; |
3 |
|
using System.Collections.Generic; |
4 |
|
using System.Linq; |
5 |
|
using System.Text; |
40 |
|
|
41 |
|
public override void Config() |
42 |
|
{ |
43 |
< |
Logging.logger.Warn.WriteLine("This plugin has no configurable settings."); |
43 |
> |
Logging.logger.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - has no configurable settings", name, ID); |
44 |
|
} |
45 |
|
|
46 |
< |
public override void Show() |
46 |
> |
public override void Show() { Show(null); } |
47 |
> |
public override void Show(DockPanel dockPanel) { Show(dockPanel, DockState.Document); } |
48 |
> |
public override void Show(DockPanel dockPanel, DockState dockState) { InternalShow(dockPanel, dockState); } |
49 |
> |
private void InternalShow(DockPanel dockPanel, DockState dockState) |
50 |
|
{ |
51 |
+ |
#if PLUGIN_ENABLED |
52 |
|
var t = new CheatCodeDockContent(); |
53 |
< |
t.Show(); |
54 |
< |
} |
55 |
< |
public override void Show(DockPanel dockPanel) |
56 |
< |
{ |
57 |
< |
var t = new CheatCodeDockContent(); |
58 |
< |
t.Show(dockPanel); |
59 |
< |
} |
60 |
< |
public override void Show(DockPanel dockPanel, DockState dockState) |
61 |
< |
{ |
62 |
< |
var t = new CheatCodeDockContent(); |
63 |
< |
t.Show(dockPanel, dockState); |
53 |
> |
if (dockPanel == null) |
54 |
> |
{ |
55 |
> |
t.Show(); |
56 |
> |
} |
57 |
> |
else |
58 |
> |
{ |
59 |
> |
t.Show(dockPanel, dockState); |
60 |
> |
} |
61 |
> |
#else |
62 |
> |
Logging.logger.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - is currently disabled", name, ID); |
63 |
> |
#endif |
64 |
|
} |
65 |
|
} |
66 |
|
} |