92 lines
3.1 KiB
Plaintext
92 lines
3.1 KiB
Plaintext
|
|
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");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|