This repository has been archived on 2025-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
BreCal/src/BreCalClient/HistoryControl.xaml.cs
Daniel Schick 32296f7d15 Change history Part 3
Finished layout of history control, reversed sort order (newest on top)
May need to move labels to HistoryDialog
2024-03-29 10:13:23 +01:00

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();
}
}
}