init
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace DTS.Common.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// converts between two values and a bool (a >= b)
|
||||
/// currently only handles two ints or two doubles
|
||||
/// </summary>
|
||||
public class IntervalToVisibilityConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
var on = false;
|
||||
if (value is int a && parameter is int b)
|
||||
{
|
||||
on = a >= b;
|
||||
}
|
||||
if (value is double dA && parameter is double dB)
|
||||
{
|
||||
on = dA >= dB;
|
||||
}
|
||||
if (value is ushort uShortA && parameter is ushort uShortB)
|
||||
{
|
||||
on = uShortA >= uShortB;
|
||||
}
|
||||
return on ? Visibility.Visible : Visibility.Collapsed;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using DTS.Common.Base;
|
||||
using Prism.Events;
|
||||
// ReSharper disable CheckNamespace
|
||||
namespace DTS.Common.Events
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The number of selected Tests changed event.
|
||||
/// </summary>
|
||||
public class TestSummaryCountNotification : PubSubEvent<TestSummaryCountNotificationArg> { }
|
||||
|
||||
public class TestSummaryCountNotificationArg
|
||||
{
|
||||
public int SummaryCount { get; set; }
|
||||
/// <summary>
|
||||
/// 24417 start pulling apart viewer to allow reuse for PSD reports
|
||||
/// </summary>
|
||||
public IBaseViewModel ParentVM { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
using DTS.Common.Base.Classes;
|
||||
using DTS.Common.Interface.TestMetaData;
|
||||
using DTS.Common.Utilities.Logging;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace DTS.Common.Classes.LabratoryDetails
|
||||
{
|
||||
public class LabratoryDetailsDbRecord : Base.BasePropertyChanged, ILabratoryDetailsDbRecord
|
||||
{
|
||||
private int _labratoryId = -1;
|
||||
[Browsable(false)]
|
||||
[ReadOnly(true)]
|
||||
public int LabratoryId
|
||||
{
|
||||
get => _labratoryId;
|
||||
set => SetProperty(ref _labratoryId, value, "LabratoryId");
|
||||
}
|
||||
|
||||
private string _name = "";
|
||||
[Browsable(false)]
|
||||
[ReadOnly(true)]
|
||||
public string Name
|
||||
{
|
||||
get => _name;
|
||||
set => SetProperty(ref _name, value, "Name");
|
||||
}
|
||||
|
||||
private string _labratoryName = string.Empty;
|
||||
[DisplayResource("LabratoryName")]
|
||||
public string LabratoryName
|
||||
{
|
||||
get => _labratoryName;
|
||||
set => SetProperty(ref _labratoryName, value, "LabratoryName");
|
||||
}
|
||||
|
||||
private string _labratoryContactName = string.Empty;
|
||||
[DisplayResource("LabratoryContactName")]
|
||||
public string LabratoryContactName
|
||||
{
|
||||
get => _labratoryContactName;
|
||||
set => SetProperty(ref _labratoryContactName, value, "LabratoryContactName");
|
||||
}
|
||||
|
||||
private string _labratoryContactPhone = "NOVALUE";
|
||||
[DisplayResource("LabratoryContactPhone")]
|
||||
public string LabratoryContactPhone
|
||||
{
|
||||
get => _labratoryContactPhone;
|
||||
set => SetProperty(ref _labratoryContactPhone, value, "LabratoryContactPhone");
|
||||
}
|
||||
|
||||
private string _labratoryContactFax = "NOVALUE";
|
||||
[DisplayResource("LabratoryContactFax")]
|
||||
public string LabratoryContactFax
|
||||
{
|
||||
get => _labratoryContactFax;
|
||||
set => SetProperty(ref _labratoryContactFax, value, "LabratoryContactFax");
|
||||
}
|
||||
|
||||
private string _labratoryContactEmail = "NOVALUE";
|
||||
[DisplayResource("LabratoryContactEmail")]
|
||||
public string LabratoryContactEmail
|
||||
{
|
||||
get => _labratoryContactEmail;
|
||||
set => SetProperty(ref _labratoryContactEmail, value, "LabratoryContactEmail");
|
||||
}
|
||||
|
||||
private string _labratoryTestRefNumber = string.Empty;
|
||||
[DisplayResource("LabratoryTestRefNumber")]
|
||||
public string LabratoryTestRefNumber
|
||||
{
|
||||
get => _labratoryTestRefNumber;
|
||||
set => SetProperty(ref _labratoryTestRefNumber, value, "LabratoryTestRefNumber");
|
||||
}
|
||||
|
||||
private string _labratoryProjectRefNumber = string.Empty;
|
||||
[DisplayResource("LabratoryProjectRefNumber")]
|
||||
public string LabratoryProjectRefNumber
|
||||
{
|
||||
get => _labratoryProjectRefNumber;
|
||||
set => SetProperty(ref _labratoryProjectRefNumber, value, "LabratoryProjectRefNumber");
|
||||
}
|
||||
|
||||
private DateTime _lastModified = DateTime.MinValue;
|
||||
[Browsable(false)]
|
||||
[ReadOnly(true)]
|
||||
public DateTime LastModified
|
||||
{
|
||||
get => _lastModified;
|
||||
set => SetProperty(ref _lastModified, value, "LastModified");
|
||||
}
|
||||
|
||||
private string _lastModifiedBy = "";
|
||||
[Browsable(false)]
|
||||
[ReadOnly(true)]
|
||||
public string LastModifiedBy
|
||||
{
|
||||
get => _lastModifiedBy;
|
||||
set => SetProperty(ref _lastModifiedBy, value, "LastModifiedBy");
|
||||
}
|
||||
|
||||
private bool _localOnly = false;
|
||||
[Browsable(false)]
|
||||
[ReadOnly(true)]
|
||||
public bool LocalOnly
|
||||
{
|
||||
get => _localOnly;
|
||||
set => SetProperty(ref _localOnly, value, "LocalOnly");
|
||||
}
|
||||
|
||||
private int _version = -1;
|
||||
[Browsable(false)]
|
||||
[ReadOnly(true)]
|
||||
public int Version
|
||||
{
|
||||
get => _version;
|
||||
set => SetProperty(ref _version, value, "Version");
|
||||
}
|
||||
|
||||
public LabratoryDetailsDbRecord(ILabratoryDetailsDbRecord labratoryDetailsDbRecord)
|
||||
{
|
||||
Name = labratoryDetailsDbRecord.Name;
|
||||
LabratoryName = labratoryDetailsDbRecord.LabratoryName;
|
||||
LabratoryContactName = labratoryDetailsDbRecord.LabratoryContactName;
|
||||
LabratoryContactPhone = labratoryDetailsDbRecord.LabratoryContactPhone;
|
||||
LabratoryContactFax = labratoryDetailsDbRecord.LabratoryContactFax;
|
||||
LabratoryContactEmail = labratoryDetailsDbRecord.LabratoryContactEmail;
|
||||
LabratoryTestRefNumber = labratoryDetailsDbRecord.LabratoryTestRefNumber;
|
||||
LabratoryProjectRefNumber = labratoryDetailsDbRecord.LabratoryProjectRefNumber;
|
||||
LastModified = labratoryDetailsDbRecord.LastModified;
|
||||
LastModifiedBy = labratoryDetailsDbRecord.LastModifiedBy;
|
||||
LocalOnly = labratoryDetailsDbRecord.LocalOnly;
|
||||
Version = labratoryDetailsDbRecord.Version;
|
||||
}
|
||||
public LabratoryDetailsDbRecord() { }
|
||||
public LabratoryDetailsDbRecord(IDataReader reader)
|
||||
{
|
||||
Name = Utility.GetString(reader, "Name");
|
||||
LabratoryName = Utility.GetString(reader, "LabratoryName");
|
||||
LabratoryContactName = Utility.GetString(reader, "LabratoryContactName");
|
||||
LabratoryContactPhone = Utility.GetString(reader, "LabratoryContactPhone");
|
||||
LabratoryContactFax = Utility.GetString(reader, "LabratoryContactFax");
|
||||
LabratoryContactEmail = Utility.GetString(reader, "LabratoryContactEmail");
|
||||
LabratoryTestRefNumber = Utility.GetString(reader, "LabratoryTestRefNumber");
|
||||
LabratoryProjectRefNumber = Utility.GetString(reader, "LabratoryProjectRefNumber");
|
||||
LastModified = Utility.GetDateTime(reader, "LastModified", DateTime.MinValue);
|
||||
LastModifiedBy = Utility.GetString(reader, "LastModifiedBy");
|
||||
LocalOnly = Utility.GetBool(reader, "LocalOnly");
|
||||
Version = Utility.GetInt(reader, "Version");
|
||||
}
|
||||
public bool IsInvalidBlank()
|
||||
{
|
||||
return string.IsNullOrWhiteSpace(Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface IDiagView : IBaseView { }
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace DTS.Common.XMLUtils
|
||||
{
|
||||
public class ChannelXMLClass
|
||||
{
|
||||
public ChannelXMLClass()
|
||||
{
|
||||
Settings = new SettingsXMLClass();
|
||||
}
|
||||
public string ISOChannelName { get; set; }
|
||||
public string ISOCode { get; set; }
|
||||
public string UserChannelName { get; set; }
|
||||
public string UserCode { get; set; }
|
||||
public string Disabled { get; set; }
|
||||
|
||||
[XmlElement("Settings")]
|
||||
public SettingsXMLClass Settings { get; set; }
|
||||
public string SensorId { get; set; }
|
||||
public string DASId { get; set; }
|
||||
public string DASChannelIdx { get; set; }
|
||||
public string TestSetupOrder { get; set; }
|
||||
public string GroupOrder { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.DASFactory.Diagnostics.HardwareList
|
||||
{
|
||||
public interface IHardwareListView : IBaseView { }
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Media.Animation;
|
||||
|
||||
namespace DTS.Common.Controls
|
||||
{
|
||||
public class GridLengthAnimation : AnimationTimeline
|
||||
{
|
||||
public GridLengthAnimation()
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
|
||||
public GridLength From
|
||||
{
|
||||
get => (GridLength)GetValue(FromProperty);
|
||||
set => SetValue(FromProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty FromProperty =
|
||||
DependencyProperty.Register("From", typeof(GridLength), typeof(GridLengthAnimation));
|
||||
|
||||
public GridLength To
|
||||
{
|
||||
get => (GridLength)GetValue(ToProperty);
|
||||
set => SetValue(ToProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty ToProperty =
|
||||
DependencyProperty.Register("To", typeof(GridLength), typeof(GridLengthAnimation));
|
||||
|
||||
public override Type TargetPropertyType => typeof(GridLength);
|
||||
|
||||
protected override Freezable CreateInstanceCore()
|
||||
{
|
||||
return new GridLengthAnimation();
|
||||
}
|
||||
|
||||
public override object GetCurrentValue(object defaultOriginValue, object defaultDestinationValue, AnimationClock animationClock)
|
||||
{
|
||||
var fromValue = From.Value;
|
||||
var toValue = To.Value;
|
||||
|
||||
if (fromValue > toValue)
|
||||
{
|
||||
return new GridLength((1 - animationClock.CurrentProgress.Value) * (fromValue - toValue) + toValue, To.IsStar ? GridUnitType.Star : GridUnitType.Pixel);
|
||||
}
|
||||
return new GridLength(animationClock.CurrentProgress.Value * (toValue - fromValue) + fromValue, To.IsStar ? GridUnitType.Star : GridUnitType.Pixel);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,646 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
//FB 33034 Refactor to remove the second implementation of BrushesAndColors class
|
||||
//from DataPro project
|
||||
namespace DTS.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// helper class to simplify using brushes and colors
|
||||
/// note this class is holding static caches of the brushes, so if we switch themes they might be out of date
|
||||
/// and we could just return them directly each time in which case we wouldn't have that problem, however
|
||||
/// we can also avoid the time for the lookup even though it's not likely to be significant by holding it here
|
||||
/// Currently we aren't using themese after all ...
|
||||
/// </summary>
|
||||
public abstract class BrushesAndColors
|
||||
{
|
||||
private static ResourceDictionary _resourceDictionary = default(ResourceDictionary);
|
||||
|
||||
private static SolidColorBrush _brush_ApplicationTileExport = null;
|
||||
public static SolidColorBrush Brush_ApplicationTileExport
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_ApplicationTileExport)
|
||||
{
|
||||
_brush_ApplicationTileExport =
|
||||
(SolidColorBrush)Application.Current.FindResource("Brush_ApplicationTileExport");
|
||||
_brush_ApplicationTileExport.Freeze();
|
||||
}
|
||||
return _brush_ApplicationTileExport;
|
||||
}
|
||||
}
|
||||
private static SolidColorBrush _brush_ApplicationTileCollectData = null;
|
||||
public static SolidColorBrush Brush__ApplicationTileCollectData
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_ApplicationTileCollectData)
|
||||
{
|
||||
_brush_ApplicationTileCollectData =
|
||||
(SolidColorBrush)
|
||||
Application.Current.FindResource("Brush_ApplicationTileCollectData");
|
||||
_brush_ApplicationTileCollectData.Freeze();
|
||||
}
|
||||
return _brush_ApplicationTileCollectData;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brush_ApplicationStatus_Failed = null;
|
||||
public static SolidColorBrush Brush_ApplicationStatus_Failed
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_ApplicationStatus_Failed)
|
||||
{
|
||||
_brush_ApplicationStatus_Failed = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationStatus_Failed");
|
||||
_brush_ApplicationStatus_Failed.Freeze();
|
||||
}
|
||||
return _brush_ApplicationStatus_Failed;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brush_ApplicationStatus_TSRAIRGo_Failed = null;
|
||||
public static SolidColorBrush Brush_ApplicationStatus_TSRAIRGo_Failed
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_ApplicationStatus_TSRAIRGo_Failed)
|
||||
{
|
||||
_brush_ApplicationStatus_TSRAIRGo_Failed = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationStatus_TSRAIRGo_Failed");
|
||||
_brush_ApplicationStatus_TSRAIRGo_Failed.Freeze();
|
||||
}
|
||||
return _brush_ApplicationStatus_TSRAIRGo_Failed;
|
||||
}
|
||||
}
|
||||
private static SolidColorBrush _brush_Dimmed_Text = null;
|
||||
public static SolidColorBrush Brush_Dimmed_Text
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_Dimmed_Text)
|
||||
{
|
||||
_brush_Dimmed_Text = (SolidColorBrush)Application.Current.FindResource("Brush_Dimmed_TextForeground");
|
||||
_brush_Dimmed_Text.Freeze();
|
||||
}
|
||||
return _brush_Dimmed_Text;
|
||||
}
|
||||
}
|
||||
private static SolidColorBrush _brush_Application_Idle = null;
|
||||
public static SolidColorBrush Brush_Application_Idle
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_Application_Idle)
|
||||
{
|
||||
_brush_Application_Idle = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationStatus_Idle");
|
||||
_brush_Application_Idle.Freeze();
|
||||
}
|
||||
return _brush_Application_Idle;
|
||||
}
|
||||
}
|
||||
private static SolidColorBrush _brush_ApplicationStatus_Complete = null;
|
||||
public static SolidColorBrush Brush_ApplicationStatus_Complete
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_ApplicationStatus_Complete)
|
||||
{
|
||||
_brush_ApplicationStatus_Complete = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationStatus_Complete");
|
||||
_brush_ApplicationStatus_Complete.Freeze();
|
||||
}
|
||||
return _brush_ApplicationStatus_Complete;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brush_ApplicationStatus_TSRAIRGo_Complete = null;
|
||||
public static SolidColorBrush Brush_ApplicationStatus_TSRAIRGo_Complete
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_ApplicationStatus_TSRAIRGo_Complete)
|
||||
{
|
||||
_brush_ApplicationStatus_TSRAIRGo_Complete = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationStatus_TSRAIRGo_Complete");
|
||||
_brush_ApplicationStatus_TSRAIRGo_Complete.Freeze();
|
||||
}
|
||||
return _brush_ApplicationStatus_TSRAIRGo_Complete;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brush_ApplicationStatus_Idle = null;
|
||||
public static SolidColorBrush Brush_ApplicationStatus_Idle
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_ApplicationStatus_Idle)
|
||||
{
|
||||
_brush_ApplicationStatus_Idle = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationStatus_Idle");
|
||||
_brush_ApplicationStatus_Idle.Freeze();
|
||||
}
|
||||
return _brush_ApplicationStatus_Idle;
|
||||
}
|
||||
}
|
||||
private static SolidColorBrush _brush_ApplicationStatus_Busy = null;
|
||||
public static SolidColorBrush Brush_ApplicationStatus_Busy
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_ApplicationStatus_Busy)
|
||||
{
|
||||
_brush_ApplicationStatus_Busy = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationStatus_Busy");
|
||||
_brush_ApplicationStatus_Busy.Freeze();
|
||||
}
|
||||
return _brush_ApplicationStatus_Busy;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brush_ApplicationStatus_TSRAIRGo_Busy = null;
|
||||
public static SolidColorBrush Brush_ApplicationStatus_TSRAIRGo_Busy
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_ApplicationStatus_TSRAIRGo_Busy)
|
||||
{
|
||||
_brush_ApplicationStatus_TSRAIRGo_Busy = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationStatus_TSRAIRGo_Busy");
|
||||
_brush_ApplicationStatus_TSRAIRGo_Busy.Freeze();
|
||||
}
|
||||
return _brush_ApplicationStatus_TSRAIRGo_Busy;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brush_Run_SensorIdNotFound = null;
|
||||
public static SolidColorBrush Brush_Run_SensorIdNotFound
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_Run_SensorIdNotFound)
|
||||
{
|
||||
_brush_Run_SensorIdNotFound =
|
||||
(SolidColorBrush)Application.Current.FindResource("Brush_Run_SensorIdNotFound");
|
||||
_brush_Run_SensorIdNotFound.Freeze();
|
||||
}
|
||||
return _brush_Run_SensorIdNotFound;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brush_Run_SensorIdOutOfPlace;
|
||||
public static SolidColorBrush Brush_Run_SensorIdOutOfPlace
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_Run_SensorIdOutOfPlace)
|
||||
{
|
||||
_brush_Run_SensorIdOutOfPlace =
|
||||
(SolidColorBrush)Application.Current.FindResource("Brush_Run_SensorIdOutOfPlace");
|
||||
_brush_Run_SensorIdOutOfPlace.Freeze();
|
||||
}
|
||||
return _brush_Run_SensorIdOutOfPlace;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brush_Table_AlternatingRowBackground = null;
|
||||
public static SolidColorBrush Brush_Table_AlternatingRowBackground
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_Table_AlternatingRowBackground)
|
||||
{
|
||||
_brush_Table_AlternatingRowBackground = (SolidColorBrush)Application.Current.FindResource("Brush_Table_AlternatingRowBackground");
|
||||
_brush_Table_AlternatingRowBackground.Freeze();
|
||||
}
|
||||
return _brush_Table_AlternatingRowBackground;
|
||||
}
|
||||
}
|
||||
private static SolidColorBrush _brush_Table_RowBackground = null;
|
||||
public static SolidColorBrush Brush_Table_RowBackground
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_Table_RowBackground)
|
||||
{
|
||||
_brush_Table_RowBackground = (SolidColorBrush)Application.Current.FindResource("Brush_Table_RowBackground");
|
||||
_brush_Table_RowBackground.Freeze();
|
||||
}
|
||||
return _brush_Table_RowBackground;
|
||||
}
|
||||
}
|
||||
|
||||
private static Brush _brush_FlatControlPressedBackground = null;
|
||||
public static Brush Brush_FlatControlPressedBackground
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_FlatControlPressedBackground)
|
||||
{
|
||||
_brush_FlatControlPressedBackground = (Brush)Application.Current.FindResource("Brush_FlatControlPressedBackground");
|
||||
_brush_FlatControlPressedBackground.Freeze();
|
||||
}
|
||||
return _brush_FlatControlPressedBackground;
|
||||
}
|
||||
}
|
||||
private static Brush _brush_FlatControlPressedForeground = null;
|
||||
public static Brush Brush_FlatControlPressedForeground
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_FlatControlPressedForeground)
|
||||
{
|
||||
_brush_FlatControlPressedForeground = (Brush)Application.Current.FindResource("Brush_FlatControlPressedForeground");
|
||||
_brush_FlatControlPressedForeground.Freeze();
|
||||
}
|
||||
return _brush_FlatControlPressedForeground;
|
||||
}
|
||||
}
|
||||
|
||||
private static Brush _brushTransparent = null;
|
||||
public static Brush Brush_Transparent
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brushTransparent)
|
||||
{
|
||||
_brushTransparent = new SolidColorBrush(Colors.Transparent);
|
||||
_brushTransparent.Freeze();
|
||||
}
|
||||
return _brushTransparent;
|
||||
}
|
||||
}
|
||||
|
||||
private static Brush _brush_NoError = null;
|
||||
public static Brush Brush_NoError
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_NoError)
|
||||
{
|
||||
if (_resourceDictionary == null) { _resourceDictionary = new ResourceDictionary { Source = new Uri("/DTS.Common;component/Themes/brushes.xaml", UriKind.RelativeOrAbsolute) }; }
|
||||
_brush_NoError = (SolidColorBrush)_resourceDictionary["Brush_NoError"];
|
||||
_brush_NoError.Freeze();
|
||||
}
|
||||
return _brush_NoError;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brushError = null;
|
||||
public static SolidColorBrush Brush_Error
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null != _brushError) return _brushError;
|
||||
if (_resourceDictionary == null)
|
||||
{
|
||||
_resourceDictionary = new ResourceDictionary { Source = new Uri("/DTS.Common;component/Themes/brushes.xaml", UriKind.RelativeOrAbsolute) };
|
||||
}
|
||||
_brushError = (SolidColorBrush)_resourceDictionary["Brush_Error"];
|
||||
_brushError.Freeze();
|
||||
return _brushError;
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly SolidColorBrush _brushWarning = null;
|
||||
public static SolidColorBrush Brush_Warning
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null != _brushWarning) return _brushWarning;
|
||||
if (_resourceDictionary == null)
|
||||
{
|
||||
_resourceDictionary = new ResourceDictionary { Source = new Uri("/DTS.Common;component/Themes/brushes.xaml", UriKind.RelativeOrAbsolute) };
|
||||
}
|
||||
_brushError = (SolidColorBrush)_resourceDictionary["Brush_Warning"];
|
||||
_brushError.Freeze();
|
||||
return _brushError;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brushAttention = null;
|
||||
public static SolidColorBrush Brush_Attention
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null != _brushAttention) return _brushAttention;
|
||||
if (_resourceDictionary == null)
|
||||
{
|
||||
_resourceDictionary = new ResourceDictionary { Source = new Uri("/DTS.Common;component/Themes/brushes.xaml", UriKind.RelativeOrAbsolute) };
|
||||
}
|
||||
_brushAttention = (SolidColorBrush)_resourceDictionary["Brush_Attention"];
|
||||
_brushAttention.Freeze();
|
||||
return _brushAttention;
|
||||
}
|
||||
}
|
||||
|
||||
private static Brush _brushFlatControlDisabledForeground = null;
|
||||
public static Brush Brush_FlatControlDisabledForeground
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null != _brushFlatControlDisabledForeground) return _brushFlatControlDisabledForeground;
|
||||
_brushFlatControlDisabledForeground = (Brush)Application.Current.FindResource("Brush_FlatControlDisabledForeground");
|
||||
if (_brushFlatControlDisabledForeground != null) { _brushFlatControlDisabledForeground.Freeze(); }
|
||||
return _brushFlatControlDisabledForeground;
|
||||
}
|
||||
}
|
||||
|
||||
private static Brush _brush_ApplicationContentForeground = null;
|
||||
public static Brush Brush_ApplicationContentForeground
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_ApplicationContentForeground)
|
||||
{
|
||||
_brush_ApplicationContentForeground = (Brush)Application.Current.FindResource("Brush_ApplicationContentForeground");
|
||||
if (_brush_ApplicationContentForeground != null) _brush_ApplicationContentForeground.Freeze();
|
||||
}
|
||||
return _brush_ApplicationContentForeground;
|
||||
}
|
||||
}
|
||||
private static Brush _brush_FlatControlDisbledBackground = null;
|
||||
public static Brush Brush_FlatControlDisabledBackground
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_FlatControlDisbledBackground)
|
||||
{
|
||||
_brush_FlatControlDisbledBackground = (Brush)Application.Current.FindResource("Brush_FlatControlDisabledBackground");
|
||||
if (_brush_FlatControlDisbledBackground != null) _brush_FlatControlDisbledBackground.Freeze();
|
||||
}
|
||||
return _brush_FlatControlDisbledBackground;
|
||||
}
|
||||
}
|
||||
private static SolidColorBrush _brush_ApplicationStatus_Waiting = null;
|
||||
public static SolidColorBrush Brush_ApplicationStatus_Waiting
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null != _brush_ApplicationStatus_Waiting) return _brush_ApplicationStatus_Waiting;
|
||||
_brush_ApplicationStatus_Waiting = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationStatus_Waiting");
|
||||
if (_brush_ApplicationStatus_Waiting != null) _brush_ApplicationStatus_Waiting.Freeze();
|
||||
return _brush_ApplicationStatus_Waiting;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brush_ApplicationStatus_Failed_ActionBackground = null;
|
||||
public static SolidColorBrush Brush_ApplicationStatus_Failed_ActionBackground
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null != _brush_ApplicationStatus_Failed_ActionBackground) return _brush_ApplicationStatus_Failed_ActionBackground;
|
||||
_brush_ApplicationStatus_Failed_ActionBackground = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationStatus_Failed_ActionBackground");
|
||||
if (_brush_ApplicationStatus_Failed_ActionBackground != null)
|
||||
_brush_ApplicationStatus_Failed_ActionBackground.Freeze();
|
||||
return _brush_ApplicationStatus_Failed_ActionBackground;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brush_ApplicationStatus_Complete_ActionBackground = null;
|
||||
public static SolidColorBrush Brush_ApplicationStatus_Complete_ActionBackground
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null != _brush_ApplicationStatus_Complete_ActionBackground) return _brush_ApplicationStatus_Complete_ActionBackground;
|
||||
_brush_ApplicationStatus_Complete_ActionBackground = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationStatus_Complete_ActionBackground");
|
||||
if (_brush_ApplicationStatus_Complete_ActionBackground != null) { _brush_ApplicationStatus_Complete_ActionBackground.Freeze(); }
|
||||
return _brush_ApplicationStatus_Complete_ActionBackground;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brush_ApplicationStatus_Failed_SystemProcess = null;
|
||||
public static SolidColorBrush Brush_ApplicationStatus_Failed_SystemProcess
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null != _brush_ApplicationStatus_Failed_SystemProcess) return _brush_ApplicationStatus_Failed_SystemProcess;
|
||||
_brush_ApplicationStatus_Failed_SystemProcess = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationStauts_Failed_SystemProcess");
|
||||
if (_brush_ApplicationStatus_Failed_SystemProcess != null) { _brush_ApplicationStatus_Failed_SystemProcess.Freeze(); }
|
||||
return _brush_ApplicationStatus_Failed_SystemProcess;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brush_ApplicationFooterBackground = null;
|
||||
public static SolidColorBrush Brush_ApplicationFooterBackground
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null != _brush_ApplicationFooterBackground) return _brush_ApplicationFooterBackground;
|
||||
_brush_ApplicationFooterBackground = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationFooterBackground");
|
||||
if (_brush_ApplicationFooterBackground != null) { _brush_ApplicationFooterBackground.Freeze(); }
|
||||
return _brush_ApplicationFooterBackground;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brush_ApplicationLicensingFooterBackground = null;
|
||||
public static SolidColorBrush Brush_ApplicationLicensingFooterBackground
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brush_ApplicationLicensingFooterBackground)
|
||||
{
|
||||
_brush_ApplicationLicensingFooterBackground = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationLicensingFooterBackground");
|
||||
if (_brush_ApplicationLicensingFooterBackground != null) { _brush_ApplicationLicensingFooterBackground.Freeze(); }
|
||||
}
|
||||
return _brush_ApplicationLicensingFooterBackground;
|
||||
}
|
||||
}
|
||||
|
||||
private static Brush _Brush_Realtime_OSC_SELECTED = null;
|
||||
public static Brush Brush_Realtime_OSC_SELECTED
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _Brush_Realtime_OSC_SELECTED)
|
||||
{
|
||||
_Brush_Realtime_OSC_SELECTED = (Brush)Application.Current.FindResource("Brush_Realtime_OSC_SELECTED");
|
||||
_Brush_Realtime_OSC_SELECTED.Freeze();
|
||||
}
|
||||
return _Brush_Realtime_OSC_SELECTED;
|
||||
}
|
||||
}
|
||||
|
||||
private static Brush _Brush_Realtime_OSC_UNSELECTED = null;
|
||||
public static Brush Brush_Realtime_OSC_UNSELECTED
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _Brush_Realtime_OSC_UNSELECTED)
|
||||
{
|
||||
_Brush_Realtime_OSC_UNSELECTED = (Brush)Application.Current.FindResource("Brush_Realtime_OSC_UNSELECTED");
|
||||
_Brush_Realtime_OSC_UNSELECTED.Freeze();
|
||||
}
|
||||
return _Brush_Realtime_OSC_UNSELECTED;
|
||||
}
|
||||
}
|
||||
private static Brush _Brush_Realtime_METER_SELECTED = null;
|
||||
public static Brush Brush_Realtime_METER_SELECTED
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _Brush_Realtime_METER_SELECTED)
|
||||
{
|
||||
_Brush_Realtime_METER_SELECTED = (Brush)Application.Current.FindResource("Brush_Realtime_METER_SELECTED");
|
||||
_Brush_Realtime_METER_SELECTED.Freeze();
|
||||
}
|
||||
return _Brush_Realtime_METER_SELECTED;
|
||||
}
|
||||
}
|
||||
|
||||
private static Brush _Brush_Realtime_METER_UNSELECTED = null;
|
||||
public static Brush Brush_Realtime_METER_UNSELECTED
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _Brush_Realtime_METER_UNSELECTED)
|
||||
{
|
||||
_Brush_Realtime_METER_UNSELECTED = (Brush)Application.Current.FindResource("Brush_Realtime_METER_UNSELECTED");
|
||||
_Brush_Realtime_METER_UNSELECTED.Freeze();
|
||||
}
|
||||
return _Brush_Realtime_METER_UNSELECTED;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _Brush_SensorIdFound = null;
|
||||
public static SolidColorBrush Brush_SensorIdFound
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _Brush_SensorIdFound)
|
||||
{
|
||||
_Brush_SensorIdFound = (SolidColorBrush)Application.Current.FindResource("Brush_SensorIdFound");
|
||||
_Brush_SensorIdFound.Freeze();
|
||||
}
|
||||
return _Brush_SensorIdFound;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _Brush_ArmSystemForeground = null;
|
||||
public static SolidColorBrush Brush_ArmSystemForeground
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _Brush_ArmSystemForeground)
|
||||
{
|
||||
_Brush_ArmSystemForeground = (SolidColorBrush)Application.Current.FindResource("Brush_ArmSystemForeground");
|
||||
_Brush_ArmSystemForeground.Freeze();
|
||||
}
|
||||
return _Brush_ArmSystemForeground;
|
||||
}
|
||||
}
|
||||
private static SolidColorBrush _Brush_ApplicationTilePrepare;
|
||||
public static SolidColorBrush Brush_ApplicationTilePrepare
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _Brush_ApplicationTilePrepare)
|
||||
{
|
||||
_Brush_ApplicationTilePrepare = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationTilePrepare");
|
||||
_Brush_ApplicationTilePrepare.Freeze();
|
||||
}
|
||||
return _Brush_ApplicationTilePrepare;
|
||||
}
|
||||
}
|
||||
private static SolidColorBrush _Brush_ApplicationTileSetup;
|
||||
public static SolidColorBrush Brush_ApplicationTileSetup
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _Brush_ApplicationTileSetup)
|
||||
{
|
||||
_Brush_ApplicationTileSetup = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationTileSetup");
|
||||
_Brush_ApplicationTileSetup.Freeze();
|
||||
}
|
||||
return _Brush_ApplicationTileSetup;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brushApplicationStatusPowerRed;
|
||||
public static SolidColorBrush BrushApplicationStatusPowerRed
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brushApplicationStatusPowerRed)
|
||||
{
|
||||
_brushApplicationStatusPowerRed = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationStatusPowerRed");
|
||||
if (_brushApplicationStatusPowerRed != null) _brushApplicationStatusPowerRed.Freeze();
|
||||
}
|
||||
return _brushApplicationStatusPowerRed;
|
||||
}
|
||||
}
|
||||
private static SolidColorBrush _brushApplicationStatusPowerYellow;
|
||||
public static SolidColorBrush BrushApplicationStatusPowerYellow
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brushApplicationStatusPowerYellow)
|
||||
{
|
||||
_brushApplicationStatusPowerYellow = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationStatusPowerYellow");
|
||||
if (_brushApplicationStatusPowerYellow != null) _brushApplicationStatusPowerYellow.Freeze();
|
||||
}
|
||||
return _brushApplicationStatusPowerYellow;
|
||||
}
|
||||
}
|
||||
private static SolidColorBrush _brushApplicationStatusPowerGreen;
|
||||
public static SolidColorBrush BrushApplicationStatusPowerGreen
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brushApplicationStatusPowerGreen)
|
||||
{
|
||||
_brushApplicationStatusPowerGreen = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationStatusPowerGreen");
|
||||
if (_brushApplicationStatusPowerGreen != null) _brushApplicationStatusPowerGreen.Freeze();
|
||||
}
|
||||
return _brushApplicationStatusPowerGreen;
|
||||
}
|
||||
}
|
||||
private static SolidColorBrush _brushFlatControlDarkForeground;
|
||||
public static SolidColorBrush BrushFlatControlDarkForeground
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brushFlatControlDarkForeground)
|
||||
{
|
||||
_brushFlatControlDarkForeground = (SolidColorBrush)Application.Current.FindResource("Brush_FlatControlDarkForeground");
|
||||
if (_brushFlatControlDarkForeground != null) _brushFlatControlDarkForeground.Freeze();
|
||||
}
|
||||
return _brushFlatControlDarkForeground;
|
||||
}
|
||||
}
|
||||
|
||||
private static SolidColorBrush _brushButtonBorderForeground;
|
||||
public static SolidColorBrush BrushButtonBorderForeground
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _brushButtonBorderForeground)
|
||||
{
|
||||
_brushButtonBorderForeground = (SolidColorBrush)Application.Current.FindResource("Brush_ButtonBorderForeground");
|
||||
if (_brushButtonBorderForeground != null) _brushButtonBorderForeground.Freeze();
|
||||
}
|
||||
return _brushButtonBorderForeground;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static SolidColorBrush _BrushApplicationStatusPowerClear;
|
||||
public static SolidColorBrush BrushApplicationStatusPowerClear
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _BrushApplicationStatusPowerClear)
|
||||
{
|
||||
_BrushApplicationStatusPowerClear = (SolidColorBrush)Application.Current.FindResource("Brush_ApplicationStatusPowerClear");
|
||||
if (_BrushApplicationStatusPowerClear != null) _BrushApplicationStatusPowerClear.Freeze();
|
||||
}
|
||||
return _BrushApplicationStatusPowerClear;
|
||||
}
|
||||
}
|
||||
public static Color Color_ActionBackground => (Color)Application.Current.FindResource("Color_ActionBackground");
|
||||
public static Color Color_ApplicationTileCollectData => (Color)Application.Current.FindResource("Color_ApplicationTileCollectData");
|
||||
public static Color Color_ItemBackground => (Color)Application.Current.FindResource("Color_ItemBackground");
|
||||
public static Color Color_ActionForeground => (Color)Application.Current.FindResource("Color_ActionForeground");
|
||||
public static Color Color_ItemForeground => (Color)Application.Current.FindResource("Color_ItemForeground");
|
||||
public static Color Color_ApplicationTileSetup => (Color)Application.Current.FindResource("Color_ApplicationTileSetup");
|
||||
public static Color Color_ApplicationTilePrepare => (Color)Application.Current.FindResource("Color_ApplicationTilePrepare");
|
||||
public static Color Color_ApplicationTileCalibration => (Color)Application.Current.FindResource("Color_ApplicationTileCalibration");
|
||||
public static Color Color_ApplicationTileExport => (Color)Application.Current.FindResource("Color_ApplicationTileExport");
|
||||
public static Color Color_ApplicationTileAdmin => (Color)Application.Current.FindResource("Color_ApplicationTileAdmin");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Constant.DASSpecific
|
||||
{
|
||||
public class SLICE6
|
||||
{
|
||||
public const uint MaxAAFilterRateHz = 20000;
|
||||
|
||||
public const int MIN_PROTOCOL_VER = 1;
|
||||
public const int DIAGNOS_SHUNT_DAC = 2;
|
||||
public const int START_REC_DELAY_IN_SECONDS = 3;
|
||||
public const int IN_SLICE_TILT_SENSOR_ADC_PRE = 4;
|
||||
public const int STACK_SENSORS = 5;
|
||||
public const int START_REALTIME_STREAM = 11;
|
||||
public const int UDP_REALTIME_STREAM = 14;
|
||||
// Profiles as detailed in 29378
|
||||
public const int CLOCKSYNCPROFILE = 21;
|
||||
// minimum protocol version for PTP Domain ID per 30472
|
||||
public const int PTP_DOMAIN_ID_VER = 21;
|
||||
|
||||
public static bool IsRecordingModeSupported(RecordingModes mode, int protocolVersion)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case RecordingModes.CircularBuffer:
|
||||
case RecordingModes.Recorder:
|
||||
case RecordingModes.MultipleEventCircularBuffer:
|
||||
case RecordingModes.MultipleEventRecorder:
|
||||
case RecordingModes.HybridRecorder:
|
||||
case RecordingModes.MultipleEventHybridRecorder:
|
||||
case RecordingModes.ContinuousRecorder:
|
||||
case RecordingModes.MultipleEventRAMActive:
|
||||
case RecordingModes.RAMActive:
|
||||
return true;
|
||||
//RecordingModes.S6A_DeviceStreamingOnly:
|
||||
//note: per Loc, S6 only supports udp streams in realtime, *not* as a streaming test mode (i.e. boot-and-stream)
|
||||
//result = protocolVersion >= UDP_REALTIME_STREAM;
|
||||
//break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsStreamingProfileSupported(UDPStreamProfile profile, int protocolVersion)
|
||||
{
|
||||
switch (profile)
|
||||
{
|
||||
//note: per Loc, S6 only supports these in realtime, *not* as a streaming test mode (i.e. boot-and-stream)
|
||||
case UDPStreamProfile.RTCStreaming:
|
||||
case UDPStreamProfile.DTS_UDP:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsClockSyncProfileSupported(ClockSyncProfile profile, int protocolVersion)
|
||||
{
|
||||
switch (profile)
|
||||
{
|
||||
case ClockSyncProfile.None:
|
||||
return true;
|
||||
case ClockSyncProfile.Manual:
|
||||
//per LP there should be no max protocol version for manual, just any protocol version > 1
|
||||
//http://manuscript.dts.local/f/cases/41798/Clock-slave-output-clock-type-setting-preventing-from-setting-clock-sync-in-manual-mode
|
||||
return protocolVersion > 1;
|
||||
case ClockSyncProfile.Slave_E2E:
|
||||
return protocolVersion >= CLOCKSYNCPROFILE;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user