From d71ea5913acbf9a9cfd51ea854680e51536398e6 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 10:00:03 +0000 Subject: Utilisateur : Fcolin Date : 24/01/06 Heure : 15:44 Archivé dans $/CSharp/Ivy/Ivy Commentaire: (vss 10) --- CSharp/Ivy/IvyPPC/IvyDomain.cs | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/CSharp/Ivy/IvyPPC/IvyDomain.cs b/CSharp/Ivy/IvyPPC/IvyDomain.cs index 55e45bf..754ed0e 100644 --- a/CSharp/Ivy/IvyPPC/IvyDomain.cs +++ b/CSharp/Ivy/IvyPPC/IvyDomain.cs @@ -10,18 +10,15 @@ namespace IvyBus { public partial class IvyDomain : UserControl { - private Ivy bus; - - public Ivy Bus - { - get { return bus; } - set { bus = value; } - } + public event EventHandler DomainChanged; [Category("Ivy")] public string Domain { get { return ivybus.Text; } - set { ivybus.Text = value; } + set { + ivybus.Text = value; + if (DomainChanged != null ) DomainChanged(this, EventArgs.Empty); + } } public IvyDomain() @@ -32,25 +29,17 @@ namespace IvyBus private void ivybus_Validating(object sender, CancelEventArgs e) { - e.Cancel = false; + e.Cancel = !Ivy.ValidatingDomain(ivybus.Text); } private void ivybus_Validated(object sender, EventArgs e) { - if (bus != null) - { - bus.stop(); - bus.start(ivybus.Text); - } + Domain = ivybus.Text; } private void IvyDomain_Load(object sender, EventArgs e) { ivybus.Text = Ivy.getDomain(ivybus.Text); - if (bus != null) - { - bus.start(ivybus.Text); - } } } -- cgit v1.1