summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CSharp/Ivy/IvyPPC/IvyDomain.cs127
1 files changed, 127 insertions, 0 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyDomain.cs b/CSharp/Ivy/IvyPPC/IvyDomain.cs
new file mode 100644
index 0000000..37d397f
--- /dev/null
+++ b/CSharp/Ivy/IvyPPC/IvyDomain.cs
@@ -0,0 +1,127 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+
+namespace IvyBus
+{
+ public partial class IvyDomain : UserControl
+ {
+ //string domain;
+ //string appname;
+ //string ready;
+ public Ivy ivy;
+
+ [Category("Ivy")]
+ public string AppName
+ {
+ get { return appname.Text; }
+ set { appname.Text = value; }
+ }
+
+ [Category("Ivy")]
+ public string Ready
+ {
+ get { return ready.Text; }
+ set { ready.Text = value; }
+ }
+
+ [Category("Ivy")]
+ public string Domain
+ {
+ get { return domain.Text; }
+ set { domain.Text = value; }
+ }
+ [Category("Ivy")]
+ public event Ivy.ClientConnectedHandler clientConnected
+ {
+ add
+ {
+ ivy.clientConnected += value;
+ }
+ remove
+ {
+ ivy.clientConnected -= value;
+ }
+ }
+ [Category("Ivy")]
+ public event Ivy.ClientDisconnectedHandler clientDisconnected
+ {
+ add
+ {
+ ivy.clientDisconnected += value;
+ }
+ remove
+ {
+ ivy.clientDisconnected -= value;
+ }
+ }
+ [Category("Ivy")]
+ public event Ivy.ClientAddBindingHandler addBinding
+ {
+ add
+ {
+ ivy.addBinding += value;
+ }
+ remove
+ {
+ ivy.addBinding -= value;
+ }
+ }
+ [Category("Ivy")]
+ public event Ivy.ClientRemoveBindingHandler removeBinding
+ {
+ add
+ {
+ ivy.removeBinding += value;
+ }
+ remove
+ {
+ ivy.removeBinding -= value;
+ }
+ }
+ [Category("Ivy")]
+ public event Ivy.DieHandler dieReceived
+ {
+ add
+ {
+ ivy.dieReceived += value;
+ }
+ remove
+ {
+ ivy.dieReceived -= value;
+ }
+ }
+ [Category("Ivy")]
+ public event Ivy.DirectMessageHandler directMessageReceived
+ {
+ add
+ {
+ ivy.directMessageReceived += value;
+ }
+ remove
+ {
+ ivy.directMessageReceived -= value;
+ }
+ }
+ public IvyDomain()
+ {
+ InitializeComponent();
+ ivy = new Ivy(this);
+ }
+
+ private void textBox1_Validating(object sender, CancelEventArgs e)
+ {
+ e.Cancel = false;
+ }
+
+ private void textBox1_Validated(object sender, EventArgs e)
+ {
+ ivy.stop();
+ ivy.start(domain.Text);
+ }
+ }
+}