This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

View File

@@ -0,0 +1,29 @@
using System.ComponentModel;
using DTS.Common.Converters;
using DTS.Common.Utils;
using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
// ReSharper disable CheckNamespace
namespace DTS.Common.Enums.Viewer
{
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum WakeMethodTypeEnum
{
[Description("None")]
None = 0,
[Description("Motion detect")]
MotionDetect = 1,
[Description("Time session")]
TimeSession = 2,
[Description("Magnet")]
Magnet = 3,
}
public class WakeMethodTypeItemSource : IItemsSource
{
public ItemCollection GetValues()
{
return EnumUtil.GetValuesList<WakeMethodTypeEnum>();
}
}
}

View File

@@ -0,0 +1,23 @@
using System;
using System.Windows.Data;
namespace DTS.Common.Converters
{
/// <summary>
/// Date converter that will display Table_NA when date is null, otherwise datetime [xaml responsible for formatting]
/// </summary>
public class NullableFloatConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value is double d) { return d; }
return value is float ft ? ft : (object)string.Empty;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return value is float ft ? ft : (object)string.Empty;
}
}
}

View File

@@ -0,0 +1,40 @@
using System.Windows.Input;
using DTS.Common.Enums;
using DTS.Common.Enums.Channels;
namespace DTS.Common.Interface.Channels.ChannelCodes
{
/// <summary>
/// used to describe the behavior of channelcodes for the UI
/// </summary>
public interface IChannelCode
{
/// <summary>
/// id of the channel code in the database
/// </summary>
int Id { get; }
/// <summary>
/// codevalue (either user code or isocode depending on codetype)
/// </summary>
string Code { get; set; }
/// <summary>
/// name associated with code (either user channel name or iso channel name)
/// </summary>
string Name { get; set; }
/// <summary>
/// the type of code (iso or user)
/// </summary>
ChannelEnumsAndConstants.ChannelCodeType CodeType { get; }
/// <summary>
/// handler for paste command
/// this is used for when data is pasted into either a channel code or name
/// it's needed because you can paste many rows, a CSV for example, into one field
/// </summary>
ICommand PasteCommand { get; set; }
/// <summary>
/// the status of the item in the UI
/// (failed/success/etc)
/// </summary>
UIItemStatus ItemStatus { get; set; }
}
}