From dbddcf54e1f9a41bac5ce8934a93b018d2b160a5 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 09:55:06 +0000 Subject: Utilisateur : Fcolin Date : 16/01/06 Heure : 13:58 Archivé dans $/CSharp/Ivy/Ivy Commentaire: (vss 35) --- CSharp/Ivy/IvyPPC/Ivy.cs | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'CSharp/Ivy') 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 /// fires when a client receive a add binding from another client public event ClientAddBindingHandler addBinding; /// fires when a client receive a remove binding from another client - public event ClientAddBindingHandler removeBinding; + public event ClientRemoveBindingHandler removeBinding; /// IvyClients accesses the list of the connected clients @@ -204,6 +204,15 @@ namespace IvyBus // for synchronous event private Control syncControl = null; + public Ivy() + { + clients = new List(); + bindings = new Dictionary(); +#if (!PocketPC ) + debug = Properties.Settings.Default.IvyDebug; + protocolVersion = Properties.Settings.Default.IvyProtocolVersion; +#endif + } /// Readies the structures for the software bus connexion. /// /// This sample shows how to start working with Ivy. @@ -226,20 +235,15 @@ namespace IvyBus /// /// The hellow message you will send once ready /// - 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(); - bindings = new Dictionary(); 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 /// // // 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; -- cgit v1.1