Finished layout of history control, reversed sort order (newest on top) May need to move labels to HistoryDialog
28 lines
879 B
C#
28 lines
879 B
C#
// Copyright (c) 2024- schick Informatik
|
|
// Description: display single history element (later shown in a list)
|
|
//
|
|
|
|
using BreCalClient.misc.Model;
|
|
using System.Windows.Controls;
|
|
|
|
namespace BreCalClient
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for HistoryControl.xaml
|
|
/// </summary>
|
|
public partial class HistoryControl : UserControl
|
|
{
|
|
public HistoryControl(string ship, History history)
|
|
{
|
|
InitializeComponent();
|
|
|
|
this.textBlockOperation.Text = $"{history.Operation} on {history.Type}";
|
|
this.textBlockShip.Text = ship;
|
|
if(BreCalLists.ParticipantLookupDict.ContainsKey(history.ParticipantId))
|
|
this.textBlockParticipant.Text = BreCalLists.ParticipantLookupDict[history.ParticipantId].Name;
|
|
this.textBlockTimestamp.Text = history.Timestamp.ToString();
|
|
|
|
}
|
|
}
|
|
}
|