summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CSharp/Ivy/IvyPPC/Ivy.cs26
1 files changed, 24 insertions, 2 deletions
diff --git a/CSharp/Ivy/IvyPPC/Ivy.cs b/CSharp/Ivy/IvyPPC/Ivy.cs
index fc358fb..7ae6443 100644
--- a/CSharp/Ivy/IvyPPC/Ivy.cs
+++ b/CSharp/Ivy/IvyPPC/Ivy.cs
@@ -26,7 +26,8 @@ namespace IvyBus
///
[ToolboxItemFilter("System.Windows.Forms.Form",ToolboxItemFilterType.Allow)]
[DesignerCategory("Component")]
- public class Ivy : System.ComponentModel.Component
+ [Description("IVY Main API")]
+ public class Ivy : System.ComponentModel.Component
{
/* Event handler */
public delegate void DirectMessageHandler (IvyClient app, int id, string arg );
@@ -201,7 +202,8 @@ namespace IvyBus
set
{
syncControl = value;
- AutoBinding(syncControl);
+ if ( syncControl != null )
+ AutoBinding(syncControl);
}
}
internal class MyTcpListener : TcpListener
@@ -299,6 +301,26 @@ namespace IvyBus
{
syncControl = sync;
}
+
+ // Dispose ressources
+ protected override void Dispose(bool disposing)
+ {
+ if ( disposing ) stop();
+ base.Dispose(disposing);
+ }
+
+ public override ISite Site
+ {
+ get {
+ Console.WriteLine("Site get " + base.Site);
+ return base.Site;
+ }
+ set{
+ base.Site = value;
+ Console.WriteLine("Site set " + base.Site);
+
+ }
+ }
// Autobinding on static method
public void AutoBinding(Type type)
{