init
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace DTS.Common.Converters
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Minor Code Smell", "S101:Types should be named in PascalCase", Justification = "Acronym")]
|
||||
public class DSPStreamingFilterFrequencyConverter : IValueConverter
|
||||
{
|
||||
private const double EPSILON = .00001D;
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
if (value is double d)
|
||||
{
|
||||
if (double.IsNaN(d)) { return string.Empty; }
|
||||
if (Math.Abs(d - 0D) < EPSILON) { return Strings.Strings.Table_NA; }
|
||||
return d.ToString("F1");
|
||||
}
|
||||
return Strings.Strings.Table_NA;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
return value.Equals(true) ? parameter : Binding.DoNothing;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Interface.ISO.ExtraProperties
|
||||
{
|
||||
public interface IExtraProperty : INotifyPropertyChanged
|
||||
{
|
||||
/// <summary>
|
||||
/// key/name of the property
|
||||
/// </summary>
|
||||
string Key { get; set; }
|
||||
/// <summary>
|
||||
/// value associated with property
|
||||
/// </summary>
|
||||
string Value { get; set; }
|
||||
/// <summary>
|
||||
/// handler for paste command
|
||||
/// this is used for when data is pasted into either a key or value
|
||||
/// 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; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System.Windows.Input;
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface ITestDataViewModel : IBaseViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the Tab View.
|
||||
/// </summary>
|
||||
ITestDataView View { get; set; }
|
||||
ITestDataSeries Model { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System.ComponentModel;
|
||||
using DTS.Common.Converters;
|
||||
|
||||
namespace DTS.Common.Enums
|
||||
{
|
||||
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
|
||||
public enum StringReplacementMode
|
||||
{
|
||||
All,
|
||||
First,
|
||||
Last
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using DTS.Common.Interface;
|
||||
using DTS.Common.Interface.TestDefinition;
|
||||
using Prism.Commands;
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable RedundantDefaultMemberInitializer
|
||||
|
||||
namespace DTS.Common.Classes.Viewer.TestMetadata
|
||||
{
|
||||
public class TestSummary : ITestSummary
|
||||
{
|
||||
/// <summary>
|
||||
/// the _ROI Period x folder name if present
|
||||
/// 18411 Data will not export [CSV Unfiltered]
|
||||
/// </summary>
|
||||
public const string ROI_SUFFIX = @"_ROI Period";
|
||||
public string Id { get; set; }
|
||||
public string SetupName { get; set; }
|
||||
public string Description { get; set; }
|
||||
public int ChannelCount { get; set; }
|
||||
public DateTime FileDate { get; set; }
|
||||
public DateTime TimeStamp { get; set; }
|
||||
public string DataType { get; set; }
|
||||
private bool _isSelected = false;
|
||||
public bool IsSelected { get => _isSelected; set { if (value != IsSelected) { _isSelected = value; SelectionChanged(); OnPropertyChanged("IsSelected"); } } }
|
||||
public List<ITestGraphs> Graphs { get; set; }
|
||||
public List<ITestChannel> Channels { get; set; }
|
||||
public List<ITestChannel> CalculatedChannels { get; set; }
|
||||
public IBaseViewModel Parent { get; set; }
|
||||
public CalibrationBehaviors CalibrationBehavior { get; set; } = CalibrationBehaviors.NonLinearIfAvailable;
|
||||
public ITestMetadata TestMetadata { get; set; }
|
||||
|
||||
#region Commands
|
||||
|
||||
private DelegateCommand _isSelectedCommand;
|
||||
public DelegateCommand IsSelectedCommand
|
||||
{
|
||||
get => _isSelectedCommand ?? (_isSelectedCommand = new DelegateCommand(SelectionChanged));
|
||||
set => _isSelectedCommand = value;
|
||||
}
|
||||
public void SelectionChanged()
|
||||
{
|
||||
var parent = (ITestSummaryListViewModel)Parent;
|
||||
|
||||
if (parent == null) return;
|
||||
|
||||
var list = parent.SelectedTestSummaryList;
|
||||
|
||||
if (IsSelected) { if (!list.Contains(this)) list.Add(this); }
|
||||
else { if (list.Contains(this)) list.Remove(this); }
|
||||
|
||||
parent.PublishSelectedTestSummaryList();
|
||||
|
||||
}
|
||||
#endregion Commands
|
||||
|
||||
///<summary>
|
||||
///Occurs when a property value changes.
|
||||
///</summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
public void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Reference in New Issue
Block a user