private static void LogWithInner(Exception ex)
        {
            var entry = new CollapsibleLogEntry()
            {
                DateTime = DateTime.Now,
                Message  = "" + ex.GetType().Name + ": " + ex.Message
            };

            if (ex.InnerException != null)
            {
                var errMsg = "";
                var inner  = ex.InnerException;
                while (inner != null)
                {
                    errMsg += ex.Message + Environment.NewLine;
                    inner   = inner.InnerException;
                }

                entry.Contents = new List <LogEntry>();
                entry.Contents.Add(new LogEntry()
                {
                    DateTime = DateTime.Now,
                    Message  = errMsg
                });
            }

            _sLastCreatedLogviewer.Append(entry);
        }
        public static void CreateOutgoingLog(string msgType, string content, byte[] binary)
        {
            if (_sLastCreatedLogviewer != null)
            {
                var entry = new CollapsibleLogEntry()
                {
                    DateTime = DateTime.Now,
                    Message = Convert.ToString(msgType) + ": " + content
                };

                entry.Contents = new List<LogEntry>();
                entry.Contents.Add(new LogEntry()
                {
                    DateTime = DateTime.Now,
                    Message = BitConverter.ToString(binary)
                });

                _sLastCreatedLogviewer.Append(entry);
            }
        }
        public static void CreateOutgoingLog(string msgType, string content, byte[] binary)
        {
            if (_sLastCreatedLogviewer != null)
            {
                var entry = new CollapsibleLogEntry()
                {
                    DateTime = DateTime.Now,
                    Message  = Convert.ToString(msgType) + ": " + content
                };

                entry.Contents = new List <LogEntry>();
                entry.Contents.Add(new LogEntry()
                {
                    DateTime = DateTime.Now,
                    Message  = BitConverter.ToString(binary)
                });

                _sLastCreatedLogviewer.Append(entry);
            }
        }
        private static void LogWithInner(Exception ex)
        {
            var entry = new CollapsibleLogEntry()
            {
                DateTime = DateTime.Now,
                Message = "" + ex.GetType().Name + ": " + ex.Message
            };

            if (ex.InnerException != null)
            {
                var errMsg = "";
                var inner = ex.InnerException;
                while (inner != null)
                {
                    errMsg += ex.Message + Environment.NewLine;
                    inner = inner.InnerException;
                }

                entry.Contents = new List<LogEntry>();
                entry.Contents.Add(new LogEntry()
                {
                    DateTime = DateTime.Now,
                    Message = errMsg
                });
            }

            _sLastCreatedLogviewer.Append(entry);
        }