Inheritance: System.EventArgs
示例#1
0
        public void ServerStatus(object[] status)
        {
            //List<IServerStatus> meh = new List<IServerStatus>((IServerStatus[])status);
            List<IServerStatus> meh = new List<IServerStatus>(status.Length);
            foreach (IServerStatus s in status)
            {
                meh.Add(s);
            }

            if (StatusReceived != null)
            {
                ServerStatusEventArgs ssea = new ServerStatusEventArgs();
                ssea.StatusList = meh;
                StatusReceived(this, ssea);
            }
        }
示例#2
0
        void ServerCallback_StatusReceived(object sender, ServerStatusEventArgs e)
        {
            if (e.StatusList == null)
                return;

            listBox1.Items.Add("Got statuses for " + e.StatusList.Count + " Servers");
            foreach (IServerStatus iss in e.StatusList)
            {
                listBox1.Items.Add(iss.type.ToString() + ": " + iss.args + " Running: " + iss.IsRunning + " Crashed: " + iss.IsCrashed + " Uptime (s): " + iss.Uptime / 1000);
            }
        }