コード例 #1
0
ファイル: LogRow.xaml.cs プロジェクト: sobanieca/QLog
 public LogRow(int index, QLog log)
 {
     InitializeComponent();
     _log = log;
     lblArea.Content = log.Area;
     lblArea.Foreground = new SolidColorBrush(AreaColorHelper.GetColor(log.AreaColor));
     lblMessage.Content = log.Message;
     lblDate.Content = log.CreatedOn.ToString("dd-MM-yyyy HH:mm:ss,fff");
     if (index % 2 != 0)
         _backgroundBrush = Brushes.White;
     else
         _backgroundBrush = _evenBrush;
     Background = _backgroundBrush;
 }
コード例 #2
0
 public LogDetailsWindow(QLog log)
 {
     InitializeComponent();
     lblArea.Foreground = new SolidColorBrush(AreaColorHelper.GetColor(log.AreaColor));
     lblArea.Content = log.Area;
     txtMessage.Text = log.Message;
     txtId.Text = log.Id.ToString();
     txtDate.Text = log.CreatedOn.ToString("dd-MM-yyyy HH:mm:ss,fff");
     txtClass.Text = log.Class;
     txtMethod.Text = log.Method;
     txtSessionId.Text = log.SessionId;
     txtThreadId.Text = log.ThreadId;
     txtUserAgent.Text = log.UserAgent;
     txtUserHost.Text = log.UserHost;
     txtInstanceId.Text = log.InstanceId;
     txtDeploymentId.Text = log.DeploymentId;
     _log = log;
 }