/// <summary>
        /// CanDeleteAllCommand
        /// </summary>
        /// <returns></returns>
        private bool CanDeleteAllCommand()
        {
            MdiChild tw = GetTopMDIWindow();

            if (tw == null)
            {
                return(false);
            }
            UserControlTCPMDIChild uctmc = GetTopMDIWindow().Content as UserControlTCPMDIChild;

            return(uctmc.IsConnected && uctmc.GetAllMessages().Count > 0);
        }
        /// <summary>
        /// CanEditAndReplaceMessageCommand
        /// </summary>
        /// <returns></returns>
        private bool CanEditAndReplaceMessageCommand()
        {
            MdiChild tw = GetTopMDIWindow();

            if (tw == null)
            {
                return(false);
            }
            UserControlTCPMDIChild uctmc = GetTopMDIWindow().Content as UserControlTCPMDIChild;

            if (uctmc == null)
            {
                return(false);
            }
            else
            {
                return(uctmc.IsConnected && uctmc.GetAllMessages().Count > 0 && uctmc.GetAllSelectetMessages().Count > 0);
            }
        }