From 5e310bef48ed719d15d88aafb9b92e674cb42b96 Mon Sep 17 00:00:00 2001 From: fcolin Date: Mon, 18 Oct 2010 15:42:04 +0000 Subject: utilisation de socket IPV6 si le domain contient un multicast IPV6 genre FF02::1 --- IvyProbe/IvyProbe.Designer.cs | 16 ++++++++-------- IvyProbe/IvyProbe.cs | 11 ++++++----- IvyProbe/Properties/Settings.Designer.cs | 2 +- IvyProbe/Properties/Settings.settings | 2 +- IvyProbe/app.config | 2 +- 5 files changed, 17 insertions(+), 16 deletions(-) (limited to 'IvyProbe') diff --git a/IvyProbe/IvyProbe.Designer.cs b/IvyProbe/IvyProbe.Designer.cs index af5222a..b723029 100644 --- a/IvyProbe/IvyProbe.Designer.cs +++ b/IvyProbe/IvyProbe.Designer.cs @@ -136,6 +136,7 @@ namespace IvyProbe // // busDomain // + this.busDomain.Domain = "FF02::1:2011"; this.busDomain.Location = new System.Drawing.Point(0, 0); this.busDomain.Margin = new System.Windows.Forms.Padding(0); this.busDomain.Name = "busDomain"; @@ -149,20 +150,20 @@ namespace IvyProbe this.bus.Bindings.Add(this.ivyApplicationBinding1); this.bus.Culture = new System.Globalization.CultureInfo("en-US"); this.bus.ReadyMessage = "IvyProbeC# ready"; - this.bus.BindingFilter += new System.EventHandler(this.bus_BindingFilter); - this.bus.ErrorMessage += new System.EventHandler(this.bus_ErrorMessage); - this.bus.DirectMessageReceived += new System.EventHandler(this.directMessage); - this.bus.BindingAdd += new System.EventHandler(this.bus_addBinding); this.bus.ClientConnected += new System.EventHandler(this.connect); this.bus.ClientDisconnected += new System.EventHandler(this.disconnect); - this.bus.BindingRemove += new System.EventHandler(this.bus_removeBinding); + this.bus.DirectMessageReceived += new System.EventHandler(this.directMessage); this.bus.DieReceived += new System.EventHandler(this.die); + this.bus.BindingAdd += new System.EventHandler(this.bus_addBinding); + this.bus.BindingRemove += new System.EventHandler(this.bus_removeBinding); + this.bus.BindingFilter += new System.EventHandler(this.bus_BindingFilter); + this.bus.ErrorMessage += new System.EventHandler(this.bus_ErrorMessage); // // ivyApplicationBinding1 // this.ivyApplicationBinding1.Arguments.Add("Name"); this.ivyApplicationBinding1.Binding = IvyBus.BindingType.RegularExpression; - this.ivyApplicationBinding1.Expression = "^%0%(.*)"; + this.ivyApplicationBinding1.Expression = "(^%0%.*)"; this.ivyApplicationBinding1.Callback += new System.EventHandler(this.ivyprobe); // // IvyProbe @@ -179,10 +180,9 @@ namespace IvyProbe this.Controls.Add(this.tbRegexp); this.Controls.Add(this.label2); this.Controls.Add(this.label1); - //this.DoubleBuffered = true; this.Name = "IvyProbe"; this.Text = "IvyProbe"; - this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.IvyProbe_FormClosed); + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.IvyProbe_FormClosing); this.Load += new System.EventHandler(this.IvyProbe_Load); ((System.ComponentModel.ISupportInitialize)(this.bus)).EndInit(); this.ResumeLayout(false); diff --git a/IvyProbe/IvyProbe.cs b/IvyProbe/IvyProbe.cs index 270dbd8..a066447 100644 --- a/IvyProbe/IvyProbe.cs +++ b/IvyProbe/IvyProbe.cs @@ -152,11 +152,6 @@ namespace IvyProbe bus.ivy.Start(busDomain.Domain); } - private void IvyProbe_FormClosed(object sender, FormClosedEventArgs e) - { - bus.ivy.Stop(); - } - private void IvyProbe_Load(object sender, EventArgs e) { bus.ivy.Start(busDomain.Domain); @@ -168,6 +163,12 @@ namespace IvyProbe receive(sender, e); } + private void IvyProbe_FormClosing(object sender, FormClosingEventArgs e) + { + bus.ivy.Stop(); + e.Cancel = false; + } + } } \ No newline at end of file diff --git a/IvyProbe/Properties/Settings.Designer.cs b/IvyProbe/Properties/Settings.Designer.cs index b907809..c5ef330 100644 --- a/IvyProbe/Properties/Settings.Designer.cs +++ b/IvyProbe/Properties/Settings.Designer.cs @@ -25,7 +25,7 @@ namespace IvyProbe.Properties { [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] + [global::System.Configuration.DefaultSettingValueAttribute("ff05::1")] public string IvyBus { get { return ((string)(this["IvyBus"])); diff --git a/IvyProbe/Properties/Settings.settings b/IvyProbe/Properties/Settings.settings index 421d8f2..44eacd4 100644 --- a/IvyProbe/Properties/Settings.settings +++ b/IvyProbe/Properties/Settings.settings @@ -3,7 +3,7 @@ - + ff05::1 \ No newline at end of file diff --git a/IvyProbe/app.config b/IvyProbe/app.config index e9c8b0c..a4b7d37 100644 --- a/IvyProbe/app.config +++ b/IvyProbe/app.config @@ -8,7 +8,7 @@ - + ff05::1 -- cgit v1.1