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

View File

@@ -0,0 +1,21 @@
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)
{
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,91 @@
using DTS.Common.Base;
using DTS.Common.Interface.TestSetups;
using System.Data;
namespace DTS.Common.Classes.TestSetups
{
/// <summary>
/// Describes a record in the TestSetupROIs table
/// </summary>
public class TestSetupROIsRecord : BasePropertyChanged, ITestSetupROIRecord
{
/// <summary>
/// The field that matches the same field in the ROIPeriodChannels table
/// </summary>
private int _testSetupROIId;
public int TestSetupROIId
{
get => _testSetupROIId;
set => SetProperty(ref _testSetupROIId, value, "TestSetupROIId");
}
/// <summary>
/// The field that matches the same field in the TestSetups table
/// </summary>
private int _testSetupId;
public int TestSetupId
{
get => _testSetupId;
set => SetProperty(ref _testSetupId, value, "TestSetupId");
}
/// <summary>
/// e.g. "_ROI Period 1", "_ROI Period 2", etc.
/// </summary>
private string _suffix = "";
public string Suffix
{
get => _suffix;
set => SetProperty(ref _suffix, value, "Suffix");
}
/// <summary>
/// The starting time of the ROI period.
/// </summary>
private double _roiStart = -1.0D;
public double ROIStart
{
get => _roiStart;
set => SetProperty(ref _roiStart, value, "ROIStart");
}
/// <summary>
/// The ending time of the ROI period.
/// </summary>
private double _roiEnd = 1.0D;
public double ROIEnd
{
get => _roiEnd;
set => SetProperty(ref _roiEnd, value, "ROIEnd");
}
/// <summary>
/// Whether or not the period is enabled.
/// </summary>
private bool _isEnabled = true;
public bool IsEnabled
{
get => _isEnabled;
set => SetProperty(ref _isEnabled, value, "IsEnabled");
}
/// <summary>
/// Whether or not the period is the default
/// </summary>
private bool _isDefault = true;
public bool IsDefault
{
get => _isDefault;
set => SetProperty(ref _isDefault, value, "IsDefault");
}
/// <summary>
/// Builds a TestSetupROIs record after a call to sp_TestSetupROIsGet
/// </summary>
/// <param name="reader"></param>
public TestSetupROIsRecord(IDataReader reader)
{
TestSetupROIId = Utility.GetInt(reader, "TestSetupROIId");
TestSetupId = Utility.GetInt(reader, "TestSetupROIId");
Suffix = Utility.GetString(reader, "Suffix");
ROIStart = Utility.GetDouble(reader, "ROIStart", -1);
ROIEnd = Utility.GetDouble(reader, "ROIEnd", 1);
IsEnabled = Utility.GetBool(reader, "IsEnabled");
IsDefault = Utility.GetBool(reader, "IsDefault");
}
}
}

View File

@@ -0,0 +1,31 @@
using Prism.Events;
namespace DTS.Common.Events
{
/// <summary>
/// Event to inform app that it should mark itself busy or available
/// </summary>
/// <remarks>
///
/// </remarks>
public class PageModifiedEvent : PubSubEvent<PageModifiedArg> { }
public class PageModifiedArg
{
public enum Status
{
Clear,
Modified,
Saved
}
public Status PageStatus { get; }
public object Page { get; }
public bool Handled { get; set; }
public PageModifiedArg(Status status, object page)
{
PageStatus = status;
Page = page;
}
}
}

View File

@@ -0,0 +1,23 @@
using System;
namespace DTS.Common.Interface.Tags
{
/// <summary>
/// describes a database record for a tag
/// </summary>
public interface ITag : ICloneable
{
/// <summary>
/// Database id for tag
/// </summary>
int ID { get; set; }
/// <summary>
/// text associated with tag
/// </summary>
string Text { get; set; }
/// <summary>
/// whether tag is obsolete or not
/// </summary>
bool IsObsolete { get; set; }
}
}

View File

@@ -0,0 +1,6 @@
using DTS.Common.Base;
namespace DTS.Common.Interface
{
public interface ICustomerDetailsView : IBaseView { }
}