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.Collections.Generic;
using DTS.Common.Base;
using DTS.Common.Interface;
using Prism.Events;
// ReSharper disable CheckNamespace
namespace DTS.Common.Events
{
/// <summary>
/// The number of selected Events changed event.
/// </summary>
public class GraphSelectedEventsNotification : PubSubEvent<GraphSelectedEventsNotificationArg> { }
public class GraphSelectedEventsNotificationArg
{
public System.ComponentModel.BindingList<ITestEvent> SelectedEvents { get; set; }
/// <summary>
/// 24417 start pulling apart viewer to allow reuse for PSD reports
/// </summary>
public IBaseViewModel ParentVM { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
using DTS.Common.Enums.Communication;
namespace DTS.Common.Interface.Communication
{
public interface ICommunicationReport
{
object UserState { get; set; }
CommunicationConstantsAndEnums.CommunicationResult Result { get; set; }
byte[] Data { get; set; }
}
}

View File

@@ -0,0 +1,49 @@
using System.Windows.Controls;
// ReSharper disable once CheckNamespace
namespace DTS.Common.Base
{
/// <summary>
/// Represents the base class for views that define the appearance of data in a UserControl control.
/// </summary>
///
public class BaseView : UserControl, IBaseView
{
/// <summary>
/// Gets a value indicating whether the bound object data data has been changed (View is dirty).
/// </summary>
public bool IsDirty
{
get
{
if (DataContext != null)
{
if (DataContext is IBaseViewModel baseViewModel)
{
return baseViewModel.IsDirty;
}
}
return false;
}
}
/// <summary>
/// Gets a header info which uses by the TabControl to display the TabItem's header.
/// </summary>
public string HeaderInfo
{
get
{
if (DataContext != null)
{
if (DataContext is IHeaderInfoProvider<string> headerInfoProvider)
{
return headerInfoProvider.HeaderInfo;
}
}
return string.Empty;
}
}
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Windows;
using System.Windows.Data;
namespace DTS.Common.Converters
{
public class EnumVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return null != value && value.Equals(parameter) ? Visibility.Visible : Visibility.Hidden;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return null != value && value.Equals(Visibility.Visible) ? parameter : Binding.DoNothing;
}
}
}

View File

@@ -0,0 +1,75 @@
using DTS.Common.Enums;
using static DTS.Common.Enums.DASFactory.DFConstantsAndEnums;
namespace DTS.Common.Constant.DASSpecific
{
#pragma warning disable S101 // Types should be named in PascalCase
public static class SLICE6AIRTC
#pragma warning restore S101 // Types should be named in PascalCase
{
public const int MIN_PROTOCOL_VER = 1;
public const int ADC_SAMPLES_PER_PACKET_VER = 1;
public const int MULTIPLE_CONFIGURATIONS_VER = 100;
public const int ThermocouplersPerModule = 8;
public static bool IsRecordingModeSupported(RecordingModes mode)
{
switch (mode)
{
case RecordingModes.S6A_DeviceStreamingOnly:
return true;
default:
return false;
}
}
public static bool IsStreamingProfileSupported(UDPStreamProfile profile, int protocolVersion)
{
switch (profile)
{
case UDPStreamProfile.RTCStreaming:
case UDPStreamProfile.DTS_UDP:
case UDPStreamProfile.CH10_MANUAL_CONFIG:
case UDPStreamProfile.CH10_PCM128_MM:
case UDPStreamProfile.CH10_ANALOG:
case UDPStreamProfile.CH10_PCM_STANDARD:
case UDPStreamProfile.CH10_PCM_SUPERCOM:
case UDPStreamProfile.CH10_PCM_128BIT_2HDR:
case UDPStreamProfile.CH10_ANALOG_2HDR:
case UDPStreamProfile.CH10_PCM_STANDARD_2HDR:
case UDPStreamProfile.CH10_PCM_SUPERCOM_2HDR:
case UDPStreamProfile.TMNS_PCM_STANDARD:
case UDPStreamProfile.TMNS_PCM_SUPERCOM:
case UDPStreamProfile.IENA_PTYPE_STREAM:
return true;
default:
return false;
}
}
public static bool IsClockSyncProfileSupported(ClockSyncProfile profile, int protocolVersion)
{
switch (profile)
{
case ClockSyncProfile.PPS_OUT:
case ClockSyncProfile.GPS_EXT_PPS_PPS_OUT:
case ClockSyncProfile.GPS_EXT_PPS_Master_E2E_PPS_OUT:
case ClockSyncProfile.IRIG_EXT_PPS_PPS_OUT:
case ClockSyncProfile.IRIG_EXT_PPS_Master_E2E_PPS_OUT:
case ClockSyncProfile.EXT_PPS_PPS_OUT:
case ClockSyncProfile.EXT_PPS_Master_E2E_PPS_OUT:
case ClockSyncProfile.Slave_E2E_Master_E2E_OUT:
case ClockSyncProfile.Slave_E2E_Master_E2E_PPS_OUT:
case ClockSyncProfile.Manual:
case ClockSyncProfile.Master_E2E_GPS:
case ClockSyncProfile.GPS_PPS_OUT:
case ClockSyncProfile.GPS_Master_E2E_PPS_OUT:
return false;
case ClockSyncProfile.GPS:
case ClockSyncProfile.Slave_E2E_PPS_OUT:
case ClockSyncProfile.Master_E2E_PPS_OUT:
case ClockSyncProfile.IRIG_Master_E2E_PPS_OUT:
case ClockSyncProfile.IRIG_PPS_OUT:
default: return true;
}
}
}
}

View File

@@ -0,0 +1,6 @@
using DTS.Common.RibbonControl;
namespace DTS.Common.Interface
{
public interface ILabDetailsMenuViewModel : IRibbonViewModel { }
}