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,18 @@
using DTS.Common.Converters;
using System.ComponentModel;
namespace DTS.Common.Enums.Hardware
{
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
public enum SLICEConfigurations
{
[Description("SLICE_CONFIGURATION_MEGA")]
MEGA,
[Description("SLICE_CONFIGURATION_800K")]
EIGHT_HUNDRED,
[Description("SLICE_CONFIGURATION_700K")]
SEVEN_HUNDRED,
[Description("SLICE_CONFIGURATION_600K")]
SIX_HUNDRED
}
}

View File

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

View File

@@ -0,0 +1,75 @@
using System;
namespace DTS.Common.Interface.DataRecorders
{
/// <summary>
/// interface encapsulating a DAS record in the DB
/// </summary>
public interface IDASDBRecord
{
int DASId { get; set; }
string SerialNumber { get; set; }
int DASType { get; set; }
int MaxModules { get; set; }
long MaxMemory { get; set; }
double MaxSampleRate { get; set; }
double MinSampleRate { get; set; }
string FirmwareVersion { get; set; }
DateTime CalDate { get; set; }
int ProtocolVersion { get; set; }
DateTime LastModified { get; set; }
string LastModifiedBy { get; set; }
int Version { get; set; }
bool LocalOnly { get; set; }
DateTime LastUsed { get; set; }
string LastUsedBy { get; set; }
/// <summary>
/// Used to determine DAS connectivity for Hardware Scan
/// </summary>
string Connection { get; set; }
int Channels { get; set; }
string Position { get; set; }
int [] ChannelTypes { get; set; }
bool IsProgrammable { get; set; }
bool IsReconfigurable { get; set; }
/// <summary>
/// the module flag is whether this hardware is operating by itself or as part
/// of a collection (a rack module)
/// </summary>
bool IsModule { get; set; }
int PositionOnDistributor { get; set; }
int PositionOnChain { get; set; }
int Port { get; set; }
string ParentDAS { get; set; }
/// <summary>
/// first date of use after calibration
/// only valid if IsFirstUseValid is true
/// null value indicates hardware has not been used since calibration
/// (once again, only if IsFirstUseValid is true)
/// 15524 DAS "First Use Date"
/// </summary>
DateTime? FirstUseDate { get; set; }
/// <summary>
/// The test id this hardware is associated with if it's a
/// standin hardware existing in a test only
/// 15727 Building and Replacing Racks/Mods
/// </summary>
int? TestId { get; set; }
/// <summary>
/// The group id this hardware is associated with if it's a
/// standin hardware existing in a group only
/// </summary>
int? GroupId { get; set; }
/// <summary>
/// whether this hardware is standin/dummy hardware and not actually
/// physical hardware that data can be collected on
/// </summary>
bool StandIn { get; set; }
double MaxAAFRate { get; set; }
/// <summary>
/// whether hardware supports and is using first use date
/// 15524 DAS "First Use Date"
/// </summary>
bool IsFirstUseValid { get; set; }
}
}

View File

