Exemple #1
0
        /// <summary>
        /// Updates the status bar
        /// </summary>
        /// <param name="status"></param>
        private void ChangeStatus(ClientStati status)
        {
            mModelMain.MyData.Status = status;
            switch (status)
            {
            case ClientStati.Connected:
                mViewMain.setStatus("Connected");
                mViewMain.EnableDisableAdd(true);
                break;

            case ClientStati.NotConnected:
                mViewMain.setStatus("Not Connected");
                mViewMain.EnableDisableAdd(false);
                break;

            case ClientStati.Dead:
                mViewMain.setStatus("Dead");
                mViewMain.EnableDisableAdd(false);
                break;

            case ClientStati.NotStarted:
                mViewMain.setStatus("NotStarted");
                mViewMain.EnableDisableAdd(false);
                break;

            default:
                mViewMain.setStatus("?");
                mViewMain.EnableDisableAdd(false);
                break;
            }
        }
Exemple #2
0
 /// <summary>
 /// CTor
 /// </summary>
 /// <param name="cName">Name of the client</param>
 /// <param name="cNumber">Number of the client</param>
 /// <param name="cStatus">Status of the client</param>
 public ClientData(string cName, ClientStati cStatus)
 {
     name          = cName;
     number        = -1;
     status        = cStatus;
     address       = null;
     lastHeartBeat = DateTime.MinValue;
 }
Exemple #3
0
 /// <summary>
 /// CTor with IP and number
 /// </summary>
 /// <param name="cName">Name of the client</param>
 /// <param name="cNumber">Number of the client</param>
 /// <param name="cStatus">Status of the client</param>
 /// <param name="cAddress">IP and port of the client</param>
 public ClientData(string cName, int cNumber, ClientStati cStatus, IPEndPoint cAddress)
 {
     name             = cName;
     number           = cNumber;
     status           = cStatus;
     address          = cAddress;
     startingAttempts = 0;
     lastHeartBeat    = DateTime.MinValue;
 }