summaryrefslogtreecommitdiff
path: root/CSharp/Ivy
diff options
context:
space:
mode:
Diffstat (limited to 'CSharp/Ivy')
-rw-r--r--CSharp/Ivy/IvyPPC/Ivy.cs32
1 files changed, 19 insertions, 13 deletions
diff --git a/CSharp/Ivy/IvyPPC/Ivy.cs b/CSharp/Ivy/IvyPPC/Ivy.cs
index 46ce746..4fc603b 100644
--- a/CSharp/Ivy/IvyPPC/Ivy.cs
+++ b/CSharp/Ivy/IvyPPC/Ivy.cs
@@ -51,7 +51,7 @@ namespace IvyBus
/// <summary>fires when a client receive a add binding from another client</summary>
public event ClientAddBindingHandler addBinding;
/// <summary>fires when a client receive a remove binding from another client</summary>
- public event ClientAddBindingHandler removeBinding;
+ public event ClientRemoveBindingHandler removeBinding;
/// <summary>IvyClients accesses the list of the connected clients</summary>
@@ -204,6 +204,15 @@ namespace IvyBus
// for synchronous event
private Control syncControl = null;
+ public Ivy()
+ {
+ clients = new List<IvyClient>();
+ bindings = new Dictionary<int, ApplicationBinding>();
+#if (!PocketPC )
+ debug = Properties.Settings.Default.IvyDebug;
+ protocolVersion = Properties.Settings.Default.IvyProtocolVersion;
+#endif
+ }
/// <summary> Readies the structures for the software bus connexion.
/// </summary>
/// <example> This sample shows how to start working with Ivy.
@@ -226,20 +235,15 @@ namespace IvyBus
/// </param>
/// <param name='message'>The hellow message you will send once ready
/// </param>
- public Ivy(string name, string message)
+ public Ivy(string name, string message):this()
{
- //clients = ArrayList.Synchronized( new ArrayList() );
- //bindings = Hashtable.Synchronized( new Hashtable());
- clients = new List<IvyClient>();
- bindings = new Dictionary<int,ApplicationBinding>();
appName = name;
- ready_message = message;
-#if (!PocketPC )
- debug = Properties.Settings.Default.IvyDebug;
- protocolVersion = Properties.Settings.Default.IvyProtocolVersion;
-#endif
-
+ ready_message = message;
}
+ public Ivy(Control sync): this()
+ {
+ syncControl = sync;
+ }
public Ivy(string name, string message, Control sync) :this( name, message )
{
syncControl = sync;
@@ -497,12 +501,14 @@ namespace IvyBus
/// </returns>
//
// for compatibility raison with old IVY
+#if OLD_API
[Obsolete("Will be removed in next version")]
public int bindMsg(string regexp, MessageHandler callback)
{
return bindMsg( regexp, callback, null);
}
- public int bindMsg(string regexp, MessageHandler callback, params object[] args )
+#endif
+ public int bindMsg(string regexp, MessageHandler callback, params object[] args)
{
// creates a new binding (regexp,callback)
ApplicationBinding newbind;