@@ -0,0 +1,118 @@
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
namespace DTS.Common.RibbonControl
{
public class MenuButtonData : ControlData
{
public MenuButtonData()
: this(false)
{
}
public MenuButtonData(bool isApplicationMenu)
{
_isApplicationMenu = isApplicationMenu;
}
public bool IsVerticallyResizable
{
get => _isVerticallyResizable;
set
{
if (_isVerticallyResizable == value) return;
_isVerticallyResizable = value;
OnPropertyChanged(new PropertyChangedEventArgs("IsVerticallyResizable"));
}
}
public bool IsHorizontallyResizable
{
get => _isHorizontallyResizable;
set
{
if (_isHorizontallyResizable == value) return;
_isHorizontallyResizable = value;
OnPropertyChanged(new PropertyChangedEventArgs("IsHorizontallyResizable"));
}
}
private bool _isVerticallyResizable, _isHorizontallyResizable;
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public ObservableCollection<ControlData> ControlDataCollection
{
get
{
if (_controlDataCollection == null)
{
_controlDataCollection = new ObservableCollection<ControlData>();
if (_nestingDepth <= ViewModelData.MenuItemNestingCount)
{
_nestingDepth++;
var smallImage = new Uri("/Common;component/RibbonControl/Images/Paste_16x16.png", UriKind.Relative);
var largeImage = new Uri("/Common;component/RibbonControl/Images/Paste_32x32.png", UriKind.Relative);
for (var i = 0; i < ViewModelData.GalleryCount; i++)
{
var galleryData = new GalleryData()
{
Label = "Gallery " + i,
SmallImage = smallImage,
LargeImage = largeImage,
ToolTipTitle = "ToolTip Title",
ToolTipDescription = "ToolTip Description",
ToolTipImage = smallImage,
Command = ViewModelData.DefaultCommand
};
galleryData.SelectedItem = galleryData.CategoryDataCollection[0].GalleryItemDataCollection[ViewModelData.GalleryItemCount - 1];
_controlDataCollection.Add(galleryData);
}
for (var i = 0; i < ViewModelData.MenuItemCount; i++)
{
var menuItemData = _isApplicationMenu ? new ApplicationMenuItemData(true) : new MenuItemData(false);
menuItemData.Label = "MenuItem " + i;
menuItemData.SmallImage = smallImage;
menuItemData.LargeImage = largeImage;
menuItemData.ToolTipTitle = "ToolTip Title";
menuItemData.ToolTipDescription = "ToolTip Description";
menuItemData.ToolTipImage = smallImage;
menuItemData.Command = ViewModelData.DefaultCommand;
menuItemData._nestingDepth = _nestingDepth;
_controlDataCollection.Add(menuItemData);
}
_controlDataCollection.Add(new SeparatorData());
for (var i = 0; i < ViewModelData.SplitMenuItemCount; i++)
{
var splitMenuItemData = _isApplicationMenu ? new ApplicationSplitMenuItemData(true) : new SplitMenuItemData(false);
splitMenuItemData.Label = "SplitMenuItem " + i;
splitMenuItemData.SmallImage = smallImage;
splitMenuItemData.LargeImage = largeImage;
splitMenuItemData.ToolTipTitle = "ToolTip Title";
splitMenuItemData.ToolTipDescription = "ToolTip Description";
splitMenuItemData.ToolTipImage = smallImage;
splitMenuItemData.Command = ViewModelData.DefaultCommand;
splitMenuItemData._nestingDepth = _nestingDepth;
splitMenuItemData.IsCheckable = true;
_controlDataCollection.Add(splitMenuItemData);
}
}
}
return _controlDataCollection;
}
}
private ObservableCollection<ControlData> _controlDataCollection;
private int _nestingDepth;
private bool _isApplicationMenu;
}
}

View File

@@ -0,0 +1,68 @@
using System;
using System.Globalization;
using System.Windows.Data;
namespace DTS.Common.Converters
{
/// <summary>
/// This converter is used to bind a value to a group of radio buttons, and can be used with bool parameters only.
/// It depends on the converter parameter, which maps a radio button to a specific value.
/// </summary>
///
/// <remarks>
/// <para>
/// Notice the converter parameter.
/// Its role is to make sure to get opposite values for the two radio buttons (when one is true, the other is false).
/// --------------------------------------------------------------------------------------------------
/// | value | param | result : (RadioButton.IsChecked = !(value ^ param)) where ^ is the XOR operator |
/// --------------------------------------------------------------------------------------------------
/// | true | true | true |
/// | false | true | false |
/// | true | false | false |
/// | false | false | true |
/// --------------------------------------------------------------------------------------------------
/// </para>
/// </remarks>
[ValueConversion(typeof(bool?), typeof(bool))]
public class RadioButtonCheckedConverter : IValueConverter
{
/// <summary>
/// Maps a radio button to a specific value.
/// </summary>
/// <param name="value">The value produced by the binding source.</param>
/// <param name="targetType">The target output type.</param>
/// <param name="parameter">The converter parameter to use.</param>
/// <param name="culture">The culture to use in the format operation.</param>
/// <returns>
/// <value>
/// <see langword="true" /> if [value] and [parameter] have same values; otherwise <see langword="false" />.
/// </value>
/// </returns>
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var param = bool.Parse(parameter.ToString());
if (value == null)
return false;
return !((bool)value ^ param); // ^ is the XOR operator
}
/// <summary>
/// Maps a radio button to a specific value.
/// </summary>
/// <param name="value">The value that is produced by the binding target.</param>
/// <param name="targetType">This parameter is not used.</param>
/// <param name="parameter">The converter parameter to use.</param>
/// <param name="culture">This parameter is not used.</param>
/// <returns>
/// <value>
/// <see langword="true" /> if [value] and [parameter] have same values; otherwise <see langword="false" />.
/// </value>
/// </returns>
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
var param = bool.Parse(parameter.ToString());
return !((bool)value ^ param);
}
}
}