Exemple #1
0
 public TcpXxxStatusChangeEventArgs(bool isConnect, int linkedClientCount, Util.UIModel.ConsoleMsgType consoleMsgType, string consoleMsg, DateTime entryTime)
 {
     this.IsConnect         = isConnect;
     this.LinkedClientCount = linkedClientCount;
     this.ConsoleMsgType    = consoleMsgType;
     this.ConsoleMsg        = consoleMsg;
     this.EntryTime         = entryTime;
 }
Exemple #2
0
        private void onStatusChange(string msg, Util.UIModel.ConsoleMsgType consoleMsgType = Util.UIModel.ConsoleMsgType.INFO, DateTime?entryTime = null)
        {
            System.Diagnostics.Debug.WriteLine(msg);

            bool isConnect           = mTcpClient != null;
            int  linkClientListCount = 0;

            var args = new TcpXxxStatusChangeEventArgs(isConnect, linkClientListCount, consoleMsgType, msg, entryTime.HasValue ? entryTime.Value : DateTime.Now);

            StatusChange?.Invoke(this, args);
        }