Push Alpha Version

This commit is contained in:
2026-02-27 16:09:59 +01:00
parent a0ef457995
commit d2665d17fa
209 changed files with 13423 additions and 1034 deletions

View File

@@ -0,0 +1,33 @@
using System.Globalization;
using System.Windows;
using System.Windows.Data;
namespace InfineonHMI
{
public class DateTimeToEventTimeConverter : IValueConverter
{
// 599264352000000000 ticks is a date used by beckhoff for events that didnt happen up to this point
public const long NoTime = 599264352000000000;
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is DateTime dt)
{
if (dt.Ticks == NoTime)
return "";
else
{
CultureInfo cultureInfo = CultureInfo.CurrentCulture;
return dt.ToString("G", cultureInfo);
}
}
else
throw new InvalidOperationException("Target must be of type DateTime");
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return DependencyProperty.UnsetValue;
}
}
}