using System; using System.Collections.Generic; 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 client; private int id; private string[] args; public IvyClient Client { get { return client; } } public int Id { get { return id; } } public string[] Arguments { get { return args; } } public string this[int i] { get { return args[i]; } } public IvyMessageEventArgs(IvyClient app, int id, string[] args) { this.client = app; this.id = id; this.args = args; } } }