Beispiel #1
0
        private void BindDetails(EventLogDto dto)
        {
            var output = new StringBuilder();

            if (dto.Metadata != null)
            {
                output.Append(JsonConvert.JsonSerialize(dto.Metadata));
            }
            txtJsonRaw.Text = output.ToString();

            var html = _serviceHelper.GetHtml(dto);

            webBrowser.DocumentText = html;

            var start = DateTimeHelper.UnixToWindowsMilliSecs(dto.Start);

            txtEventType.Text     = dto.Type;
            txtCorrelationId.Text = dto.CorrelationId;
            txtStart.Text         = start.ToString(DateFormat);
            txtDuration.Text      = dto.ElapsedMillis.ToString();
            txtAccount.Text       = dto.AccountName;
            txtProvider.Text      = dto.ProviderName;
            lblStatus.Text        = dto.Level.ToString();
            lblLevel.BackColor    = GetColorByLevel(dto.Level);
            lblLevel.Visible      = true;
        }