File tree 3 files changed +10
-19
lines changed
3 files changed +10
-19
lines changed Original file line number Diff line number Diff line change @@ -5,18 +5,11 @@ namespace SamplePluginHybrid
5
5
// / <summary>This method gets called when ReClass.NET loads the plugin.</summary>
6
6
bool SamplePluginHybridExt::Initialize (IPluginHost^ host)
7
7
{
8
- if (host == nullptr )
9
- {
10
- throw gcnew ArgumentNullException (" host" );
11
- }
12
-
13
8
this ->host = host;
14
9
15
10
// Register a node info reader to display custom data on nodes.
16
- if (reader == nullptr )
17
- {
18
- reader = gcnew SampleNodeInfoReader;
19
- }
11
+ reader = gcnew SampleNodeInfoReader;
12
+
20
13
host->RegisterNodeInfoReader (reader);
21
14
22
15
return true ;
Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ using namespace ReClassNET::Nodes;
6
6
using namespace ReClassNET ::Plugins;
7
7
using namespace ReClassNET ::Util;
8
8
9
+ // The namespace name must equal the plugin name
9
10
namespace SamplePluginHybrid
10
11
{
12
+ // / <summary>The class name must equal the namespace name + "Ext"</summary>
11
13
public ref class SamplePluginHybridExt : Plugin
12
14
{
13
15
public:
Original file line number Diff line number Diff line change 8
8
using ReClassNET . UI ;
9
9
using ReClassNET . Util ;
10
10
11
+ // The namespace name must equal the plugin name
11
12
namespace SamplePluginManaged
12
13
{
14
+
15
+ /// <summary>The class name must equal the namespace name + "Ext"</summary>
13
16
public class SamplePluginManagedExt : Plugin
14
17
{
15
18
private IPluginHost host ;
@@ -21,21 +24,14 @@ public class SamplePluginManagedExt : Plugin
21
24
/// <summary>This method gets called when ReClass.NET loads the plugin.</summary>
22
25
public override bool Initialize ( IPluginHost host )
23
26
{
24
- if ( host == null )
25
- {
26
- throw new ArgumentNullException ( nameof ( host ) ) ;
27
- }
28
-
29
27
this . host = host ;
30
28
31
29
// Notfiy the plugin if a window is shown.
32
30
GlobalWindowManager . WindowAdded += OnWindowAdded ;
33
31
34
32
// Register a node info reader to display custom data on nodes.
35
- if ( reader == null )
36
- {
37
- reader = new SampleNodeInfoReader ( ) ;
38
- }
33
+ reader = new SampleNodeInfoReader ( ) ;
34
+
39
35
host . RegisterNodeInfoReader ( reader ) ;
40
36
41
37
return true ;
@@ -55,7 +51,7 @@ public override void Terminate()
55
51
56
52
/// <summary>
57
53
/// This method gets called when a new windows is opened.
58
- /// You can use this function to add a settings panel into the original form .
54
+ /// You can use this function to add a settings panel into the settings dialog for example .
59
55
/// </summary>
60
56
private void OnWindowAdded ( object sender , GlobalWindowManagerEventArgs e )
61
57
{
You can’t perform that action at this time.
0 commit comments