init
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace DTS.Common.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the converter that converts Boolean values to and from <see cref="Visibility">Visibility</see> enumeration values.
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Use the BooleanToVisibilityConverter class to convert a Boolean to and from a <see cref="Visibility">Visibility</see> value.
|
||||
/// The Convert method returns <see cref="Visibility.Visible">Visibility.Visible</see> when <b>true</b> is passed in
|
||||
/// or <see cref="Visibility.Collapsed">Visibility.Collapsed</see> when <b>false</b> is passed in.
|
||||
/// Note that the <see cref="Visibility.Collapsed">Visibility.Collapsed</see> value hides the control and does not reserve space for it in a layout.
|
||||
/// When you call the ConvertBack method and specify a reference to an object, it returns <b>true</b>
|
||||
/// if the object is <see cref="Visibility.Visible">Visible</see>; otherwise, it returns <b>false</b>.
|
||||
/// </remarks>
|
||||
///
|
||||
public class InverseBooleanToVisibilityConverter : IValueConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts a Boolean value to a Visibility enumeration value.
|
||||
/// </summary>
|
||||
/// <param name="value">The Boolean value to convert. This value can be a standard Boolean value or a nullable Boolean value.</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>The value to be passed to the target dependency property.</returns>
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
var useFalseAsVisible = parameter != null && parameter.ToString().ToUpper() == "FALSE";
|
||||
var hideNotCollapse = parameter != null && parameter.ToString().ToUpper() == "HIDE";
|
||||
|
||||
if (!useFalseAsVisible)
|
||||
{
|
||||
if (value != null && (bool)value)
|
||||
return hideNotCollapse ? Visibility.Hidden : Visibility.Collapsed;
|
||||
return Visibility.Visible;
|
||||
}
|
||||
if (value != null && (bool)value)
|
||||
return Visibility.Visible;
|
||||
return hideNotCollapse ? Visibility.Hidden : Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a Visibility enumeration value to a Boolean value.
|
||||
/// </summary>
|
||||
/// <param name="value">A Visibility enumeration value.</param>
|
||||
/// <param name="targetType">This parameter is not used.</param>
|
||||
/// <param name="parameter">This parameter is not used.</param>
|
||||
/// <param name="culture">This parameter is not used.</param>
|
||||
/// <returns>The value to be passed to the source object.</returns>
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DTS.Common.Classes.Sensors
|
||||
{
|
||||
/// <summary>
|
||||
/// internal helper class to avoid passing a huge number of parameters between methods
|
||||
/// right now it's needed both in the Wizard CSV import code and in DataPRO CSV import code
|
||||
/// but it can probably be moved to only be in Wizard CSV import code when DataPRO CSV import code is removed
|
||||
/// for now it lives here.
|
||||
/// </summary>
|
||||
public class ParseParameters
|
||||
{
|
||||
public bool ImportContainedSensorRanges { get; set; } = false;
|
||||
private ISensorData _sd;
|
||||
public ISensorData SensorData { get => _sd; set => _sd = value; }
|
||||
|
||||
private IFormatProvider _importCulture;
|
||||
public IFormatProvider ImportCulture { get => _importCulture; set => _importCulture = value; }
|
||||
|
||||
private List<string> _errors;
|
||||
public List<string> Errors { get => _errors; set => _errors = value; }
|
||||
|
||||
private double _dIrTraccExponent;
|
||||
public double IrtraccExponent { get => _dIrTraccExponent; set => _dIrTraccExponent = value; }
|
||||
|
||||
private ISensorCalibration _sc;
|
||||
public ISensorCalibration SensorCal { get => _sc; set => _sc = value; }
|
||||
|
||||
private double _dSensitivity;
|
||||
public double Sensitivity { get => _dSensitivity; set => _dSensitivity = value; }
|
||||
|
||||
private bool _bSavedIsProportional;
|
||||
public bool SavedIsProportional { get => _bSavedIsProportional; set => _bSavedIsProportional = value; }
|
||||
|
||||
private bool _savedRemoveOffset;
|
||||
public bool SavedRemoveOffset { get => _savedRemoveOffset; set => _savedRemoveOffset = value; }
|
||||
|
||||
private bool _stripBackslash;
|
||||
public bool StripBackslash { get => _stripBackslash; set => _stripBackslash = value; }
|
||||
|
||||
private double _dOriginalOffset;
|
||||
public double OriginalOffset { get => _dOriginalOffset; set => _dOriginalOffset = value; }
|
||||
|
||||
private ZeroMethodType _zmt;
|
||||
public ZeroMethodType ZeroType { get => _zmt; set => _zmt = value; }
|
||||
|
||||
private double _zeroMethodEnd;
|
||||
public double ZeroEnd
|
||||
{
|
||||
get => _zeroMethodEnd; set => _zeroMethodEnd = value;
|
||||
}
|
||||
|
||||
private double _zeroMethodStart;
|
||||
public double ZeroStart { get => _zeroMethodStart; set => _zeroMethodStart = value; }
|
||||
|
||||
private ISquibSettingDefaults _squibDefaults;
|
||||
public ISquibSettingDefaults SquibDefaults
|
||||
{
|
||||
get => _squibDefaults; set => _squibDefaults = value;
|
||||
}
|
||||
|
||||
private IDigitalOutDefaults _digitalOutDefaults;
|
||||
public IDigitalOutDefaults DigitalOutDefaults
|
||||
{
|
||||
get => _digitalOutDefaults; set => _digitalOutDefaults = value;
|
||||
}
|
||||
|
||||
private Dictionary<string, string> _sensorGroupNameLookup;
|
||||
public Dictionary<string, string> SensorGroupNameLookup
|
||||
{
|
||||
get => _sensorGroupNameLookup; set => _sensorGroupNameLookup = value;
|
||||
}
|
||||
|
||||
private Dictionary<string, string> _sensorGroupTypeLookup;
|
||||
public Dictionary<string, string> SensorGroupTypeLookup
|
||||
{
|
||||
get => _sensorGroupTypeLookup; set => _sensorGroupTypeLookup = value;
|
||||
}
|
||||
|
||||
private Dictionary<string, string> _groupNameToTestObjectLookup;
|
||||
public Dictionary<string, string> GroupNameToTestObjectLookup { get => _groupNameToTestObjectLookup; set => _groupNameToTestObjectLookup = value; }
|
||||
|
||||
private string _sensorTestObject;
|
||||
public string SensorTestObject { get => _sensorTestObject; set => _sensorTestObject = value; }
|
||||
|
||||
private bool _bUseISOCodeFilterMapping;
|
||||
public bool UseISOCodeFilterMapping { get => _bUseISOCodeFilterMapping; set => _bUseISOCodeFilterMapping = value; }
|
||||
|
||||
private bool _bUseZeroForUnfiltered;
|
||||
public bool UseZeroForUnfiltered { get => _bUseZeroForUnfiltered; set => _bUseZeroForUnfiltered = value; }
|
||||
|
||||
private Dictionary<string, string> _SensorISOCode;
|
||||
public Dictionary<string, string> SensorISOCode { get => _SensorISOCode; set => _SensorISOCode = value; }
|
||||
|
||||
private Dictionary<string, string> _SensorISOChannelName;
|
||||
public Dictionary<string, string> SensorISOChannelName { get => _SensorISOChannelName; set => _SensorISOChannelName = value; }
|
||||
|
||||
private Dictionary<string, string> _SensorUserCode;
|
||||
public Dictionary<string, string> SensorUserCode { get => _SensorUserCode; set => _SensorUserCode = value; }
|
||||
|
||||
private Dictionary<string, string> _SensorUserChannelName;
|
||||
public Dictionary<string, string> SensorUserChannelName { get => _SensorUserChannelName; set => _SensorUserChannelName = value; }
|
||||
|
||||
private Dictionary<string, string> _SensorDASSerialNumber;
|
||||
public Dictionary<string, string> SensorDASSerialNumber { get => _SensorDASSerialNumber; set => _SensorDASSerialNumber = value; }
|
||||
|
||||
private Dictionary<string, int> _SensorDASChannelIndex;
|
||||
public Dictionary<string, int> SensorDASChannelIndex { get => _SensorDASChannelIndex; set => _SensorDASChannelIndex = value; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using DTS.Common.Classes.DSP;
|
||||
|
||||
namespace DTS.Common.Classes.ClockSync
|
||||
{
|
||||
public interface IClockSyncProfile
|
||||
{
|
||||
int ProfileId { get; set; }
|
||||
string ProfileName { get; set; }
|
||||
string ProfileDesc { get; set; }
|
||||
int DisplayOrder { get; set; }
|
||||
bool Visible { get; set; }
|
||||
DASRestriction[] FilterRestrictions { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using DTS.Common.Base.Classes;
|
||||
|
||||
namespace DTS.Common.Enums.Sensors.SensorsList
|
||||
{
|
||||
public enum CACOption
|
||||
{
|
||||
[DescriptionResourceAttribute("CAC_Manual")]
|
||||
Manual,
|
||||
[DescriptionResourceAttribute("CAC_Capacity")]
|
||||
Capacity,
|
||||
[DescriptionResourceAttribute("CAC_RangeHigh")]
|
||||
RangeHigh,
|
||||
[DescriptionResourceAttribute("CAC_RangeMedium")]
|
||||
RangeMedium,
|
||||
[DescriptionResourceAttribute("CAC_RangeLow")]
|
||||
RangeLow,
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 630 B |
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace DTS.Common.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ISOPopup.xaml
|
||||
/// </summary>
|
||||
public partial class ISOPopup : Popup
|
||||
{
|
||||
public ISOPopup()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ISOPart_OnPreviewKeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
bool isAlpha = (e.Key >= Key.A && e.Key <= Key.Z);
|
||||
bool isNumPadNumeric = (e.Key >= Key.NumPad0 && e.Key <= Key.NumPad9);
|
||||
bool isNumeric = (e.Key >= Key.D0 && e.Key <= Key.D9);
|
||||
bool isControl = e.Key == Key.Enter || e.Key == Key.Return || e.Key == Key.Tab || e.Key == Key.OemBackTab ||
|
||||
e.Key == Key.Delete || e.Key == Key.Back || e.Key == Key.Home || e.Key == Key.End;
|
||||
e.Handled = !(e.Key == Key.OemQuestion || isAlpha || isNumPadNumeric || isNumeric || isControl);
|
||||
}
|
||||
|
||||
private void ISOPart_OnGotMouseCapture(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (sender is TextBox tb)
|
||||
{
|
||||
tb.SelectAll();
|
||||
}
|
||||
}
|
||||
|
||||
private void ISOPart_OnGotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
|
||||
{
|
||||
if (sender is TextBox tb)
|
||||
{
|
||||
tb.SelectAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 425 B |
@@ -0,0 +1,24 @@
|
||||
using DTS.Common.Enums.Hardware;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace DTS.Common.Interface.Hardware.AddEditHardware
|
||||
{
|
||||
/// <summary>
|
||||
/// describes interface used in AddEditHardware
|
||||
/// </summary>
|
||||
public interface IAddEditHardwareDASModule
|
||||
{
|
||||
HardwareTypes ModuleType { get; set; }
|
||||
string SerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// an image representing the das
|
||||
/// </summary>
|
||||
ImageSource DASImage { get; }
|
||||
IAddEditHardwareHardware OwningHardware { get; set; }
|
||||
SLICEBridgeTypes SLICEBridgeType { get; set; }
|
||||
/// <summary>
|
||||
/// returns the prefix for any modules of this moduletype
|
||||
/// </summary>
|
||||
string GetSerialNumberPrefix();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user