From 775a569834eed1e55775ba3855e26ebfffa407ca Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 10:00:48 +0000 Subject: Utilisateur : Fcolin Date : 2/06/06 Heure : 16:47 Créé Commentaire: Mise en conformite du code avec les guidelines , et changement prototype evenements (vss 1) --- CSharp/Ivy/IvyPPC/IvyEventArgs.cs | 81 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 CSharp/Ivy/IvyPPC/IvyEventArgs.cs (limited to 'CSharp/Ivy/IvyPPC') diff --git a/CSharp/Ivy/IvyPPC/IvyEventArgs.cs b/CSharp/Ivy/IvyPPC/IvyEventArgs.cs new file mode 100644 index 0000000..a4f033a --- /dev/null +++ b/CSharp/Ivy/IvyPPC/IvyEventArgs.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Specialized; +using System.Text; + +namespace IvyBus +{ + /// The EventArgs Classes + /// + /// + public class IvyEventArgs : EventArgs + { + private IvyClient client; + private int id; + private string arg; + + public IvyClient Client + { + get { return client; } + } + + public int Id + { + get { return id; } + } + + public string Argument + { + get { return arg; } + } + public IvyEventArgs(IvyClient app, int id, string arg) + { + this.client = app; + this.id = id; + this.arg = arg; + } + } + public class IvyDieEventArgs : IvyEventArgs + { + /* return value for Die Event */ + private bool forceExit; + + public bool ForceExit + { + get { return forceExit; } + set { forceExit = value; } + } + public IvyDieEventArgs(IvyClient app, int id, string arg) + : base(app, id, arg) + { + forceExit = true; + } + } + public class IvyMessageEventArgs : EventArgs + { + private IvyClient cleint; + private int id; + private StringCollection args; + + public IvyClient Client + { + get { return cleint; } + } + + public int Id + { + get { return id; } + } + + public StringCollection Arguments + { + get { return args; } + } + public IvyMessageEventArgs(IvyClient app, int id, string[] args) + { + this.cleint = app; + this.id = id; + this.args = new StringCollection(); + this.args.AddRange(args); + } + } +} -- cgit v1.1