summaryrefslogtreecommitdiff
path: root/CSharp
diff options
context:
space:
mode:
authorfcolin2007-02-01 09:48:37 +0000
committerfcolin2007-02-01 09:48:37 +0000
commit2505f6c5f762840970f0d34766889b6ff180b355 (patch)
tree96354e11d1ecb63066318a9503d882a3f1ab464a /CSharp
parent95b381aa6fa4945a977decc07993cdeeb6fd943b (diff)
downloadivy-csharp-2505f6c5f762840970f0d34766889b6ff180b355.zip
ivy-csharp-2505f6c5f762840970f0d34766889b6ff180b355.tar.gz
ivy-csharp-2505f6c5f762840970f0d34766889b6ff180b355.tar.bz2
ivy-csharp-2505f6c5f762840970f0d34766889b6ff180b355.tar.xz
Utilisateur : Fcolin Date : 24/01/06 Heure : 15:44 Archivé dans $/CSharp/Ivy/Ivy Commentaire: (vss 10)
Diffstat (limited to 'CSharp')
-rw-r--r--CSharp/Ivy/Ivy/IvyDomain.cs25
1 files changed, 7 insertions, 18 deletions
diff --git a/CSharp/Ivy/Ivy/IvyDomain.cs b/CSharp/Ivy/Ivy/IvyDomain.cs
index 55e45bf..754ed0e 100644
--- a/CSharp/Ivy/Ivy/IvyDomain.cs
+++ b/CSharp/Ivy/Ivy/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);
- }
}
}