diff options
Diffstat (limited to 'CSharp/Ivy')
-rw-r--r-- | CSharp/Ivy/IvyPPC/IvyDomain.cs | 105 |
1 files changed, 14 insertions, 91 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyDomain.cs b/CSharp/Ivy/IvyPPC/IvyDomain.cs index 0e6aa24..55e45bf 100644 --- a/CSharp/Ivy/IvyPPC/IvyDomain.cs +++ b/CSharp/Ivy/IvyPPC/IvyDomain.cs @@ -10,102 +10,19 @@ namespace IvyBus {
public partial class IvyDomain : UserControl
{
- private string appname;
- private string ready;
+ private Ivy bus;
- [Category("Ivy")]
- public string AppName
+ public Ivy Bus
{
- get { return ivy.AppName; }
- set { ivy.AppName = value; }
+ get { return bus; }
+ set { bus = value; }
}
-
- [Category("Ivy")]
- public string AppReadyMessage
- {
- get { return ivy.ready_message; }
- set { ivy.ready_message = value; }
- }
-
[Category("Ivy")]
public string Domain
{
get { return ivybus.Text; }
set { ivybus.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 BindingAdd
- {
- add
- {
- ivy.BindingAdd += value;
- }
- remove
- {
- ivy.BindingAdd -= value;
- }
- }
- [Category("Ivy")]
- public event Ivy.ClientRemoveBindingHandler BindingRemove
- {
- add
- {
- ivy.BindingRemove += value;
- }
- remove
- {
- ivy.BindingRemove -= 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()
{
@@ -120,14 +37,20 @@ namespace IvyBus private void ivybus_Validated(object sender, EventArgs e)
{
- ivy.stop();
- ivy.start(ivybus.Text);
+ if (bus != null)
+ {
+ bus.stop();
+ bus.start(ivybus.Text);
+ }
}
private void IvyDomain_Load(object sender, EventArgs e)
{
ivybus.Text = Ivy.getDomain(ivybus.Text);
- ivy.start(ivybus.Text);
+ if (bus != null)
+ {
+ bus.start(ivybus.Text);
+ }
}
}
|