init
This commit is contained in:
@@ -0,0 +1 @@
|
||||
12
|
||||
@@ -0,0 +1 @@
|
||||
12
|
||||
@@ -0,0 +1,282 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ConstantCurrentBreakPoint" xml:space="preserve">
|
||||
<value>Constant current breakpoint (ADC)</value>
|
||||
</data>
|
||||
<data name="Current" xml:space="preserve">
|
||||
<value>Current (A)</value>
|
||||
</data>
|
||||
<data name="Delay" xml:space="preserve">
|
||||
<value>Delay (ms)</value>
|
||||
</data>
|
||||
<data name="DigitalInputSettings" xml:space="preserve">
|
||||
<value>Digital input defaults</value>
|
||||
</data>
|
||||
<data name="DigitalOutDefaults" xml:space="preserve">
|
||||
<value>Digital output defaults</value>
|
||||
</data>
|
||||
<data name="DigitalOutputDelayMS" xml:space="preserve">
|
||||
<value>Delay (ms)</value>
|
||||
</data>
|
||||
<data name="DigitalOutputDuration" xml:space="preserve">
|
||||
<value>Duration (ms)</value>
|
||||
</data>
|
||||
<data name="DigitalOutputLimitDuration" xml:space="preserve">
|
||||
<value>Limit duration</value>
|
||||
</data>
|
||||
<data name="DigitalOutputMode" xml:space="preserve">
|
||||
<value>Output mode</value>
|
||||
</data>
|
||||
<data name="DisplaySPDADC" xml:space="preserve">
|
||||
<value>Display SPD analog data</value>
|
||||
</data>
|
||||
<data name="DisableAutoSense" xml:space="preserve">
|
||||
<value>Disable auto-sense</value>
|
||||
</data>
|
||||
<data name="Duration" xml:space="preserve">
|
||||
<value>Duration (ms)</value>
|
||||
</data>
|
||||
<data name="FiringMode" xml:space="preserve">
|
||||
<value>Firing mode</value>
|
||||
</data>
|
||||
<data name="HighTolerance" xml:space="preserve">
|
||||
<value>High tolerance (Ω)</value>
|
||||
</data>
|
||||
<data name="IEPEDefaults" xml:space="preserve">
|
||||
<value>IEPE defaults</value>
|
||||
</data>
|
||||
<data name="IEPERangeHighLimit" xml:space="preserve">
|
||||
<value>Actual range high limit (x full scale)</value>
|
||||
</data>
|
||||
<data name="IEPERangeLowLimit" xml:space="preserve">
|
||||
<value>Actual range low limit (x full scale)</value>
|
||||
</data>
|
||||
<data name="LimitDuration" xml:space="preserve">
|
||||
<value>Limit duration</value>
|
||||
</data>
|
||||
<data name="LowTolerance" xml:space="preserve">
|
||||
<value>Low tolerance (Ω)</value>
|
||||
</data>
|
||||
<data name="OutputMode" xml:space="preserve">
|
||||
<value>Output mode</value>
|
||||
</data>
|
||||
<data name="Policy" xml:space="preserve">
|
||||
<value>Policy</value>
|
||||
</data>
|
||||
<data name="SensorCalibrationPolicies" xml:space="preserve">
|
||||
<value>Sensor calibration policies</value>
|
||||
</data>
|
||||
<data name="AnalogSettings" xml:space="preserve">
|
||||
<value>Analog defaults</value>
|
||||
</data>
|
||||
<data name="DefineDefaultFilter" xml:space="preserve">
|
||||
<value>Define Default Filter</value>
|
||||
</data>
|
||||
<data name="UseMeasuredExcitation" xml:space="preserve">
|
||||
<value>Use Measured Excitation to scale EU data</value>
|
||||
</data>
|
||||
<data name="SquibDefaults" xml:space="preserve">
|
||||
<value>Squib defaults</value>
|
||||
</data>
|
||||
<data name="VoltageInputBreakpoint" xml:space="preserve">
|
||||
<value>Voltage input breakpoint (ADC)</value>
|
||||
</data>
|
||||
<data name="WarningPeriod" xml:space="preserve">
|
||||
<value>Warning period (days)</value>
|
||||
</data>
|
||||
<data name="_24VPowerHigh" xml:space="preserve">
|
||||
<value>24V Power high (V)</value>
|
||||
</data>
|
||||
<data name="_24VPowerLow" xml:space="preserve">
|
||||
<value>24V Power low (V)</value>
|
||||
</data>
|
||||
<data name="UseSensorFirstUseDate" xml:space="preserve">
|
||||
<value>Calibration interval starts after sensor's first use</value>
|
||||
</data>
|
||||
<data name="BaudRate" xml:space="preserve">
|
||||
<value>Baud rate</value>
|
||||
</data>
|
||||
<data name="DataBits" xml:space="preserve">
|
||||
<value>Data bits</value>
|
||||
</data>
|
||||
<data name="DataFormat" xml:space="preserve">
|
||||
<value>Data format</value>
|
||||
</data>
|
||||
<data name="FlowControl" xml:space="preserve">
|
||||
<value>Flow control</value>
|
||||
</data>
|
||||
<data name="Parity" xml:space="preserve">
|
||||
<value>Parity</value>
|
||||
</data>
|
||||
<data name="StopBits" xml:space="preserve">
|
||||
<value>Stop bits</value>
|
||||
</data>
|
||||
<data name="UartSettings" xml:space="preserve">
|
||||
<value>UART defaults</value>
|
||||
</data>
|
||||
<data name="DataChannelId" xml:space="preserve">
|
||||
<value>Data channel id</value>
|
||||
</data>
|
||||
<data name="IRIGTimeDataPacketIntervalMs" xml:space="preserve">
|
||||
<value>Time packet interval (ms)</value>
|
||||
</data>
|
||||
<data name="StreamOutputSettings" xml:space="preserve">
|
||||
<value>Stream output defaults</value>
|
||||
</data>
|
||||
<data name="TimeChannelId" xml:space="preserve">
|
||||
<value>Time channel id</value>
|
||||
</data>
|
||||
<data name="TmNSConfig" xml:space="preserve">
|
||||
<value>TmNS config</value>
|
||||
</data>
|
||||
<data name="UDPAddress" xml:space="preserve">
|
||||
<value>UDP Address</value>
|
||||
</data>
|
||||
<data name="UDPProfile" xml:space="preserve">
|
||||
<value>Stream Profile</value>
|
||||
</data>
|
||||
<data name="StreamInputSettings" xml:space="preserve">
|
||||
<value>Stream input defaults</value>
|
||||
</data>
|
||||
<data name="UseAdvancedUDPStreamProfiles" xml:space="preserve">
|
||||
<value>Use advanced streaming profiles</value>
|
||||
</data>
|
||||
<data name="TrackDiagnostics" xml:space="preserve">
|
||||
<value>Track diagnostics</value>
|
||||
</data>
|
||||
<data name="SensorSettings_AllowInspectBeforeUse" xml:space="preserve">
|
||||
<value>Inspect before use</value>
|
||||
</data>
|
||||
<data name="SensorSettings_DefaultMaxUsageAllowed" xml:space="preserve">
|
||||
<value>Default maximum uses allowed</value>
|
||||
</data>
|
||||
<data name="SensorSettings_DontAllowDataCollectionIfOverused" xml:space="preserve">
|
||||
<value>Do not allow data collection if sensor is overused</value>
|
||||
</data>
|
||||
<data name="SensorSettings_UsageRemainingForWarning" xml:space="preserve">
|
||||
<value>Warn when number of uses remaining</value>
|
||||
</data>
|
||||
<data name="ArbBaseBitrate" xml:space="preserve">
|
||||
<value>Arb/Base Bitrate</value>
|
||||
</data>
|
||||
<data name="CanSettings" xml:space="preserve">
|
||||
<value>CAN defaults</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,276 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ConstantCurrentBreakPoint" xml:space="preserve">
|
||||
<value>Constant current breakpoint (ADC)</value>
|
||||
</data>
|
||||
<data name="Current" xml:space="preserve">
|
||||
<value>Current (A)</value>
|
||||
</data>
|
||||
<data name="Delay" xml:space="preserve">
|
||||
<value>Delay (ms)</value>
|
||||
</data>
|
||||
<data name="DigitalInputSettings" xml:space="preserve">
|
||||
<value>Digital input defaults</value>
|
||||
</data>
|
||||
<data name="DigitalOutDefaults" xml:space="preserve">
|
||||
<value>Digital output defaults</value>
|
||||
</data>
|
||||
<data name="DigitalOutputDelayMS" xml:space="preserve">
|
||||
<value>Delay (ms)</value>
|
||||
</data>
|
||||
<data name="DigitalOutputDuration" xml:space="preserve">
|
||||
<value>Duration (ms)</value>
|
||||
</data>
|
||||
<data name="DigitalOutputLimitDuration" xml:space="preserve">
|
||||
<value>Limit duration</value>
|
||||
</data>
|
||||
<data name="DigitalOutputMode" xml:space="preserve">
|
||||
<value>Output mode</value>
|
||||
</data>
|
||||
<data name="DisplaySPDADC" xml:space="preserve">
|
||||
<value>Display SPD analog data</value>
|
||||
</data>
|
||||
<data name="DisableAutoSense" xml:space="preserve">
|
||||
<value>Disable auto-sense</value>
|
||||
</data>
|
||||
<data name="Duration" xml:space="preserve">
|
||||
<value>Duration (ms)</value>
|
||||
</data>
|
||||
<data name="FiringMode" xml:space="preserve">
|
||||
<value>Firing mode</value>
|
||||
</data>
|
||||
<data name="HighTolerance" xml:space="preserve">
|
||||
<value>High tolerance (Ω)</value>
|
||||
</data>
|
||||
<data name="IEPEDefaults" xml:space="preserve">
|
||||
<value>IEPE defaults</value>
|
||||
</data>
|
||||
<data name="IEPERangeHighLimit" xml:space="preserve">
|
||||
<value>Actual range high limit (x full scale)</value>
|
||||
</data>
|
||||
<data name="IEPERangeLowLimit" xml:space="preserve">
|
||||
<value>Actual range low limit (x full scale)</value>
|
||||
</data>
|
||||
<data name="LimitDuration" xml:space="preserve">
|
||||
<value>Limit duration</value>
|
||||
</data>
|
||||
<data name="LowTolerance" xml:space="preserve">
|
||||
<value>Low tolerance (Ω)</value>
|
||||
</data>
|
||||
<data name="OutputMode" xml:space="preserve">
|
||||
<value>Output mode</value>
|
||||
</data>
|
||||
<data name="Policy" xml:space="preserve">
|
||||
<value>Policy</value>
|
||||
</data>
|
||||
<data name="SensorCalibrationPolicies" xml:space="preserve">
|
||||
<value>Sensor calibration policies</value>
|
||||
</data>
|
||||
<data name="AnalogSettings" xml:space="preserve">
|
||||
<value>Analog defaults</value>
|
||||
</data>
|
||||
<data name="DefineDefaultFilter" xml:space="preserve">
|
||||
<value>Define Default Filter</value>
|
||||
</data>
|
||||
<data name="UseMeasuredExcitation" xml:space="preserve">
|
||||
<value>Use Measured Excitation to scale EU data</value>
|
||||
</data>
|
||||
<data name="SquibDefaults" xml:space="preserve">
|
||||
<value>Squib defaults</value>
|
||||
</data>
|
||||
<data name="VoltageInputBreakpoint" xml:space="preserve">
|
||||
<value>Voltage input breakpoint (ADC)</value>
|
||||
</data>
|
||||
<data name="WarningPeriod" xml:space="preserve">
|
||||
<value>Warning period (days)</value>
|
||||
</data>
|
||||
<data name="_24VPowerHigh" xml:space="preserve">
|
||||
<value>24V Power high (V)</value>
|
||||
</data>
|
||||
<data name="_24VPowerLow" xml:space="preserve">
|
||||
<value>24V Power low (V)</value>
|
||||
</data>
|
||||
<data name="UseSensorFirstUseDate" xml:space="preserve">
|
||||
<value>Calibration interval starts after sensor's first use</value>
|
||||
</data>
|
||||
<data name="BaudRate" xml:space="preserve">
|
||||
<value>Baud rate</value>
|
||||
</data>
|
||||
<data name="DataBits" xml:space="preserve">
|
||||
<value>Data bits</value>
|
||||
</data>
|
||||
<data name="DataFormat" xml:space="preserve">
|
||||
<value>Data format</value>
|
||||
</data>
|
||||
<data name="FlowControl" xml:space="preserve">
|
||||
<value>Flow control</value>
|
||||
</data>
|
||||
<data name="Parity" xml:space="preserve">
|
||||
<value>Parity</value>
|
||||
</data>
|
||||
<data name="StopBits" xml:space="preserve">
|
||||
<value>Stop bits</value>
|
||||
</data>
|
||||
<data name="UartSettings" xml:space="preserve">
|
||||
<value>UART defaults</value>
|
||||
</data>
|
||||
<data name="DataChannelId" xml:space="preserve">
|
||||
<value>Data channel id</value>
|
||||
</data>
|
||||
<data name="IRIGTimeDataPacketIntervalMs" xml:space="preserve">
|
||||
<value>Time packet interval (ms)</value>
|
||||
</data>
|
||||
<data name="StreamOutputSettings" xml:space="preserve">
|
||||
<value>Stream output defaults</value>
|
||||
</data>
|
||||
<data name="TimeChannelId" xml:space="preserve">
|
||||
<value>Time channel id</value>
|
||||
</data>
|
||||
<data name="TmNSConfig" xml:space="preserve">
|
||||
<value>TmNS config</value>
|
||||
</data>
|
||||
<data name="UDPAddress" xml:space="preserve">
|
||||
<value>UDP Address</value>
|
||||
</data>
|
||||
<data name="UDPProfile" xml:space="preserve">
|
||||
<value>Stream Profile</value>
|
||||
</data>
|
||||
<data name="StreamInputSettings" xml:space="preserve">
|
||||
<value>Stream input defaults</value>
|
||||
</data>
|
||||
<data name="UseAdvancedUDPStreamProfiles" xml:space="preserve">
|
||||
<value>Use advanced streaming profiles</value>
|
||||
</data>
|
||||
<data name="TrackDiagnostics" xml:space="preserve">
|
||||
<value>Track diagnostics</value>
|
||||
</data>
|
||||
<data name="SensorSettings_AllowInspectBeforeUse" xml:space="preserve">
|
||||
<value>Inspect before use</value>
|
||||
</data>
|
||||
<data name="SensorSettings_DefaultMaxUsageAllowed" xml:space="preserve">
|
||||
<value>Default maximum uses allowed</value>
|
||||
</data>
|
||||
<data name="SensorSettings_DontAllowDataCollectionIfOverused" xml:space="preserve">
|
||||
<value>Do not allow data collection if sensor is overused</value>
|
||||
</data>
|
||||
<data name="SensorSettings_UsageRemainingForWarning" xml:space="preserve">
|
||||
<value>Warn when number of uses remaining</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SensorSettingsModule.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,341 @@
|
||||
<base:BaseView x:Class="SensorSettingsModule.SensorSettingsView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:strings="clr-namespace:SensorSettingsModule"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Controls/combobox.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Constant/XamlConstants.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<sys:Double x:Key="_24VPOWER_LOW_MAX">24</sys:Double>
|
||||
<sys:Double x:Key="_24VPOWER_LOW_MIN">0</sys:Double>
|
||||
<sys:Double x:Key="_24VPOWER_HIGH_MAX">30</sys:Double>
|
||||
<sys:Double x:Key="_24VPOWER_HIGH_MIN">0</sys:Double>
|
||||
<sys:Double x:Key="IEPE_RANGE_LOW_MIN">.1</sys:Double>
|
||||
<sys:Double x:Key="IEPE_RANGE_LOW_MAX">10</sys:Double>
|
||||
<sys:Double x:Key="IEPE_RANGE_HIGH_MIN">1</sys:Double>
|
||||
<sys:Double x:Key="IEPE_RANGE_HIGH_MAX">1000</sys:Double>
|
||||
<!-- most of the styles down to the converter were either already here or copied in when I was trying to fix a few style issues
|
||||
none of them are native to here so it's probably ok to wipe out down to the converters if the DTS.Common commonstyles has the
|
||||
right styles present
|
||||
-->
|
||||
<Style TargetType="xctk:DoubleUpDown" BasedOn="{StaticResource PageContentXCDoubleUpDown}">
|
||||
<Setter Property="Width" Value="150"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="FormatString" Value="N2"/>
|
||||
<Setter Property="Increment" Value="0.1"/>
|
||||
</Style>
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TTS_ListViewItemStyle}"/>
|
||||
</Style>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||||
<Style TargetType="ComboBox" BasedOn="{StaticResource FlatComboBoxStyle}">
|
||||
<Setter Property="Width" Value="450"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
</Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
<Style TargetType="Expander" BasedOn="{StaticResource SimpleExpanderTemp}">
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
||||
</Style>
|
||||
<!-- these are used for error decoration of Squib high/low tolerances -->
|
||||
<converters:BooleanToBorderThicknessConverter x:Key="BooleanToBorderThickness" />
|
||||
<converters:BooleanToColorConverter x:Key="BooleanToColor" />
|
||||
<!--<converters:BooleanToColorConverter x:Key="BooleanToWarningColor" WarningBrush="True" />-->
|
||||
<converters:BooleanToVisibilityConverter x:Key="BoolToVisConverter" /> <!-- used for Current Visability depending on squib fire mode-->
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<!-- I originally tried DynamicGrid here, but it had weird column sizing, I believe it was missing some stuff from CommonStyles -->
|
||||
<StackPanel Background="{DynamicResource Brush_ApplicationContentBackground}" Orientation="Vertical">
|
||||
<Expander Header="{strings:TranslateExtension SquibDefaults}" DataContext="{Binding SquibSettings}" AutomationProperties.AutomationId="SQUIBDefaultsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension Delay}" Grid.Row="0" AutomationProperties.AutomationId="SQUIBDelayLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="0" Minimum="{StaticResource SQUIB_DELAY_MIN}"
|
||||
Maximum="{StaticResource SQUIB_DELAY_MAX}" ClipValueToMinMax="True" Value="{Binding FireDelayMS}"
|
||||
AutomationProperties.AutomationId="SQUIBDelay"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension LimitDuration}" Grid.Row="1" AutomationProperties.AutomationId="SQUIBLimitDurationLabel"/>
|
||||
<CheckBox Grid.Column="1" Grid.Row="1" Margin="0" IsChecked="{Binding LimitDurationDefault}" AutomationProperties.AutomationId="SQUIBLimitDuration" HorizontalAlignment="Left"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension Duration}" Grid.Row="2"
|
||||
Visibility="{Binding LimitDurationDefault, Converter={StaticResource BoolToVisConverter}}" AutomationProperties.AutomationId="SQUIBDurationLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="2" FormatString="N1" Minimum="{StaticResource SQUIB_DURATION_MIN}" Maximum="{StaticResource SQUIB_DURATION_MAX}"
|
||||
ClipValueToMinMax="True" Value="{Binding FireDurationMS}"
|
||||
Visibility="{Binding LimitDurationDefault, Converter={StaticResource BoolToVisConverter}}"
|
||||
AutomationProperties.AutomationId="SQUIBDuration"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension LowTolerance}" Grid.Row="3" AutomationProperties.AutomationId="SQUIBLowToleranceLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="3" FormatString="N1" Minimum="{StaticResource SQUIB_TOLERANCE_LOW}"
|
||||
Maximum="{StaticResource SQUIB_TOLERANCE_HIGH}" Value="{Binding ToleranceLowDefault}"
|
||||
BorderBrush="{Binding ToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding ToleranceValid, Converter={StaticResource BooleanToBorderThickness}}" AutomationProperties.AutomationId="SQUIBLowTolerance"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension HighTolerance}" Grid.Row="4" AutomationProperties.AutomationId="SQUIBHighToleranceLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="4" FormatString="N1" Minimum="{StaticResource SQUIB_TOLERANCE_LOW}"
|
||||
Maximum="{StaticResource SQUIB_TOLERANCE_HIGH}" Value="{Binding ToleranceHighDefault}"
|
||||
BorderBrush="{Binding ToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding ToleranceValid, Converter={StaticResource BooleanToBorderThickness}}" AutomationProperties.AutomationId="SQUIBHighTolerance"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension FiringMode}" Grid.Row="5" AutomationProperties.AutomationId="SQUIBFiringModeLabel"/>
|
||||
<ComboBox Grid.Column="1" Grid.Row="5" SelectedItem="{Binding FireModeDefault}" ItemsSource="{Binding AvailableModes}" AutomationProperties.AutomationId="SQUIBFiringMode" HorizontalAlignment="Left"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension Current}" Grid.Row="6" Visibility="{Binding IsConstantCurrent, Converter={StaticResource BoolToVisConverter}}" AutomationProperties.AutomationId="SQUIBConstantCurrentabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="6" Minimum="{StaticResource SQUIB_CURRENT_LOW}" Maximum="{StaticResource SQUIB_CURRENT_HIGH}"
|
||||
Value="{Binding OutputCurrentDefault}" Visibility="{Binding IsConstantCurrent, Converter={StaticResource BoolToVisConverter}}"
|
||||
AutomationProperties.AutomationId="SQUIBConstantCurrent" />
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension DigitalOutDefaults}" DataContext="{Binding DigitalOutSettings}" AutomationProperties.AutomationId="DigitalOutExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="0" Text="{strings:TranslateExtension DigitalOutputMode}" AutomationProperties.AutomationId="DOUTModeLabel"/>
|
||||
<ComboBox Grid.Column="1" Grid.Row="0" SelectedItem="{Binding OutputMode}" ItemsSource="{Binding AvailableModes}" AutomationProperties.AutomationId="DOUTMode" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{strings:TranslateExtension DigitalOutputDelayMS}" AutomationProperties.AutomationId="DOUTDelayLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="1" Minimum="0" ClipValueToMinMax="True"
|
||||
Increment=".1" Value="{Binding DelayMS}" AutomationProperties.AutomationId="DOUTDelay"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="{strings:TranslateExtension DigitalOutputLimitDuration}" AutomationProperties.AutomationId="DOUTLimitDurationLabel"/>
|
||||
<CheckBox Grid.Column="1" Grid.Row="2" IsChecked="{Binding LimitDuration}" AutomationProperties.AutomationId="DOUTLimitDuration" HorizontalAlignment="Left"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="3" Text="{strings:TranslateExtension DigitalOutputDuration}"
|
||||
Visibility="{Binding LimitDuration, Converter={StaticResource BoolToVisConverter}}" AutomationProperties.AutomationId="DOUTDurationLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="3" Minimum="0" ClipValueToMinMax="True"
|
||||
Increment=".1" Value="{Binding DurationMS}" Visibility="{Binding LimitDuration, Converter={StaticResource BoolToVisConverter}}"
|
||||
AutomationProperties.AutomationId="DOUTDuration"/>
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension DigitalInputSettings}" DataContext="{Binding DigitalInputDefaults}" AutomationProperties.AutomationId="DigitalInputsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="0" Text="{strings:TranslateExtension ConstantCurrentBreakPoint}" />
|
||||
<!-- 16 bit signed -->
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="0" Minimum="-32768" Maximum="32767" ClipValueToMinMax="True"
|
||||
Increment="1" Value="{Binding ConstantCurrentBreakpointADC}" AutomationProperties.AutomationId="DIConstantCurrentBreakpoint"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{strings:TranslateExtension VoltageInputBreakpoint}" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="1" Minimum="-32768" Maximum="32767" ClipValueToMinMax="True"
|
||||
Increment="1" Value="{Binding VoltageBreakpointADC}" AutomationProperties.AutomationId="DIVoltageBreakpoint"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension DisplaySPDADC}" Grid.Row="2" />
|
||||
<CheckBox Grid.Column="1" Grid.Row="2" IsChecked="{Binding DisplaySPDADC}" />
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension IEPEDefaults}" DataContext="{Binding IEPESensorDefaults}" AutomationProperties.AutomationId="IEPEDefaultsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" /> <!-- Disable AutoSense -->
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension _24VPowerLow}" Grid.Row="0" AutomationProperties.AutomationId="_24VPowerLowLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="0" Minimum="{StaticResource _24VPOWER_LOW_MIN}" FormatString="N1"
|
||||
Maximum="{StaticResource _24VPOWER_LOW_MAX}" ClipValueToMinMax="True" Value="{Binding _24VPowerLow}"
|
||||
AutomationProperties.AutomationId="_24VPowerLowDoubleUpDown"
|
||||
BorderBrush="{Binding ToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding ToleranceValid, Converter={StaticResource BooleanToBorderThickness}}" />
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension _24VPowerHigh}" Grid.Row="1"
|
||||
AutomationProperties.AutomationId="_24VPowerHighLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="1" FormatString="N1" Minimum="{StaticResource _24VPOWER_HIGH_MIN}" Maximum="{StaticResource _24VPOWER_HIGH_MAX}"
|
||||
ClipValueToMinMax="True" Value="{Binding _24VPowerHigh}"
|
||||
AutomationProperties.AutomationId="_24VPowerHighDoubleUpDown"
|
||||
BorderBrush="{Binding ToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding ToleranceValid, Converter={StaticResource BooleanToBorderThickness}}"/>
|
||||
|
||||
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension IEPERangeLowLimit}" Grid.Row="2" AutomationProperties.AutomationId="RangeLowLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="2" Minimum="{StaticResource IEPE_RANGE_LOW_MIN}" FormatString="N1"
|
||||
Maximum="{StaticResource IEPE_RANGE_LOW_MAX}" ClipValueToMinMax="True" Value="{Binding RangeLowLimitScalar}"
|
||||
AutomationProperties.AutomationId="IEPELowDoubleUpDown"
|
||||
BorderBrush="{Binding RangeToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding RangeToleranceValid, Converter={StaticResource BooleanToBorderThickness}}" />
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension IEPERangeHighLimit}" Grid.Row="3"
|
||||
AutomationProperties.AutomationId="RangeHighLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="3" FormatString="N1" Minimum="{StaticResource IEPE_RANGE_HIGH_MIN}" Maximum="{StaticResource IEPE_RANGE_HIGH_MAX}"
|
||||
ClipValueToMinMax="True" Value="{Binding RangeHighLimitScalar}"
|
||||
AutomationProperties.AutomationId="IEPEHighDoubleUpDown"
|
||||
BorderBrush="{Binding RangeToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding RangeToleranceValid, Converter={StaticResource BooleanToBorderThickness}}"/>
|
||||
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension DisableAutoSense}" Grid.Row="4" AutomationProperties.AutomationId="AutoSenseLabel" />
|
||||
<CheckBox Grid.Column="1" IsChecked="{Binding DisableAutoSense}" Grid.Row="4" AutomationProperties.AutomationId="DisableAutoSenseCheckBox" />
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension SensorCalibrationPolicies}" DataContext="{Binding SensorCalibrationDefaults}" AutomationProperties.AutomationId="SensorCalibrationsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension UseSensorFirstUseDate}" AutomationProperties.AutomationId="SensorFirstUseLabel" />
|
||||
<CheckBox Grid.Column="1" IsChecked="{Binding UseSensorFirstUseDate}" AutomationProperties.AutomationId="SensorFirstUseCheckBox" />
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension Policy}" Grid.Row="1 "/>
|
||||
<ComboBox Grid.Column="1" ItemsSource="{Binding AvailableSensorCalPolicies, Mode=OneWay}" SelectedItem="{Binding SelectedCalPolicy}"
|
||||
AutomationProperties.AutomationId="SensorCalPolicyComboBox" Grid.Row="1"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension WarningPeriod}" Grid.Row="2" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="2" FormatString="N0" Minimum="1" Maximum="36500" ClipValueToMinMax="True" Value="{Binding WarningPeriod}"
|
||||
AutomationProperties.AutomationId="WarningPeriodDoubleUpDown" Increment="1"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="3" Text="{strings:TranslateExtension SensorSettings_DontAllowDataCollectionIfOverused}" AutomationProperties.AutomationId="SensorOveruseLabel" />
|
||||
<CheckBox Grid.Column="1" Grid.Row="3" IsChecked="{Binding DontAllowDataCollectionIfOverused}" IsEnabled="{Binding SensorAssemblyEnabled}" AutomationProperties.AutomationId="SensorOveruseCheckBox" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="4" Visibility ="{Binding DontAllowDataCollectionIfOverused, Converter={StaticResource BoolToVisConverter}}" Text="{strings:TranslateExtension SensorSettings_UsageRemainingForWarning}" AutomationProperties.AutomationId="UsageRemainingTxtBlock"/>
|
||||
<TextBox Grid.Column="1" Grid.Row="4" Visibility ="{Binding DontAllowDataCollectionIfOverused, Converter={StaticResource BoolToVisConverter}}" Text="{Binding UsageRemainingForWarning}" MinWidth="50" MaxWidth="50" HorizontalAlignment="Left" AutomationProperties.AutomationId="UsageRemainingTxtBx"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="5" Visibility ="{Binding DontAllowDataCollectionIfOverused, Converter={StaticResource BoolToVisConverter}}" Text="{strings:TranslateExtension SensorSettings_DefaultMaxUsageAllowed}" AutomationProperties.AutomationId="MaxUsageAllowedTxtBlock"/>
|
||||
<TextBox Grid.Column="1" Grid.Row="5" Visibility ="{Binding DontAllowDataCollectionIfOverused, Converter={StaticResource BoolToVisConverter}}" Text="{Binding DefaultMaxUsageAllowed}" MinWidth="50" MaxWidth="50" HorizontalAlignment="Left" AutomationProperties.AutomationId="MaxUsageAllowedTxtBx"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="6" Text="{strings:TranslateExtension SensorSettings_AllowInspectBeforeUse}" />
|
||||
<CheckBox Grid.Column="1" Grid.Row="6" IsChecked="{Binding AllowInspectBeforeUse}" IsEnabled="{Binding AllowInspectBeforeUseEnabled}" AutomationProperties.AutomationId="chk_AllowInspectBeforeUse" />
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension AnalogSettings}" DataContext="{Binding AnalogDefaults}" AutomationProperties.AutomationId="AnalogSettingsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension DefineDefaultFilter}" />
|
||||
<ComboBox Grid.Column="1" DisplayMemberPath="FilterName" LostFocus="CbFilterOption_LostFocus" x:Name="cbFilterOption" ItemsSource="{Binding FilterOptions}" SelectedItem="{Binding SelectedFilterOption, Mode=TwoWay}"
|
||||
AutomationProperties.AutomationId="SensorCalPolicyComboBox" IsEditable="True" IsReadOnly="False" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{strings:TranslateExtension UseMeasuredExcitation}" />
|
||||
<CheckBox Grid.Column="1" Grid.Row="1" IsChecked="{Binding UseMeasuredExcitation}" AutomationProperties.AutomationId="chk_UseMeasuredExcitationFlag"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="{strings:TranslateExtension TrackDiagnostics}" />
|
||||
<CheckBox Grid.Column="1" Grid.Row="2" IsChecked="{Binding TrackAnalogDiagnostics}" AutomationProperties.AutomationId="chk_TrackAnalogDiagnostics"
|
||||
IsEnabled="{Binding TrackAnalogDiagnosticsEnabled}"/>
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension UartSettings}" DataContext="{Binding UartIODefaults}" AutomationProperties.AutomationId="UartSettingsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="0" Text="{strings:TranslateExtension BaudRate}" AutomationProperties.AutomationId="UARTBaudRateLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="0" FormatString="N0" Increment="1" Minimum="110" Maximum="3000000"
|
||||
ClipValueToMinMax="True" Value="{Binding BaudRate}"
|
||||
AutomationProperties.AutomationId="UARTDataBits"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{strings:TranslateExtension DataBits}" AutomationProperties.AutomationId="UARTDataBitsLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="1" FormatString="N0" Increment="1" Minimum="{StaticResource UART_DATA_BITS_MIN}" Maximum="{StaticResource UART_DATA_BITS_MAX}"
|
||||
ClipValueToMinMax="True" Value="{Binding DataBits}"
|
||||
AutomationProperties.AutomationId="UARTDataBits"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="{strings:TranslateExtension StopBits}" AutomationProperties.AutomationId="UARTStopBitsLabel"/>
|
||||
<ComboBox Grid.Column="1" Grid.Row="2" SelectedItem="{Binding StopBits}" ItemsSource="{Binding AvailableStopBits}" AutomationProperties.AutomationId="UARTStopBits" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="3" Text="{strings:TranslateExtension Parity}" AutomationProperties.AutomationId="UARTParityLabel"/>
|
||||
<ComboBox Grid.Column="1" Grid.Row="3" SelectedItem="{Binding Parity}" ItemsSource="{Binding AvailableParities}" AutomationProperties.AutomationId="UARTParity" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="4" Text="{strings:TranslateExtension DataFormat}" AutomationProperties.AutomationId="UARTDataFormatLabel"/>
|
||||
<ComboBox Grid.Column="1" Grid.Row="4" SelectedItem="{Binding DataFormat}" ItemsSource="{Binding AvailableDataFormats}" AutomationProperties.AutomationId="UARTDataFormat" HorizontalAlignment="Left" />
|
||||
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension StreamOutputSettings}" DataContext="{Binding StreamOutputSettings}" AutomationProperties.AutomationId="StreamOutputSettingsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{strings:TranslateExtension UDPProfile}" AutomationProperties.AutomationId="UDPProfileLabel" />
|
||||
<ComboBox Grid.Column="1" Grid.Row="1" SelectedItem="{Binding Profile}" ItemsSource="{Binding AvailableStreamOutUDPProfiles}" AutomationProperties.AutomationId="StreamOutProfile" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="{strings:TranslateExtension UDPAddress}" AutomationProperties.AutomationId="UDPAddressLabel" />
|
||||
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding UDPAddress}" AutomationProperties.AutomationId="StreamOutUDPAddress"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="3" Text="{strings:TranslateExtension TimeChannelId}" AutomationProperties.AutomationId="TimeChannelIdLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="3" FormatString="N0" Increment="1" Minimum="0" Maximum="100"
|
||||
ClipValueToMinMax="True" Value="{Binding TimeChannelId}"
|
||||
AutomationProperties.AutomationId="StreamOutTimeChannelId"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="4" Text="{strings:TranslateExtension DataChannelId}" AutomationProperties.AutomationId="DataChannelIdLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="4" FormatString="N0" Increment="1" Minimum="0" Maximum="100"
|
||||
ClipValueToMinMax="True" Value="{Binding DataChannelId}"
|
||||
AutomationProperties.AutomationId="StreamOutDataChannelId"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="5" Text="{strings:TranslateExtension TmNSConfig}" AutomationProperties.AutomationId="TmNSConfigLabel" />
|
||||
<TextBox Grid.Column="1" Grid.Row="5" Text="{Binding TmNSConfig}" AutomationProperties.AutomationId="StreamOutTmNSConfig"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="6" Text="{strings:TranslateExtension IRIGTimeDataPacketIntervalMs}" AutomationProperties.AutomationId="IRIGTimeDataPacketIntervalMsLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="6" FormatString="N0" Increment="1" Minimum="0" Maximum="100"
|
||||
ClipValueToMinMax="True" Value="{Binding IRIGTimeDataPacketIntervalMs}"
|
||||
AutomationProperties.AutomationId="StreamOutIRIGTimeDataPacketIntervalMs"/>
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension CanSettings}" DataContext="{Binding CanIODefaults}" AutomationProperties.AutomationId="CanSettingsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="0" Text="{strings:TranslateExtension ArbBaseBitrate}" AutomationProperties.AutomationId="CANArbBaseBitrateLabel" />
|
||||
<ComboBox Grid.Column="1" Grid.Row="0" SelectedItem="{Binding ArbBaseBitrate}" ItemsSource="{Binding AvailableArbBaseBitrates}" AutomationProperties.AutomationId="CANArbBaseBitrateItems" HorizontalAlignment="Left" />
|
||||
</Grid>
|
||||
</Expander>
|
||||
</StackPanel>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="SensorSettingsModule.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<SensorSettingsModule.Properties.Settings>
|
||||
</SensorSettingsModule.Properties.Settings>
|
||||
</userSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||
@@ -0,0 +1,31 @@
|
||||
using DTS.Common.Events.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors.SensorSettingsModule;
|
||||
using Prism.Ioc;
|
||||
using Prism.Events;
|
||||
using System.Windows;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace SensorSettingsModule
|
||||
{
|
||||
public partial class SensorSettingsView : ISensorSettingsView
|
||||
{
|
||||
private IEventAggregator _eventAggregator;
|
||||
|
||||
public SensorSettingsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
_eventAggregator = ContainerLocator.Container.Resolve<IEventAggregator>();
|
||||
}
|
||||
//FB 13120 Identify the AdHoc filter to get saved later on if it's not already saved to db
|
||||
private double freq;
|
||||
private void CbFilterOption_LostFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var filter = cbFilterOption.Text;
|
||||
if (double.TryParse(filter, out freq))
|
||||
{
|
||||
_eventAggregator.GetEvent<SensorSavedEvent>().Publish(freq);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
using System;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DTS.Common;
|
||||
using DTS.Common.Interface;
|
||||
using DTS.Common.Interface.Sensors.SensorSettingsModule;
|
||||
using Prism.Modularity;
|
||||
using Unity;
|
||||
using SensorSettingsModule;
|
||||
using Prism.Ioc;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable RedundantAttributeUsageProperty
|
||||
// ReSharper disable UnusedParameter.Local
|
||||
|
||||
[assembly: SensorSettingsModuleModuleName]
|
||||
[assembly: SensorSettingsModuleModuleImageAttribute]
|
||||
namespace SensorSettingsModule
|
||||
{
|
||||
[Export(typeof(IModule))]
|
||||
[Module(ModuleName = "SensorSettingsModule")]
|
||||
public class SensorSettingsModuleModule : IModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Injected unity container
|
||||
/// </summary>
|
||||
private readonly IUnityContainer _unityContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SensorSettingsModuleModule"/> class.
|
||||
/// </summary>
|
||||
/// <param name="unityContainer">Obtained reference of the unity container by using dependency injection.</param>
|
||||
public SensorSettingsModuleModule(IUnityContainer unityContainer)
|
||||
{
|
||||
|
||||
_unityContainer = unityContainer;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// Register View & View-Model with Unity dependency injection container as a singleton.
|
||||
_unityContainer.RegisterType<ISensorSettingsView, SensorSettingsView>();
|
||||
_unityContainer.RegisterType<ISensorSettingsViewModel, SensorSettingsViewModel>();
|
||||
}
|
||||
|
||||
public void OnInitialized(IContainerProvider containerProvider)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attribute class contains assembly name
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
|
||||
public class SensorSettingsModuleModuleNameAttribute : TextAttribute
|
||||
{
|
||||
public SensorSettingsModuleModuleNameAttribute() : this(null) { }
|
||||
|
||||
public SensorSettingsModuleModuleNameAttribute(string s)
|
||||
{
|
||||
AssemblyName = AssemblyNames.SensorSettingsModule.ToString();
|
||||
}
|
||||
|
||||
public override string AssemblyName { get; }
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(TextAttribute);
|
||||
}
|
||||
|
||||
public override string GetAssemblyName()
|
||||
{
|
||||
return AssemblyName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attribute class contains assembly image and name - used on the Main screen to SummaryModule available components
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
|
||||
public class SensorSettingsModuleModuleImageAttribute : ImageAttribute
|
||||
{
|
||||
private BitmapImage _img;
|
||||
|
||||
public SensorSettingsModuleModuleImageAttribute() : this(null) { }
|
||||
public override BitmapImage AssemblyImage
|
||||
{
|
||||
get { _img = AssemblyInfo.GetImage(AssemblyNames.SensorSettingsModule.ToString()); return _img; }
|
||||
}
|
||||
public SensorSettingsModuleModuleImageAttribute(string s)
|
||||
{
|
||||
_img = AssemblyInfo.GetImage(AssemblyNames.SensorSettingsModule.ToString());
|
||||
}
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(ImageAttribute);
|
||||
}
|
||||
public override BitmapImage GetAssemblyImage()
|
||||
{
|
||||
return AssemblyImage;
|
||||
}
|
||||
private string _name;
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { _name = AssemblyNames.SensorSettingsModule.ToString(); return _name; }
|
||||
}
|
||||
|
||||
public override string GetAssemblyName()
|
||||
{
|
||||
return AssemblyName;
|
||||
}
|
||||
private string _group;
|
||||
public override string AssemblyGroup
|
||||
{
|
||||
get { _group = eAssemblyGroups.Administrative.ToString(); return _group; }
|
||||
}
|
||||
|
||||
public override string GetAssemblyGroup()
|
||||
{
|
||||
return AssemblyGroup;
|
||||
}
|
||||
|
||||
private eAssemblyRegion _region;
|
||||
public override eAssemblyRegion AssemblyRegion
|
||||
{
|
||||
get { _region = eAssemblyRegion.SensorSettingsModuleRegion; return _region; }
|
||||
}
|
||||
public override eAssemblyRegion GetAssemblyRegion()
|
||||
{
|
||||
return AssemblyRegion;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,531 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SensorSettingsModule.Resources {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class StringResources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal StringResources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SensorSettingsModule.Resources.StringResources", typeof(StringResources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 24V Power high (V).
|
||||
/// </summary>
|
||||
internal static string _24VPowerHigh {
|
||||
get {
|
||||
return ResourceManager.GetString("_24VPowerHigh", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 24V Power low (V).
|
||||
/// </summary>
|
||||
internal static string _24VPowerLow {
|
||||
get {
|
||||
return ResourceManager.GetString("_24VPowerLow", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Analog defaults.
|
||||
/// </summary>
|
||||
internal static string AnalogSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Baud rate.
|
||||
/// </summary>
|
||||
internal static string BaudRate {
|
||||
get {
|
||||
return ResourceManager.GetString("BaudRate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Constant current breakpoint (ADC).
|
||||
/// </summary>
|
||||
internal static string ConstantCurrentBreakPoint {
|
||||
get {
|
||||
return ResourceManager.GetString("ConstantCurrentBreakPoint", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Current (A).
|
||||
/// </summary>
|
||||
internal static string Current {
|
||||
get {
|
||||
return ResourceManager.GetString("Current", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data bits.
|
||||
/// </summary>
|
||||
internal static string DataBits {
|
||||
get {
|
||||
return ResourceManager.GetString("DataBits", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data channel id.
|
||||
/// </summary>
|
||||
internal static string DataChannelId {
|
||||
get {
|
||||
return ResourceManager.GetString("DataChannelId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data format.
|
||||
/// </summary>
|
||||
internal static string DataFormat {
|
||||
get {
|
||||
return ResourceManager.GetString("DataFormat", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Define Default Filter.
|
||||
/// </summary>
|
||||
internal static string DefineDefaultFilter {
|
||||
get {
|
||||
return ResourceManager.GetString("DefineDefaultFilter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delay (ms).
|
||||
/// </summary>
|
||||
internal static string Delay {
|
||||
get {
|
||||
return ResourceManager.GetString("Delay", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Digital input defaults.
|
||||
/// </summary>
|
||||
internal static string DigitalInputSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalInputSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Digital output defaults.
|
||||
/// </summary>
|
||||
internal static string DigitalOutDefaults {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutDefaults", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delay (ms).
|
||||
/// </summary>
|
||||
internal static string DigitalOutputDelayMS {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutputDelayMS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Duration (ms).
|
||||
/// </summary>
|
||||
internal static string DigitalOutputDuration {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutputDuration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Limit duration.
|
||||
/// </summary>
|
||||
internal static string DigitalOutputLimitDuration {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutputLimitDuration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Output mode.
|
||||
/// </summary>
|
||||
internal static string DigitalOutputMode {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutputMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Disable auto-sense.
|
||||
/// </summary>
|
||||
internal static string DisableAutoSense {
|
||||
get {
|
||||
return ResourceManager.GetString("DisableAutoSense", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Display SPD analog data.
|
||||
/// </summary>
|
||||
internal static string DisplaySPDADC {
|
||||
get {
|
||||
return ResourceManager.GetString("DisplaySPDADC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Duration (ms).
|
||||
/// </summary>
|
||||
internal static string Duration {
|
||||
get {
|
||||
return ResourceManager.GetString("Duration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Firing mode.
|
||||
/// </summary>
|
||||
internal static string FiringMode {
|
||||
get {
|
||||
return ResourceManager.GetString("FiringMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flow control.
|
||||
/// </summary>
|
||||
internal static string FlowControl {
|
||||
get {
|
||||
return ResourceManager.GetString("FlowControl", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to High tolerance (Ω).
|
||||
/// </summary>
|
||||
internal static string HighTolerance {
|
||||
get {
|
||||
return ResourceManager.GetString("HighTolerance", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to IEPE defaults.
|
||||
/// </summary>
|
||||
internal static string IEPEDefaults {
|
||||
get {
|
||||
return ResourceManager.GetString("IEPEDefaults", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Actual range high limit (x full scale).
|
||||
/// </summary>
|
||||
internal static string IEPERangeHighLimit {
|
||||
get {
|
||||
return ResourceManager.GetString("IEPERangeHighLimit", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Actual range low limit (x full scale).
|
||||
/// </summary>
|
||||
internal static string IEPERangeLowLimit {
|
||||
get {
|
||||
return ResourceManager.GetString("IEPERangeLowLimit", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Time packet interval (ms).
|
||||
/// </summary>
|
||||
internal static string IRIGTimeDataPacketIntervalMs {
|
||||
get {
|
||||
return ResourceManager.GetString("IRIGTimeDataPacketIntervalMs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Limit duration.
|
||||
/// </summary>
|
||||
internal static string LimitDuration {
|
||||
get {
|
||||
return ResourceManager.GetString("LimitDuration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Low tolerance (Ω).
|
||||
/// </summary>
|
||||
internal static string LowTolerance {
|
||||
get {
|
||||
return ResourceManager.GetString("LowTolerance", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Output mode.
|
||||
/// </summary>
|
||||
internal static string OutputMode {
|
||||
get {
|
||||
return ResourceManager.GetString("OutputMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Parity.
|
||||
/// </summary>
|
||||
internal static string Parity {
|
||||
get {
|
||||
return ResourceManager.GetString("Parity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Policy.
|
||||
/// </summary>
|
||||
internal static string Policy {
|
||||
get {
|
||||
return ResourceManager.GetString("Policy", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor calibration policies.
|
||||
/// </summary>
|
||||
internal static string SensorCalibrationPolicies {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorCalibrationPolicies", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Inspect before use.
|
||||
/// </summary>
|
||||
internal static string SensorSettings_AllowInspectBeforeUse {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorSettings_AllowInspectBeforeUse", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Default maximum uses allowed.
|
||||
/// </summary>
|
||||
internal static string SensorSettings_DefaultMaxUsageAllowed {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorSettings_DefaultMaxUsageAllowed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Do not allow data collection if sensor is overused.
|
||||
/// </summary>
|
||||
internal static string SensorSettings_DontAllowDataCollectionIfOverused {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorSettings_DontAllowDataCollectionIfOverused", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Warn when number of uses remaining.
|
||||
/// </summary>
|
||||
internal static string SensorSettings_UsageRemainingForWarning {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorSettings_UsageRemainingForWarning", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Squib defaults.
|
||||
/// </summary>
|
||||
internal static string SquibDefaults {
|
||||
get {
|
||||
return ResourceManager.GetString("SquibDefaults", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stop bits.
|
||||
/// </summary>
|
||||
internal static string StopBits {
|
||||
get {
|
||||
return ResourceManager.GetString("StopBits", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream input defaults.
|
||||
/// </summary>
|
||||
internal static string StreamInputSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamInputSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream output defaults.
|
||||
/// </summary>
|
||||
internal static string StreamOutputSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutputSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Time channel id.
|
||||
/// </summary>
|
||||
internal static string TimeChannelId {
|
||||
get {
|
||||
return ResourceManager.GetString("TimeChannelId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to TmNS config.
|
||||
/// </summary>
|
||||
internal static string TmNSConfig {
|
||||
get {
|
||||
return ResourceManager.GetString("TmNSConfig", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Track diagnostics.
|
||||
/// </summary>
|
||||
internal static string TrackDiagnostics {
|
||||
get {
|
||||
return ResourceManager.GetString("TrackDiagnostics", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UART defaults.
|
||||
/// </summary>
|
||||
internal static string UartSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("UartSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UDP Address.
|
||||
/// </summary>
|
||||
internal static string UDPAddress {
|
||||
get {
|
||||
return ResourceManager.GetString("UDPAddress", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream Profile.
|
||||
/// </summary>
|
||||
internal static string UDPProfile {
|
||||
get {
|
||||
return ResourceManager.GetString("UDPProfile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use advanced streaming profiles.
|
||||
/// </summary>
|
||||
internal static string UseAdvancedUDPStreamProfiles {
|
||||
get {
|
||||
return ResourceManager.GetString("UseAdvancedUDPStreamProfiles", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use Measured Excitation to scale EU data.
|
||||
/// </summary>
|
||||
internal static string UseMeasuredExcitation {
|
||||
get {
|
||||
return ResourceManager.GetString("UseMeasuredExcitation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Calibration interval starts after sensor's first use.
|
||||
/// </summary>
|
||||
internal static string UseSensorFirstUseDate {
|
||||
get {
|
||||
return ResourceManager.GetString("UseSensorFirstUseDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Voltage input breakpoint (ADC).
|
||||
/// </summary>
|
||||
internal static string VoltageInputBreakpoint {
|
||||
get {
|
||||
return ResourceManager.GetString("VoltageInputBreakpoint", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Warning period (days).
|
||||
/// </summary>
|
||||
internal static string WarningPeriod {
|
||||
get {
|
||||
return ResourceManager.GetString("WarningPeriod", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="SensorSettingsModule.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,549 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SensorSettingsModule.Resources {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class StringResources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal StringResources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SensorSettingsModule.Resources.StringResources", typeof(StringResources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 24V Power high (V).
|
||||
/// </summary>
|
||||
internal static string _24VPowerHigh {
|
||||
get {
|
||||
return ResourceManager.GetString("_24VPowerHigh", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 24V Power low (V).
|
||||
/// </summary>
|
||||
internal static string _24VPowerLow {
|
||||
get {
|
||||
return ResourceManager.GetString("_24VPowerLow", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Analog defaults.
|
||||
/// </summary>
|
||||
internal static string AnalogSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Arb/Base Bitrate.
|
||||
/// </summary>
|
||||
internal static string ArbBaseBitrate {
|
||||
get {
|
||||
return ResourceManager.GetString("ArbBaseBitrate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Baud rate.
|
||||
/// </summary>
|
||||
internal static string BaudRate {
|
||||
get {
|
||||
return ResourceManager.GetString("BaudRate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to CAN defaults.
|
||||
/// </summary>
|
||||
internal static string CanSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("CanSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Constant current breakpoint (ADC).
|
||||
/// </summary>
|
||||
internal static string ConstantCurrentBreakPoint {
|
||||
get {
|
||||
return ResourceManager.GetString("ConstantCurrentBreakPoint", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Current (A).
|
||||
/// </summary>
|
||||
internal static string Current {
|
||||
get {
|
||||
return ResourceManager.GetString("Current", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data bits.
|
||||
/// </summary>
|
||||
internal static string DataBits {
|
||||
get {
|
||||
return ResourceManager.GetString("DataBits", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data channel id.
|
||||
/// </summary>
|
||||
internal static string DataChannelId {
|
||||
get {
|
||||
return ResourceManager.GetString("DataChannelId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data format.
|
||||
/// </summary>
|
||||
internal static string DataFormat {
|
||||
get {
|
||||
return ResourceManager.GetString("DataFormat", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Define Default Filter.
|
||||
/// </summary>
|
||||
internal static string DefineDefaultFilter {
|
||||
get {
|
||||
return ResourceManager.GetString("DefineDefaultFilter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delay (ms).
|
||||
/// </summary>
|
||||
internal static string Delay {
|
||||
get {
|
||||
return ResourceManager.GetString("Delay", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Digital input defaults.
|
||||
/// </summary>
|
||||
internal static string DigitalInputSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalInputSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Digital output defaults.
|
||||
/// </summary>
|
||||
internal static string DigitalOutDefaults {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutDefaults", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delay (ms).
|
||||
/// </summary>
|
||||
internal static string DigitalOutputDelayMS {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutputDelayMS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Duration (ms).
|
||||
/// </summary>
|
||||
internal static string DigitalOutputDuration {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutputDuration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Limit duration.
|
||||
/// </summary>
|
||||
internal static string DigitalOutputLimitDuration {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutputLimitDuration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Output mode.
|
||||
/// </summary>
|
||||
internal static string DigitalOutputMode {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutputMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Disable auto-sense.
|
||||
/// </summary>
|
||||
internal static string DisableAutoSense {
|
||||
get {
|
||||
return ResourceManager.GetString("DisableAutoSense", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Display SPD analog data.
|
||||
/// </summary>
|
||||
internal static string DisplaySPDADC {
|
||||
get {
|
||||
return ResourceManager.GetString("DisplaySPDADC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Duration (ms).
|
||||
/// </summary>
|
||||
internal static string Duration {
|
||||
get {
|
||||
return ResourceManager.GetString("Duration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Firing mode.
|
||||
/// </summary>
|
||||
internal static string FiringMode {
|
||||
get {
|
||||
return ResourceManager.GetString("FiringMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flow control.
|
||||
/// </summary>
|
||||
internal static string FlowControl {
|
||||
get {
|
||||
return ResourceManager.GetString("FlowControl", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to High tolerance (Ω).
|
||||
/// </summary>
|
||||
internal static string HighTolerance {
|
||||
get {
|
||||
return ResourceManager.GetString("HighTolerance", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to IEPE defaults.
|
||||
/// </summary>
|
||||
internal static string IEPEDefaults {
|
||||
get {
|
||||
return ResourceManager.GetString("IEPEDefaults", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Actual range high limit (x full scale).
|
||||
/// </summary>
|
||||
internal static string IEPERangeHighLimit {
|
||||
get {
|
||||
return ResourceManager.GetString("IEPERangeHighLimit", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Actual range low limit (x full scale).
|
||||
/// </summary>
|
||||
internal static string IEPERangeLowLimit {
|
||||
get {
|
||||
return ResourceManager.GetString("IEPERangeLowLimit", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Time packet interval (ms).
|
||||
/// </summary>
|
||||
internal static string IRIGTimeDataPacketIntervalMs {
|
||||
get {
|
||||
return ResourceManager.GetString("IRIGTimeDataPacketIntervalMs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Limit duration.
|
||||
/// </summary>
|
||||
internal static string LimitDuration {
|
||||
get {
|
||||
return ResourceManager.GetString("LimitDuration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Low tolerance (Ω).
|
||||
/// </summary>
|
||||
internal static string LowTolerance {
|
||||
get {
|
||||
return ResourceManager.GetString("LowTolerance", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Output mode.
|
||||
/// </summary>
|
||||
internal static string OutputMode {
|
||||
get {
|
||||
return ResourceManager.GetString("OutputMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Parity.
|
||||
/// </summary>
|
||||
internal static string Parity {
|
||||
get {
|
||||
return ResourceManager.GetString("Parity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Policy.
|
||||
/// </summary>
|
||||
internal static string Policy {
|
||||
get {
|
||||
return ResourceManager.GetString("Policy", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor calibration policies.
|
||||
/// </summary>
|
||||
internal static string SensorCalibrationPolicies {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorCalibrationPolicies", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Inspect before use.
|
||||
/// </summary>
|
||||
internal static string SensorSettings_AllowInspectBeforeUse {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorSettings_AllowInspectBeforeUse", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Default maximum uses allowed.
|
||||
/// </summary>
|
||||
internal static string SensorSettings_DefaultMaxUsageAllowed {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorSettings_DefaultMaxUsageAllowed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Do not allow data collection if sensor is overused.
|
||||
/// </summary>
|
||||
internal static string SensorSettings_DontAllowDataCollectionIfOverused {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorSettings_DontAllowDataCollectionIfOverused", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Warn when number of uses remaining.
|
||||
/// </summary>
|
||||
internal static string SensorSettings_UsageRemainingForWarning {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorSettings_UsageRemainingForWarning", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Squib defaults.
|
||||
/// </summary>
|
||||
internal static string SquibDefaults {
|
||||
get {
|
||||
return ResourceManager.GetString("SquibDefaults", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stop bits.
|
||||
/// </summary>
|
||||
internal static string StopBits {
|
||||
get {
|
||||
return ResourceManager.GetString("StopBits", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream input defaults.
|
||||
/// </summary>
|
||||
internal static string StreamInputSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamInputSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream output defaults.
|
||||
/// </summary>
|
||||
internal static string StreamOutputSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutputSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Time channel id.
|
||||
/// </summary>
|
||||
internal static string TimeChannelId {
|
||||
get {
|
||||
return ResourceManager.GetString("TimeChannelId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to TmNS config.
|
||||
/// </summary>
|
||||
internal static string TmNSConfig {
|
||||
get {
|
||||
return ResourceManager.GetString("TmNSConfig", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Track diagnostics.
|
||||
/// </summary>
|
||||
internal static string TrackDiagnostics {
|
||||
get {
|
||||
return ResourceManager.GetString("TrackDiagnostics", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UART defaults.
|
||||
/// </summary>
|
||||
internal static string UartSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("UartSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UDP Address.
|
||||
/// </summary>
|
||||
internal static string UDPAddress {
|
||||
get {
|
||||
return ResourceManager.GetString("UDPAddress", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream Profile.
|
||||
/// </summary>
|
||||
internal static string UDPProfile {
|
||||
get {
|
||||
return ResourceManager.GetString("UDPProfile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use advanced streaming profiles.
|
||||
/// </summary>
|
||||
internal static string UseAdvancedUDPStreamProfiles {
|
||||
get {
|
||||
return ResourceManager.GetString("UseAdvancedUDPStreamProfiles", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use Measured Excitation to scale EU data.
|
||||
/// </summary>
|
||||
internal static string UseMeasuredExcitation {
|
||||
get {
|
||||
return ResourceManager.GetString("UseMeasuredExcitation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Calibration interval starts after sensor's first use.
|
||||
/// </summary>
|
||||
internal static string UseSensorFirstUseDate {
|
||||
get {
|
||||
return ResourceManager.GetString("UseSensorFirstUseDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Voltage input breakpoint (ADC).
|
||||
/// </summary>
|
||||
internal static string VoltageInputBreakpoint {
|
||||
get {
|
||||
return ResourceManager.GetString("VoltageInputBreakpoint", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Warning period (days).
|
||||
/// </summary>
|
||||
internal static string WarningPeriod {
|
||||
get {
|
||||
return ResourceManager.GetString("WarningPeriod", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,352 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Threading.Tasks;
|
||||
using DTS.Common.Events;
|
||||
using Prism.Events;
|
||||
using Prism.Regions;
|
||||
using Unity;
|
||||
using DTS.Common.Interactivity;
|
||||
using DTS.Common.Interface.Sensors.SensorSettingsModule;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Storage;
|
||||
using System.Linq;
|
||||
using DTS.Common.Classes.Groups.ChannelSettings;
|
||||
using Prism.Ioc;
|
||||
using DTS.SensorDB;
|
||||
//using SensorSettingsModule.Model;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace SensorSettingsModule
|
||||
{
|
||||
/// <summary>
|
||||
/// this class handles SensorSettingsViewModel functionality
|
||||
/// </summary>
|
||||
[PartCreationPolicy(CreationPolicy.Shared)]
|
||||
public class SensorSettingsViewModel : ISensorSettingsViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The SensorSettings view
|
||||
/// </summary>
|
||||
public ISensorSettingsView View { get; set; }
|
||||
|
||||
public IDigitalInputDefaults DigitalInputDefaults { get; set; }
|
||||
public ISquibSettingDefaults SquibSettings { get; set; }
|
||||
public IDigitalOutDefaults DigitalOutSettings { get; set; }
|
||||
public IIEPESensorDefaults IEPESensorDefaults { get; set; }
|
||||
public ICalibrationPolicy SensorCalibrationDefaults { get; set; }
|
||||
public IAnalogDefaults AnalogDefaults { get; set; }
|
||||
public IUartSettingDefaults UartIODefaults { get; set; }
|
||||
public IStreamOutputSettingDefaults StreamOutputSettings { get; set; }
|
||||
|
||||
private IEventAggregator _eventAggregator { get; }
|
||||
private IRegionManager _regionManager;
|
||||
private IUnityContainer UnityContainer { get; }
|
||||
|
||||
public InteractionRequest<Notification> NotificationRequest { get; }
|
||||
public InteractionRequest<Confirmation> ConfirmationRequest { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Occurs when a property value changes.
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
public void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
#region constructors and initializers
|
||||
/// <summary>
|
||||
/// Creates a new instance of the SensorSettingsViewModel
|
||||
/// </summary>
|
||||
/// <param name="view"></param>
|
||||
/// <param name="regionManager">The logical placeholder defined within the application's UI (in the shell or within views) into which views are displayed.</param>
|
||||
/// <param name="eventAggregator">The EventAggregator which allows different components to publish/subscribe to events without being coupled to each other.</param>
|
||||
/// <param name="unityContainer">The unityContainer.</param>
|
||||
public SensorSettingsViewModel(ISensorSettingsView view, IRegionManager regionManager,
|
||||
IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||||
{
|
||||
View = view;
|
||||
View.DataContext = this;
|
||||
|
||||
NotificationRequest = new InteractionRequest<Notification>();
|
||||
ConfirmationRequest = new InteractionRequest<Confirmation>();
|
||||
|
||||
_eventAggregator = eventAggregator;
|
||||
UnityContainer = unityContainer;
|
||||
_regionManager = regionManager;
|
||||
_eventAggregator.GetEvent<RaiseNotification>().Subscribe(OnRaiseNotification);
|
||||
_eventAggregator.GetEvent<BusyIndicatorChangeNotification>()
|
||||
.Subscribe(OnBusyIndicatorNotification, ThreadOption.PublisherThread, true);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
public void OnSetActive()
|
||||
{
|
||||
SquibSettings = SquibSettingDefaults.GetSquibSettingsDefault(User);
|
||||
OnPropertyChanged("SquibSettings");
|
||||
DigitalOutSettings = DigitalOutputDefaults.GetDigitalOutDefault(User);
|
||||
OnPropertyChanged("DigitalOutSettings");
|
||||
IEPESensorDefaults = IEPESensorDefault.GetIEPESensorDefaults(User);
|
||||
OnPropertyChanged("IEPESensorDefaults");
|
||||
SensorCalibrationDefaults = CalibrationPolicy.GetCalibrationPolicy();
|
||||
OnPropertyChanged("SensorCalibrationDefaults");
|
||||
DigitalInputDefaults = DigitalInputSensorDefault.GetDigitalInputDefaults(User);
|
||||
OnPropertyChanged("DigitalInputDefaults");
|
||||
AnalogDefaults = AnalogSettingDefaults.GetAnalogDefaults();
|
||||
OnPropertyChanged("AnalogDefaults");
|
||||
UartIODefaults = UartSettingDefaults.GetUartSettingsDefault(UserID);
|
||||
OnPropertyChanged("UartIODefaults");
|
||||
StreamOutputSettings = StreamOutputSettingDefaults.GetStreamOutputSettingsDefault(UserID);
|
||||
OnPropertyChanged("StreamOutputSettings");
|
||||
}
|
||||
|
||||
public void Unset()
|
||||
{
|
||||
//FB 13120 needs to validate and save settings when change the tab
|
||||
ValidateAndSave();
|
||||
}
|
||||
|
||||
public void Cleanup()
|
||||
{
|
||||
}
|
||||
|
||||
public Task CleanupAsync()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
}
|
||||
|
||||
public void Initialize(object parameter)
|
||||
{
|
||||
}
|
||||
|
||||
public void Initialize(object parameter, object model)
|
||||
{
|
||||
}
|
||||
|
||||
public Task InitializeAsync()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public Task InitializeAsync(object parameter)
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public void Activated()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Private Event handler for RaiseNotification event.
|
||||
/// </summary>
|
||||
private void OnBusyIndicatorNotification(bool eventArg)
|
||||
{
|
||||
IsBusy = eventArg;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Private Event handler for RaiseNotification event.
|
||||
/// </summary>
|
||||
private void OnRaiseNotification(NotificationContentEventArgs eventArgsWithTitle)
|
||||
{
|
||||
// The NotificationRequest.Raise triggers the Invoke() method of the PopupWindowAction object to show the NotificationWindow window
|
||||
// Notification object expects a NotificationContentEventArgsWithoutTitle object and a Title string.
|
||||
var eventArgsWithoutTitle = new NotificationContentEventArgs(eventArgsWithTitle.Message, "",
|
||||
eventArgsWithTitle.Image, string.Empty);
|
||||
|
||||
NotificationRequest.Raise(new Notification
|
||||
{
|
||||
Content = eventArgsWithoutTitle,
|
||||
Title = eventArgsWithTitle.Title
|
||||
});
|
||||
}
|
||||
|
||||
public void RestoreOriginalSettings()
|
||||
{
|
||||
AnalogSettingDefaults.RestoreDefaults(AnalogDefaults);
|
||||
|
||||
IEPESensorDefault.RestoreDefaults(IEPESensorDefaults);
|
||||
IEPESensorDefault.Save(IEPESensorDefaults);
|
||||
|
||||
DigitalInputSensorDefault.RestoreDefaults(DigitalInputDefaults);
|
||||
DigitalInputSensorDefault.Save(DigitalInputDefaults);
|
||||
UartSettingDefaults.RestoreDefaults(UartIODefaults);
|
||||
UartSettingDefaults.CommitChange((UartSettingDefaults)UartIODefaults, UserID);
|
||||
OnPropertyChanged("UartIODefaults");
|
||||
StreamOutputSettingDefaults.RestoreDefaults(StreamOutputSettings);
|
||||
StreamOutputSettingDefaults.CommitChange((StreamOutputSettingDefaults)StreamOutputSettings, UserID);
|
||||
OnPropertyChanged("StreamOutputSettings");
|
||||
CalibrationPolicy.RestoreDefaults();
|
||||
SensorCalibrationDefaults = CalibrationPolicy.GetCalibrationPolicy();
|
||||
OnPropertyChanged("SensorCalibrationDefaults");
|
||||
}
|
||||
|
||||
private void InvalidateAllTestSetups()
|
||||
{
|
||||
using (var sql = DbOperations.GetSQLCommand())
|
||||
{
|
||||
sql.CommandType = System.Data.CommandType.Text;
|
||||
sql.CommandText = "UPDATE [TestSetups] SET [Dirty]=1, [Complete]=0";
|
||||
sql.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
|
||||
public bool ValidateAndSave()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!(SquibSettings is SquibSettingDefaults squib)) { return false; }
|
||||
if (!(DigitalOutSettings is DigitalOutputDefaults dout)) { return false; }
|
||||
if (!(AnalogDefaults is AnalogSettingDefaults ad)) { return false; }
|
||||
if (!(UartIODefaults is UartSettingDefaults ud)) { return false; }
|
||||
if (!(StreamOutputSettings is StreamOutputSettingDefaults sout)) { return false; }
|
||||
|
||||
bool bValid = true;
|
||||
if (UartIODefaults.Validate())
|
||||
{
|
||||
DTS.SensorDB.UartSettingDefaults.CommitChange(ud, UserID);
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
if (StreamOutputSettings.Validate())
|
||||
{
|
||||
DTS.SensorDB.StreamOutputSettingDefaults.CommitChange(sout, UserID);
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
if (IEPESensorDefaults.Validate())
|
||||
{
|
||||
IEPESensorDefault.Save(IEPESensorDefaults);
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
|
||||
if (DigitalInputDefaults.Validate())
|
||||
{
|
||||
DigitalInputSensorDefault.Save(DigitalInputDefaults);
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
// FB 13120 Validate and save the default filter class settings
|
||||
if (AnalogDefaults.Validate())
|
||||
{
|
||||
AnalogDefaults.Save();
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
|
||||
var original = CalibrationPolicy.GetCalibrationPolicy();
|
||||
if (original.SelectedCalPolicy != SensorCalibrationDefaults.SelectedCalPolicy
|
||||
|| original.WarningPeriod != SensorCalibrationDefaults.WarningPeriod
|
||||
|| original.UseSensorFirstUseDate != SensorCalibrationDefaults.UseSensorFirstUseDate
|
||||
|| original.DontAllowDataCollectionIfOverused != SensorCalibrationDefaults.DontAllowDataCollectionIfOverused
|
||||
|| original.UsageRemainingForWarning != SensorCalibrationDefaults.UsageRemainingForWarning
|
||||
|| original.DefaultMaxUsageAllowed != SensorCalibrationDefaults.DefaultMaxUsageAllowed
|
||||
|| original.AllowInspectBeforeUse != SensorCalibrationDefaults.AllowInspectBeforeUse)
|
||||
{
|
||||
CalibrationPolicy.WriteCalibrationPolicyToDb(SensorCalibrationDefaults);
|
||||
InvalidateAllTestSetups();
|
||||
}
|
||||
|
||||
if (SquibSettings.Validate())
|
||||
{
|
||||
var defaults = DbOperations.GetChannelSettingDefaults();
|
||||
var lookup = defaults.ToDictionary(d => d.SettingName);
|
||||
|
||||
lookup[ChannelSettingBase.SQMODE].IntValue = (int)squib.FireModeDefault;
|
||||
lookup[ChannelSettingBase.SQUIB_DELAY].DoubleValue = squib.FireDelayMS;
|
||||
lookup[ChannelSettingBase.SQUIB_DURATION].DoubleValue = squib.FireDurationMS;
|
||||
lookup[ChannelSettingBase.SQUIB_LIMIT_DURATION].BoolValue = squib.LimitDurationDefault;
|
||||
lookup[ChannelSettingBase.SQUIB_CURRENT].DoubleValue = squib.OutputCurrentDefault;
|
||||
SquibSettingDefaults.CommitChange(squib, User);
|
||||
DbOperations.SaveChannelSettingDefaults(new[] {
|
||||
lookup[ChannelSettingBase.SQMODE], lookup[ChannelSettingBase.SQUIB_DELAY],
|
||||
lookup[ChannelSettingBase.SQUIB_DURATION], lookup[ChannelSettingBase.SQUIB_LIMIT_DURATION],
|
||||
lookup[ChannelSettingBase.SQUIB_CURRENT]});
|
||||
|
||||
lookup[ChannelSettingBase.OUTPUT_MODE].IntValue = (int)dout.OutputMode;
|
||||
lookup[ChannelSettingBase.DIGITALOUT_DELAY].DoubleValue = dout.DelayMS;
|
||||
lookup[ChannelSettingBase.DIGITALOUT_DURATION].DoubleValue = dout.DurationMS;
|
||||
lookup[ChannelSettingBase.DIGITALOUT_LIMIT_DURATION].BoolValue = dout.LimitDuration;
|
||||
DbOperations.SaveChannelSettingDefaults(new[] {
|
||||
lookup[ChannelSettingBase.OUTPUT_MODE], lookup[ChannelSettingBase.DIGITALOUT_LIMIT_DURATION],
|
||||
lookup[ChannelSettingBase.DIGITALOUT_DURATION], lookup[ChannelSettingBase.DIGITALOUT_DELAY] });
|
||||
|
||||
DigitalOutputDefaults.CommitChange(dout, User);
|
||||
return bValid;
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
var eventAggregator = ContainerLocator.Container.Resolve<IEventAggregator>();
|
||||
eventAggregator.GetEvent<PageErrorEvent>().Publish(new PageErrorArg(new[] { ex.Message }, null));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
public string User { get; set; }
|
||||
public int UserID { get; set; }
|
||||
public bool IsDirty => false;
|
||||
|
||||
private bool _isBusy;
|
||||
public bool IsBusy
|
||||
{
|
||||
get => _isBusy;
|
||||
set
|
||||
{
|
||||
_isBusy = value;
|
||||
OnPropertyChanged("IsBusy");
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isMenuIncluded;
|
||||
public bool IsMenuIncluded
|
||||
{
|
||||
get => _isMenuIncluded;
|
||||
set
|
||||
{
|
||||
_isMenuIncluded = value;
|
||||
OnPropertyChanged("IsMenuIncluded");
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isNavigationIncluded;
|
||||
public bool IsNavigationIncluded
|
||||
{
|
||||
get => _isNavigationIncluded;
|
||||
set
|
||||
{
|
||||
_isNavigationIncluded = value;
|
||||
OnPropertyChanged("IsNavigationIncluded");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Commands
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,367 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Threading.Tasks;
|
||||
using DTS.Common.Events;
|
||||
using Prism.Events;
|
||||
using Prism.Regions;
|
||||
using Unity;
|
||||
using DTS.Common.Interactivity;
|
||||
using DTS.Common.Interface.Sensors.SensorSettingsModule;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Storage;
|
||||
using System.Linq;
|
||||
using DTS.Common.Classes.Groups.ChannelSettings;
|
||||
using Prism.Ioc;
|
||||
using DTS.SensorDB;
|
||||
//using SensorSettingsModule.Model;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace SensorSettingsModule
|
||||
{
|
||||
/// <summary>
|
||||
/// this class handles SensorSettingsViewModel functionality
|
||||
/// </summary>
|
||||
[PartCreationPolicy(CreationPolicy.Shared)]
|
||||
public class SensorSettingsViewModel : ISensorSettingsViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The SensorSettings view
|
||||
/// </summary>
|
||||
public ISensorSettingsView View { get; set; }
|
||||
|
||||
public IDigitalInputDefaults DigitalInputDefaults { get; set; }
|
||||
public ISquibSettingDefaults SquibSettings { get; set; }
|
||||
public IDigitalOutDefaults DigitalOutSettings { get; set; }
|
||||
public IIEPESensorDefaults IEPESensorDefaults { get; set; }
|
||||
public ICalibrationPolicy SensorCalibrationDefaults { get; set; }
|
||||
public IAnalogDefaults AnalogDefaults { get; set; }
|
||||
public IUartSettingDefaults UartIODefaults { get; set; }
|
||||
public ICanSettingDefaults CanIODefaults { get; set; }
|
||||
public IStreamOutputSettingDefaults StreamOutputSettings { get; set; }
|
||||
|
||||
private IEventAggregator _eventAggregator { get; }
|
||||
private IRegionManager _regionManager;
|
||||
private IUnityContainer UnityContainer { get; }
|
||||
|
||||
public InteractionRequest<Notification> NotificationRequest { get; }
|
||||
public InteractionRequest<Confirmation> ConfirmationRequest { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Occurs when a property value changes.
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
public void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
#region constructors and initializers
|
||||
/// <summary>
|
||||
/// Creates a new instance of the SensorSettingsViewModel
|
||||
/// </summary>
|
||||
/// <param name="view"></param>
|
||||
/// <param name="regionManager">The logical placeholder defined within the application's UI (in the shell or within views) into which views are displayed.</param>
|
||||
/// <param name="eventAggregator">The EventAggregator which allows different components to publish/subscribe to events without being coupled to each other.</param>
|
||||
/// <param name="unityContainer">The unityContainer.</param>
|
||||
public SensorSettingsViewModel(ISensorSettingsView view, IRegionManager regionManager,
|
||||
IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||||
{
|
||||
View = view;
|
||||
View.DataContext = this;
|
||||
|
||||
NotificationRequest = new InteractionRequest<Notification>();
|
||||
ConfirmationRequest = new InteractionRequest<Confirmation>();
|
||||
|
||||
_eventAggregator = eventAggregator;
|
||||
UnityContainer = unityContainer;
|
||||
_regionManager = regionManager;
|
||||
_eventAggregator.GetEvent<RaiseNotification>().Subscribe(OnRaiseNotification);
|
||||
_eventAggregator.GetEvent<BusyIndicatorChangeNotification>()
|
||||
.Subscribe(OnBusyIndicatorNotification, ThreadOption.PublisherThread, true);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
public void OnSetActive()
|
||||
{
|
||||
SquibSettings = SquibSettingDefaults.GetSquibSettingsDefault(User);
|
||||
OnPropertyChanged("SquibSettings");
|
||||
DigitalOutSettings = DigitalOutputDefaults.GetDigitalOutDefault(User);
|
||||
OnPropertyChanged("DigitalOutSettings");
|
||||
IEPESensorDefaults = IEPESensorDefault.GetIEPESensorDefaults(User);
|
||||
OnPropertyChanged("IEPESensorDefaults");
|
||||
SensorCalibrationDefaults = CalibrationPolicy.GetCalibrationPolicy();
|
||||
OnPropertyChanged("SensorCalibrationDefaults");
|
||||
DigitalInputDefaults = DigitalInputSensorDefault.GetDigitalInputDefaults(User);
|
||||
OnPropertyChanged("DigitalInputDefaults");
|
||||
AnalogDefaults = AnalogSettingDefaults.GetAnalogDefaults();
|
||||
OnPropertyChanged("AnalogDefaults");
|
||||
UartIODefaults = UartSettingDefaults.GetUartSettingsDefault(UserID);
|
||||
OnPropertyChanged("UartIODefaults");
|
||||
StreamOutputSettings = StreamOutputSettingDefaults.GetStreamOutputSettingsDefault(UserID);
|
||||
OnPropertyChanged("StreamOutputSettings");
|
||||
CanIODefaults = CanSettingDefaults.GetCanSettingsDefault(UserID);
|
||||
OnPropertyChanged("CanIODefaults");
|
||||
}
|
||||
|
||||
public void Unset()
|
||||
{
|
||||
//FB 13120 needs to validate and save settings when change the tab
|
||||
ValidateAndSave();
|
||||
}
|
||||
|
||||
public void Cleanup()
|
||||
{
|
||||
}
|
||||
|
||||
public Task CleanupAsync()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
}
|
||||
|
||||
public void Initialize(object parameter)
|
||||
{
|
||||
}
|
||||
|
||||
public void Initialize(object parameter, object model)
|
||||
{
|
||||
}
|
||||
|
||||
public Task InitializeAsync()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public Task InitializeAsync(object parameter)
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public void Activated()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Private Event handler for RaiseNotification event.
|
||||
/// </summary>
|
||||
private void OnBusyIndicatorNotification(bool eventArg)
|
||||
{
|
||||
IsBusy = eventArg;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Private Event handler for RaiseNotification event.
|
||||
/// </summary>
|
||||
private void OnRaiseNotification(NotificationContentEventArgs eventArgsWithTitle)
|
||||
{
|
||||
// The NotificationRequest.Raise triggers the Invoke() method of the PopupWindowAction object to show the NotificationWindow window
|
||||
// Notification object expects a NotificationContentEventArgsWithoutTitle object and a Title string.
|
||||
var eventArgsWithoutTitle = new NotificationContentEventArgs(eventArgsWithTitle.Message, "",
|
||||
eventArgsWithTitle.Image, string.Empty);
|
||||
|
||||
NotificationRequest.Raise(new Notification
|
||||
{
|
||||
Content = eventArgsWithoutTitle,
|
||||
Title = eventArgsWithTitle.Title
|
||||
});
|
||||
}
|
||||
|
||||
public void RestoreOriginalSettings()
|
||||
{
|
||||
AnalogSettingDefaults.RestoreDefaults(AnalogDefaults);
|
||||
|
||||
IEPESensorDefault.RestoreDefaults(IEPESensorDefaults);
|
||||
IEPESensorDefault.Save(IEPESensorDefaults);
|
||||
|
||||
DigitalInputSensorDefault.RestoreDefaults(DigitalInputDefaults);
|
||||
DigitalInputSensorDefault.Save(DigitalInputDefaults);
|
||||
UartSettingDefaults.RestoreDefaults(UartIODefaults);
|
||||
UartSettingDefaults.CommitChange((UartSettingDefaults)UartIODefaults, UserID);
|
||||
OnPropertyChanged("UartIODefaults");
|
||||
StreamOutputSettingDefaults.RestoreDefaults(StreamOutputSettings);
|
||||
StreamOutputSettingDefaults.CommitChange((StreamOutputSettingDefaults)StreamOutputSettings, UserID);
|
||||
OnPropertyChanged("StreamOutputSettings");
|
||||
CanSettingDefaults.RestoreDefaults(CanIODefaults);
|
||||
CanSettingDefaults.CommitChange((CanSettingDefaults)CanIODefaults, UserID);
|
||||
OnPropertyChanged("CanIODefaults");
|
||||
CalibrationPolicy.RestoreDefaults();
|
||||
SensorCalibrationDefaults = CalibrationPolicy.GetCalibrationPolicy();
|
||||
OnPropertyChanged("SensorCalibrationDefaults");
|
||||
}
|
||||
|
||||
private void InvalidateAllTestSetups()
|
||||
{
|
||||
using (var sql = DbOperations.GetSQLCommand())
|
||||
{
|
||||
sql.CommandType = System.Data.CommandType.Text;
|
||||
sql.CommandText = "UPDATE [TestSetups] SET [Dirty]=1, [Complete]=0";
|
||||
sql.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
|
||||
public bool ValidateAndSave()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!(SquibSettings is SquibSettingDefaults squib)) { return false; }
|
||||
if (!(DigitalOutSettings is DigitalOutputDefaults dout)) { return false; }
|
||||
if (!(AnalogDefaults is AnalogSettingDefaults ad)) { return false; }
|
||||
if (!(UartIODefaults is UartSettingDefaults ud)) { return false; }
|
||||
if (!(StreamOutputSettings is StreamOutputSettingDefaults sout)) { return false; }
|
||||
if (!(CanIODefaults is CanSettingDefaults cd)) { return false; }
|
||||
|
||||
bool bValid = true;
|
||||
if (UartIODefaults.Validate())
|
||||
{
|
||||
DTS.SensorDB.UartSettingDefaults.CommitChange(ud, UserID);
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
if (StreamOutputSettings.Validate())
|
||||
{
|
||||
DTS.SensorDB.StreamOutputSettingDefaults.CommitChange(sout, UserID);
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
if (CanIODefaults.Validate())
|
||||
{
|
||||
CanSettingDefaults.CommitChange(cd, UserID);
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
if (IEPESensorDefaults.Validate())
|
||||
{
|
||||
IEPESensorDefault.Save(IEPESensorDefaults);
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
|
||||
if (DigitalInputDefaults.Validate())
|
||||
{
|
||||
DigitalInputSensorDefault.Save(DigitalInputDefaults);
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
// FB 13120 Validate and save the default filter class settings
|
||||
if (AnalogDefaults.Validate())
|
||||
{
|
||||
AnalogDefaults.Save();
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
|
||||
var original = CalibrationPolicy.GetCalibrationPolicy();
|
||||
if (original.SelectedCalPolicy != SensorCalibrationDefaults.SelectedCalPolicy
|
||||
|| original.WarningPeriod != SensorCalibrationDefaults.WarningPeriod
|
||||
|| original.UseSensorFirstUseDate != SensorCalibrationDefaults.UseSensorFirstUseDate
|
||||
|| original.DontAllowDataCollectionIfOverused != SensorCalibrationDefaults.DontAllowDataCollectionIfOverused
|
||||
|| original.UsageRemainingForWarning != SensorCalibrationDefaults.UsageRemainingForWarning
|
||||
|| original.DefaultMaxUsageAllowed != SensorCalibrationDefaults.DefaultMaxUsageAllowed
|
||||
|| original.AllowInspectBeforeUse != SensorCalibrationDefaults.AllowInspectBeforeUse)
|
||||
{
|
||||
CalibrationPolicy.WriteCalibrationPolicyToDb(SensorCalibrationDefaults);
|
||||
InvalidateAllTestSetups();
|
||||
}
|
||||
|
||||
if (SquibSettings.Validate())
|
||||
{
|
||||
var defaults = DbOperations.GetChannelSettingDefaults();
|
||||
var lookup = defaults.ToDictionary(d => d.SettingName);
|
||||
|
||||
lookup[ChannelSettingBase.SQMODE].IntValue = (int)squib.FireModeDefault;
|
||||
lookup[ChannelSettingBase.SQUIB_DELAY].DoubleValue = squib.FireDelayMS;
|
||||
lookup[ChannelSettingBase.SQUIB_DURATION].DoubleValue = squib.FireDurationMS;
|
||||
lookup[ChannelSettingBase.SQUIB_LIMIT_DURATION].BoolValue = squib.LimitDurationDefault;
|
||||
lookup[ChannelSettingBase.SQUIB_CURRENT].DoubleValue = squib.OutputCurrentDefault;
|
||||
SquibSettingDefaults.CommitChange(squib, User);
|
||||
DbOperations.SaveChannelSettingDefaults(new[] {
|
||||
lookup[ChannelSettingBase.SQMODE], lookup[ChannelSettingBase.SQUIB_DELAY],
|
||||
lookup[ChannelSettingBase.SQUIB_DURATION], lookup[ChannelSettingBase.SQUIB_LIMIT_DURATION],
|
||||
lookup[ChannelSettingBase.SQUIB_CURRENT]});
|
||||
|
||||
lookup[ChannelSettingBase.OUTPUT_MODE].IntValue = (int)dout.OutputMode;
|
||||
lookup[ChannelSettingBase.DIGITALOUT_DELAY].DoubleValue = dout.DelayMS;
|
||||
lookup[ChannelSettingBase.DIGITALOUT_DURATION].DoubleValue = dout.DurationMS;
|
||||
lookup[ChannelSettingBase.DIGITALOUT_LIMIT_DURATION].BoolValue = dout.LimitDuration;
|
||||
DbOperations.SaveChannelSettingDefaults(new[] {
|
||||
lookup[ChannelSettingBase.OUTPUT_MODE], lookup[ChannelSettingBase.DIGITALOUT_LIMIT_DURATION],
|
||||
lookup[ChannelSettingBase.DIGITALOUT_DURATION], lookup[ChannelSettingBase.DIGITALOUT_DELAY] });
|
||||
|
||||
DigitalOutputDefaults.CommitChange(dout, User);
|
||||
return bValid;
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
var eventAggregator = ContainerLocator.Container.Resolve<IEventAggregator>();
|
||||
eventAggregator.GetEvent<PageErrorEvent>().Publish(new PageErrorArg(new[] { ex.Message }, null));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
public string User { get; set; }
|
||||
public int UserID { get; set; }
|
||||
public bool IsDirty => false;
|
||||
|
||||
private bool _isBusy;
|
||||
public bool IsBusy
|
||||
{
|
||||
get => _isBusy;
|
||||
set
|
||||
{
|
||||
_isBusy = value;
|
||||
OnPropertyChanged("IsBusy");
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isMenuIncluded;
|
||||
public bool IsMenuIncluded
|
||||
{
|
||||
get => _isMenuIncluded;
|
||||
set
|
||||
{
|
||||
_isMenuIncluded = value;
|
||||
OnPropertyChanged("IsMenuIncluded");
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isNavigationIncluded;
|
||||
public bool IsNavigationIncluded
|
||||
{
|
||||
get => _isNavigationIncluded;
|
||||
set
|
||||
{
|
||||
_isNavigationIncluded = value;
|
||||
OnPropertyChanged("IsNavigationIncluded");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Commands
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("SensorSettingsModule")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("DTS")]
|
||||
[assembly: AssemblyProduct("SensorSettingsModule")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("32dfec83-bdc6-4d9c-be01-be5441e3d8e6")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,175 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{B6AD76AB-A081-4951-92E2-AD9A5215B245}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SensorSettingsModule</RootNamespace>
|
||||
<AssemblyName>SensorSettingsModule</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<RunCodeAnalysis>false</RunCodeAnalysis>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="Microsoft.Xaml.Behaviors">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Microsoft.Xaml.Behaviors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="Prism">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Unity.Wpf">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.Unity.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Wpf">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Unity.Abstractions">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Unity.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Container">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Unity.Container.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="Xceed.Wpf.Toolkit">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\Xceed.Wpf.Toolkit\Xceed.Wpf.Toolkit.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SensorSettingsModule.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\StringResources.Designer.cs">
|
||||
<DependentUpon>StringResources.resx</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Resources\TranslateExtension.cs" />
|
||||
<Compile Include="ViewModel\SensorSettingsViewModel.cs" />
|
||||
<Compile Include="View\SensorSettingsView.xaml.cs">
|
||||
<DependentUpon>SensorSettingsView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\StringResources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>StringResources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
<CustomToolNamespace>SensorSettingsModule.Resources</CustomToolNamespace>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Core\DTS.Common.Core.csproj">
|
||||
<Project>{fab1f470-1574-4301-b56e-d3364aa93679}</Project>
|
||||
<Name>DTS.Common.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.SettingsDB\DTS.Common.Settings.csproj">
|
||||
<Project>{61017104-D8EE-41D1-B9CA-DAD863FF78B2}</Project>
|
||||
<Name>DTS.Common.Settings</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Storage\DTS.Common.Storage.csproj">
|
||||
<Project>{e0d1a7d0-dce8-403d-ba85-5a5d66ba1313}</Project>
|
||||
<Name>DTS.Common.Storage</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Utilities\DTS.Common.Utilities.csproj">
|
||||
<Project>{03eace47-ea59-44ac-b49d-956e4dc4d618}</Project>
|
||||
<Name>DTS.Common.Utilities</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common\DTS.Common.csproj">
|
||||
<Project>{114edc77-f3b5-4576-a91b-40818d503b55}</Project>
|
||||
<Name>DTS.Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\IService\IService.csproj">
|
||||
<Project>{c9c45b72-05a3-4962-bc13-a78b1f4b1925}</Project>
|
||||
<Name>IService</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\SensorDB\SensorDB.csproj">
|
||||
<Project>{444ef10c-046e-47ad-a9a5-17318d488723}</Project>
|
||||
<Name>SensorDB</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Users\Users.csproj">
|
||||
<Project>{be8d217d-6da9-4bca-b62a-a82325b33979}</Project>
|
||||
<Name>Users</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\SensorSettingsView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Model\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Windows.Markup;
|
||||
using SensorSettingsModule.Resources;
|
||||
|
||||
namespace SensorSettingsModule
|
||||
{
|
||||
[MarkupExtensionReturnType(typeof(string))]
|
||||
public class TranslateExtension : MarkupExtension
|
||||
{
|
||||
private readonly string _key;
|
||||
public TranslateExtension(string key) { _key = key; }
|
||||
|
||||
private const string NotFound = "#stringnotfound#";
|
||||
|
||||
public override object ProvideValue(IServiceProvider serviceProvider)
|
||||
{
|
||||
if (string.IsNullOrEmpty(_key)) { return NotFound; }
|
||||
return StringResources.ResourceManager.GetString(_key) ?? NotFound + " " + _key;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,323 @@
|
||||
<base:BaseView x:Class="SensorSettingsModule.SensorSettingsView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:strings="clr-namespace:SensorSettingsModule"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Controls/combobox.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Constant/XamlConstants.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<sys:Double x:Key="_24VPOWER_LOW_MAX">24</sys:Double>
|
||||
<sys:Double x:Key="_24VPOWER_LOW_MIN">0</sys:Double>
|
||||
<sys:Double x:Key="_24VPOWER_HIGH_MAX">30</sys:Double>
|
||||
<sys:Double x:Key="_24VPOWER_HIGH_MIN">0</sys:Double>
|
||||
<sys:Double x:Key="IEPE_RANGE_LOW_MIN">.1</sys:Double>
|
||||
<sys:Double x:Key="IEPE_RANGE_LOW_MAX">10</sys:Double>
|
||||
<sys:Double x:Key="IEPE_RANGE_HIGH_MIN">1</sys:Double>
|
||||
<sys:Double x:Key="IEPE_RANGE_HIGH_MAX">1000</sys:Double>
|
||||
<!-- most of the styles down to the converter were either already here or copied in when I was trying to fix a few style issues
|
||||
none of them are native to here so it's probably ok to wipe out down to the converters if the DTS.Common commonstyles has the
|
||||
right styles present
|
||||
-->
|
||||
<Style TargetType="xctk:DoubleUpDown" BasedOn="{StaticResource PageContentXCDoubleUpDown}">
|
||||
<Setter Property="Width" Value="150"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="FormatString" Value="N2"/>
|
||||
<Setter Property="Increment" Value="0.1"/>
|
||||
</Style>
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TTS_ListViewItemStyle}"/>
|
||||
</Style>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||||
<Style TargetType="ComboBox" BasedOn="{StaticResource FlatComboBoxStyle}">
|
||||
<Setter Property="Width" Value="450"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
</Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
<Style TargetType="Expander" BasedOn="{StaticResource SimpleExpanderTemp}">
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
||||
</Style>
|
||||
<!-- these are used for error decoration of Squib high/low tolerances -->
|
||||
<converters:BooleanToBorderThicknessConverter x:Key="BooleanToBorderThickness" />
|
||||
<converters:BooleanToColorConverter x:Key="BooleanToColor" />
|
||||
<!--<converters:BooleanToColorConverter x:Key="BooleanToWarningColor" WarningBrush="True" />-->
|
||||
<converters:BooleanToVisibilityConverter x:Key="BoolToVisConverter" /> <!-- used for Current Visability depending on squib fire mode-->
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<!-- I originally tried DynamicGrid here, but it had weird column sizing, I believe it was missing some stuff from CommonStyles -->
|
||||
<StackPanel Background="{DynamicResource Brush_ApplicationContentBackground}" Orientation="Vertical">
|
||||
<Expander Header="{strings:TranslateExtension SquibDefaults}" DataContext="{Binding SquibSettings}" AutomationProperties.AutomationId="SQUIBDefaultsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension Delay}" Grid.Row="0" AutomationProperties.AutomationId="SQUIBDelayLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="0" Minimum="{StaticResource SQUIB_DELAY_MIN}"
|
||||
Maximum="{StaticResource SQUIB_DELAY_MAX}" ClipValueToMinMax="True" Value="{Binding FireDelayMS}"
|
||||
AutomationProperties.AutomationId="SQUIBDelay"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension LimitDuration}" Grid.Row="1" AutomationProperties.AutomationId="SQUIBLimitDurationLabel"/>
|
||||
<CheckBox Grid.Column="1" Grid.Row="1" Margin="0" IsChecked="{Binding LimitDurationDefault}" AutomationProperties.AutomationId="SQUIBLimitDuration" HorizontalAlignment="Left"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension Duration}" Grid.Row="2"
|
||||
Visibility="{Binding LimitDurationDefault, Converter={StaticResource BoolToVisConverter}}" AutomationProperties.AutomationId="SQUIBDurationLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="2" FormatString="N1" Minimum="{StaticResource SQUIB_DURATION_MIN}" Maximum="{StaticResource SQUIB_DURATION_MAX}"
|
||||
ClipValueToMinMax="True" Value="{Binding FireDurationMS}"
|
||||
Visibility="{Binding LimitDurationDefault, Converter={StaticResource BoolToVisConverter}}"
|
||||
AutomationProperties.AutomationId="SQUIBDuration"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension LowTolerance}" Grid.Row="3" AutomationProperties.AutomationId="SQUIBLowToleranceLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="3" FormatString="N1" Minimum="{StaticResource SQUIB_TOLERANCE_LOW}"
|
||||
Maximum="{StaticResource SQUIB_TOLERANCE_HIGH}" Value="{Binding ToleranceLowDefault}"
|
||||
BorderBrush="{Binding ToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding ToleranceValid, Converter={StaticResource BooleanToBorderThickness}}" AutomationProperties.AutomationId="SQUIBLowTolerance"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension HighTolerance}" Grid.Row="4" AutomationProperties.AutomationId="SQUIBHighToleranceLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="4" FormatString="N1" Minimum="{StaticResource SQUIB_TOLERANCE_LOW}"
|
||||
Maximum="{StaticResource SQUIB_TOLERANCE_HIGH}" Value="{Binding ToleranceHighDefault}"
|
||||
BorderBrush="{Binding ToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding ToleranceValid, Converter={StaticResource BooleanToBorderThickness}}" AutomationProperties.AutomationId="SQUIBHighTolerance"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension FiringMode}" Grid.Row="5" AutomationProperties.AutomationId="SQUIBFiringModeLabel"/>
|
||||
<ComboBox Grid.Column="1" Grid.Row="5" SelectedItem="{Binding FireModeDefault}" ItemsSource="{Binding AvailableModes}" AutomationProperties.AutomationId="SQUIBFiringMode" HorizontalAlignment="Left"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension Current}" Grid.Row="6" Visibility="{Binding IsConstantCurrent, Converter={StaticResource BoolToVisConverter}}" AutomationProperties.AutomationId="SQUIBConstantCurrentabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="6" Minimum="{StaticResource SQUIB_CURRENT_LOW}" Maximum="{StaticResource SQUIB_CURRENT_HIGH}"
|
||||
Value="{Binding OutputCurrentDefault}" Visibility="{Binding IsConstantCurrent, Converter={StaticResource BoolToVisConverter}}"
|
||||
AutomationProperties.AutomationId="SQUIBConstantCurrent" />
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension DigitalOutDefaults}" DataContext="{Binding DigitalOutSettings}" AutomationProperties.AutomationId="DigitalOutExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="0" Text="{strings:TranslateExtension DigitalOutputMode}" AutomationProperties.AutomationId="DOUTModeLabel"/>
|
||||
<ComboBox Grid.Column="1" Grid.Row="0" SelectedItem="{Binding OutputMode}" ItemsSource="{Binding AvailableModes}" AutomationProperties.AutomationId="DOUTMode" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{strings:TranslateExtension DigitalOutputDelayMS}" AutomationProperties.AutomationId="DOUTDelayLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="1" Minimum="0" ClipValueToMinMax="True"
|
||||
Increment=".1" Value="{Binding DelayMS}" AutomationProperties.AutomationId="DOUTDelay"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="{strings:TranslateExtension DigitalOutputLimitDuration}" AutomationProperties.AutomationId="DOUTLimitDurationLabel"/>
|
||||
<CheckBox Grid.Column="1" Grid.Row="2" IsChecked="{Binding LimitDuration}" AutomationProperties.AutomationId="DOUTLimitDuration" HorizontalAlignment="Left"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="3" Text="{strings:TranslateExtension DigitalOutputDuration}"
|
||||
Visibility="{Binding LimitDuration, Converter={StaticResource BoolToVisConverter}}" AutomationProperties.AutomationId="DOUTDurationLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="3" Minimum="0" ClipValueToMinMax="True"
|
||||
Increment=".1" Value="{Binding DurationMS}" Visibility="{Binding LimitDuration, Converter={StaticResource BoolToVisConverter}}"
|
||||
AutomationProperties.AutomationId="DOUTDuration"/>
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension DigitalInputSettings}" DataContext="{Binding DigitalInputDefaults}" AutomationProperties.AutomationId="DigitalInputsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="0" Text="{strings:TranslateExtension ConstantCurrentBreakPoint}" />
|
||||
<!-- 16 bit signed -->
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="0" Minimum="-32768" Maximum="32767" ClipValueToMinMax="True"
|
||||
Increment="1" Value="{Binding ConstantCurrentBreakpointADC}" AutomationProperties.AutomationId="DIConstantCurrentBreakpoint"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{strings:TranslateExtension VoltageInputBreakpoint}" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="1" Minimum="-32768" Maximum="32767" ClipValueToMinMax="True"
|
||||
Increment="1" Value="{Binding VoltageBreakpointADC}" AutomationProperties.AutomationId="DIVoltageBreakpoint"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension DisplaySPDADC}" Grid.Row="2" />
|
||||
<CheckBox Grid.Column="1" Grid.Row="2" IsChecked="{Binding DisplaySPDADC}" />
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension IEPEDefaults}" DataContext="{Binding IEPESensorDefaults}" AutomationProperties.AutomationId="IEPEDefaultsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" /> <!-- Disable AutoSense -->
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension _24VPowerLow}" Grid.Row="0" AutomationProperties.AutomationId="_24VPowerLowLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="0" Minimum="{StaticResource _24VPOWER_LOW_MIN}" FormatString="N1"
|
||||
Maximum="{StaticResource _24VPOWER_LOW_MAX}" ClipValueToMinMax="True" Value="{Binding _24VPowerLow}"
|
||||
AutomationProperties.AutomationId="_24VPowerLowDoubleUpDown"
|
||||
BorderBrush="{Binding ToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding ToleranceValid, Converter={StaticResource BooleanToBorderThickness}}" />
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension _24VPowerHigh}" Grid.Row="1"
|
||||
AutomationProperties.AutomationId="_24VPowerHighLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="1" FormatString="N1" Minimum="{StaticResource _24VPOWER_HIGH_MIN}" Maximum="{StaticResource _24VPOWER_HIGH_MAX}"
|
||||
ClipValueToMinMax="True" Value="{Binding _24VPowerHigh}"
|
||||
AutomationProperties.AutomationId="_24VPowerHighDoubleUpDown"
|
||||
BorderBrush="{Binding ToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding ToleranceValid, Converter={StaticResource BooleanToBorderThickness}}"/>
|
||||
|
||||
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension IEPERangeLowLimit}" Grid.Row="2" AutomationProperties.AutomationId="RangeLowLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="2" Minimum="{StaticResource IEPE_RANGE_LOW_MIN}" FormatString="N1"
|
||||
Maximum="{StaticResource IEPE_RANGE_LOW_MAX}" ClipValueToMinMax="True" Value="{Binding RangeLowLimitScalar}"
|
||||
AutomationProperties.AutomationId="IEPELowDoubleUpDown"
|
||||
BorderBrush="{Binding RangeToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding RangeToleranceValid, Converter={StaticResource BooleanToBorderThickness}}" />
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension IEPERangeHighLimit}" Grid.Row="3"
|
||||
AutomationProperties.AutomationId="RangeHighLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="3" FormatString="N1" Minimum="{StaticResource IEPE_RANGE_HIGH_MIN}" Maximum="{StaticResource IEPE_RANGE_HIGH_MAX}"
|
||||
ClipValueToMinMax="True" Value="{Binding RangeHighLimitScalar}"
|
||||
AutomationProperties.AutomationId="IEPEHighDoubleUpDown"
|
||||
BorderBrush="{Binding RangeToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding RangeToleranceValid, Converter={StaticResource BooleanToBorderThickness}}"/>
|
||||
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension DisableAutoSense}" Grid.Row="4" AutomationProperties.AutomationId="AutoSenseLabel" />
|
||||
<CheckBox Grid.Column="1" IsChecked="{Binding DisableAutoSense}" Grid.Row="4" AutomationProperties.AutomationId="DisableAutoSenseCheckBox" />
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension SensorCalibrationPolicies}" DataContext="{Binding SensorCalibrationDefaults}" AutomationProperties.AutomationId="SensorCalibrationsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension UseSensorFirstUseDate}" AutomationProperties.AutomationId="SensorFirstUseLabel" />
|
||||
<CheckBox Grid.Column="1" IsChecked="{Binding UseSensorFirstUseDate}" AutomationProperties.AutomationId="SensorFirstUseCheckBox" />
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension Policy}" Grid.Row="1 "/>
|
||||
<ComboBox Grid.Column="1" ItemsSource="{Binding AvailableSensorCalPolicies, Mode=OneWay}" SelectedItem="{Binding SelectedCalPolicy}"
|
||||
AutomationProperties.AutomationId="SensorCalPolicyComboBox" Grid.Row="1"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension WarningPeriod}" Grid.Row="2" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="2" FormatString="N0" Minimum="1" Maximum="36500" ClipValueToMinMax="True" Value="{Binding WarningPeriod}"
|
||||
AutomationProperties.AutomationId="WarningPeriodDoubleUpDown" Increment="1"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="3" Text="{strings:TranslateExtension SensorSettings_DontAllowDataCollectionIfOverused}" AutomationProperties.AutomationId="SensorOveruseLabel" />
|
||||
<CheckBox Grid.Column="1" Grid.Row="3" IsChecked="{Binding DontAllowDataCollectionIfOverused}" IsEnabled="{Binding SensorAssemblyEnabled}" AutomationProperties.AutomationId="SensorOveruseCheckBox" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="4" Visibility ="{Binding DontAllowDataCollectionIfOverused, Converter={StaticResource BoolToVisConverter}}" Text="{strings:TranslateExtension SensorSettings_UsageRemainingForWarning}" AutomationProperties.AutomationId="UsageRemainingTxtBlock"/>
|
||||
<TextBox Grid.Column="1" Grid.Row="4" Visibility ="{Binding DontAllowDataCollectionIfOverused, Converter={StaticResource BoolToVisConverter}}" Text="{Binding UsageRemainingForWarning}" MinWidth="50" MaxWidth="50" HorizontalAlignment="Left" AutomationProperties.AutomationId="UsageRemainingTxtBx"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="5" Visibility ="{Binding DontAllowDataCollectionIfOverused, Converter={StaticResource BoolToVisConverter}}" Text="{strings:TranslateExtension SensorSettings_DefaultMaxUsageAllowed}" AutomationProperties.AutomationId="MaxUsageAllowedTxtBlock"/>
|
||||
<TextBox Grid.Column="1" Grid.Row="5" Visibility ="{Binding DontAllowDataCollectionIfOverused, Converter={StaticResource BoolToVisConverter}}" Text="{Binding DefaultMaxUsageAllowed}" MinWidth="50" MaxWidth="50" HorizontalAlignment="Left" AutomationProperties.AutomationId="MaxUsageAllowedTxtBx"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="6" Text="{strings:TranslateExtension SensorSettings_AllowInspectBeforeUse}" />
|
||||
<CheckBox Grid.Column="1" Grid.Row="6" IsChecked="{Binding AllowInspectBeforeUse}" IsEnabled="{Binding AllowInspectBeforeUseEnabled}" AutomationProperties.AutomationId="chk_AllowInspectBeforeUse" />
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension AnalogSettings}" DataContext="{Binding AnalogDefaults}" AutomationProperties.AutomationId="AnalogSettingsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension DefineDefaultFilter}" />
|
||||
<ComboBox Grid.Column="1" DisplayMemberPath="FilterName" LostFocus="CbFilterOption_LostFocus" x:Name="cbFilterOption" ItemsSource="{Binding FilterOptions}" SelectedItem="{Binding SelectedFilterOption, Mode=TwoWay}"
|
||||
AutomationProperties.AutomationId="SensorCalPolicyComboBox" IsEditable="True" IsReadOnly="False" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{strings:TranslateExtension UseMeasuredExcitation}" />
|
||||
<CheckBox Grid.Column="1" Grid.Row="1" IsChecked="{Binding UseMeasuredExcitation}" AutomationProperties.AutomationId="chk_UseMeasuredExcitationFlag"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="{strings:TranslateExtension TrackDiagnostics}" />
|
||||
<CheckBox Grid.Column="1" Grid.Row="2" IsChecked="{Binding TrackAnalogDiagnostics}" AutomationProperties.AutomationId="chk_TrackAnalogDiagnostics"
|
||||
IsEnabled="{Binding TrackAnalogDiagnosticsEnabled}"/>
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension UartSettings}" DataContext="{Binding UartIODefaults}" AutomationProperties.AutomationId="UartSettingsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="0" Text="{strings:TranslateExtension BaudRate}" AutomationProperties.AutomationId="UARTBaudRateLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="0" FormatString="N0" Increment="1" Minimum="110" Maximum="3000000"
|
||||
ClipValueToMinMax="True" Value="{Binding BaudRate}"
|
||||
AutomationProperties.AutomationId="UARTDataBits"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{strings:TranslateExtension DataBits}" AutomationProperties.AutomationId="UARTDataBitsLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="1" FormatString="N0" Increment="1" Minimum="{StaticResource UART_DATA_BITS_MIN}" Maximum="{StaticResource UART_DATA_BITS_MAX}"
|
||||
ClipValueToMinMax="True" Value="{Binding DataBits}"
|
||||
AutomationProperties.AutomationId="UARTDataBits"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="{strings:TranslateExtension StopBits}" AutomationProperties.AutomationId="UARTStopBitsLabel"/>
|
||||
<ComboBox Grid.Column="1" Grid.Row="2" SelectedItem="{Binding StopBits}" ItemsSource="{Binding AvailableStopBits}" AutomationProperties.AutomationId="UARTStopBits" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="3" Text="{strings:TranslateExtension Parity}" AutomationProperties.AutomationId="UARTParityLabel"/>
|
||||
<ComboBox Grid.Column="1" Grid.Row="3" SelectedItem="{Binding Parity}" ItemsSource="{Binding AvailableParities}" AutomationProperties.AutomationId="UARTParity" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="4" Text="{strings:TranslateExtension DataFormat}" AutomationProperties.AutomationId="UARTDataFormatLabel"/>
|
||||
<ComboBox Grid.Column="1" Grid.Row="4" SelectedItem="{Binding DataFormat}" ItemsSource="{Binding AvailableDataFormats}" AutomationProperties.AutomationId="UARTDataFormat" HorizontalAlignment="Left" />
|
||||
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension StreamOutputSettings}" DataContext="{Binding StreamOutputSettings}" AutomationProperties.AutomationId="StreamOutputSettingsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{strings:TranslateExtension UDPProfile}" AutomationProperties.AutomationId="UDPProfileLabel" />
|
||||
<ComboBox Grid.Column="1" Grid.Row="1" SelectedItem="{Binding Profile}" ItemsSource="{Binding AvailableStreamOutUDPProfiles}" AutomationProperties.AutomationId="StreamOutProfile" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="{strings:TranslateExtension UDPAddress}" AutomationProperties.AutomationId="UDPAddressLabel" />
|
||||
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding UDPAddress}" AutomationProperties.AutomationId="StreamOutUDPAddress"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="3" Text="{strings:TranslateExtension TimeChannelId}" AutomationProperties.AutomationId="TimeChannelIdLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="3" FormatString="N0" Increment="1" Minimum="0" Maximum="100"
|
||||
ClipValueToMinMax="True" Value="{Binding TimeChannelId}"
|
||||
AutomationProperties.AutomationId="StreamOutTimeChannelId"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="4" Text="{strings:TranslateExtension DataChannelId}" AutomationProperties.AutomationId="DataChannelIdLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="4" FormatString="N0" Increment="1" Minimum="0" Maximum="100"
|
||||
ClipValueToMinMax="True" Value="{Binding DataChannelId}"
|
||||
AutomationProperties.AutomationId="StreamOutDataChannelId"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="5" Text="{strings:TranslateExtension TmNSConfig}" AutomationProperties.AutomationId="TmNSConfigLabel" />
|
||||
<TextBox Grid.Column="1" Grid.Row="5" Text="{Binding TmNSConfig}" AutomationProperties.AutomationId="StreamOutTmNSConfig"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="6" Text="{strings:TranslateExtension IRIGTimeDataPacketIntervalMs}" AutomationProperties.AutomationId="IRIGTimeDataPacketIntervalMsLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="6" FormatString="N0" Increment="1" Minimum="0" Maximum="100"
|
||||
ClipValueToMinMax="True" Value="{Binding IRIGTimeDataPacketIntervalMs}"
|
||||
AutomationProperties.AutomationId="StreamOutIRIGTimeDataPacketIntervalMs"/>
|
||||
</Grid>
|
||||
</Expander>
|
||||
</StackPanel>
|
||||
</base:BaseView>
|
||||
BIN
DataPRO/Modules/SensorsList/SensorSettingsModule/.svn/wc.db
Normal file
BIN
DataPRO/Modules/SensorsList/SensorSettingsModule/.svn/wc.db
Normal file
Binary file not shown.
12
DataPRO/Modules/SensorsList/SensorSettingsModule/App.config
Normal file
12
DataPRO/Modules/SensorsList/SensorSettingsModule/App.config
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="SensorSettingsModule.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<SensorSettingsModule.Properties.Settings>
|
||||
</SensorSettingsModule.Properties.Settings>
|
||||
</userSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("SensorSettingsModule")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("DTS")]
|
||||
[assembly: AssemblyProduct("SensorSettingsModule")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("32dfec83-bdc6-4d9c-be01-be5441e3d8e6")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
26
DataPRO/Modules/SensorsList/SensorSettingsModule/Properties/Settings.Designer.cs
generated
Normal file
26
DataPRO/Modules/SensorsList/SensorSettingsModule/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SensorSettingsModule.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="SensorSettingsModule.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
549
DataPRO/Modules/SensorsList/SensorSettingsModule/Resources/StringResources.Designer.cs
generated
Normal file
549
DataPRO/Modules/SensorsList/SensorSettingsModule/Resources/StringResources.Designer.cs
generated
Normal file
@@ -0,0 +1,549 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SensorSettingsModule.Resources {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class StringResources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal StringResources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SensorSettingsModule.Resources.StringResources", typeof(StringResources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 24V Power high (V).
|
||||
/// </summary>
|
||||
internal static string _24VPowerHigh {
|
||||
get {
|
||||
return ResourceManager.GetString("_24VPowerHigh", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to 24V Power low (V).
|
||||
/// </summary>
|
||||
internal static string _24VPowerLow {
|
||||
get {
|
||||
return ResourceManager.GetString("_24VPowerLow", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Analog defaults.
|
||||
/// </summary>
|
||||
internal static string AnalogSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Arb/Base Bitrate.
|
||||
/// </summary>
|
||||
internal static string ArbBaseBitrate {
|
||||
get {
|
||||
return ResourceManager.GetString("ArbBaseBitrate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Baud rate.
|
||||
/// </summary>
|
||||
internal static string BaudRate {
|
||||
get {
|
||||
return ResourceManager.GetString("BaudRate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to CAN defaults.
|
||||
/// </summary>
|
||||
internal static string CanSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("CanSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Constant current breakpoint (ADC).
|
||||
/// </summary>
|
||||
internal static string ConstantCurrentBreakPoint {
|
||||
get {
|
||||
return ResourceManager.GetString("ConstantCurrentBreakPoint", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Current (A).
|
||||
/// </summary>
|
||||
internal static string Current {
|
||||
get {
|
||||
return ResourceManager.GetString("Current", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data bits.
|
||||
/// </summary>
|
||||
internal static string DataBits {
|
||||
get {
|
||||
return ResourceManager.GetString("DataBits", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data channel id.
|
||||
/// </summary>
|
||||
internal static string DataChannelId {
|
||||
get {
|
||||
return ResourceManager.GetString("DataChannelId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data format.
|
||||
/// </summary>
|
||||
internal static string DataFormat {
|
||||
get {
|
||||
return ResourceManager.GetString("DataFormat", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Define Default Filter.
|
||||
/// </summary>
|
||||
internal static string DefineDefaultFilter {
|
||||
get {
|
||||
return ResourceManager.GetString("DefineDefaultFilter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delay (ms).
|
||||
/// </summary>
|
||||
internal static string Delay {
|
||||
get {
|
||||
return ResourceManager.GetString("Delay", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Digital input defaults.
|
||||
/// </summary>
|
||||
internal static string DigitalInputSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalInputSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Digital output defaults.
|
||||
/// </summary>
|
||||
internal static string DigitalOutDefaults {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutDefaults", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delay (ms).
|
||||
/// </summary>
|
||||
internal static string DigitalOutputDelayMS {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutputDelayMS", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Duration (ms).
|
||||
/// </summary>
|
||||
internal static string DigitalOutputDuration {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutputDuration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Limit duration.
|
||||
/// </summary>
|
||||
internal static string DigitalOutputLimitDuration {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutputLimitDuration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Output mode.
|
||||
/// </summary>
|
||||
internal static string DigitalOutputMode {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutputMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Disable auto-sense.
|
||||
/// </summary>
|
||||
internal static string DisableAutoSense {
|
||||
get {
|
||||
return ResourceManager.GetString("DisableAutoSense", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Display SPD analog data.
|
||||
/// </summary>
|
||||
internal static string DisplaySPDADC {
|
||||
get {
|
||||
return ResourceManager.GetString("DisplaySPDADC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Duration (ms).
|
||||
/// </summary>
|
||||
internal static string Duration {
|
||||
get {
|
||||
return ResourceManager.GetString("Duration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Firing mode.
|
||||
/// </summary>
|
||||
internal static string FiringMode {
|
||||
get {
|
||||
return ResourceManager.GetString("FiringMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flow control.
|
||||
/// </summary>
|
||||
internal static string FlowControl {
|
||||
get {
|
||||
return ResourceManager.GetString("FlowControl", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to High tolerance (Ω).
|
||||
/// </summary>
|
||||
internal static string HighTolerance {
|
||||
get {
|
||||
return ResourceManager.GetString("HighTolerance", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to IEPE defaults.
|
||||
/// </summary>
|
||||
internal static string IEPEDefaults {
|
||||
get {
|
||||
return ResourceManager.GetString("IEPEDefaults", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Actual range high limit (x full scale).
|
||||
/// </summary>
|
||||
internal static string IEPERangeHighLimit {
|
||||
get {
|
||||
return ResourceManager.GetString("IEPERangeHighLimit", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Actual range low limit (x full scale).
|
||||
/// </summary>
|
||||
internal static string IEPERangeLowLimit {
|
||||
get {
|
||||
return ResourceManager.GetString("IEPERangeLowLimit", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Time packet interval (ms).
|
||||
/// </summary>
|
||||
internal static string IRIGTimeDataPacketIntervalMs {
|
||||
get {
|
||||
return ResourceManager.GetString("IRIGTimeDataPacketIntervalMs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Limit duration.
|
||||
/// </summary>
|
||||
internal static string LimitDuration {
|
||||
get {
|
||||
return ResourceManager.GetString("LimitDuration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Low tolerance (Ω).
|
||||
/// </summary>
|
||||
internal static string LowTolerance {
|
||||
get {
|
||||
return ResourceManager.GetString("LowTolerance", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Output mode.
|
||||
/// </summary>
|
||||
internal static string OutputMode {
|
||||
get {
|
||||
return ResourceManager.GetString("OutputMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Parity.
|
||||
/// </summary>
|
||||
internal static string Parity {
|
||||
get {
|
||||
return ResourceManager.GetString("Parity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Policy.
|
||||
/// </summary>
|
||||
internal static string Policy {
|
||||
get {
|
||||
return ResourceManager.GetString("Policy", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor calibration policies.
|
||||
/// </summary>
|
||||
internal static string SensorCalibrationPolicies {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorCalibrationPolicies", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Inspect before use.
|
||||
/// </summary>
|
||||
internal static string SensorSettings_AllowInspectBeforeUse {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorSettings_AllowInspectBeforeUse", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Default maximum uses allowed.
|
||||
/// </summary>
|
||||
internal static string SensorSettings_DefaultMaxUsageAllowed {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorSettings_DefaultMaxUsageAllowed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Do not allow data collection if sensor is overused.
|
||||
/// </summary>
|
||||
internal static string SensorSettings_DontAllowDataCollectionIfOverused {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorSettings_DontAllowDataCollectionIfOverused", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Warn when number of uses remaining.
|
||||
/// </summary>
|
||||
internal static string SensorSettings_UsageRemainingForWarning {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorSettings_UsageRemainingForWarning", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Squib defaults.
|
||||
/// </summary>
|
||||
internal static string SquibDefaults {
|
||||
get {
|
||||
return ResourceManager.GetString("SquibDefaults", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stop bits.
|
||||
/// </summary>
|
||||
internal static string StopBits {
|
||||
get {
|
||||
return ResourceManager.GetString("StopBits", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream input defaults.
|
||||
/// </summary>
|
||||
internal static string StreamInputSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamInputSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream output defaults.
|
||||
/// </summary>
|
||||
internal static string StreamOutputSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutputSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Time channel id.
|
||||
/// </summary>
|
||||
internal static string TimeChannelId {
|
||||
get {
|
||||
return ResourceManager.GetString("TimeChannelId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to TmNS config.
|
||||
/// </summary>
|
||||
internal static string TmNSConfig {
|
||||
get {
|
||||
return ResourceManager.GetString("TmNSConfig", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Track diagnostics.
|
||||
/// </summary>
|
||||
internal static string TrackDiagnostics {
|
||||
get {
|
||||
return ResourceManager.GetString("TrackDiagnostics", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UART defaults.
|
||||
/// </summary>
|
||||
internal static string UartSettings {
|
||||
get {
|
||||
return ResourceManager.GetString("UartSettings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UDP Address.
|
||||
/// </summary>
|
||||
internal static string UDPAddress {
|
||||
get {
|
||||
return ResourceManager.GetString("UDPAddress", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream Profile.
|
||||
/// </summary>
|
||||
internal static string UDPProfile {
|
||||
get {
|
||||
return ResourceManager.GetString("UDPProfile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use advanced streaming profiles.
|
||||
/// </summary>
|
||||
internal static string UseAdvancedUDPStreamProfiles {
|
||||
get {
|
||||
return ResourceManager.GetString("UseAdvancedUDPStreamProfiles", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use Measured Excitation to scale EU data.
|
||||
/// </summary>
|
||||
internal static string UseMeasuredExcitation {
|
||||
get {
|
||||
return ResourceManager.GetString("UseMeasuredExcitation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Calibration interval starts after sensor's first use.
|
||||
/// </summary>
|
||||
internal static string UseSensorFirstUseDate {
|
||||
get {
|
||||
return ResourceManager.GetString("UseSensorFirstUseDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Voltage input breakpoint (ADC).
|
||||
/// </summary>
|
||||
internal static string VoltageInputBreakpoint {
|
||||
get {
|
||||
return ResourceManager.GetString("VoltageInputBreakpoint", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Warning period (days).
|
||||
/// </summary>
|
||||
internal static string WarningPeriod {
|
||||
get {
|
||||
return ResourceManager.GetString("WarningPeriod", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,282 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ConstantCurrentBreakPoint" xml:space="preserve">
|
||||
<value>Constant current breakpoint (ADC)</value>
|
||||
</data>
|
||||
<data name="Current" xml:space="preserve">
|
||||
<value>Current (A)</value>
|
||||
</data>
|
||||
<data name="Delay" xml:space="preserve">
|
||||
<value>Delay (ms)</value>
|
||||
</data>
|
||||
<data name="DigitalInputSettings" xml:space="preserve">
|
||||
<value>Digital input defaults</value>
|
||||
</data>
|
||||
<data name="DigitalOutDefaults" xml:space="preserve">
|
||||
<value>Digital output defaults</value>
|
||||
</data>
|
||||
<data name="DigitalOutputDelayMS" xml:space="preserve">
|
||||
<value>Delay (ms)</value>
|
||||
</data>
|
||||
<data name="DigitalOutputDuration" xml:space="preserve">
|
||||
<value>Duration (ms)</value>
|
||||
</data>
|
||||
<data name="DigitalOutputLimitDuration" xml:space="preserve">
|
||||
<value>Limit duration</value>
|
||||
</data>
|
||||
<data name="DigitalOutputMode" xml:space="preserve">
|
||||
<value>Output mode</value>
|
||||
</data>
|
||||
<data name="DisplaySPDADC" xml:space="preserve">
|
||||
<value>Display SPD analog data</value>
|
||||
</data>
|
||||
<data name="DisableAutoSense" xml:space="preserve">
|
||||
<value>Disable auto-sense</value>
|
||||
</data>
|
||||
<data name="Duration" xml:space="preserve">
|
||||
<value>Duration (ms)</value>
|
||||
</data>
|
||||
<data name="FiringMode" xml:space="preserve">
|
||||
<value>Firing mode</value>
|
||||
</data>
|
||||
<data name="HighTolerance" xml:space="preserve">
|
||||
<value>High tolerance (Ω)</value>
|
||||
</data>
|
||||
<data name="IEPEDefaults" xml:space="preserve">
|
||||
<value>IEPE defaults</value>
|
||||
</data>
|
||||
<data name="IEPERangeHighLimit" xml:space="preserve">
|
||||
<value>Actual range high limit (x full scale)</value>
|
||||
</data>
|
||||
<data name="IEPERangeLowLimit" xml:space="preserve">
|
||||
<value>Actual range low limit (x full scale)</value>
|
||||
</data>
|
||||
<data name="LimitDuration" xml:space="preserve">
|
||||
<value>Limit duration</value>
|
||||
</data>
|
||||
<data name="LowTolerance" xml:space="preserve">
|
||||
<value>Low tolerance (Ω)</value>
|
||||
</data>
|
||||
<data name="OutputMode" xml:space="preserve">
|
||||
<value>Output mode</value>
|
||||
</data>
|
||||
<data name="Policy" xml:space="preserve">
|
||||
<value>Policy</value>
|
||||
</data>
|
||||
<data name="SensorCalibrationPolicies" xml:space="preserve">
|
||||
<value>Sensor calibration policies</value>
|
||||
</data>
|
||||
<data name="AnalogSettings" xml:space="preserve">
|
||||
<value>Analog defaults</value>
|
||||
</data>
|
||||
<data name="DefineDefaultFilter" xml:space="preserve">
|
||||
<value>Define Default Filter</value>
|
||||
</data>
|
||||
<data name="UseMeasuredExcitation" xml:space="preserve">
|
||||
<value>Use Measured Excitation to scale EU data</value>
|
||||
</data>
|
||||
<data name="SquibDefaults" xml:space="preserve">
|
||||
<value>Squib defaults</value>
|
||||
</data>
|
||||
<data name="VoltageInputBreakpoint" xml:space="preserve">
|
||||
<value>Voltage input breakpoint (ADC)</value>
|
||||
</data>
|
||||
<data name="WarningPeriod" xml:space="preserve">
|
||||
<value>Warning period (days)</value>
|
||||
</data>
|
||||
<data name="_24VPowerHigh" xml:space="preserve">
|
||||
<value>24V Power high (V)</value>
|
||||
</data>
|
||||
<data name="_24VPowerLow" xml:space="preserve">
|
||||
<value>24V Power low (V)</value>
|
||||
</data>
|
||||
<data name="UseSensorFirstUseDate" xml:space="preserve">
|
||||
<value>Calibration interval starts after sensor's first use</value>
|
||||
</data>
|
||||
<data name="BaudRate" xml:space="preserve">
|
||||
<value>Baud rate</value>
|
||||
</data>
|
||||
<data name="DataBits" xml:space="preserve">
|
||||
<value>Data bits</value>
|
||||
</data>
|
||||
<data name="DataFormat" xml:space="preserve">
|
||||
<value>Data format</value>
|
||||
</data>
|
||||
<data name="FlowControl" xml:space="preserve">
|
||||
<value>Flow control</value>
|
||||
</data>
|
||||
<data name="Parity" xml:space="preserve">
|
||||
<value>Parity</value>
|
||||
</data>
|
||||
<data name="StopBits" xml:space="preserve">
|
||||
<value>Stop bits</value>
|
||||
</data>
|
||||
<data name="UartSettings" xml:space="preserve">
|
||||
<value>UART defaults</value>
|
||||
</data>
|
||||
<data name="DataChannelId" xml:space="preserve">
|
||||
<value>Data channel id</value>
|
||||
</data>
|
||||
<data name="IRIGTimeDataPacketIntervalMs" xml:space="preserve">
|
||||
<value>Time packet interval (ms)</value>
|
||||
</data>
|
||||
<data name="StreamOutputSettings" xml:space="preserve">
|
||||
<value>Stream output defaults</value>
|
||||
</data>
|
||||
<data name="TimeChannelId" xml:space="preserve">
|
||||
<value>Time channel id</value>
|
||||
</data>
|
||||
<data name="TmNSConfig" xml:space="preserve">
|
||||
<value>TmNS config</value>
|
||||
</data>
|
||||
<data name="UDPAddress" xml:space="preserve">
|
||||
<value>UDP Address</value>
|
||||
</data>
|
||||
<data name="UDPProfile" xml:space="preserve">
|
||||
<value>Stream Profile</value>
|
||||
</data>
|
||||
<data name="StreamInputSettings" xml:space="preserve">
|
||||
<value>Stream input defaults</value>
|
||||
</data>
|
||||
<data name="UseAdvancedUDPStreamProfiles" xml:space="preserve">
|
||||
<value>Use advanced streaming profiles</value>
|
||||
</data>
|
||||
<data name="TrackDiagnostics" xml:space="preserve">
|
||||
<value>Track diagnostics</value>
|
||||
</data>
|
||||
<data name="SensorSettings_AllowInspectBeforeUse" xml:space="preserve">
|
||||
<value>Inspect before use</value>
|
||||
</data>
|
||||
<data name="SensorSettings_DefaultMaxUsageAllowed" xml:space="preserve">
|
||||
<value>Default maximum uses allowed</value>
|
||||
</data>
|
||||
<data name="SensorSettings_DontAllowDataCollectionIfOverused" xml:space="preserve">
|
||||
<value>Do not allow data collection if sensor is overused</value>
|
||||
</data>
|
||||
<data name="SensorSettings_UsageRemainingForWarning" xml:space="preserve">
|
||||
<value>Warn when number of uses remaining</value>
|
||||
</data>
|
||||
<data name="ArbBaseBitrate" xml:space="preserve">
|
||||
<value>Arb/Base Bitrate</value>
|
||||
</data>
|
||||
<data name="CanSettings" xml:space="preserve">
|
||||
<value>CAN defaults</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Windows.Markup;
|
||||
using SensorSettingsModule.Resources;
|
||||
|
||||
namespace SensorSettingsModule
|
||||
{
|
||||
[MarkupExtensionReturnType(typeof(string))]
|
||||
public class TranslateExtension : MarkupExtension
|
||||
{
|
||||
private readonly string _key;
|
||||
public TranslateExtension(string key) { _key = key; }
|
||||
|
||||
private const string NotFound = "#stringnotfound#";
|
||||
|
||||
public override object ProvideValue(IServiceProvider serviceProvider)
|
||||
{
|
||||
if (string.IsNullOrEmpty(_key)) { return NotFound; }
|
||||
return StringResources.ResourceManager.GetString(_key) ?? NotFound + " " + _key;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
using System;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DTS.Common;
|
||||
using DTS.Common.Interface;
|
||||
using DTS.Common.Interface.Sensors.SensorSettingsModule;
|
||||
using Prism.Modularity;
|
||||
using Unity;
|
||||
using SensorSettingsModule;
|
||||
using Prism.Ioc;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable RedundantAttributeUsageProperty
|
||||
// ReSharper disable UnusedParameter.Local
|
||||
|
||||
[assembly: SensorSettingsModuleModuleName]
|
||||
[assembly: SensorSettingsModuleModuleImageAttribute]
|
||||
namespace SensorSettingsModule
|
||||
{
|
||||
[Export(typeof(IModule))]
|
||||
[Module(ModuleName = "SensorSettingsModule")]
|
||||
public class SensorSettingsModuleModule : IModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Injected unity container
|
||||
/// </summary>
|
||||
private readonly IUnityContainer _unityContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SensorSettingsModuleModule"/> class.
|
||||
/// </summary>
|
||||
/// <param name="unityContainer">Obtained reference of the unity container by using dependency injection.</param>
|
||||
public SensorSettingsModuleModule(IUnityContainer unityContainer)
|
||||
{
|
||||
|
||||
_unityContainer = unityContainer;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// Register View & View-Model with Unity dependency injection container as a singleton.
|
||||
_unityContainer.RegisterType<ISensorSettingsView, SensorSettingsView>();
|
||||
_unityContainer.RegisterType<ISensorSettingsViewModel, SensorSettingsViewModel>();
|
||||
}
|
||||
|
||||
public void OnInitialized(IContainerProvider containerProvider)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attribute class contains assembly name
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
|
||||
public class SensorSettingsModuleModuleNameAttribute : TextAttribute
|
||||
{
|
||||
public SensorSettingsModuleModuleNameAttribute() : this(null) { }
|
||||
|
||||
public SensorSettingsModuleModuleNameAttribute(string s)
|
||||
{
|
||||
AssemblyName = AssemblyNames.SensorSettingsModule.ToString();
|
||||
}
|
||||
|
||||
public override string AssemblyName { get; }
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(TextAttribute);
|
||||
}
|
||||
|
||||
public override string GetAssemblyName()
|
||||
{
|
||||
return AssemblyName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attribute class contains assembly image and name - used on the Main screen to SummaryModule available components
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
|
||||
public class SensorSettingsModuleModuleImageAttribute : ImageAttribute
|
||||
{
|
||||
private BitmapImage _img;
|
||||
|
||||
public SensorSettingsModuleModuleImageAttribute() : this(null) { }
|
||||
public override BitmapImage AssemblyImage
|
||||
{
|
||||
get { _img = AssemblyInfo.GetImage(AssemblyNames.SensorSettingsModule.ToString()); return _img; }
|
||||
}
|
||||
public SensorSettingsModuleModuleImageAttribute(string s)
|
||||
{
|
||||
_img = AssemblyInfo.GetImage(AssemblyNames.SensorSettingsModule.ToString());
|
||||
}
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(ImageAttribute);
|
||||
}
|
||||
public override BitmapImage GetAssemblyImage()
|
||||
{
|
||||
return AssemblyImage;
|
||||
}
|
||||
private string _name;
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { _name = AssemblyNames.SensorSettingsModule.ToString(); return _name; }
|
||||
}
|
||||
|
||||
public override string GetAssemblyName()
|
||||
{
|
||||
return AssemblyName;
|
||||
}
|
||||
private string _group;
|
||||
public override string AssemblyGroup
|
||||
{
|
||||
get { _group = eAssemblyGroups.Administrative.ToString(); return _group; }
|
||||
}
|
||||
|
||||
public override string GetAssemblyGroup()
|
||||
{
|
||||
return AssemblyGroup;
|
||||
}
|
||||
|
||||
private eAssemblyRegion _region;
|
||||
public override eAssemblyRegion AssemblyRegion
|
||||
{
|
||||
get { _region = eAssemblyRegion.SensorSettingsModuleRegion; return _region; }
|
||||
}
|
||||
public override eAssemblyRegion GetAssemblyRegion()
|
||||
{
|
||||
return AssemblyRegion;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{B6AD76AB-A081-4951-92E2-AD9A5215B245}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SensorSettingsModule</RootNamespace>
|
||||
<AssemblyName>SensorSettingsModule</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<RunCodeAnalysis>false</RunCodeAnalysis>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="Microsoft.Xaml.Behaviors">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Microsoft.Xaml.Behaviors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="Prism">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Unity.Wpf">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.Unity.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Wpf">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Unity.Abstractions">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Unity.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Container">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Unity.Container.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="Xceed.Wpf.Toolkit">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\Xceed.Wpf.Toolkit\Xceed.Wpf.Toolkit.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SensorSettingsModule.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\StringResources.Designer.cs">
|
||||
<DependentUpon>StringResources.resx</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Resources\TranslateExtension.cs" />
|
||||
<Compile Include="ViewModel\SensorSettingsViewModel.cs" />
|
||||
<Compile Include="View\SensorSettingsView.xaml.cs">
|
||||
<DependentUpon>SensorSettingsView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\StringResources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>StringResources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
<CustomToolNamespace>SensorSettingsModule.Resources</CustomToolNamespace>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Core\DTS.Common.Core.csproj">
|
||||
<Project>{fab1f470-1574-4301-b56e-d3364aa93679}</Project>
|
||||
<Name>DTS.Common.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.SettingsDB\DTS.Common.Settings.csproj">
|
||||
<Project>{61017104-D8EE-41D1-B9CA-DAD863FF78B2}</Project>
|
||||
<Name>DTS.Common.Settings</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Storage\DTS.Common.Storage.csproj">
|
||||
<Project>{e0d1a7d0-dce8-403d-ba85-5a5d66ba1313}</Project>
|
||||
<Name>DTS.Common.Storage</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Utilities\DTS.Common.Utilities.csproj">
|
||||
<Project>{03eace47-ea59-44ac-b49d-956e4dc4d618}</Project>
|
||||
<Name>DTS.Common.Utilities</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common\DTS.Common.csproj">
|
||||
<Project>{114edc77-f3b5-4576-a91b-40818d503b55}</Project>
|
||||
<Name>DTS.Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\IService\IService.csproj">
|
||||
<Project>{c9c45b72-05a3-4962-bc13-a78b1f4b1925}</Project>
|
||||
<Name>IService</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\SensorDB\SensorDB.csproj">
|
||||
<Project>{444ef10c-046e-47ad-a9a5-17318d488723}</Project>
|
||||
<Name>SensorDB</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Users\Users.csproj">
|
||||
<Project>{be8d217d-6da9-4bca-b62a-a82325b33979}</Project>
|
||||
<Name>Users</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\SensorSettingsView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Model\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,341 @@
|
||||
<base:BaseView x:Class="SensorSettingsModule.SensorSettingsView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:strings="clr-namespace:SensorSettingsModule"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Controls/combobox.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Constant/XamlConstants.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<sys:Double x:Key="_24VPOWER_LOW_MAX">24</sys:Double>
|
||||
<sys:Double x:Key="_24VPOWER_LOW_MIN">0</sys:Double>
|
||||
<sys:Double x:Key="_24VPOWER_HIGH_MAX">30</sys:Double>
|
||||
<sys:Double x:Key="_24VPOWER_HIGH_MIN">0</sys:Double>
|
||||
<sys:Double x:Key="IEPE_RANGE_LOW_MIN">.1</sys:Double>
|
||||
<sys:Double x:Key="IEPE_RANGE_LOW_MAX">10</sys:Double>
|
||||
<sys:Double x:Key="IEPE_RANGE_HIGH_MIN">1</sys:Double>
|
||||
<sys:Double x:Key="IEPE_RANGE_HIGH_MAX">1000</sys:Double>
|
||||
<!-- most of the styles down to the converter were either already here or copied in when I was trying to fix a few style issues
|
||||
none of them are native to here so it's probably ok to wipe out down to the converters if the DTS.Common commonstyles has the
|
||||
right styles present
|
||||
-->
|
||||
<Style TargetType="xctk:DoubleUpDown" BasedOn="{StaticResource PageContentXCDoubleUpDown}">
|
||||
<Setter Property="Width" Value="150"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="FormatString" Value="N2"/>
|
||||
<Setter Property="Increment" Value="0.1"/>
|
||||
</Style>
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TTS_ListViewItemStyle}"/>
|
||||
</Style>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||||
<Style TargetType="ComboBox" BasedOn="{StaticResource FlatComboBoxStyle}">
|
||||
<Setter Property="Width" Value="450"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
</Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
<Style TargetType="Expander" BasedOn="{StaticResource SimpleExpanderTemp}">
|
||||
<Setter Property="Width" Value="Auto"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
||||
</Style>
|
||||
<!-- these are used for error decoration of Squib high/low tolerances -->
|
||||
<converters:BooleanToBorderThicknessConverter x:Key="BooleanToBorderThickness" />
|
||||
<converters:BooleanToColorConverter x:Key="BooleanToColor" />
|
||||
<!--<converters:BooleanToColorConverter x:Key="BooleanToWarningColor" WarningBrush="True" />-->
|
||||
<converters:BooleanToVisibilityConverter x:Key="BoolToVisConverter" /> <!-- used for Current Visability depending on squib fire mode-->
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<!-- I originally tried DynamicGrid here, but it had weird column sizing, I believe it was missing some stuff from CommonStyles -->
|
||||
<StackPanel Background="{DynamicResource Brush_ApplicationContentBackground}" Orientation="Vertical">
|
||||
<Expander Header="{strings:TranslateExtension SquibDefaults}" DataContext="{Binding SquibSettings}" AutomationProperties.AutomationId="SQUIBDefaultsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension Delay}" Grid.Row="0" AutomationProperties.AutomationId="SQUIBDelayLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="0" Minimum="{StaticResource SQUIB_DELAY_MIN}"
|
||||
Maximum="{StaticResource SQUIB_DELAY_MAX}" ClipValueToMinMax="True" Value="{Binding FireDelayMS}"
|
||||
AutomationProperties.AutomationId="SQUIBDelay"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension LimitDuration}" Grid.Row="1" AutomationProperties.AutomationId="SQUIBLimitDurationLabel"/>
|
||||
<CheckBox Grid.Column="1" Grid.Row="1" Margin="0" IsChecked="{Binding LimitDurationDefault}" AutomationProperties.AutomationId="SQUIBLimitDuration" HorizontalAlignment="Left"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension Duration}" Grid.Row="2"
|
||||
Visibility="{Binding LimitDurationDefault, Converter={StaticResource BoolToVisConverter}}" AutomationProperties.AutomationId="SQUIBDurationLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="2" FormatString="N1" Minimum="{StaticResource SQUIB_DURATION_MIN}" Maximum="{StaticResource SQUIB_DURATION_MAX}"
|
||||
ClipValueToMinMax="True" Value="{Binding FireDurationMS}"
|
||||
Visibility="{Binding LimitDurationDefault, Converter={StaticResource BoolToVisConverter}}"
|
||||
AutomationProperties.AutomationId="SQUIBDuration"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension LowTolerance}" Grid.Row="3" AutomationProperties.AutomationId="SQUIBLowToleranceLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="3" FormatString="N1" Minimum="{StaticResource SQUIB_TOLERANCE_LOW}"
|
||||
Maximum="{StaticResource SQUIB_TOLERANCE_HIGH}" Value="{Binding ToleranceLowDefault}"
|
||||
BorderBrush="{Binding ToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding ToleranceValid, Converter={StaticResource BooleanToBorderThickness}}" AutomationProperties.AutomationId="SQUIBLowTolerance"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension HighTolerance}" Grid.Row="4" AutomationProperties.AutomationId="SQUIBHighToleranceLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="4" FormatString="N1" Minimum="{StaticResource SQUIB_TOLERANCE_LOW}"
|
||||
Maximum="{StaticResource SQUIB_TOLERANCE_HIGH}" Value="{Binding ToleranceHighDefault}"
|
||||
BorderBrush="{Binding ToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding ToleranceValid, Converter={StaticResource BooleanToBorderThickness}}" AutomationProperties.AutomationId="SQUIBHighTolerance"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension FiringMode}" Grid.Row="5" AutomationProperties.AutomationId="SQUIBFiringModeLabel"/>
|
||||
<ComboBox Grid.Column="1" Grid.Row="5" SelectedItem="{Binding FireModeDefault}" ItemsSource="{Binding AvailableModes}" AutomationProperties.AutomationId="SQUIBFiringMode" HorizontalAlignment="Left"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension Current}" Grid.Row="6" Visibility="{Binding IsConstantCurrent, Converter={StaticResource BoolToVisConverter}}" AutomationProperties.AutomationId="SQUIBConstantCurrentabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="6" Minimum="{StaticResource SQUIB_CURRENT_LOW}" Maximum="{StaticResource SQUIB_CURRENT_HIGH}"
|
||||
Value="{Binding OutputCurrentDefault}" Visibility="{Binding IsConstantCurrent, Converter={StaticResource BoolToVisConverter}}"
|
||||
AutomationProperties.AutomationId="SQUIBConstantCurrent" />
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension DigitalOutDefaults}" DataContext="{Binding DigitalOutSettings}" AutomationProperties.AutomationId="DigitalOutExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="0" Text="{strings:TranslateExtension DigitalOutputMode}" AutomationProperties.AutomationId="DOUTModeLabel"/>
|
||||
<ComboBox Grid.Column="1" Grid.Row="0" SelectedItem="{Binding OutputMode}" ItemsSource="{Binding AvailableModes}" AutomationProperties.AutomationId="DOUTMode" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{strings:TranslateExtension DigitalOutputDelayMS}" AutomationProperties.AutomationId="DOUTDelayLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="1" Minimum="0" ClipValueToMinMax="True"
|
||||
Increment=".1" Value="{Binding DelayMS}" AutomationProperties.AutomationId="DOUTDelay"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="{strings:TranslateExtension DigitalOutputLimitDuration}" AutomationProperties.AutomationId="DOUTLimitDurationLabel"/>
|
||||
<CheckBox Grid.Column="1" Grid.Row="2" IsChecked="{Binding LimitDuration}" AutomationProperties.AutomationId="DOUTLimitDuration" HorizontalAlignment="Left"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="3" Text="{strings:TranslateExtension DigitalOutputDuration}"
|
||||
Visibility="{Binding LimitDuration, Converter={StaticResource BoolToVisConverter}}" AutomationProperties.AutomationId="DOUTDurationLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="3" Minimum="0" ClipValueToMinMax="True"
|
||||
Increment=".1" Value="{Binding DurationMS}" Visibility="{Binding LimitDuration, Converter={StaticResource BoolToVisConverter}}"
|
||||
AutomationProperties.AutomationId="DOUTDuration"/>
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension DigitalInputSettings}" DataContext="{Binding DigitalInputDefaults}" AutomationProperties.AutomationId="DigitalInputsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="0" Text="{strings:TranslateExtension ConstantCurrentBreakPoint}" />
|
||||
<!-- 16 bit signed -->
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="0" Minimum="-32768" Maximum="32767" ClipValueToMinMax="True"
|
||||
Increment="1" Value="{Binding ConstantCurrentBreakpointADC}" AutomationProperties.AutomationId="DIConstantCurrentBreakpoint"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{strings:TranslateExtension VoltageInputBreakpoint}" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="1" Minimum="-32768" Maximum="32767" ClipValueToMinMax="True"
|
||||
Increment="1" Value="{Binding VoltageBreakpointADC}" AutomationProperties.AutomationId="DIVoltageBreakpoint"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension DisplaySPDADC}" Grid.Row="2" />
|
||||
<CheckBox Grid.Column="1" Grid.Row="2" IsChecked="{Binding DisplaySPDADC}" />
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension IEPEDefaults}" DataContext="{Binding IEPESensorDefaults}" AutomationProperties.AutomationId="IEPEDefaultsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" /> <!-- Disable AutoSense -->
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension _24VPowerLow}" Grid.Row="0" AutomationProperties.AutomationId="_24VPowerLowLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="0" Minimum="{StaticResource _24VPOWER_LOW_MIN}" FormatString="N1"
|
||||
Maximum="{StaticResource _24VPOWER_LOW_MAX}" ClipValueToMinMax="True" Value="{Binding _24VPowerLow}"
|
||||
AutomationProperties.AutomationId="_24VPowerLowDoubleUpDown"
|
||||
BorderBrush="{Binding ToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding ToleranceValid, Converter={StaticResource BooleanToBorderThickness}}" />
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension _24VPowerHigh}" Grid.Row="1"
|
||||
AutomationProperties.AutomationId="_24VPowerHighLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="1" FormatString="N1" Minimum="{StaticResource _24VPOWER_HIGH_MIN}" Maximum="{StaticResource _24VPOWER_HIGH_MAX}"
|
||||
ClipValueToMinMax="True" Value="{Binding _24VPowerHigh}"
|
||||
AutomationProperties.AutomationId="_24VPowerHighDoubleUpDown"
|
||||
BorderBrush="{Binding ToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding ToleranceValid, Converter={StaticResource BooleanToBorderThickness}}"/>
|
||||
|
||||
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension IEPERangeLowLimit}" Grid.Row="2" AutomationProperties.AutomationId="RangeLowLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="2" Minimum="{StaticResource IEPE_RANGE_LOW_MIN}" FormatString="N1"
|
||||
Maximum="{StaticResource IEPE_RANGE_LOW_MAX}" ClipValueToMinMax="True" Value="{Binding RangeLowLimitScalar}"
|
||||
AutomationProperties.AutomationId="IEPELowDoubleUpDown"
|
||||
BorderBrush="{Binding RangeToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding RangeToleranceValid, Converter={StaticResource BooleanToBorderThickness}}" />
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension IEPERangeHighLimit}" Grid.Row="3"
|
||||
AutomationProperties.AutomationId="RangeHighLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="3" FormatString="N1" Minimum="{StaticResource IEPE_RANGE_HIGH_MIN}" Maximum="{StaticResource IEPE_RANGE_HIGH_MAX}"
|
||||
ClipValueToMinMax="True" Value="{Binding RangeHighLimitScalar}"
|
||||
AutomationProperties.AutomationId="IEPEHighDoubleUpDown"
|
||||
BorderBrush="{Binding RangeToleranceValid, Converter={StaticResource BooleanToColor}}"
|
||||
BorderThickness="{Binding RangeToleranceValid, Converter={StaticResource BooleanToBorderThickness}}"/>
|
||||
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension DisableAutoSense}" Grid.Row="4" AutomationProperties.AutomationId="AutoSenseLabel" />
|
||||
<CheckBox Grid.Column="1" IsChecked="{Binding DisableAutoSense}" Grid.Row="4" AutomationProperties.AutomationId="DisableAutoSenseCheckBox" />
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension SensorCalibrationPolicies}" DataContext="{Binding SensorCalibrationDefaults}" AutomationProperties.AutomationId="SensorCalibrationsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension UseSensorFirstUseDate}" AutomationProperties.AutomationId="SensorFirstUseLabel" />
|
||||
<CheckBox Grid.Column="1" IsChecked="{Binding UseSensorFirstUseDate}" AutomationProperties.AutomationId="SensorFirstUseCheckBox" />
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension Policy}" Grid.Row="1 "/>
|
||||
<ComboBox Grid.Column="1" ItemsSource="{Binding AvailableSensorCalPolicies, Mode=OneWay}" SelectedItem="{Binding SelectedCalPolicy}"
|
||||
AutomationProperties.AutomationId="SensorCalPolicyComboBox" Grid.Row="1"/>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension WarningPeriod}" Grid.Row="2" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="2" FormatString="N0" Minimum="1" Maximum="36500" ClipValueToMinMax="True" Value="{Binding WarningPeriod}"
|
||||
AutomationProperties.AutomationId="WarningPeriodDoubleUpDown" Increment="1"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="3" Text="{strings:TranslateExtension SensorSettings_DontAllowDataCollectionIfOverused}" AutomationProperties.AutomationId="SensorOveruseLabel" />
|
||||
<CheckBox Grid.Column="1" Grid.Row="3" IsChecked="{Binding DontAllowDataCollectionIfOverused}" IsEnabled="{Binding SensorAssemblyEnabled}" AutomationProperties.AutomationId="SensorOveruseCheckBox" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="4" Visibility ="{Binding DontAllowDataCollectionIfOverused, Converter={StaticResource BoolToVisConverter}}" Text="{strings:TranslateExtension SensorSettings_UsageRemainingForWarning}" AutomationProperties.AutomationId="UsageRemainingTxtBlock"/>
|
||||
<TextBox Grid.Column="1" Grid.Row="4" Visibility ="{Binding DontAllowDataCollectionIfOverused, Converter={StaticResource BoolToVisConverter}}" Text="{Binding UsageRemainingForWarning}" MinWidth="50" MaxWidth="50" HorizontalAlignment="Left" AutomationProperties.AutomationId="UsageRemainingTxtBx"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="5" Visibility ="{Binding DontAllowDataCollectionIfOverused, Converter={StaticResource BoolToVisConverter}}" Text="{strings:TranslateExtension SensorSettings_DefaultMaxUsageAllowed}" AutomationProperties.AutomationId="MaxUsageAllowedTxtBlock"/>
|
||||
<TextBox Grid.Column="1" Grid.Row="5" Visibility ="{Binding DontAllowDataCollectionIfOverused, Converter={StaticResource BoolToVisConverter}}" Text="{Binding DefaultMaxUsageAllowed}" MinWidth="50" MaxWidth="50" HorizontalAlignment="Left" AutomationProperties.AutomationId="MaxUsageAllowedTxtBx"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="6" Text="{strings:TranslateExtension SensorSettings_AllowInspectBeforeUse}" />
|
||||
<CheckBox Grid.Column="1" Grid.Row="6" IsChecked="{Binding AllowInspectBeforeUse}" IsEnabled="{Binding AllowInspectBeforeUseEnabled}" AutomationProperties.AutomationId="chk_AllowInspectBeforeUse" />
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension AnalogSettings}" DataContext="{Binding AnalogDefaults}" AutomationProperties.AutomationId="AnalogSettingsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{strings:TranslateExtension DefineDefaultFilter}" />
|
||||
<ComboBox Grid.Column="1" DisplayMemberPath="FilterName" LostFocus="CbFilterOption_LostFocus" x:Name="cbFilterOption" ItemsSource="{Binding FilterOptions}" SelectedItem="{Binding SelectedFilterOption, Mode=TwoWay}"
|
||||
AutomationProperties.AutomationId="SensorCalPolicyComboBox" IsEditable="True" IsReadOnly="False" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{strings:TranslateExtension UseMeasuredExcitation}" />
|
||||
<CheckBox Grid.Column="1" Grid.Row="1" IsChecked="{Binding UseMeasuredExcitation}" AutomationProperties.AutomationId="chk_UseMeasuredExcitationFlag"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="{strings:TranslateExtension TrackDiagnostics}" />
|
||||
<CheckBox Grid.Column="1" Grid.Row="2" IsChecked="{Binding TrackAnalogDiagnostics}" AutomationProperties.AutomationId="chk_TrackAnalogDiagnostics"
|
||||
IsEnabled="{Binding TrackAnalogDiagnosticsEnabled}"/>
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension UartSettings}" DataContext="{Binding UartIODefaults}" AutomationProperties.AutomationId="UartSettingsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="0" Text="{strings:TranslateExtension BaudRate}" AutomationProperties.AutomationId="UARTBaudRateLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="0" FormatString="N0" Increment="1" Minimum="110" Maximum="3000000"
|
||||
ClipValueToMinMax="True" Value="{Binding BaudRate}"
|
||||
AutomationProperties.AutomationId="UARTDataBits"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{strings:TranslateExtension DataBits}" AutomationProperties.AutomationId="UARTDataBitsLabel" />
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="1" FormatString="N0" Increment="1" Minimum="{StaticResource UART_DATA_BITS_MIN}" Maximum="{StaticResource UART_DATA_BITS_MAX}"
|
||||
ClipValueToMinMax="True" Value="{Binding DataBits}"
|
||||
AutomationProperties.AutomationId="UARTDataBits"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="{strings:TranslateExtension StopBits}" AutomationProperties.AutomationId="UARTStopBitsLabel"/>
|
||||
<ComboBox Grid.Column="1" Grid.Row="2" SelectedItem="{Binding StopBits}" ItemsSource="{Binding AvailableStopBits}" AutomationProperties.AutomationId="UARTStopBits" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="3" Text="{strings:TranslateExtension Parity}" AutomationProperties.AutomationId="UARTParityLabel"/>
|
||||
<ComboBox Grid.Column="1" Grid.Row="3" SelectedItem="{Binding Parity}" ItemsSource="{Binding AvailableParities}" AutomationProperties.AutomationId="UARTParity" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="4" Text="{strings:TranslateExtension DataFormat}" AutomationProperties.AutomationId="UARTDataFormatLabel"/>
|
||||
<ComboBox Grid.Column="1" Grid.Row="4" SelectedItem="{Binding DataFormat}" ItemsSource="{Binding AvailableDataFormats}" AutomationProperties.AutomationId="UARTDataFormat" HorizontalAlignment="Left" />
|
||||
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension StreamOutputSettings}" DataContext="{Binding StreamOutputSettings}" AutomationProperties.AutomationId="StreamOutputSettingsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{strings:TranslateExtension UDPProfile}" AutomationProperties.AutomationId="UDPProfileLabel" />
|
||||
<ComboBox Grid.Column="1" Grid.Row="1" SelectedItem="{Binding Profile}" ItemsSource="{Binding AvailableStreamOutUDPProfiles}" AutomationProperties.AutomationId="StreamOutProfile" HorizontalAlignment="Left" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="{strings:TranslateExtension UDPAddress}" AutomationProperties.AutomationId="UDPAddressLabel" />
|
||||
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding UDPAddress}" AutomationProperties.AutomationId="StreamOutUDPAddress"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="3" Text="{strings:TranslateExtension TimeChannelId}" AutomationProperties.AutomationId="TimeChannelIdLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="3" FormatString="N0" Increment="1" Minimum="0" Maximum="100"
|
||||
ClipValueToMinMax="True" Value="{Binding TimeChannelId}"
|
||||
AutomationProperties.AutomationId="StreamOutTimeChannelId"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="4" Text="{strings:TranslateExtension DataChannelId}" AutomationProperties.AutomationId="DataChannelIdLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="4" FormatString="N0" Increment="1" Minimum="0" Maximum="100"
|
||||
ClipValueToMinMax="True" Value="{Binding DataChannelId}"
|
||||
AutomationProperties.AutomationId="StreamOutDataChannelId"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="5" Text="{strings:TranslateExtension TmNSConfig}" AutomationProperties.AutomationId="TmNSConfigLabel" />
|
||||
<TextBox Grid.Column="1" Grid.Row="5" Text="{Binding TmNSConfig}" AutomationProperties.AutomationId="StreamOutTmNSConfig"/>
|
||||
<TextBlock Grid.Column="0" Grid.Row="6" Text="{strings:TranslateExtension IRIGTimeDataPacketIntervalMs}" AutomationProperties.AutomationId="IRIGTimeDataPacketIntervalMsLabel"/>
|
||||
<xctk:DoubleUpDown Grid.Column="1" Grid.Row="6" FormatString="N0" Increment="1" Minimum="0" Maximum="100"
|
||||
ClipValueToMinMax="True" Value="{Binding IRIGTimeDataPacketIntervalMs}"
|
||||
AutomationProperties.AutomationId="StreamOutIRIGTimeDataPacketIntervalMs"/>
|
||||
</Grid>
|
||||
</Expander>
|
||||
<Expander Header="{strings:TranslateExtension CanSettings}" DataContext="{Binding CanIODefaults}" AutomationProperties.AutomationId="CanSettingsExpander">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="0" Text="{strings:TranslateExtension ArbBaseBitrate}" AutomationProperties.AutomationId="CANArbBaseBitrateLabel" />
|
||||
<ComboBox Grid.Column="1" Grid.Row="0" SelectedItem="{Binding ArbBaseBitrate}" ItemsSource="{Binding AvailableArbBaseBitrates}" AutomationProperties.AutomationId="CANArbBaseBitrateItems" HorizontalAlignment="Left" />
|
||||
</Grid>
|
||||
</Expander>
|
||||
</StackPanel>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,31 @@
|
||||
using DTS.Common.Events.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors.SensorSettingsModule;
|
||||
using Prism.Ioc;
|
||||
using Prism.Events;
|
||||
using System.Windows;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace SensorSettingsModule
|
||||
{
|
||||
public partial class SensorSettingsView : ISensorSettingsView
|
||||
{
|
||||
private IEventAggregator _eventAggregator;
|
||||
|
||||
public SensorSettingsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
_eventAggregator = ContainerLocator.Container.Resolve<IEventAggregator>();
|
||||
}
|
||||
//FB 13120 Identify the AdHoc filter to get saved later on if it's not already saved to db
|
||||
private double freq;
|
||||
private void CbFilterOption_LostFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var filter = cbFilterOption.Text;
|
||||
if (double.TryParse(filter, out freq))
|
||||
{
|
||||
_eventAggregator.GetEvent<SensorSavedEvent>().Publish(freq);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,367 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Threading.Tasks;
|
||||
using DTS.Common.Events;
|
||||
using Prism.Events;
|
||||
using Prism.Regions;
|
||||
using Unity;
|
||||
using DTS.Common.Interactivity;
|
||||
using DTS.Common.Interface.Sensors.SensorSettingsModule;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Storage;
|
||||
using System.Linq;
|
||||
using DTS.Common.Classes.Groups.ChannelSettings;
|
||||
using Prism.Ioc;
|
||||
using DTS.SensorDB;
|
||||
//using SensorSettingsModule.Model;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace SensorSettingsModule
|
||||
{
|
||||
/// <summary>
|
||||
/// this class handles SensorSettingsViewModel functionality
|
||||
/// </summary>
|
||||
[PartCreationPolicy(CreationPolicy.Shared)]
|
||||
public class SensorSettingsViewModel : ISensorSettingsViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The SensorSettings view
|
||||
/// </summary>
|
||||
public ISensorSettingsView View { get; set; }
|
||||
|
||||
public IDigitalInputDefaults DigitalInputDefaults { get; set; }
|
||||
public ISquibSettingDefaults SquibSettings { get; set; }
|
||||
public IDigitalOutDefaults DigitalOutSettings { get; set; }
|
||||
public IIEPESensorDefaults IEPESensorDefaults { get; set; }
|
||||
public ICalibrationPolicy SensorCalibrationDefaults { get; set; }
|
||||
public IAnalogDefaults AnalogDefaults { get; set; }
|
||||
public IUartSettingDefaults UartIODefaults { get; set; }
|
||||
public ICanSettingDefaults CanIODefaults { get; set; }
|
||||
public IStreamOutputSettingDefaults StreamOutputSettings { get; set; }
|
||||
|
||||
private IEventAggregator _eventAggregator { get; }
|
||||
private IRegionManager _regionManager;
|
||||
private IUnityContainer UnityContainer { get; }
|
||||
|
||||
public InteractionRequest<Notification> NotificationRequest { get; }
|
||||
public InteractionRequest<Confirmation> ConfirmationRequest { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Occurs when a property value changes.
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
public void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
#region constructors and initializers
|
||||
/// <summary>
|
||||
/// Creates a new instance of the SensorSettingsViewModel
|
||||
/// </summary>
|
||||
/// <param name="view"></param>
|
||||
/// <param name="regionManager">The logical placeholder defined within the application's UI (in the shell or within views) into which views are displayed.</param>
|
||||
/// <param name="eventAggregator">The EventAggregator which allows different components to publish/subscribe to events without being coupled to each other.</param>
|
||||
/// <param name="unityContainer">The unityContainer.</param>
|
||||
public SensorSettingsViewModel(ISensorSettingsView view, IRegionManager regionManager,
|
||||
IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||||
{
|
||||
View = view;
|
||||
View.DataContext = this;
|
||||
|
||||
NotificationRequest = new InteractionRequest<Notification>();
|
||||
ConfirmationRequest = new InteractionRequest<Confirmation>();
|
||||
|
||||
_eventAggregator = eventAggregator;
|
||||
UnityContainer = unityContainer;
|
||||
_regionManager = regionManager;
|
||||
_eventAggregator.GetEvent<RaiseNotification>().Subscribe(OnRaiseNotification);
|
||||
_eventAggregator.GetEvent<BusyIndicatorChangeNotification>()
|
||||
.Subscribe(OnBusyIndicatorNotification, ThreadOption.PublisherThread, true);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
public void OnSetActive()
|
||||
{
|
||||
SquibSettings = SquibSettingDefaults.GetSquibSettingsDefault(User);
|
||||
OnPropertyChanged("SquibSettings");
|
||||
DigitalOutSettings = DigitalOutputDefaults.GetDigitalOutDefault(User);
|
||||
OnPropertyChanged("DigitalOutSettings");
|
||||
IEPESensorDefaults = IEPESensorDefault.GetIEPESensorDefaults(User);
|
||||
OnPropertyChanged("IEPESensorDefaults");
|
||||
SensorCalibrationDefaults = CalibrationPolicy.GetCalibrationPolicy();
|
||||
OnPropertyChanged("SensorCalibrationDefaults");
|
||||
DigitalInputDefaults = DigitalInputSensorDefault.GetDigitalInputDefaults(User);
|
||||
OnPropertyChanged("DigitalInputDefaults");
|
||||
AnalogDefaults = AnalogSettingDefaults.GetAnalogDefaults();
|
||||
OnPropertyChanged("AnalogDefaults");
|
||||
UartIODefaults = UartSettingDefaults.GetUartSettingsDefault(UserID);
|
||||
OnPropertyChanged("UartIODefaults");
|
||||
StreamOutputSettings = StreamOutputSettingDefaults.GetStreamOutputSettingsDefault(UserID);
|
||||
OnPropertyChanged("StreamOutputSettings");
|
||||
CanIODefaults = CanSettingDefaults.GetCanSettingsDefault(UserID);
|
||||
OnPropertyChanged("CanIODefaults");
|
||||
}
|
||||
|
||||
public void Unset()
|
||||
{
|
||||
//FB 13120 needs to validate and save settings when change the tab
|
||||
ValidateAndSave();
|
||||
}
|
||||
|
||||
public void Cleanup()
|
||||
{
|
||||
}
|
||||
|
||||
public Task CleanupAsync()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
}
|
||||
|
||||
public void Initialize(object parameter)
|
||||
{
|
||||
}
|
||||
|
||||
public void Initialize(object parameter, object model)
|
||||
{
|
||||
}
|
||||
|
||||
public Task InitializeAsync()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public Task InitializeAsync(object parameter)
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public void Activated()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Private Event handler for RaiseNotification event.
|
||||
/// </summary>
|
||||
private void OnBusyIndicatorNotification(bool eventArg)
|
||||
{
|
||||
IsBusy = eventArg;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Private Event handler for RaiseNotification event.
|
||||
/// </summary>
|
||||
private void OnRaiseNotification(NotificationContentEventArgs eventArgsWithTitle)
|
||||
{
|
||||
// The NotificationRequest.Raise triggers the Invoke() method of the PopupWindowAction object to show the NotificationWindow window
|
||||
// Notification object expects a NotificationContentEventArgsWithoutTitle object and a Title string.
|
||||
var eventArgsWithoutTitle = new NotificationContentEventArgs(eventArgsWithTitle.Message, "",
|
||||
eventArgsWithTitle.Image, string.Empty);
|
||||
|
||||
NotificationRequest.Raise(new Notification
|
||||
{
|
||||
Content = eventArgsWithoutTitle,
|
||||
Title = eventArgsWithTitle.Title
|
||||
});
|
||||
}
|
||||
|
||||
public void RestoreOriginalSettings()
|
||||
{
|
||||
AnalogSettingDefaults.RestoreDefaults(AnalogDefaults);
|
||||
|
||||
IEPESensorDefault.RestoreDefaults(IEPESensorDefaults);
|
||||
IEPESensorDefault.Save(IEPESensorDefaults);
|
||||
|
||||
DigitalInputSensorDefault.RestoreDefaults(DigitalInputDefaults);
|
||||
DigitalInputSensorDefault.Save(DigitalInputDefaults);
|
||||
UartSettingDefaults.RestoreDefaults(UartIODefaults);
|
||||
UartSettingDefaults.CommitChange((UartSettingDefaults)UartIODefaults, UserID);
|
||||
OnPropertyChanged("UartIODefaults");
|
||||
StreamOutputSettingDefaults.RestoreDefaults(StreamOutputSettings);
|
||||
StreamOutputSettingDefaults.CommitChange((StreamOutputSettingDefaults)StreamOutputSettings, UserID);
|
||||
OnPropertyChanged("StreamOutputSettings");
|
||||
CanSettingDefaults.RestoreDefaults(CanIODefaults);
|
||||
CanSettingDefaults.CommitChange((CanSettingDefaults)CanIODefaults, UserID);
|
||||
OnPropertyChanged("CanIODefaults");
|
||||
CalibrationPolicy.RestoreDefaults();
|
||||
SensorCalibrationDefaults = CalibrationPolicy.GetCalibrationPolicy();
|
||||
OnPropertyChanged("SensorCalibrationDefaults");
|
||||
}
|
||||
|
||||
private void InvalidateAllTestSetups()
|
||||
{
|
||||
using (var sql = DbOperations.GetSQLCommand())
|
||||
{
|
||||
sql.CommandType = System.Data.CommandType.Text;
|
||||
sql.CommandText = "UPDATE [TestSetups] SET [Dirty]=1, [Complete]=0";
|
||||
sql.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
|
||||
public bool ValidateAndSave()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!(SquibSettings is SquibSettingDefaults squib)) { return false; }
|
||||
if (!(DigitalOutSettings is DigitalOutputDefaults dout)) { return false; }
|
||||
if (!(AnalogDefaults is AnalogSettingDefaults ad)) { return false; }
|
||||
if (!(UartIODefaults is UartSettingDefaults ud)) { return false; }
|
||||
if (!(StreamOutputSettings is StreamOutputSettingDefaults sout)) { return false; }
|
||||
if (!(CanIODefaults is CanSettingDefaults cd)) { return false; }
|
||||
|
||||
bool bValid = true;
|
||||
if (UartIODefaults.Validate())
|
||||
{
|
||||
DTS.SensorDB.UartSettingDefaults.CommitChange(ud, UserID);
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
if (StreamOutputSettings.Validate())
|
||||
{
|
||||
DTS.SensorDB.StreamOutputSettingDefaults.CommitChange(sout, UserID);
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
if (CanIODefaults.Validate())
|
||||
{
|
||||
CanSettingDefaults.CommitChange(cd, UserID);
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
if (IEPESensorDefaults.Validate())
|
||||
{
|
||||
IEPESensorDefault.Save(IEPESensorDefaults);
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
|
||||
if (DigitalInputDefaults.Validate())
|
||||
{
|
||||
DigitalInputSensorDefault.Save(DigitalInputDefaults);
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
// FB 13120 Validate and save the default filter class settings
|
||||
if (AnalogDefaults.Validate())
|
||||
{
|
||||
AnalogDefaults.Save();
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = false;
|
||||
}
|
||||
|
||||
var original = CalibrationPolicy.GetCalibrationPolicy();
|
||||
if (original.SelectedCalPolicy != SensorCalibrationDefaults.SelectedCalPolicy
|
||||
|| original.WarningPeriod != SensorCalibrationDefaults.WarningPeriod
|
||||
|| original.UseSensorFirstUseDate != SensorCalibrationDefaults.UseSensorFirstUseDate
|
||||
|| original.DontAllowDataCollectionIfOverused != SensorCalibrationDefaults.DontAllowDataCollectionIfOverused
|
||||
|| original.UsageRemainingForWarning != SensorCalibrationDefaults.UsageRemainingForWarning
|
||||
|| original.DefaultMaxUsageAllowed != SensorCalibrationDefaults.DefaultMaxUsageAllowed
|
||||
|| original.AllowInspectBeforeUse != SensorCalibrationDefaults.AllowInspectBeforeUse)
|
||||
{
|
||||
CalibrationPolicy.WriteCalibrationPolicyToDb(SensorCalibrationDefaults);
|
||||
InvalidateAllTestSetups();
|
||||
}
|
||||
|
||||
if (SquibSettings.Validate())
|
||||
{
|
||||
var defaults = DbOperations.GetChannelSettingDefaults();
|
||||
var lookup = defaults.ToDictionary(d => d.SettingName);
|
||||
|
||||
lookup[ChannelSettingBase.SQMODE].IntValue = (int)squib.FireModeDefault;
|
||||
lookup[ChannelSettingBase.SQUIB_DELAY].DoubleValue = squib.FireDelayMS;
|
||||
lookup[ChannelSettingBase.SQUIB_DURATION].DoubleValue = squib.FireDurationMS;
|
||||
lookup[ChannelSettingBase.SQUIB_LIMIT_DURATION].BoolValue = squib.LimitDurationDefault;
|
||||
lookup[ChannelSettingBase.SQUIB_CURRENT].DoubleValue = squib.OutputCurrentDefault;
|
||||
SquibSettingDefaults.CommitChange(squib, User);
|
||||
DbOperations.SaveChannelSettingDefaults(new[] {
|
||||
lookup[ChannelSettingBase.SQMODE], lookup[ChannelSettingBase.SQUIB_DELAY],
|
||||
lookup[ChannelSettingBase.SQUIB_DURATION], lookup[ChannelSettingBase.SQUIB_LIMIT_DURATION],
|
||||
lookup[ChannelSettingBase.SQUIB_CURRENT]});
|
||||
|
||||
lookup[ChannelSettingBase.OUTPUT_MODE].IntValue = (int)dout.OutputMode;
|
||||
lookup[ChannelSettingBase.DIGITALOUT_DELAY].DoubleValue = dout.DelayMS;
|
||||
lookup[ChannelSettingBase.DIGITALOUT_DURATION].DoubleValue = dout.DurationMS;
|
||||
lookup[ChannelSettingBase.DIGITALOUT_LIMIT_DURATION].BoolValue = dout.LimitDuration;
|
||||
DbOperations.SaveChannelSettingDefaults(new[] {
|
||||
lookup[ChannelSettingBase.OUTPUT_MODE], lookup[ChannelSettingBase.DIGITALOUT_LIMIT_DURATION],
|
||||
lookup[ChannelSettingBase.DIGITALOUT_DURATION], lookup[ChannelSettingBase.DIGITALOUT_DELAY] });
|
||||
|
||||
DigitalOutputDefaults.CommitChange(dout, User);
|
||||
return bValid;
|
||||
}
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
var eventAggregator = ContainerLocator.Container.Resolve<IEventAggregator>();
|
||||
eventAggregator.GetEvent<PageErrorEvent>().Publish(new PageErrorArg(new[] { ex.Message }, null));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
public string User { get; set; }
|
||||
public int UserID { get; set; }
|
||||
public bool IsDirty => false;
|
||||
|
||||
private bool _isBusy;
|
||||
public bool IsBusy
|
||||
{
|
||||
get => _isBusy;
|
||||
set
|
||||
{
|
||||
_isBusy = value;
|
||||
OnPropertyChanged("IsBusy");
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isMenuIncluded;
|
||||
public bool IsMenuIncluded
|
||||
{
|
||||
get => _isMenuIncluded;
|
||||
set
|
||||
{
|
||||
_isMenuIncluded = value;
|
||||
OnPropertyChanged("IsMenuIncluded");
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isNavigationIncluded;
|
||||
public bool IsNavigationIncluded
|
||||
{
|
||||
get => _isNavigationIncluded;
|
||||
set
|
||||
{
|
||||
_isNavigationIncluded = value;
|
||||
OnPropertyChanged("IsNavigationIncluded");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Commands
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = "")]
|
||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
|
||||
Binary file not shown.
Binary file not shown.
1
DataPRO/Modules/SensorsList/SensorsList/.svn/entries
Normal file
1
DataPRO/Modules/SensorsList/SensorsList/.svn/entries
Normal file
@@ -0,0 +1 @@
|
||||
12
|
||||
1
DataPRO/Modules/SensorsList/SensorsList/.svn/format
Normal file
1
DataPRO/Modules/SensorsList/SensorsList/.svn/format
Normal file
@@ -0,0 +1 @@
|
||||
12
|
||||
@@ -0,0 +1,522 @@
|
||||
<base:BaseView x:Class="SensorsList.SensorsListEditGroupView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:strings="clr-namespace:SensorsList"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:my="clr-namespace:DTS.Common.Enums;assembly=DTS.Common">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Controls/combobox.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style TargetType="ToggleButton">
|
||||
<Setter Property="Width" Value="20"/>
|
||||
<Setter Property="MaxWidth" Value="20"/>
|
||||
</Style>
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TTS_ListViewItemStyle}"/>
|
||||
</Style>
|
||||
<Style TargetType="TextBox" BasedOn="{StaticResource TTS_TextBoxStyle}"/>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource TTS_TextBlockStyle}"/>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||||
<Style TargetType="ComboBox" BasedOn="{StaticResource TTS_ComboBoxStyle}"/>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
<BooleanToVisibilityConverter x:Key="BoolToVisibility" />
|
||||
<converters:BooleanOrToVisibilityMultiConverter x:Key="BooleanOrToVisibilityMultiConverter" />
|
||||
<converters:InverseBooleanToVisibilityConverter x:Key="InverseBoolToVisibility" />
|
||||
<converters:NumericStringFormatConverter x:Key="NumericStringFormatConverter" />
|
||||
<converters:DateConverter x:Key="DateConverter" />
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid Background="{DynamicResource Brush_ApplicationContentBackground}">
|
||||
<TabControl AutomationProperties.AutomationId="SensorsListTab" SelectedIndex="{Binding SelectedTabIndex, Mode=TwoWay}">
|
||||
<TabItem Header="{strings:Translate Analog}" AutomationProperties.AutomationId="AnalogTab">
|
||||
<ListView x:Name="lvAnalog" ItemsSource="{Binding AnalogSensors, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="SensorsListView" SelectedIndex="{Binding SelectedAnalogIndex, Mode=TwoWay}" AllowDrop="True" DragOver="AnalogDropOver" DragLeave="AnalogDragLeave" DragEnter="AnalogDragEnter" Drop="AnalogDrop" PreviewMouseLeftButtonDown="Analog_PreviewMouseLeftButtonDown" SelectionMode="Extended" GridViewColumnHeader.Click="GridViewColumnHeader_OnClick">
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListViewItem}" BasedOn="{StaticResource TTS_ListViewItemStyle}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=SensorCalibrationOrUsageStatus}" Value="{x:Static my:UIItemStatus.Error}">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_ApplicationStatus_Failed}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=SensorCalibrationOrUsageStatus}" Value="{x:Static my:UIItemStatus.Warning}">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_Amber}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=SensorCalibrationOrUsageStatus}" Value="{x:Static my:UIItemStatus.None}">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_Table_RowBackground}" />
|
||||
</DataTrigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_ApplicationSelectedBackground}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="SensorsListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Description" x:Name="DescriptionColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Description" HeaderTitle="{strings:TranslateExtension Description}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Description,FallbackValue='Comment'}" AutomationProperties.AutomationId="DescriptionLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="Assembly" x:Name="AssemblyColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Assembly" HeaderTitle="{strings:TranslateExtension Assembly}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding AssemblyName}" AutomationProperties.AutomationId="AssemblyLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="IEPE">
|
||||
<controls:GridViewColumnHeaderSearchableCheckBox Tag="IEPE" HeaderTitle="{strings:TranslateExtension IEPE}" ClickHandler="GridViewColumnHeaderCheckBox_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged"
|
||||
ListviewId="{Binding ListViewId}" Filter="CheckBox_Filter" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding IEPE, Mode=OneWay}" IsEnabled="False" AutomationProperties.AutomationId="IEPECheckBox"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Capacity">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Capacity" HeaderTitle="{strings:TranslateExtension SensorMaxRange}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock AutomationProperties.AutomationId="CapacityLbl">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Converter="{StaticResource NumericStringFormatConverter}" FallbackValue="'Capacity'">
|
||||
<Binding Path="Capacity" />
|
||||
<Binding Path="DataContext.CapacityFormat" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type ListView}}"/>
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Units" x:Name="Units">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Units" HeaderTitle="{strings:TranslateExtension Units}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Units,FallbackValue='Units'}" AutomationProperties.AutomationId="UnitsLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UsageCount" x:Name="UsageCountColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UsageCount" HeaderTitle="{strings:TranslateExtension UsageCount}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UsageCount}" AutomationProperties.AutomationId="UsageCountLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="MaximumUsage" x:Name="MaximumUsageColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="MaximumUsage" HeaderTitle="{strings:TranslateExtension MaximumUsage}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding MaximumUsage}" AutomationProperties.AutomationId="MaximumUsageLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue1">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue1" HeaderTitle="{strings:TranslateExtension UserValue1}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UserValue1}" AutomationProperties.AutomationId="UserValue1Lbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue2">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue2" HeaderTitle="{strings:TranslateExtension UserValue2}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UserValue2}" AutomationProperties.AutomationId="UserValue2Lbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue3">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue3" HeaderTitle="{strings:TranslateExtension UserValue3}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UserValue3}" AutomationProperties.AutomationId="UserValue3Lbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="FirstUseDate" x:Name="FirstUseColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="FirstUseDate" HeaderTitle="{strings:TranslateExtension FirstUseDate}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding FirstUseDate, StringFormat='d', Converter={StaticResource DateConverter}}" AutomationProperties.AutomationId="FirstUseDateLbl"
|
||||
/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SensorsListCalDueDate" x:Name="CalDateColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="CalDueDate" HeaderTitle="{strings:TranslateExtension CalDueDate}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding CalDueDate,FallbackValue='CalDueDate', StringFormat='d'}" AutomationProperties.AutomationId="SensorsListCalDueDateLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="OutOfDate">
|
||||
<controls:GridViewColumnHeaderSearchableCheckBox Tag="OutOfDate" HeaderTitle="{strings:TranslateExtension OutOfDate}" ClickHandler="GridViewColumnHeaderCheckBox_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}" Filter="CheckBox_Filter" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding OutOfDate, Mode=OneWay}" IsEnabled="False" AutomationProperties.AutomationId="OutOfDateCheckbox" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="InWarningPeriod" x:Name="InWarningPeriodColumn">
|
||||
<controls:GridViewColumnHeaderSearchableCheckBox Tag="InWarningPeriod" HeaderTitle="{strings:TranslateExtension InWarningPeriod}" ClickHandler="GridViewColumnHeaderCheckBox_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}" Filter="CheckBox_Filter" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding InWarningPeriod, Mode=OneWay}" IsEnabled="False" AutomationProperties.AutomationId="InWarningPeriodCheckBox"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="InspectBeforeUse" x:Name="InspectBeforeUseColumn">
|
||||
<controls:GridViewColumnHeaderSearchableCheckBox Tag="InspectBeforeUse" HeaderTitle="{strings:TranslateExtension InspectBeforeUse}" ClickHandler="GridViewColumnHeaderCheckBox_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}" Filter="CheckBox_Filter" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding InspectBeforeUse, Mode=OneWay}" IsEnabled="False" AutomationProperties.AutomationId="InspectBeforeUseCheckBox"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{strings:Translate Squibs}" AutomationProperties.AutomationId="SquibsTab">
|
||||
<ListView x:Name="lvSquibs" ItemsSource="{Binding Squibs, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="SquibsListView" SelectedIndex="{Binding SelectedSquibIndex, Mode=TwoWay}" AllowDrop="True" DragEnter="Squibs_DragEnter" DragLeave="SquibsDragLeave" DragOver="SquibsDragOver" Drop="SquibsDragDrop" PreviewMouseLeftButtonDown="Squibs_PreviewMouseLeftButtonDown" SelectionMode="Extended" GridViewColumnHeader.Click="GridViewColumnHeader_OnClick">
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="SquibGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="S_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Description">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Description" HeaderTitle="{strings:TranslateExtension Description}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Description,FallbackValue='Comment'}" AutomationProperties.AutomationId="S_DescriptionLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SQMode">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SQMode" HeaderTitle="{strings:TranslateExtension SQMode}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SQMode,FallbackValue='SQMode'}" AutomationProperties.AutomationId="S_ModeLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SQDelay">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SQDelay" HeaderTitle="{strings:TranslateExtension SQDelay}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SQDelay,FallbackValue='SQDelay'}" AutomationProperties.AutomationId="S_DelayLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SQDuration">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SQDuration" HeaderTitle="{strings:TranslateExtension SQDuration}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SQDuration,FallbackValue='SQDuration'}" AutomationProperties.AutomationId="S_DurationLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{strings:Translate DigitalInputs}" AutomationProperties.AutomationId="DigitalInputsTab">
|
||||
<ListView x:Name="lvDigitalInputs" ItemsSource="{Binding DigitalInputSettings, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="DigitalInputsListView" SelectedIndex="{Binding SelectedDigitialInIndex, Mode=TwoWay}" AllowDrop="True" DragEnter="DigitalInDragEnter" DragLeave="DigitalInDragLeave" DragOver="DigitalInDragOver" Drop="DigitalInDragDrop" PreviewMouseLeftButtonDown="DigitalInput_PreviewMouseLeftButtonDown" SelectionMode="Extended" GridViewColumnHeader.Click="GridViewColumnHeader_OnClick">
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="DigitalInputsGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableDigitalIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="DI_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Description">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Description" HeaderTitle="{strings:TranslateExtension Description}" Search="GridViewColumnHeaderSearchableDigitalIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Description,FallbackValue='Comment'}" AutomationProperties.AutomationId="DI_DescriptionLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="DIMode">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DIMode" HeaderTitle="{strings:TranslateExtension DIMode}" Search="GridViewColumnHeaderSearchableDigitalIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding DIMode,FallbackValue='DIMode'}" AutomationProperties.AutomationId="DI_ModeLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{strings:Translate DigitalOutputs}" AutomationProperties.AutomationId="DigitalOutputsTab">
|
||||
<ListView x:Name="lvDigitalOutput" ItemsSource="{Binding DigitalOutputSettings, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="DigitalOutputsListView" SelectedIndex="{Binding SelectedDigitalOutIndex, Mode=TwoWay}" AllowDrop="True" DragEnter="DigitalOutDragEnter" DragLeave="DigitalOutDragLeave" DragOver="DigitalOutDragOver" Drop="DigitalOutDragDrop" PreviewMouseLeftButtonDown="DigitalOutput_PreviewMouseLeftButtonDown" SelectionMode="Extended" GridViewColumnHeader.Click="GridViewColumnHeader_OnClick">
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="DigitalOutputsListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableDigitalOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="DO_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="DODelay">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DODelay" HeaderTitle="{strings:TranslateExtension DODelay}" Search="GridViewColumnHeaderSearchableDigitalOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding DODelay,FallbackValue='DODelay'}" AutomationProperties.AutomationId="DO_DelayLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="DODuration">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DODuration" HeaderTitle="{strings:TranslateExtension DODuration}" Search="GridViewColumnHeaderSearchableDigitalOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding DODuration,FallbackValue='DODuration'}" AutomationProperties.AutomationId="DO_DurationLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{strings:Translate Uarts}" AutomationProperties.AutomationId="UartsTab">
|
||||
<ListView x:Name="lvUart" ItemsSource="{Binding UartSettings, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="UartsListView" SelectedIndex="{Binding SelectedUartSettingsIndex, Mode=TwoWay}" AllowDrop="True" DragEnter="UartSettingsDragEnter" DragLeave="UartSettingsDragLeave" DragOver="UartSettingsDragOver" Drop="UartSettingsDragDrop" PreviewMouseLeftButtonDown="Uart_PreviewMouseLeftButtonDown" SelectionMode="Extended" GridViewColumnHeader.Click="GridViewColumnHeader_OnClick">
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="UartsListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="Uart_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartBaudRate">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="BaudRate" HeaderTitle="{strings:TranslateExtension UartBaudRate}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding BaudRate,FallbackValue='BaudRate'}" AutomationProperties.AutomationId="BaudRateLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartDataBits">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DataBits" HeaderTitle="{strings:TranslateExtension UartDataBits}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding DataBits,FallbackValue='DataBits'}" AutomationProperties.AutomationId="DataBitsLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartStopBits">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StopBits" HeaderTitle="{strings:TranslateExtension UartStopBits}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding StopBits,FallbackValue='StopBits'}" AutomationProperties.AutomationId="StopBitsLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartParity">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Parity" HeaderTitle="{strings:TranslateExtension UartParity}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Parity,FallbackValue='Parity'}" AutomationProperties.AutomationId="ParityLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartDataFormat">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DataFormat" HeaderTitle="{strings:TranslateExtension UartDataFormat}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding DataFormat,FallbackValue='DataFormat'}" AutomationProperties.AutomationId="DataFormatLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{strings:Translate StreamInputs}" AutomationProperties.AutomationId="StreamInputsTab">
|
||||
<ListView x:Name="lvStreamIn" ItemsSource="{Binding StreamInputSettings, UpdateSourceTrigger=PropertyChanged}"
|
||||
AllowDrop="True" DragEnter="StreamInDragEnter" DragLeave="StreamInDragLeave" DragOver="StreamInDragOver" Drop="StreamInDragDrop" PreviewMouseLeftButtonDown="StreamIn_PreviewMouseLeftButtonDown" SelectionMode="Extended"
|
||||
AutomationProperties.AutomationId="StreamInputsListView"
|
||||
SelectedIndex="{Binding SelectedStreamInIndex, Mode=TwoWay}"
|
||||
GridViewColumnHeader.Click="GridViewColumnHeader_OnClick">
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="StreamInputsListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableStreamIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="SO_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPAddress">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPAddress" HeaderTitle="{strings:TranslateExtension UDPAddress}" Search="GridViewColumnHeaderSearchableStreamIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UDPAddress,FallbackValue='UDPAddress'}" AutomationProperties.AutomationId="UDPAddressLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{strings:Translate StreamOutputs}" AutomationProperties.AutomationId="StreamOutputsTab">
|
||||
<ListView x:Name="lvStreamOut" ItemsSource="{Binding StreamOutputSettings, UpdateSourceTrigger=PropertyChanged}"
|
||||
AllowDrop="True" DragEnter="StreamOutDragEnter" DragLeave="StreamOutDragLeave" DragOver="StreamOutDragOver" Drop="StreamOutDragDrop" PreviewMouseLeftButtonDown="StreamOut_PreviewMouseLeftButtonDown" SelectionMode="Extended"
|
||||
AutomationProperties.AutomationId="StreamOutputsListView"
|
||||
SelectedIndex="{Binding SelectedStreamOutIndex, Mode=TwoWay}"
|
||||
GridViewColumnHeader.Click="GridViewColumnHeader_OnClick">
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="StreamOutputsListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="SO_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPProfile">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPProfile" HeaderTitle="{strings:TranslateExtension UDPProfile}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UDPProfile,FallbackValue='UDPProfile'}" AutomationProperties.AutomationId="UDPProfileLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPAddress">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPAddress" HeaderTitle="{strings:TranslateExtension UDPAddress}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding UDPAddress,FallbackValue='UDPAddress'}" AutomationProperties.AutomationId="UDPAddressLbl" Visibility="{Binding IsUART, Converter={StaticResource InverseBoolToVisibility}}" />
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsUART, Converter={StaticResource BoolToVisibility}}" />
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPTimeChannelId">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPTimeChannelId" HeaderTitle="{strings:TranslateExtension TimeChannelId}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding UDPTimeChannelId,FallbackValue='UDPTimeChannelId'}" AutomationProperties.AutomationId="UDPTimeChannelIdLbl"
|
||||
Visibility="{Binding IsCH10, Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsCH10, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPDataChannelId">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPDataChannelId" HeaderTitle="{strings:TranslateExtension DataChannelId}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding UDPDataChannelId,FallbackValue='UDPDataChannelId'}" AutomationProperties.AutomationId="UDPDataChannelIdLbl">
|
||||
<TextBlock.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}">
|
||||
<Binding Path="IsCH10" />
|
||||
<Binding Path="IsUART" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Visibility>
|
||||
</TextBlock>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}">
|
||||
<TextBlock.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}" ConverterParameter="False">
|
||||
<Binding Path="IsCH10" />
|
||||
<Binding Path="IsUART" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Visibility>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPTmNSConfig">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPTmNSConfig" HeaderTitle="{strings:TranslateExtension TmNSConfig}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding UDPTmNSConfig,FallbackValue='UDPTmNSConfig'}" AutomationProperties.AutomationId="UDPTmNSConfigLbl"
|
||||
Visibility="{Binding IsTMNS,Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="IRIGTimeDataPacketIntervalMs">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="IRIGTimeDataPacketIntervalMs" HeaderTitle="{strings:TranslateExtension IRIGTimeDataPacketIntervalMs}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding IRIGTimeDataPacketIntervalMs,FallbackValue='IRIGTimeDataPacketIntervalMs'}" AutomationProperties.AutomationId="IRIGTimeDataPacketIntervalMsLbl"
|
||||
Visibility="{Binding IsCH10, Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsCH10, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="TMATSIntervalMs">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="TMATSIntervalMs" HeaderTitle="{strings:TranslateExtension TMATSIntervalMs}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding TMATSIntervalMs, FallbackValue='1000'}" AutomationProperties.AutomationId="TMATSIntervalMsLbl"
|
||||
Visibility="{Binding IsCH10, Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsCH10, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using DTS.Common.Controls;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace SensorsList
|
||||
{
|
||||
/// <inheritdoc cref="ISensorsListOverdueView" />
|
||||
/// <summary>
|
||||
/// Interaction logic for SensorsListView.xaml
|
||||
/// </summary>
|
||||
public partial class SensorsListOverdueView : ISensorsListOverdueView
|
||||
{
|
||||
public SensorsListOverdueView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private void ListViewHeader_Click(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
var colHeader = (GridViewColumnHeader)e.OriginalSource;
|
||||
var viewModel = (ISensorsListViewModel)colHeader.DataContext;
|
||||
viewModel.SortOverdue(colHeader.Tag, true);
|
||||
}
|
||||
private void GridViewColumnHeaderSearchable_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
|
||||
// Do search
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="SensorsList.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<SensorsList.Properties.Settings>
|
||||
</SensorsList.Properties.Settings>
|
||||
</userSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SensorsList.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO.Ports;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
public class CanIOSetting : DTS.Common.Base.BasePropertyChanged, ICanIOSetting, IDragAndDropItem
|
||||
{
|
||||
private bool _bIncluded = true;
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
public string SerialNumber { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
public int DatabaseId { get; set; } = -1;
|
||||
public string LastModifiedBy { get; set; } = "";
|
||||
public DateTime LastModified { get; set; }
|
||||
public bool Assigned { get; set; } = false;
|
||||
public bool Online { get; set; } = false;
|
||||
public bool Broken { get; set; } = false;
|
||||
public bool DoNotUse { get; set; } = false;
|
||||
public bool CanIsFD { get; set; } = false;
|
||||
public int CanArbBaseBitrate { get; set; } = 0;
|
||||
public int CanArbBaseSJW { get; set; } = 0;
|
||||
public int CanDataBitrate { get; set; } = 0;
|
||||
public int CanDataSJW { get; set; } = 0;
|
||||
public string CanFileType { get; set; } = string.Empty;
|
||||
public string ISOCode { get; set; } = string.Empty;
|
||||
public string ISOChannelName { get; set; } = string.Empty;
|
||||
public string UserCode { get; set; } = string.Empty;
|
||||
public string UserChannelName { get; set; } = string.Empty;
|
||||
|
||||
public bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
term = term.ToLower();
|
||||
if (SerialNumber.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (Description.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (CanIsFD.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (CanArbBaseBitrate.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (CanArbBaseSJW.ToString().ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (CanDataBitrate.ToString().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (CanDataSJW.ToString().ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (CanFileType.ToString().ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public CanIOSetting() { }
|
||||
|
||||
public CanIOSetting(ICANRecord record)
|
||||
{
|
||||
DatabaseId = record.Id;
|
||||
Description = "";
|
||||
LastModified = record.LastModified;
|
||||
LastModifiedBy = record.LastUpdatedBy;
|
||||
SerialNumber = record.SerialNumber;
|
||||
|
||||
ISOCode = "";
|
||||
ISOChannelName = "";
|
||||
UserCode = "";
|
||||
UserChannelName = "";
|
||||
|
||||
CanIsFD = record.CanIsFD;
|
||||
CanArbBaseBitrate = record.CanArbBaseBitrate;
|
||||
CanArbBaseSJW = record.CanArbBaseSJW;
|
||||
CanDataBitrate = record.CanDataBitrate;
|
||||
CanDataSJW = record.CanDataSJW;
|
||||
CanFileType = record.CanFileType;
|
||||
}
|
||||
public CanIOSetting(ISensorData s) : this()
|
||||
{
|
||||
DatabaseId = s.DatabaseId;
|
||||
Description = s.Comment;
|
||||
LastModified = s.LastModified;
|
||||
LastModifiedBy = s.LastUpdatedBy;
|
||||
SerialNumber = s.SerialNumber;
|
||||
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
|
||||
CanIsFD = s.CanIsFD;
|
||||
CanArbBaseBitrate = s.CanArbBaseBitrate;
|
||||
CanArbBaseSJW = s.CanArbBaseSJW;
|
||||
CanDataBitrate = s.CanDataBitrate;
|
||||
CanDataSJW = s.CanDataSJW;
|
||||
CanFileType = s.CanFileType;
|
||||
}
|
||||
}
|
||||
|
||||
public class CanIOComparer : IComparer<ICanIOSetting>
|
||||
{
|
||||
public CanSettingFields SortField { get; set; }
|
||||
public bool SortAscending { get; set; }
|
||||
|
||||
public int Compare(ICanIOSetting left, ICanIOSetting right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left; var b = right;
|
||||
if (!SortAscending) { a = right; b = left; }
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
var stringComparer = new DTS.Common.Utilities.NaturalStringComparer();
|
||||
switch (SortField)
|
||||
{
|
||||
case CanSettingFields.CanIsFD:
|
||||
return a.CanIsFD.CompareTo(b.CanIsFD);
|
||||
case CanSettingFields.CanArbBaseBitrate:
|
||||
return a.CanArbBaseBitrate.CompareTo(b.CanArbBaseBitrate);
|
||||
case CanSettingFields.CanArbBaseSJW:
|
||||
return a.CanArbBaseSJW.CompareTo(b.CanArbBaseSJW);
|
||||
case CanSettingFields.CanDataBitrate:
|
||||
return a.CanDataBitrate.CompareTo(b.CanDataBitrate);
|
||||
case CanSettingFields.CanDataSJW:
|
||||
return a.CanDataSJW.CompareTo(b.CanDataSJW);
|
||||
case CanSettingFields.CanFileType:
|
||||
return stringComparer.Compare(a.CanFileType, b.CanFileType);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
using System;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DTS.Common;
|
||||
using DTS.Common.Interface;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
using Prism.Ioc;
|
||||
using Prism.Modularity;
|
||||
using SensorsList;
|
||||
using Unity;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable RedundantAttributeUsageProperty
|
||||
// ReSharper disable UnusedParameter.Local
|
||||
|
||||
[assembly: SensorsListModuleName]
|
||||
[assembly: SensorsListModuleImageAttribute]
|
||||
namespace SensorsList
|
||||
{
|
||||
[Export(typeof(IModule))]
|
||||
[Module(ModuleName = "SensorsListModule")]
|
||||
public class SensorsListModule : IModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Injected unity container
|
||||
/// </summary>
|
||||
private readonly IUnityContainer _unityContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SensorsListModule"/> class.
|
||||
/// </summary>
|
||||
/// <param name="unityContainer">Obtained reference of the unity container by using dependency injection.</param>
|
||||
public SensorsListModule(IUnityContainer unityContainer)
|
||||
{
|
||||
|
||||
_unityContainer = unityContainer;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// Register View & View-Model with Unity dependency injection container as a singleton.
|
||||
_unityContainer.RegisterType<ISensorsListView, SensorsListView>();
|
||||
_unityContainer.RegisterType<ISensorsListViewModel, SensorsListViewModel>();
|
||||
_unityContainer.RegisterType<ISensorsListEditGroupView, SensorsListEditGroupView>();
|
||||
_unityContainer.RegisterType<ISensorsListEditGroupViewModel, SensorsListEditGroupViewModel>();
|
||||
}
|
||||
|
||||
public void OnInitialized(IContainerProvider containerProvider)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attribute class contains assembly name
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
|
||||
public class SensorsListModuleNameAttribute : TextAttribute
|
||||
{
|
||||
public SensorsListModuleNameAttribute() : this(null) { }
|
||||
|
||||
public SensorsListModuleNameAttribute(string s)
|
||||
{
|
||||
AssemblyName = AssemblyNames.SensorsList.ToString();
|
||||
}
|
||||
|
||||
public override string AssemblyName { get; }
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(TextAttribute);
|
||||
}
|
||||
|
||||
public override string GetAssemblyName()
|
||||
{
|
||||
return AssemblyName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attribute class contains assembly image and name - used on the Main screen to SummaryModule available components
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
|
||||
public class SensorsListModuleImageAttribute : ImageAttribute
|
||||
{
|
||||
private BitmapImage _img;
|
||||
|
||||
public SensorsListModuleImageAttribute() : this(null) { }
|
||||
public override BitmapImage AssemblyImage
|
||||
{
|
||||
get { _img = AssemblyInfo.GetImage(AssemblyNames.SensorsList.ToString()); return _img; }
|
||||
}
|
||||
public SensorsListModuleImageAttribute(string s)
|
||||
{
|
||||
_img = AssemblyInfo.GetImage(AssemblyNames.SensorsList.ToString());
|
||||
}
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(ImageAttribute);
|
||||
}
|
||||
public override BitmapImage GetAssemblyImage()
|
||||
{
|
||||
return AssemblyImage;
|
||||
}
|
||||
private string _name;
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { _name = AssemblyNames.SensorsList.ToString(); return _name; }
|
||||
}
|
||||
|
||||
public override string GetAssemblyName()
|
||||
{
|
||||
return AssemblyName;
|
||||
}
|
||||
private string _group;
|
||||
public override string AssemblyGroup
|
||||
{
|
||||
get { _group = eAssemblyGroups.Prepare.ToString(); return _group; }
|
||||
}
|
||||
|
||||
public override string GetAssemblyGroup()
|
||||
{
|
||||
return AssemblyGroup;
|
||||
}
|
||||
|
||||
private eAssemblyRegion _region;
|
||||
public override eAssemblyRegion AssemblyRegion
|
||||
{
|
||||
get { _region = eAssemblyRegion.SensorsListRegion; return _region; }
|
||||
}
|
||||
public override eAssemblyRegion GetAssemblyRegion()
|
||||
{
|
||||
return AssemblyRegion;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="SensorsList.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,233 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// this class is used to represent digital inputs in lists in the UI
|
||||
/// </summary>
|
||||
public class DigitalInputSetting : DigitalInDbRecord, IDigitalInputSetting, IDragAndDropItem
|
||||
{
|
||||
private bool _bIncluded = true;
|
||||
/// <summary>
|
||||
/// whether the item should have a check in lists with a checkbox
|
||||
/// </summary>
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// the description or comment of the digital input
|
||||
/// </summary>
|
||||
public string Description
|
||||
{
|
||||
get => UserValue1;
|
||||
set
|
||||
{
|
||||
UserValue1 = value;
|
||||
OnPropertyChanged("Description");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// a string representation of the digital input mode of the sensor
|
||||
/// </summary>
|
||||
public string DIMode
|
||||
{
|
||||
get => base.Mode.ToString();
|
||||
set
|
||||
{
|
||||
if (Enum.TryParse(value, out DigitalInputModes mode))
|
||||
{
|
||||
base.Mode = mode;
|
||||
}
|
||||
OnPropertyChanged("DIMode");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// the user who last modified the digital input
|
||||
/// </summary>
|
||||
public string ModifiedBy
|
||||
{
|
||||
get => LastModifiedBy;
|
||||
set
|
||||
{
|
||||
LastModifiedBy = value;
|
||||
OnPropertyChanged("ModifiedBy");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// not used? no references
|
||||
/// [I think it may be there because of some binding in the baseview]
|
||||
/// </summary>
|
||||
public bool Disabled { get; set; } = false;
|
||||
/// <summary>
|
||||
/// whether the digital input setting is associated with a channel or not
|
||||
/// </summary>
|
||||
public bool Assigned { get; set; } = false;
|
||||
/// <summary>
|
||||
/// whether the digital input was found online or not
|
||||
/// </summary>
|
||||
public bool Online { get; set; } = false;
|
||||
/// <summary>
|
||||
/// the database id for the digital input setting
|
||||
/// valid values must be > 0
|
||||
/// </summary>
|
||||
public int DatabaseId
|
||||
{
|
||||
get => Id;
|
||||
set
|
||||
{
|
||||
Id = value;
|
||||
OnPropertyChanged("DatabaseId");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// a string representation of the active state of the digital input
|
||||
/// this is what to display when the digital input is active (as opposed to the default state)
|
||||
/// </summary>
|
||||
public string ActiveValue //{ get; set; } = "5";
|
||||
{
|
||||
get => ScaleMultiplier.ActiveValue.ToString();
|
||||
set
|
||||
{
|
||||
if (double.TryParse(value, out var d))
|
||||
{
|
||||
ScaleMultiplier.ActiveValue = d;
|
||||
}
|
||||
OnPropertyChanged("ActiveValue");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// a string representation of the default state of the input
|
||||
/// this is what to display when the digital input is not in active state
|
||||
/// (the input is in it's default or normal state)
|
||||
/// </summary>
|
||||
public string DefaultValue //{ get; set; } = "0";
|
||||
{
|
||||
get => ScaleMultiplier.DefaultValue.ToString();
|
||||
set
|
||||
{
|
||||
if (double.TryParse(value, out var d))
|
||||
{
|
||||
ScaleMultiplier.DefaultValue = d;
|
||||
}
|
||||
OnPropertyChanged("DefaultValue");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// returns true if the digital input matches filter criteria
|
||||
/// </summary>
|
||||
/// <param name="term"></param>
|
||||
/// <returns></returns>
|
||||
public bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term)) { return true; }
|
||||
term = term.ToLower();
|
||||
if (SerialNumber.ToLower().Contains(term)) { return true; }
|
||||
if (Description.ToLower().Contains(term)) { return true; }
|
||||
if (DIMode.ToLower().Contains(term)) { return true; }
|
||||
return false;
|
||||
}
|
||||
|
||||
public DigitalInputSetting()
|
||||
{
|
||||
}
|
||||
public DigitalInputSetting(IDigitalInDbRecord record)
|
||||
: base(record)
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// constructs a new digital input from sensor data
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
public DigitalInputSetting(ISensorData s)
|
||||
{
|
||||
Description = s.Comment;
|
||||
DIMode = s.InputMode.ToString();
|
||||
LastModified = s.LastModified;
|
||||
ModifiedBy = s.LastUpdatedBy;
|
||||
SerialNumber = s.SerialNumber;
|
||||
DatabaseId = s.DatabaseId;
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
EID = s.EID;
|
||||
ActiveValue = s.InputActiveValue.ToString("N0");
|
||||
DefaultValue = s.InputDefaultValue.ToString("N0");
|
||||
Mode = s.InputMode;
|
||||
}
|
||||
public bool IsTestSpecificDigitalInput()
|
||||
{
|
||||
return SerialNumber.StartsWith("TSI_");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// compares digital inputs
|
||||
/// </summary>
|
||||
public class DigitalInComparer : IComparer<IDigitalInputSetting>
|
||||
{
|
||||
/// <summary>
|
||||
/// what field to sort on
|
||||
/// </summary>
|
||||
public DigitalInputFields SortField { get; set; }
|
||||
/// <summary>
|
||||
/// whether to sort ascending or not
|
||||
/// </summary>
|
||||
public bool SortAscending { get; set; }
|
||||
|
||||
public int Compare(IDigitalInputSetting left, IDigitalInputSetting right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left;
|
||||
var b = right;
|
||||
if (!SortAscending)
|
||||
{
|
||||
a = right;
|
||||
b = left;
|
||||
}
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
var stringComparer = new DTS.Common.Utilities.NaturalStringComparer();
|
||||
|
||||
switch (SortField)
|
||||
{
|
||||
case DigitalInputFields.Included:
|
||||
return a.Included.CompareTo(b.Included);
|
||||
case DigitalInputFields.SerialNumber:
|
||||
return stringComparer.Compare(a.SerialNumber, b.SerialNumber);
|
||||
case DigitalInputFields.Description:
|
||||
return stringComparer.Compare(a.Description, b.Description);
|
||||
case DigitalInputFields.Mode:
|
||||
return stringComparer.Compare(a.DIMode, b.DIMode);
|
||||
case DigitalInputFields.ModifiedBy:
|
||||
return stringComparer.Compare(a.ModifiedBy, b.ModifiedBy);
|
||||
case DigitalInputFields.LastModified:
|
||||
return a.LastModified.CompareTo(b.LastModified);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<base:BaseView x:Class="SensorsList.SensorTemplatesImportView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:behaviors="clr-namespace:DTS.Common.Behaviors;assembly=DTS.Common"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:strings="clr-namespace:SensorsList"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Controls/combobox.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TTS_ListViewItemStyle}"/>
|
||||
</Style>
|
||||
<Style TargetType="TextBox" BasedOn="{StaticResource TTS_TextBoxStyle}"/>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource TTS_TextBlockStyle}"/>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||||
<Style TargetType="ComboBox" BasedOn="{StaticResource TTS_ComboBoxStyle}"/>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid Background="{DynamicResource Brush_ApplicationContentBackground}">
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{45D282CA-92BD-4168-B79E-B84A196A90D5}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SensorsList</RootNamespace>
|
||||
<AssemblyName>SensorsList</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<RunCodeAnalysis>false</RunCodeAnalysis>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="Microsoft.Xaml.Behaviors">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Microsoft.Xaml.Behaviors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="Prism">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Unity.Wpf">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.Unity.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Wpf">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Unity.Abstractions">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Unity.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Container">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Unity.Container.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="Xceed.Wpf.Toolkit">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\Xceed.Wpf.Toolkit\Xceed.Wpf.Toolkit.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Model\AnalogSensor.cs" />
|
||||
<Compile Include="Model\CanIOSetting.cs" />
|
||||
<Compile Include="Model\DigitalInputSetting.cs" />
|
||||
<Compile Include="Model\StreamInputSetting.cs" />
|
||||
<Compile Include="Model\StreamOutputSetting.cs" />
|
||||
<Compile Include="Model\DigitalOutputSetting.cs" />
|
||||
<Compile Include="Model\Squib.cs" />
|
||||
<Compile Include="Model\UartIOSetting.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SensorsListModule.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\StringResources.Designer.cs">
|
||||
<DependentUpon>StringResources.resx</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Resources\TranslateExtension.cs" />
|
||||
<Compile Include="ViewModel\SensorsListEditGroupViewModel.cs" />
|
||||
<Compile Include="ViewModel\SensorTemplatesViewModel.cs" />
|
||||
<Compile Include="ViewModel\SensorsListViewModel.cs" />
|
||||
<Compile Include="View\SensorsListOverdueView.xaml.cs">
|
||||
<DependentUpon>SensorsListOverdueView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\SensorsListEditGroupView.xaml.cs">
|
||||
<DependentUpon>SensorsListEditGroupView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\SensorTemplatesImportView.xaml.cs">
|
||||
<DependentUpon>SensorTemplatesImportView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\SensorTemplatesExportView.xaml.cs">
|
||||
<DependentUpon>SensorTemplatesExportView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\SensorsListView.xaml.cs">
|
||||
<DependentUpon>SensorsListView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\StringResources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>StringResources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Core\DTS.Common.Core.csproj">
|
||||
<Project>{fab1f470-1574-4301-b56e-d3364aa93679}</Project>
|
||||
<Name>DTS.Common.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.DAS.Concepts\DTS.Common.DAS.Concepts.csproj">
|
||||
<Project>{03D8C736-36EB-4CD1-A6D9-130452B23239}</Project>
|
||||
<Name>DTS.Common.DAS.Concepts</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.DataModel\DTS.Common.DataModel.csproj">
|
||||
<Project>{2a2f03a9-bf85-4360-a06a-cf3016d2633b}</Project>
|
||||
<Name>DTS.Common.DataModel</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.ISO\DTS.Common.ISO.csproj">
|
||||
<Project>{4dccddd1-032f-430c-9a6f-231daca4fbd0}</Project>
|
||||
<Name>DTS.Common.ISO</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Storage\DTS.Common.Storage.csproj">
|
||||
<Project>{e0d1a7d0-dce8-403d-ba85-5a5d66ba1313}</Project>
|
||||
<Name>DTS.Common.Storage</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Utilities\DTS.Common.Utilities.csproj">
|
||||
<Project>{03eace47-ea59-44ac-b49d-956e4dc4d618}</Project>
|
||||
<Name>DTS.Common.Utilities</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common\DTS.Common.csproj">
|
||||
<Project>{114edc77-f3b5-4576-a91b-40818d503b55}</Project>
|
||||
<Name>DTS.Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\IService\IService.csproj">
|
||||
<Project>{c9c45b72-05a3-4962-bc13-a78b1f4b1925}</Project>
|
||||
<Name>IService</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\SensorDB\SensorDB.csproj">
|
||||
<Project>{444ef10c-046e-47ad-a9a5-17318d488723}</Project>
|
||||
<Name>SensorDB</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Users\Users.csproj">
|
||||
<Project>{BE8D217D-6DA9-4BCA-B62A-A82325B33979}</Project>
|
||||
<Name>Users</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\SensorsListOverdueView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\SensorsListEditGroupView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\SensorTemplatesImportView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\SensorTemplatesExportView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\SensorsListView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,18 @@
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace SensorsList
|
||||
{
|
||||
/// <inheritdoc cref="ISensorTemplatesImportView" />
|
||||
/// <summary>
|
||||
/// Interaction logic for SensorTemplatesImportView.xaml
|
||||
/// </summary>
|
||||
public partial class SensorTemplatesImportView : ISensorTemplatesImportView
|
||||
{
|
||||
public SensorTemplatesImportView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace SensorsList
|
||||
{
|
||||
/// <inheritdoc cref="ISensorTemplatesExportView" />
|
||||
/// <summary>
|
||||
/// Interaction logic for SensorTemplatesExportView.xaml
|
||||
/// </summary>
|
||||
public partial class SensorTemplatesExportView : ISensorTemplatesExportView
|
||||
{
|
||||
public SensorTemplatesExportView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
public class DigitalOutputSetting : DigitalOutDbRecord, IDigitalOutputSetting, IDragAndDropItem
|
||||
{
|
||||
private bool _bIncluded = true;
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
public string Description { get; set; } = "";
|
||||
public bool Disabled { get; set; } = false;
|
||||
public bool Assigned { get; set; } = false;
|
||||
public bool Online { get; set; } = false;
|
||||
public bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term)) { return true; }
|
||||
term = term.ToLower();
|
||||
if (SerialNumber.ToLower().Contains(term)) { return true; }
|
||||
if (DODelay.ToString(CultureInfo.CurrentCulture).Contains(term)) { return true; }
|
||||
if (DODuration.ToString(CultureInfo.CurrentCulture).Contains(term)) { return true; }
|
||||
return false;
|
||||
}
|
||||
public DigitalOutputSetting(IDigitalOutDbRecord record)
|
||||
: base(record)
|
||||
{
|
||||
}
|
||||
public DigitalOutputSetting()
|
||||
{
|
||||
}
|
||||
|
||||
public DigitalOutputSetting(ISensorData s)
|
||||
{
|
||||
DatabaseId = s.DatabaseId;
|
||||
Description = s.Comment;
|
||||
DODelay = s.DigitalOutputDelayMS;
|
||||
DODuration = s.DigitalOutputDurationMS;
|
||||
LastModified = s.LastModified;
|
||||
ModifiedBy = s.LastUpdatedBy;
|
||||
SerialNumber = s.SerialNumber;
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
DOMode = s.DigitalOutputMode;
|
||||
LimitDuration = s.DigitalOutputLimitDuration;
|
||||
}
|
||||
public bool IsTestSpecificDigitalOutput()
|
||||
{
|
||||
return SerialNumber.StartsWith("TSD_");
|
||||
}
|
||||
}
|
||||
public class DigitalOutComparer : IComparer<IDigitalOutputSetting>
|
||||
{
|
||||
public DigitalOutFields SortField { get; set; }
|
||||
public bool SortAscending { get; set; }
|
||||
public int Compare(IDigitalOutputSetting left, IDigitalOutputSetting right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left; var b = right;
|
||||
if (!SortAscending) { a = right; b = left; }
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (SortField)
|
||||
{
|
||||
case DigitalOutFields.Included:
|
||||
return a.Included.CompareTo(b.Included);
|
||||
case DigitalOutFields.SerialNumber:
|
||||
return string.Compare(a.SerialNumber, b.SerialNumber, StringComparison.OrdinalIgnoreCase);
|
||||
case DigitalOutFields.Description:
|
||||
return string.Compare(a.Description, b.Description, StringComparison.OrdinalIgnoreCase);
|
||||
case DigitalOutFields.Delay:
|
||||
return a.DODelay.CompareTo(b.DODelay);
|
||||
case DigitalOutFields.Duration:
|
||||
return a.DODuration.CompareTo(b.DODuration);
|
||||
case DigitalOutFields.ModifiedBy:
|
||||
return string.Compare(a.ModifiedBy, b.ModifiedBy, StringComparison.OrdinalIgnoreCase);
|
||||
case DigitalOutFields.LastModified:
|
||||
return a.LastModified.CompareTo(b.LastModified);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,630 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SensorsList.Resources {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class StringResources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal StringResources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SensorsList.Resources.StringResources", typeof(StringResources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Analog.
|
||||
/// </summary>
|
||||
internal static string Analog {
|
||||
get {
|
||||
return ResourceManager.GetString("Analog", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Assembly.
|
||||
/// </summary>
|
||||
internal static string Assembly {
|
||||
get {
|
||||
return ResourceManager.GetString("Assembly", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cal Date.
|
||||
/// </summary>
|
||||
internal static string CalDate {
|
||||
get {
|
||||
return ResourceManager.GetString("CalDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cal Due Date.
|
||||
/// </summary>
|
||||
internal static string CalDueDate {
|
||||
get {
|
||||
return ResourceManager.GetString("CalDueDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Capacity (EU).
|
||||
/// </summary>
|
||||
internal static string Capacity {
|
||||
get {
|
||||
return ResourceManager.GetString("Capacity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data channel id.
|
||||
/// </summary>
|
||||
internal static string DataChannelId {
|
||||
get {
|
||||
return ResourceManager.GetString("DataChannelId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Name.
|
||||
/// </summary>
|
||||
internal static string Description {
|
||||
get {
|
||||
return ResourceManager.GetString("Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Digital Input Settings.
|
||||
/// </summary>
|
||||
internal static string DigitalInputs {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalInputs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Digital Output Settings.
|
||||
/// </summary>
|
||||
internal static string DigitalOutputs {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutputs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Input Mode.
|
||||
/// </summary>
|
||||
internal static string DIMode {
|
||||
get {
|
||||
return ResourceManager.GetString("DIMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delay (ms).
|
||||
/// </summary>
|
||||
internal static string DODelay {
|
||||
get {
|
||||
return ResourceManager.GetString("DODelay", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Duration (ms).
|
||||
/// </summary>
|
||||
internal static string DODuration {
|
||||
get {
|
||||
return ResourceManager.GetString("DODuration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Excitation (V).
|
||||
/// </summary>
|
||||
internal static string Excitation {
|
||||
get {
|
||||
return ResourceManager.GetString("Excitation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to First use date.
|
||||
/// </summary>
|
||||
internal static string FirstUseDate {
|
||||
get {
|
||||
return ResourceManager.GetString("FirstUseDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor EID.
|
||||
/// </summary>
|
||||
internal static string ID {
|
||||
get {
|
||||
return ResourceManager.GetString("ID", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to IEPE.
|
||||
/// </summary>
|
||||
internal static string IEPE {
|
||||
get {
|
||||
return ResourceManager.GetString("IEPE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Inspect Before Use.
|
||||
/// </summary>
|
||||
internal static string InspectBeforeUse {
|
||||
get {
|
||||
return ResourceManager.GetString("InspectBeforeUse", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to In Warning Period.
|
||||
/// </summary>
|
||||
internal static string InWarningPeriod {
|
||||
get {
|
||||
return ResourceManager.GetString("InWarningPeriod", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Time packet interval (ms).
|
||||
/// </summary>
|
||||
internal static string IRIGTimeDataPacketIntervalMs {
|
||||
get {
|
||||
return ResourceManager.GetString("IRIGTimeDataPacketIntervalMs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Last Modified.
|
||||
/// </summary>
|
||||
internal static string LastModified {
|
||||
get {
|
||||
return ResourceManager.GetString("LastModified", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Linear Sensitivity.
|
||||
/// </summary>
|
||||
internal static string LinearSensitivity {
|
||||
get {
|
||||
return ResourceManager.GetString("LinearSensitivity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Manufacturer.
|
||||
/// </summary>
|
||||
internal static string Manufacturer {
|
||||
get {
|
||||
return ResourceManager.GetString("Manufacturer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Maximum Usage.
|
||||
/// </summary>
|
||||
internal static string MaximumUsage {
|
||||
get {
|
||||
return ResourceManager.GetString("MaximumUsage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Model.
|
||||
/// </summary>
|
||||
internal static string Model {
|
||||
get {
|
||||
return ResourceManager.GetString("Model", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Modified By.
|
||||
/// </summary>
|
||||
internal static string ModifiedBy {
|
||||
get {
|
||||
return ResourceManager.GetString("ModifiedBy", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Non-Linear Sensitivity.
|
||||
/// </summary>
|
||||
internal static string NonLinearSensitivity {
|
||||
get {
|
||||
return ResourceManager.GetString("NonLinearSensitivity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Out Of Date.
|
||||
/// </summary>
|
||||
internal static string OutOfDate {
|
||||
get {
|
||||
return ResourceManager.GetString("OutOfDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Resistance (Ω).
|
||||
/// </summary>
|
||||
internal static string Resistance {
|
||||
get {
|
||||
return ResourceManager.GetString("Resistance", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Resistance High (Ω).
|
||||
/// </summary>
|
||||
internal static string ResistanceHigh {
|
||||
get {
|
||||
return ResourceManager.GetString("ResistanceHigh", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Resistance Low (Ω).
|
||||
/// </summary>
|
||||
internal static string ResistanceLow {
|
||||
get {
|
||||
return ResourceManager.GetString("ResistanceLow", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensitivity.
|
||||
/// </summary>
|
||||
internal static string Sensitivity {
|
||||
get {
|
||||
return ResourceManager.GetString("Sensitivity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor max range.
|
||||
/// </summary>
|
||||
internal static string SensorMaxRange {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorMaxRange", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Serial Number.
|
||||
/// </summary>
|
||||
internal static string SerialNumber {
|
||||
get {
|
||||
return ResourceManager.GetString("SerialNumber", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delay (ms).
|
||||
/// </summary>
|
||||
internal static string SQDelay {
|
||||
get {
|
||||
return ResourceManager.GetString("SQDelay", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Duration (ms).
|
||||
/// </summary>
|
||||
internal static string SQDuration {
|
||||
get {
|
||||
return ResourceManager.GetString("SQDuration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Squib Fire Mode.
|
||||
/// </summary>
|
||||
internal static string SQMode {
|
||||
get {
|
||||
return ResourceManager.GetString("SQMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Squib Settings.
|
||||
/// </summary>
|
||||
internal static string Squibs {
|
||||
get {
|
||||
return ResourceManager.GetString("Squibs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream Input Settings.
|
||||
/// </summary>
|
||||
internal static string StreamInputs {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamInputs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to IENA key.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_IENA_Key {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_IENA_Key", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to IENA source port.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_IENA_SourcePort {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_IENA_SourcePort", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Message id.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_TMNS_MessageId {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_TMNS_MessageId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to PCM minor per major.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_TMNS_MinorPerMajor {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_TMNS_MinorPerMajor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Subframe id.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_TMNS_SubFrameId {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_TMNS_SubFrameId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to TMATS port.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_TMNS_TMATSPort {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_TMNS_TMATSPort", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream Output Settings.
|
||||
/// </summary>
|
||||
internal static string StreamOutputs {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutputs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ---.
|
||||
/// </summary>
|
||||
internal static string Table_NA {
|
||||
get {
|
||||
return ResourceManager.GetString("Table_NA", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Time channel id.
|
||||
/// </summary>
|
||||
internal static string TimeChannelId {
|
||||
get {
|
||||
return ResourceManager.GetString("TimeChannelId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to TMATS interval (ms).
|
||||
/// </summary>
|
||||
internal static string TMATSIntervalMs {
|
||||
get {
|
||||
return ResourceManager.GetString("TMATSIntervalMs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to TmNS config.
|
||||
/// </summary>
|
||||
internal static string TmNSConfig {
|
||||
get {
|
||||
return ResourceManager.GetString("TmNSConfig", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Baud Rate (bps).
|
||||
/// </summary>
|
||||
internal static string UartBaudRate {
|
||||
get {
|
||||
return ResourceManager.GetString("UartBaudRate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data Bits.
|
||||
/// </summary>
|
||||
internal static string UartDataBits {
|
||||
get {
|
||||
return ResourceManager.GetString("UartDataBits", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data Format.
|
||||
/// </summary>
|
||||
internal static string UartDataFormat {
|
||||
get {
|
||||
return ResourceManager.GetString("UartDataFormat", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flow Control.
|
||||
/// </summary>
|
||||
internal static string UartFlowControl {
|
||||
get {
|
||||
return ResourceManager.GetString("UartFlowControl", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Parity.
|
||||
/// </summary>
|
||||
internal static string UartParity {
|
||||
get {
|
||||
return ResourceManager.GetString("UartParity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UART Settings.
|
||||
/// </summary>
|
||||
internal static string Uarts {
|
||||
get {
|
||||
return ResourceManager.GetString("Uarts", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stop Bits.
|
||||
/// </summary>
|
||||
internal static string UartStopBits {
|
||||
get {
|
||||
return ResourceManager.GetString("UartStopBits", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UDP address.
|
||||
/// </summary>
|
||||
internal static string UDPAddress {
|
||||
get {
|
||||
return ResourceManager.GetString("UDPAddress", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream profile.
|
||||
/// </summary>
|
||||
internal static string UDPProfile {
|
||||
get {
|
||||
return ResourceManager.GetString("UDPProfile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Units.
|
||||
/// </summary>
|
||||
internal static string Units {
|
||||
get {
|
||||
return ResourceManager.GetString("Units", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Usage Count.
|
||||
/// </summary>
|
||||
internal static string UsageCount {
|
||||
get {
|
||||
return ResourceManager.GetString("UsageCount", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UserValue1.
|
||||
/// </summary>
|
||||
internal static string UserValue1 {
|
||||
get {
|
||||
return ResourceManager.GetString("UserValue1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UserValue2.
|
||||
/// </summary>
|
||||
internal static string UserValue2 {
|
||||
get {
|
||||
return ResourceManager.GetString("UserValue2", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UserValue3.
|
||||
/// </summary>
|
||||
internal static string UserValue3 {
|
||||
get {
|
||||
return ResourceManager.GetString("UserValue3", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,265 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
public class Squib : SquibDbRecord, ISquib, IDragAndDropItem
|
||||
{
|
||||
private bool _bIncluded = true;
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get => UserValue1;
|
||||
set
|
||||
{
|
||||
UserValue1 = value;
|
||||
OnPropertyChanged("Description");
|
||||
}
|
||||
}
|
||||
public double ResistanceLow
|
||||
{
|
||||
get => SquibToleranceLow;
|
||||
set
|
||||
{
|
||||
SquibToleranceLow = value;
|
||||
OnPropertyChanged("ResistanceLow");
|
||||
}
|
||||
}
|
||||
public double ResistanceHigh
|
||||
{
|
||||
get => SquibToleranceHigh;
|
||||
set
|
||||
{
|
||||
SquibToleranceHigh = value;
|
||||
OnPropertyChanged("ResistanceHigh");
|
||||
}
|
||||
}
|
||||
public string ID
|
||||
{
|
||||
get => ArticleId;
|
||||
set
|
||||
{
|
||||
ArticleId = value;
|
||||
OnPropertyChanged("ID");
|
||||
}
|
||||
}
|
||||
public string SQMode
|
||||
{
|
||||
get => FireMode.ToString();
|
||||
set
|
||||
{
|
||||
if (Enum.TryParse(value, out SquibFireMode mode))
|
||||
{
|
||||
FireMode = mode;
|
||||
}
|
||||
OnPropertyChanged("SQMode");
|
||||
}
|
||||
}
|
||||
public double SQDelay
|
||||
{
|
||||
get => DelayMs;
|
||||
set
|
||||
{
|
||||
DelayMs = value;
|
||||
OnPropertyChanged("SQDelay");
|
||||
}
|
||||
}
|
||||
public double SQCurrent
|
||||
{
|
||||
get => SquibOutputCurrent;
|
||||
set
|
||||
{
|
||||
SquibOutputCurrent = value;
|
||||
OnPropertyChanged("SQCurrent");
|
||||
}
|
||||
}
|
||||
public double SQDuration
|
||||
{
|
||||
get => DurationMs;
|
||||
set
|
||||
{
|
||||
DurationMs = value;
|
||||
OnPropertyChanged("SQDuration");
|
||||
}
|
||||
}
|
||||
public string ModifiedBy
|
||||
{
|
||||
get => LastModifiedBy;
|
||||
set
|
||||
{
|
||||
LastModifiedBy = value;
|
||||
OnPropertyChanged("ModifiedBy");
|
||||
}
|
||||
}
|
||||
public bool Disabled { get; set; } = false;
|
||||
public bool Assigned { get; set; } = false;
|
||||
public bool Online { get; set; } = false;
|
||||
public int DatabaseId
|
||||
{
|
||||
get => Id;
|
||||
set
|
||||
{
|
||||
Id = value;
|
||||
OnPropertyChanged("DatabaseId");
|
||||
}
|
||||
}
|
||||
public string ISOCode
|
||||
{
|
||||
get => IsoCode;
|
||||
set
|
||||
{
|
||||
IsoCode = value;
|
||||
OnPropertyChanged("ISOCode");
|
||||
}
|
||||
}
|
||||
public string ISOChannelName
|
||||
{
|
||||
get => IsoChannelName;
|
||||
set
|
||||
{
|
||||
IsoChannelName = value;
|
||||
OnPropertyChanged("ISOChannelName");
|
||||
}
|
||||
}
|
||||
|
||||
public SquibFireMode Mode
|
||||
{
|
||||
get => FireMode;
|
||||
set
|
||||
{
|
||||
FireMode = value;
|
||||
OnPropertyChanged("Mode");
|
||||
}
|
||||
}
|
||||
public bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
term = term.ToLower();
|
||||
if (SerialNumber.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (Description.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (SQDelay.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (SQCurrent.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (SQDuration.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (SQMode.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public Squib()
|
||||
{
|
||||
}
|
||||
public Squib(ISquibDbRecord record) : base(record)
|
||||
{
|
||||
|
||||
}
|
||||
public Squib(ISensorData s)
|
||||
{
|
||||
DatabaseId = s.DatabaseId;
|
||||
Description = s.Comment;
|
||||
ID = s.EID;
|
||||
LastModified = s.LastModified;
|
||||
ModifiedBy = s.LastUpdatedBy;
|
||||
ResistanceHigh = s.SquibToleranceHigh;
|
||||
ResistanceLow = s.SquibToleranceLow;
|
||||
SerialNumber = s.SerialNumber;
|
||||
SQDelay = s.SquibFireDelayMS;
|
||||
SQCurrent = s.SquibOutputCurrent;
|
||||
SQDuration = s.SquibFireDurationMS;
|
||||
SQMode = s.SquibFireMode.ToString();
|
||||
LimitDuration = s.LimitSquibFireDuration;
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
Mode = s.SquibFireMode;
|
||||
}
|
||||
public bool IsTestSpecificSquib()
|
||||
{
|
||||
return SerialNumber.StartsWith("TSQ_");
|
||||
}
|
||||
}
|
||||
public class SquibComparer : IComparer<ISquib>
|
||||
{
|
||||
public SquibFields SortField { get; set; }
|
||||
public bool SortAscending { get; set; }
|
||||
public int Compare(ISquib left, ISquib right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left; var b = right;
|
||||
if (!SortAscending) { a = right; b = left; }
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
var stringComparer = new DTS.Common.Utilities.NaturalStringComparer();
|
||||
switch (SortField)
|
||||
{
|
||||
case SquibFields.Included:
|
||||
return a.Included.CompareTo(b.Included);
|
||||
case SquibFields.SerialNumber:
|
||||
return stringComparer.Compare(a.SerialNumber, b.SerialNumber);
|
||||
case SquibFields.Description:
|
||||
return stringComparer.Compare(a.Description, b.Description);
|
||||
case SquibFields.ResistanceLow:
|
||||
return a.ResistanceLow.CompareTo(b.ResistanceLow);
|
||||
case SquibFields.ResistanceHigh:
|
||||
return a.ResistanceHigh.CompareTo(b.ResistanceHigh);
|
||||
case SquibFields.Id:
|
||||
return stringComparer.Compare(a.ID, b.ID);
|
||||
case SquibFields.Mode:
|
||||
return stringComparer.Compare(a.SQMode, b.SQMode);
|
||||
case SquibFields.Delay:
|
||||
return a.SQDelay.CompareTo(b.SQDelay);
|
||||
case SquibFields.Current:
|
||||
return a.SQCurrent.CompareTo(b.SQCurrent);
|
||||
case SquibFields.Duration:
|
||||
return a.SQDuration.CompareTo(b.SQDuration);
|
||||
case SquibFields.ModifiedBy:
|
||||
return stringComparer.Compare(a.ModifiedBy, b.ModifiedBy);
|
||||
case SquibFields.LastModified:
|
||||
return a.LastModified.CompareTo(b.LastModified);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Windows.Markup;
|
||||
using SensorsList.Resources;
|
||||
|
||||
namespace SensorsList
|
||||
{
|
||||
[MarkupExtensionReturnType(typeof(string))]
|
||||
public class TranslateExtension : MarkupExtension
|
||||
{
|
||||
private readonly string _key;
|
||||
public TranslateExtension(string key) { _key = key; }
|
||||
|
||||
private const string NotFound = "#stringnotfound#";
|
||||
|
||||
public override object ProvideValue(IServiceProvider serviceProvider)
|
||||
{
|
||||
if (string.IsNullOrEmpty(_key)) { return NotFound; }
|
||||
return StringResources.ResourceManager.GetString(_key) ?? NotFound + " " + _key;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,653 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors.SoftwareFilters;
|
||||
using DTS.Common.Storage;
|
||||
using DTS.Common.Utilities.Logging;
|
||||
using DTS.SensorDB;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// this class is used to display analog sensors in lists in the UI
|
||||
/// </summary>
|
||||
public class AnalogSensor : /*DTS.Common.Base.BasePropertyChanged*/AnalogDbRecord, IAnalogSensor, IDragAndDropItem
|
||||
{
|
||||
/// <summary>
|
||||
/// indicates if the sensor is Integrated Electronics Piezo-Electric (IEPE)
|
||||
/// </summary>
|
||||
public bool IEPE => Bridge == SensorConstants.BridgeType.IEPE;
|
||||
|
||||
private bool _bIncluded = true;
|
||||
/// <summary>
|
||||
/// used to indicate that the sensor should be checked if in a list
|
||||
/// with a checkbox
|
||||
/// </summary>
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
/// <summary>
|
||||
/// returns the status of the channel considering "IsComplete" and sensor cal status
|
||||
/// 9724 Sensor cal policy needs to match hardware cal policy
|
||||
/// </summary>
|
||||
public UIItemStatus SensorCalibrationOrUsageStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
if (OutOfDate || UsageMaximized)
|
||||
{
|
||||
return UIItemStatus.Error;
|
||||
}
|
||||
return (InWarningPeriod || InUsageWarningPeriod) ? UIItemStatus.Warning : UIItemStatus.None;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// the comment or description for the sensor
|
||||
/// </summary>
|
||||
public string Description
|
||||
{
|
||||
get => Comment;
|
||||
set
|
||||
{
|
||||
Comment = value;
|
||||
OnPropertyChanged("Description");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// a user friendly representation of the sensor sensitivity
|
||||
/// </summary>
|
||||
public string Sensitivity { get; set; }
|
||||
/// <summary>
|
||||
/// a user friendly representation of the added sensitivity of a dual sensitivity sensor
|
||||
/// (linear/non linear)
|
||||
/// </summary>
|
||||
public string AddedSensitivity { get; set; }
|
||||
/// <summary>
|
||||
/// indicates what the type of nonlinear calculation is used for this sensor as a string
|
||||
/// </summary>
|
||||
public string NonLinearCalculationType { get; set; }
|
||||
/// <summary>
|
||||
/// indicates what the type of nonlinear calculation is used for this sensor as an enum
|
||||
/// </summary>
|
||||
public NonLinearStyles NonLinearCalculationTypeEnum { get; set; }
|
||||
/// <summary>
|
||||
/// the resistance in ohms for the sensor
|
||||
/// </summary>
|
||||
public double Resistance
|
||||
{
|
||||
get => BridgeResistance;
|
||||
set
|
||||
{
|
||||
BridgeResistance = value;
|
||||
OnPropertyChanged("Resistance");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// a user friendly string representation of the excitations the sensor is valid for
|
||||
/// </summary>
|
||||
public string Excitation { get; set; }
|
||||
/// <summary>
|
||||
/// engineering units for the sensor
|
||||
/// </summary>
|
||||
public string Units { get; set; } = "";
|
||||
/// <summary>
|
||||
/// electronic id associated with the sensor
|
||||
/// </summary>
|
||||
public string EID { get; set; }
|
||||
/// <summary>
|
||||
/// the last calibration date of the sensor
|
||||
/// </summary>
|
||||
public DateTime CalDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// when the calibration is due for this sensor
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
public DateTime CalDueDate
|
||||
{
|
||||
get
|
||||
{
|
||||
if (SensorConstants.IsTestSpecificEmbedded(SerialNumber) || SensorConstants.IsTestSpecificThermoCouple(SerialNumber))
|
||||
{
|
||||
return DateTime.Today.AddDays(CalInterval);
|
||||
}
|
||||
if (SensorConstants.UseSensorFirstUseDate && UsingLatestCalibration)
|
||||
{
|
||||
//we are using the latest cal, the first use date is valid if present, otherwise
|
||||
if (null == FirstUseDate)
|
||||
{
|
||||
return DateTime.Today.AddDays(CalInterval);
|
||||
}
|
||||
else
|
||||
{
|
||||
return ((DateTime)FirstUseDate).AddDays(CalInterval);
|
||||
}
|
||||
}
|
||||
//either we aren't using the latest cal, or use sensor first use date is false, fall back to cal date + interval
|
||||
return CalDate.AddDays(CalInterval);
|
||||
}
|
||||
set { }
|
||||
}
|
||||
/// <summary>
|
||||
/// indicates if the sensor's calibration due date is in the past
|
||||
/// </summary>
|
||||
public bool OutOfDate => DateTime.Today.Date > CalDueDate;
|
||||
/// <summary>
|
||||
/// indicates if the sensor's calibration due date is in the warning period
|
||||
/// </summary>
|
||||
public bool InWarningPeriod => DateTime.Today.Date.AddDays(SensorCalWarningPeriodDays) > CalDueDate && !OutOfDate;
|
||||
/// <summary>
|
||||
/// Inspect before use
|
||||
/// </summary>
|
||||
private bool _inspectBeforeUse = false;
|
||||
public bool InspectBeforeUse
|
||||
{
|
||||
get => _inspectBeforeUse;
|
||||
set
|
||||
{
|
||||
_inspectBeforeUse = value;
|
||||
OnPropertyChanged("InspectBeforeUse");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// from DataPROWin7.Common.SerializedSettings.SensorCalWarningPeriodDays
|
||||
/// </summary>
|
||||
public int SensorCalWarningPeriodDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// indicates if the sensor's usage has been reached or exceeded
|
||||
/// </summary>
|
||||
public bool UsageMaximized => DontAllowDataCollectionIfOverused && (SensorUsageCount >= MaximumUsage);
|
||||
|
||||
/// <summary>
|
||||
/// indicates if the sensor's usage is in the warning period
|
||||
/// </summary>
|
||||
public bool InUsageWarningPeriod => DontAllowDataCollectionIfOverused && (SensorUsageWarningCount >= (MaximumUsage - SensorUsageCount));
|
||||
|
||||
/// <summary>
|
||||
/// The number of times a sensor has been in an armed test since last calibrated.
|
||||
/// </summary>
|
||||
public int SensorUsageCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// not sure this is used ... no references
|
||||
/// [I think it's here because of some binding in the baseview]
|
||||
/// </summary>
|
||||
public bool Disabled { get; set; } = false;
|
||||
/// <summary>
|
||||
/// whether the sensor is currently associated with a channel or not
|
||||
/// </summary>
|
||||
public bool Assigned { get; set; } = false;
|
||||
/// <summary>
|
||||
/// whether the sensor is currently online or not
|
||||
/// </summary>
|
||||
public bool Online { get; set; } = false;
|
||||
/// <summary>
|
||||
/// id in the database if available
|
||||
/// only positive values are valid
|
||||
/// </summary>
|
||||
public int DatabaseId
|
||||
{
|
||||
get => Id;
|
||||
set
|
||||
{
|
||||
Id = value;
|
||||
OnPropertyChanged("DatabaseId");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// channel frequency class (CFC) associated with the sensor
|
||||
/// CFC 1000 is default
|
||||
/// </summary>
|
||||
public FilterClassType CFC { get; set; } = FilterClassType.CFC1000;
|
||||
/// <summary>
|
||||
/// whether the output of the sensor needs to be inverted or not
|
||||
/// </summary>
|
||||
public bool Polarity
|
||||
{
|
||||
get => !Invert;
|
||||
set
|
||||
{
|
||||
Invert = !value;
|
||||
OnPropertyChanged("Polarity");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// software Zero Method used by the sensor
|
||||
/// Average Over Time is the default (in SensorConstants, per FB12764)
|
||||
/// </summary>
|
||||
public ZeroMethodType ZeroMethod { get; set; } = SensorConstants.DefaultZeroMethodType;
|
||||
/// <summary>
|
||||
/// If ZeroMethod is AverageOverTime, this is the start time
|
||||
/// -0.05s is the default (in SensorConstants, per FB12764)
|
||||
/// </summary>
|
||||
public double ZeroMethodStart { get; set; } = SensorConstants.DefaultZeroMethodStart;
|
||||
/// <summary>
|
||||
/// If ZeroMethod is AverageOverTime, this is the end time
|
||||
/// -0.02s is the default (in SensorConstants, per FB12764)
|
||||
/// </summary>
|
||||
public double ZeroMethodEnd { get; set; } = SensorConstants.DefaultZeroMethodEnd;
|
||||
|
||||
/// <summary>
|
||||
/// returns true if the sensor matches filter criteria
|
||||
/// </summary>
|
||||
/// <param name="term"></param>
|
||||
/// <returns></returns>
|
||||
public new bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term)) { return true; }
|
||||
if (CultureInfo.CurrentCulture.CompareInfo.IndexOf(SerialNumber, term, CompareOptions.IgnoreCase) >= 0) { return true; }
|
||||
if (CultureInfo.CurrentCulture.CompareInfo.IndexOf(Description, term, CompareOptions.IgnoreCase) >= 0) { return true; }
|
||||
if (CultureInfo.CurrentCulture.CompareInfo.IndexOf(Capacity.ToString(), term, CompareOptions.IgnoreCase) >= 0) { return true; }
|
||||
if (CultureInfo.CurrentCulture.CompareInfo.IndexOf(Units, term, CompareOptions.IgnoreCase) >= 0) { return true; }
|
||||
if (CultureInfo.CurrentCulture.CompareInfo.IndexOf(EID, term, CompareOptions.IgnoreCase) >= 0) { return true; }
|
||||
return false;
|
||||
}
|
||||
//FB 13120 identify filter class
|
||||
public IFilterClass FilterClass
|
||||
{
|
||||
get => base.Filter;
|
||||
set
|
||||
{
|
||||
base.Filter = value;
|
||||
OnPropertyChanged("FilterClass");
|
||||
}
|
||||
}
|
||||
public AnalogSensor(IAnalogDbRecord record,
|
||||
int sensorCalWarningPeriodDays,
|
||||
bool dontAllowDataCollectionIfOverused,
|
||||
int sensorUsageWarningCount,
|
||||
bool included) : base(record)
|
||||
{
|
||||
EID = record.EId;
|
||||
SensorCalWarningPeriodDays = sensorCalWarningPeriodDays;
|
||||
DontAllowDataCollectionIfOverused = dontAllowDataCollectionIfOverused;
|
||||
SensorUsageWarningCount = sensorUsageWarningCount;
|
||||
Included = included;
|
||||
//FB 43246
|
||||
InspectBeforeUse = DTS.SensorDB.SensorData.IsInspectBeforeUseSet(record.Id);
|
||||
}
|
||||
public AnalogSensor(IAnalogDbRecord record,
|
||||
int sensorCalWarningPeriodDays,
|
||||
bool dontAllowDataCollectionIfOverused,
|
||||
int sensorUsageWarningCount,
|
||||
bool included,
|
||||
bool inspectBeforeUse) : base(record)
|
||||
{
|
||||
EID = record.EId;
|
||||
SensorCalWarningPeriodDays = sensorCalWarningPeriodDays;
|
||||
DontAllowDataCollectionIfOverused = dontAllowDataCollectionIfOverused;
|
||||
SensorUsageWarningCount = sensorUsageWarningCount;
|
||||
Included = included;
|
||||
//FB 43246
|
||||
InspectBeforeUse = inspectBeforeUse;
|
||||
}
|
||||
/// <summary>
|
||||
/// constructs a new AnalogSensor given inputs
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
/// <param name="sc"></param>
|
||||
/// <param name="cals">prevent individual cal lookups by just passing them all in one bulk</param>
|
||||
public AnalogSensor(ISensorData s, ISensorCalibration sc, IReadOnlyDictionary<string, ISensorCalibration> cals)
|
||||
{
|
||||
Bridge = s.Bridge;
|
||||
//FB 13120 set filter class
|
||||
FilterClass = s.FilterClass;
|
||||
RangeHigh = s.RangeHigh;
|
||||
RangeLow = s.RangeLow;
|
||||
RangeMedium = s.RangeMedium;
|
||||
DatabaseId = s.DatabaseId;
|
||||
if (s.IsTestSpecificEmbedded || s.IsTestSpecificThermo)
|
||||
{
|
||||
CalDate = DateTime.Today;
|
||||
}
|
||||
else { CalDate = sc?.CalibrationDate ?? DateTime.MinValue; }
|
||||
CalInterval = s.CalInterval;
|
||||
Capacity = s.Capacity;
|
||||
Description = s.Comment;
|
||||
var excitations = new List<string>();
|
||||
CFC = s.FilterType;
|
||||
Polarity = !s.Invert;
|
||||
foreach (var exc in s.SupportedExcitation)
|
||||
{
|
||||
switch (exc)
|
||||
{
|
||||
case ExcitationVoltageOptions.ExcitationVoltageOption.Volt10:
|
||||
excitations.Add("10");
|
||||
break;
|
||||
case ExcitationVoltageOptions.ExcitationVoltageOption.Volt2:
|
||||
excitations.Add("2");
|
||||
break;
|
||||
case ExcitationVoltageOptions.ExcitationVoltageOption.Volt2_5:
|
||||
excitations.Add("2.5");
|
||||
break;
|
||||
case ExcitationVoltageOptions.ExcitationVoltageOption.Volt5:
|
||||
excitations.Add("5");
|
||||
break;
|
||||
}
|
||||
}
|
||||
Excitation = string.Join("/", excitations.ToArray());
|
||||
EID = s.EID;
|
||||
LastModified = s.LastModified;
|
||||
Manufacturer = s.Manufacturer;
|
||||
Model = s.Model;
|
||||
ModifiedBy = s.LastUpdatedBy;
|
||||
Resistance = s.BridgeResistance;
|
||||
Sensitivity = sc?.ToDisplayString(s.SupportedExcitation[0], "N4", "N4", s.Bridge == SensorConstants.BridgeType.IEPE) ?? "---";
|
||||
SerialNumber = s.SerialNumber;
|
||||
Units = s.DisplayUnit;
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
SensorCalWarningPeriodDays = s.SensorCalWarningPeriodDays;
|
||||
ZeroMethod = sc?.ZeroMethods.Methods[0].Method ?? SensorConstants.DefaultZeroMethodType; // FB12764: Default in SensorConstants
|
||||
ZeroMethodStart = sc?.ZeroMethods.Methods[0].Start ?? SensorConstants.DefaultZeroMethodStart; // FB12764: Default in SensorConstants
|
||||
ZeroMethodEnd = sc?.ZeroMethods.Methods[0].End ?? SensorConstants.DefaultZeroMethodEnd; // FB12764: Default in SensorConstants
|
||||
NonLinearCalculationType = null != sc ? sc.NonLinear ? sc.IRTraccCalculationType.ToString() : string.Empty : string.Empty;
|
||||
InitialOffsets = sc?.InitialOffsets.Offsets;
|
||||
LatestCalibrationId = s.LatestCalibrationId;
|
||||
FirstUseDate = s.FirstUseDate;
|
||||
if (sc != null)
|
||||
{
|
||||
UsageCount = sc.UsageCount;
|
||||
}
|
||||
MaximumUsage = s.MaximumUsage;
|
||||
//if we have a null in the latest calibration id, go get the latest calibration id
|
||||
//skip it however if we aren't using sensor first use date since it's a db query and takes some time
|
||||
//17893 Cal date confusion on sensor import
|
||||
//if (null == s.LatestCalibrationId && SensorConstants.UseSensorFirstUseDate)
|
||||
//{
|
||||
if (SensorConstants.UseSensorFirstUseDate)
|
||||
{
|
||||
if (null != cals && cals.ContainsKey(s.SerialNumber))
|
||||
{
|
||||
s.LatestCalibrationId = cals[s.SerialNumber].CalibrationId;
|
||||
}
|
||||
else
|
||||
{
|
||||
var temp = AnalogSensor.GetLatestCalibrationId(s.DatabaseId);
|
||||
if (temp >= 0)
|
||||
{
|
||||
s.LatestCalibrationId = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//}
|
||||
if (null != sc && null != sc.CalibrationId && sc.CalibrationId == s.LatestCalibrationId)
|
||||
{
|
||||
UsingLatestCalibration = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
UsingLatestCalibration = false;
|
||||
}
|
||||
//FB 43246
|
||||
InspectBeforeUse = DTS.SensorDB.SensorData.IsInspectBeforeUseSet(s.DatabaseId);
|
||||
}
|
||||
public InitialOffset[] InitialOffsets { get; set; }
|
||||
/// <summary>
|
||||
/// whether the sensor is using the latest calibration or not
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
public bool UsingLatestCalibration { get; set; } = false;
|
||||
public bool IsTestSpecificEmbedded()
|
||||
{
|
||||
return SerialNumber.StartsWith("TSA_");
|
||||
}
|
||||
public bool IsTestSpecificEmbeddedClock()
|
||||
{
|
||||
return SerialNumber.StartsWith("TSC_");
|
||||
}
|
||||
public bool IsTestSpecificThermocoupler()
|
||||
{
|
||||
return SerialNumber.StartsWith(SensorsListViewModel.TEST_SPECIFIC_THERMOCOUPLER_PREPEND);
|
||||
}
|
||||
public static int GetLatestCalibrationId(int sensorId)
|
||||
{
|
||||
using (var cmd = DbOperations.GetSQLCommand(true))
|
||||
{
|
||||
try
|
||||
{
|
||||
cmd.CommandType = System.Data.CommandType.Text;
|
||||
cmd.CommandText = $"SELECT TOP (1) [SensorCalibrationId] FROM [{RunTestVariables.DbName}].[dbo].[SensorCalibrations] WHERE [SensorId]=@1 ORDER BY [CalibrationDate] DESC, [ModifyDate] DESC";
|
||||
cmd.Parameters.Add(new System.Data.SqlClient.SqlParameter("@1", System.Data.SqlDbType.Int)
|
||||
{ Value = sensorId });
|
||||
using (var reader = cmd.ExecuteReader())
|
||||
{
|
||||
if (reader.Read())
|
||||
{
|
||||
return Convert.ToInt32(reader["SensorCalibrationId"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
APILogger.Log(ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
cmd.Connection.Dispose();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// used to compare two analog sensors
|
||||
/// </summary>
|
||||
public class AnalogComparer : IComparer<IAnalogSensor>
|
||||
{
|
||||
/// <summary>
|
||||
/// current sort field
|
||||
/// </summary>
|
||||
public AnalogSensorFields SortField { get; set; }
|
||||
/// <summary>
|
||||
/// whether to sort ascending or descending
|
||||
/// </summary>
|
||||
public bool SortAscending { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// compares first use date between two sensors
|
||||
/// </summary>
|
||||
private static int FirstUseCompare(DateTime? a, DateTime? b)
|
||||
{
|
||||
if (null == a && a == b)
|
||||
{
|
||||
//both null, return =
|
||||
return 0;
|
||||
}
|
||||
|
||||
// only a is null, return <
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
// only b is null, return >
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
//compare the dates
|
||||
return ((DateTime)a).CompareTo((DateTime)b);
|
||||
}
|
||||
public int Compare(IAnalogSensor left, IAnalogSensor right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left; var b = right;
|
||||
if (!SortAscending) { a = right; b = left; }
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
var stringComparer = new DTS.Common.Utilities.NaturalStringComparer();
|
||||
switch (SortField)
|
||||
{
|
||||
case AnalogSensorFields.FirstUseDate:
|
||||
{
|
||||
return FirstUseCompare(a.FirstUseDate, b.FirstUseDate);
|
||||
}
|
||||
case AnalogSensorFields.Included:
|
||||
return a.Included.CompareTo(b.Included);
|
||||
case AnalogSensorFields.SerialNumber:
|
||||
return stringComparer.Compare(a.SerialNumber, b.SerialNumber);
|
||||
case AnalogSensorFields.IEPE:
|
||||
return a.IEPE.CompareTo(b.IEPE);
|
||||
case AnalogSensorFields.Description:
|
||||
return stringComparer.Compare(a.Description, b.Description);
|
||||
case AnalogSensorFields.Manufacturer:
|
||||
return stringComparer.Compare(a.Manufacturer, b.Manufacturer);
|
||||
case AnalogSensorFields.Model:
|
||||
return stringComparer.Compare(a.Model, b.Model);
|
||||
case AnalogSensorFields.Capacity:
|
||||
return a.Capacity.CompareTo(b.Capacity);
|
||||
case AnalogSensorFields.Sensitivity:
|
||||
return stringComparer.Compare(a.Sensitivity, b.Sensitivity);
|
||||
case AnalogSensorFields.NonLinearCalucationType:
|
||||
return stringComparer.Compare(a.NonLinearCalculationType, b.NonLinearCalculationType);
|
||||
case AnalogSensorFields.ZeroMethod:
|
||||
return a.ZeroMethod.CompareTo(b.ZeroMethod);
|
||||
case AnalogSensorFields.ZeroMethodStart:
|
||||
return a.ZeroMethodStart.CompareTo(b.ZeroMethodStart);
|
||||
case AnalogSensorFields.ZeroMethodEnd:
|
||||
return a.ZeroMethodEnd.CompareTo(b.ZeroMethodEnd);
|
||||
case AnalogSensorFields.Resistance:
|
||||
if (a.IEPE)
|
||||
{
|
||||
if (b.IEPE)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (b.IEPE)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return a.Resistance.CompareTo(b.Resistance);
|
||||
case AnalogSensorFields.Excitation:
|
||||
if (a.IEPE)
|
||||
{
|
||||
if (b.IEPE)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (b.IEPE)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return stringComparer.Compare(a.Excitation, b.Excitation);
|
||||
case AnalogSensorFields.Units:
|
||||
return stringComparer.Compare(a.Units, b.Units);
|
||||
case AnalogSensorFields.Id:
|
||||
return stringComparer.Compare(a.EID, b.EID);
|
||||
case AnalogSensorFields.CalDate:
|
||||
return a.CalDate.CompareTo(b.CalDate);
|
||||
case AnalogSensorFields.UserValue1:
|
||||
return a.UserValue1.CompareTo(b.UserValue1);
|
||||
case AnalogSensorFields.UserValue2:
|
||||
return a.UserValue2.CompareTo(b.UserValue2);
|
||||
case AnalogSensorFields.UserValue3:
|
||||
return a.UserValue3.CompareTo(b.UserValue3);
|
||||
case AnalogSensorFields.CalDueDate:
|
||||
return a.CalDueDate.CompareTo(b.CalDueDate);
|
||||
case AnalogSensorFields.ModifiedBy:
|
||||
return stringComparer.Compare(a.ModifiedBy, b.ModifiedBy);
|
||||
case AnalogSensorFields.LastModified:
|
||||
return a.LastModified.CompareTo(b.LastModified);
|
||||
case AnalogSensorFields.OutOfDate:
|
||||
if (DateTime.Now > (a as AnalogSensor).CalDueDate)
|
||||
{
|
||||
if (DateTime.Now > (b as AnalogSensor).CalDueDate)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (DateTime.Now > (b as AnalogSensor).CalDueDate)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
case AnalogSensorFields.InWarningPeriod:
|
||||
if (DateTime.Now.AddDays((a as AnalogSensor).SensorCalWarningPeriodDays) > (a as AnalogSensor).CalDueDate &&
|
||||
DateTime.Now <= (a as AnalogSensor).CalDueDate)
|
||||
{
|
||||
if (DateTime.Now.AddDays((b as AnalogSensor).SensorCalWarningPeriodDays) > (b as AnalogSensor).CalDueDate &&
|
||||
DateTime.Now <= (b as AnalogSensor).CalDueDate)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (DateTime.Now.AddDays((b as AnalogSensor).SensorCalWarningPeriodDays) > (b as AnalogSensor).CalDueDate &&
|
||||
DateTime.Now <= (b as AnalogSensor).CalDueDate)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
case AnalogSensorFields.UsageMaximized:
|
||||
if ((a as AnalogSensor).SensorUsageCount >= (a as AnalogSensor).MaximumUsage)
|
||||
{
|
||||
if ((b as AnalogSensor).SensorUsageCount >= (b as AnalogSensor).MaximumUsage)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if ((b as AnalogSensor).SensorUsageCount >= (b as AnalogSensor).MaximumUsage)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
case AnalogSensorFields.InUsageWarningPeriod:
|
||||
if ((((a as AnalogSensor).MaximumUsage - (a as AnalogSensor).SensorUsageCount) <= (a as AnalogSensor).SensorUsageWarningCount) &&
|
||||
((a as AnalogSensor).SensorUsageCount <= (a as AnalogSensor).MaximumUsage))
|
||||
{
|
||||
if ((((b as AnalogSensor).MaximumUsage - (b as AnalogSensor).SensorUsageCount) <= (b as AnalogSensor).SensorUsageWarningCount) &&
|
||||
((b as AnalogSensor).SensorUsageCount <= (b as AnalogSensor).MaximumUsage))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if ((((b as AnalogSensor).MaximumUsage - (b as AnalogSensor).SensorUsageCount) <= (b as AnalogSensor).SensorUsageWarningCount) &&
|
||||
((b as AnalogSensor).SensorUsageCount <= (b as AnalogSensor).MaximumUsage))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
case AnalogSensorFields.Assembly:
|
||||
return stringComparer.Compare(a.AssemblyName, b.AssemblyName);
|
||||
case AnalogSensorFields.UsageCount:
|
||||
return a.SensorUsageCount.CompareTo(b.SensorUsageCount);
|
||||
case AnalogSensorFields.MaximumUsage:
|
||||
return a.MaximumUsage.CompareTo(b.MaximumUsage);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,650 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using DTS.Common.Controls;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
using DTS.Common.Utilities.Logging;
|
||||
using DTS.Common.Utils;
|
||||
using Prism.Ioc;
|
||||
using Prism.Events;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace SensorsList
|
||||
{
|
||||
/// <inheritdoc cref="ISensorsListEditGroupView" />
|
||||
/// <summary>
|
||||
/// Interaction logic for SensorsListView.xaml
|
||||
/// </summary>
|
||||
public partial class SensorsListEditGroupView : ISensorsListEditGroupView
|
||||
{
|
||||
public SensorsListEditGroupView()
|
||||
{
|
||||
InitializeComponent();
|
||||
var eventAggregator =ContainerLocator.Container.Resolve<IEventAggregator>();
|
||||
eventAggregator.GetEvent<ListViewStatusEvent>().Subscribe(OnListViewEvent);
|
||||
}
|
||||
|
||||
private void OnListViewEvent(ListViewStatusArg arg)
|
||||
{
|
||||
if (arg.Status != ListViewStatusArg.ListViewStatus.ScrollToBottom)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(DataContext is SensorsListEditGroupViewModel model))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (model.ListViewId != arg.Id) { return; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// handles removing/adding columns prior to displaying view
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
public void HandleColumns()
|
||||
{
|
||||
|
||||
//remove the first use column if we aren't using first use date functionality
|
||||
if (SensorConstants.UseSensorFirstUseDate)
|
||||
{
|
||||
|
||||
AddFirstUseColumn();
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveFirstUseColumn();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// removes first use column from view if present
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
private void RemoveFirstUseColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (view.Columns.Contains(FirstUseColumn))
|
||||
{
|
||||
view.Columns.Remove(FirstUseColumn);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// adds first use column if not present
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
private void AddFirstUseColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (!view.Columns.Contains(FirstUseColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(CalDateColumn);
|
||||
view.Columns.Insert(index + 1, FirstUseColumn);
|
||||
}
|
||||
}
|
||||
public void HandleAssemblyVisibilityColumns(bool bDontAllowDataCollectionIfOverused)
|
||||
{
|
||||
if (bDontAllowDataCollectionIfOverused)
|
||||
{
|
||||
AddAssemblyColumn();
|
||||
AddUsageCountColumn();
|
||||
AddMaximumUsageColumn();
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveAssemblyColumn();
|
||||
RemoveUsageCountColumn();
|
||||
RemoveMaximumUsageColumn();
|
||||
}
|
||||
}
|
||||
public void HandleInspectBeforeUseVisibilityColumn(bool show)
|
||||
{
|
||||
if (show)
|
||||
{
|
||||
AddInspectBeforeUseColumn();
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveInspectBeforeUseColumn();
|
||||
}
|
||||
}
|
||||
private void AddInspectBeforeUseColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (!view.Columns.Contains(InspectBeforeUseColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(InWarningPeriodColumn);
|
||||
view.Columns.Insert(index + 1, InspectBeforeUseColumn);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// adds Assembly column if not present
|
||||
/// </summary>
|
||||
private void AddAssemblyColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (!view.Columns.Contains(AssemblyColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(DescriptionColumn);
|
||||
view.Columns.Insert(index + 1, AssemblyColumn);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// adds Usage Count column if not present
|
||||
/// </summary>
|
||||
private void AddUsageCountColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (!view.Columns.Contains(UsageCountColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(Units);
|
||||
view.Columns.Insert(index + 1, UsageCountColumn);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// adds Maximum Usages column if not present
|
||||
/// </summary>
|
||||
private void AddMaximumUsageColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (!view.Columns.Contains(MaximumUsageColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(UsageCountColumn);
|
||||
view.Columns.Insert(index + 1, MaximumUsageColumn);
|
||||
}
|
||||
}
|
||||
private void RemoveInspectBeforeUseColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (view.Columns.Contains(InspectBeforeUseColumn))
|
||||
{
|
||||
view.Columns.Remove(InspectBeforeUseColumn);
|
||||
}
|
||||
}
|
||||
private void RemoveAssemblyColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (view.Columns.Contains(AssemblyColumn))
|
||||
{
|
||||
view.Columns.Remove(AssemblyColumn);
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveUsageCountColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (view.Columns.Contains(UsageCountColumn))
|
||||
{
|
||||
view.Columns.Remove(UsageCountColumn);
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveMaximumUsageColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (view.Columns.Contains(MaximumUsageColumn))
|
||||
{
|
||||
view.Columns.Remove(MaximumUsageColumn);
|
||||
}
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderSearchable_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
viewModel.Filter(columnTag, searchTerm);
|
||||
}
|
||||
private void GridViewColumnHeaderSearchableSquib_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
viewModel.FilterSquib(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderSearchableDigitalIn_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
viewModel.FilterDigitalIn(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderSearchableDigitalOut_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
viewModel.FilterDigitalOut(columnTag, searchTerm);
|
||||
}
|
||||
private void GridViewColumnHeaderSearchableUart_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
viewModel.FilterUartIO(columnTag, searchTerm);
|
||||
}
|
||||
private void GridViewColumnHeaderSearchableStreamOut_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
viewModel.FilterStreamOut(columnTag, searchTerm);
|
||||
}
|
||||
private void GridViewColumnHeaderSearchableStreamIn_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
viewModel.FilterStreamIn(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
private void GridViewColumnHeader_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
object columnTag = null;
|
||||
if (sender is GridViewColumnHeaderSearchable headerSearchable)
|
||||
{
|
||||
columnTag = headerSearchable.Tag;
|
||||
}
|
||||
else if (sender is GridViewColumnHeaderSearchableCheckBox)
|
||||
{
|
||||
//We want this handled by GridViewColumnHeaderCheckBox_OnClick
|
||||
//only so that the Sort isn't done twice.
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
var o = Utils.FindChild<GridViewColumnHeaderSearchable>((DependencyObject)e.OriginalSource, null);
|
||||
if (null == o)
|
||||
{
|
||||
//We want header clicks on GridViewColumnHeaderSearchableCheckBox items
|
||||
//handled by GridViewColumnHeaderCheckBox_OnClick only so that the Sort isn't done twice.
|
||||
return;
|
||||
}
|
||||
columnTag = o.Tag;
|
||||
}
|
||||
|
||||
if (null == columnTag)
|
||||
{
|
||||
return;
|
||||
}
|
||||
viewModel?.Sort(columnTag, true);
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderCheckBox_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchableCheckBox)?.Tag ?? Utils.FindChild<GridViewColumnHeaderSearchableCheckBox>((DependencyObject)e.OriginalSource, null)?.Tag;
|
||||
viewModel?.Sort(columnTag, true);
|
||||
}
|
||||
|
||||
private bool _bPopupOpen = false;
|
||||
private void GridViewColumnHeader_OpenChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var header = (sender as GridViewColumnHeaderSearchable);
|
||||
if (null != header)
|
||||
{
|
||||
_bPopupOpen = header.ToggleButtonIsChecked;
|
||||
}
|
||||
else
|
||||
{
|
||||
var checkBoxHeader = (sender as GridViewColumnHeaderSearchableCheckBox);
|
||||
if (checkBoxHeader != null)
|
||||
{
|
||||
_bPopupOpen = checkBoxHeader.ToggleButtonIsChecked;
|
||||
}
|
||||
}
|
||||
}
|
||||
private void AnalogDropOver(object sender, DragEventArgs e)
|
||||
{
|
||||
DragOverHandler(e);
|
||||
}
|
||||
|
||||
private void AnalogDragLeave(object sender, DragEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void AnalogDragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
DragEnterHandler(e);
|
||||
}
|
||||
|
||||
private static void DragEnterHandler(DragEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (null != e.Data)
|
||||
{
|
||||
var formats = e.Data.GetFormats();
|
||||
foreach (var format in formats)
|
||||
{
|
||||
var decoratedFormat = format;
|
||||
if (((int)e.KeyStates & (int)DragDropKeyStates.ControlKey) == (int)DragDropKeyStates.ControlKey)
|
||||
{
|
||||
decoratedFormat = "CTRL_" + format;
|
||||
}
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { APILogger.Log("GenericTable2::GenericTable2_DragOver", ex); }
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
}
|
||||
private void AnalogDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void Squibs_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
DragEnterHandler(e);
|
||||
}
|
||||
|
||||
private void SquibsDragLeave(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void SquibsDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
DragOverHandler(e);
|
||||
}
|
||||
|
||||
private void SquibsDragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void UartSettingsDragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
DragEnterHandler(e);
|
||||
}
|
||||
|
||||
private void UartSettingsDragLeave(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void UartSettingsDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
DragOverHandler(e);
|
||||
}
|
||||
|
||||
private void UartSettingsDragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void DigitalInDragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
DragEnterHandler(e);
|
||||
}
|
||||
|
||||
private void DigitalInDragLeave(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void DigitalInDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
DragOverHandler(e);
|
||||
}
|
||||
|
||||
private void DigitalInDragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void DigitalOutDragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
DragEnterHandler(e);
|
||||
}
|
||||
|
||||
private void DigitalOutDragLeave(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void DigitalOutDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
DragOverHandler(e);
|
||||
}
|
||||
|
||||
private void StreamOutDragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
DragEnterHandler(e);
|
||||
}
|
||||
|
||||
private void StreamOutDragLeave(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void StreamOutDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
DragOverHandler(e);
|
||||
}
|
||||
private void StreamOutDragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void StreamInDragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
DragEnterHandler(e);
|
||||
}
|
||||
|
||||
private void StreamInDragLeave(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void StreamInDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
DragOverHandler(e);
|
||||
}
|
||||
private void StreamInDragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
private static void DragOverHandler(DragEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (null != e.Data)
|
||||
{
|
||||
var formats = e.Data.GetFormats();
|
||||
foreach (var format in formats)
|
||||
{
|
||||
var decoratedFormat = format;
|
||||
if (((int)e.KeyStates & (int)DragDropKeyStates.ControlKey) == (int)DragDropKeyStates.ControlKey)
|
||||
{
|
||||
decoratedFormat = "CTRL_" + format;
|
||||
}
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { APILogger.Log("DragOver", ex); }
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
}
|
||||
private void DigitalOutDragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
// delegate for GetPosition function of DragEventArgs and
|
||||
// MouseButtonEventArgs event argument objects. This delegate is used to reuse the code
|
||||
// for processing both types of events.
|
||||
private delegate Point GetPositionDelegate(IInputElement element);
|
||||
|
||||
private static int GetIndex(GetPositionDelegate getPosition, ListView lv)
|
||||
{
|
||||
for (var i = 0; i < lv.Items.Count; i++)
|
||||
{
|
||||
var item = GetListViewItem(lv, i);
|
||||
if (null == item) { continue; }
|
||||
if (IsMouseOverTarget(item, getPosition))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
private static ListViewItem GetListViewItem(ListView lv, int index)
|
||||
{
|
||||
if (lv.ItemContainerGenerator.Status !=
|
||||
System.Windows.Controls.Primitives.GeneratorStatus.ContainersGenerated)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return (ListViewItem)lv.ItemContainerGenerator.ContainerFromIndex(index);
|
||||
}
|
||||
private static bool IsMouseOverTarget(UIElement target, GetPositionDelegate getPosition)
|
||||
{
|
||||
if (null == target) { return false; }
|
||||
var bounds = VisualTreeHelper.GetDescendantBounds(target);
|
||||
var mousePos = getPosition(target);
|
||||
return bounds.Contains(mousePos);
|
||||
}
|
||||
private void Analog_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
MouseDownHandler(lvAnalog, e);
|
||||
}
|
||||
|
||||
private bool MouseDownHandler(ListView lv, MouseButtonEventArgs e)
|
||||
{
|
||||
if (_bPopupOpen) { return false; }
|
||||
try
|
||||
{
|
||||
if (null == lv || null == e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var index = GetIndex(e.GetPosition, lv);
|
||||
|
||||
//don't initiate drag and drop if we are not _on_ an item
|
||||
if (index < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//don't initiate drag and drop if no items are selected, select them first
|
||||
if (lv.SelectedItems.Count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (lv.Items.Count <= index)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
//also don't initiage drag and drop if we aren't on a selected item
|
||||
var item = lv.Items[index];
|
||||
if (item == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!lv.SelectedItems.Contains(item))
|
||||
{
|
||||
if (Keyboard.Modifiers != ModifierKeys.Control && Keyboard.Modifiers != ModifierKeys.Shift)
|
||||
{
|
||||
var objects = lv.SelectedItems.Cast<object>().ToList();
|
||||
foreach (var previouslySelectedItem in objects)
|
||||
{
|
||||
GetListViewItem(lv, lv.Items.IndexOf(previouslySelectedItem)).IsSelected = false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
var items = new List<IDragAndDropItem>();
|
||||
items.AddRange(lv.SelectedItems.Cast<IDragAndDropItem>());
|
||||
|
||||
items.Sort((a, b) => lv.Items.IndexOf(a).CompareTo(lv.Items.IndexOf(b)));
|
||||
|
||||
var payload =
|
||||
new DTS.Common.Classes.Sensors.SensorsList.DragAndDropPayload(items.ToArray());
|
||||
|
||||
DragDrop.DoDragDrop(lv, payload, DragDropEffects.Copy);
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
APILogger.Log(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
private void Squibs_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
MouseDownHandler(lvSquibs, e);
|
||||
}
|
||||
|
||||
private void DigitalInput_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
MouseDownHandler(lvDigitalInputs, e);
|
||||
}
|
||||
|
||||
private void DigitalOutput_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
MouseDownHandler(lvDigitalOutput, e);
|
||||
}
|
||||
private void Uart_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
MouseDownHandler(lvUart, e);
|
||||
}
|
||||
private void StreamOut_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
MouseDownHandler(lvStreamOut, e);
|
||||
}
|
||||
private void StreamIn_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
MouseDownHandler(lvStreamIn, e);
|
||||
}
|
||||
|
||||
private void CheckBox_Filter(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
if (searchTerm == "All") { searchTerm = null; }
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchableCheckBox)?.Tag;
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
viewModel.Filter(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
private void StreamOutSettingsDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void StreamInSettingsDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("SensorsList")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("DTS")]
|
||||
[assembly: AssemblyProduct("SensorsList")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("9aa6d22f-5df9-4702-a16a-2c7f38b466f8")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,117 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
public class StreamInputSetting : DTS.Common.Base.BasePropertyChanged, IStreamInputSetting, IDragAndDropItem
|
||||
{
|
||||
private bool _bIncluded = true;
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
public string SerialNumber { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
public string LastModifiedBy { get; set; }
|
||||
public DateTime LastModified { get; set; }
|
||||
public bool Assigned { get; set; } = false;
|
||||
public bool Online { get; set; } = false;
|
||||
public int DatabaseId { get; set; } = -1;
|
||||
public string ISOCode { get; set; } = "";
|
||||
public string ISOChannelName { get; set; } = "";
|
||||
public string UserCode { get; set; } = "";
|
||||
public string UserChannelName { get; set; } = "";
|
||||
public bool Broken { get; set; } = false;
|
||||
public bool DoNotUse { get; set; } = false;
|
||||
public string UDPAddress { get; set; } = "UDP://239.1.2.10:8400";
|
||||
public bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term)) { return true; }
|
||||
term = term.ToLower();
|
||||
if (SerialNumber.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (Description.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (UDPAddress.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public StreamInputSetting()
|
||||
{
|
||||
}
|
||||
|
||||
public StreamInputSetting(ISensorData s)
|
||||
{
|
||||
DatabaseId = s.DatabaseId;
|
||||
Description = s.Comment;
|
||||
LastModified = s.LastModified;
|
||||
LastModifiedBy = s.LastUpdatedBy;
|
||||
SerialNumber = s.SerialNumber;
|
||||
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
|
||||
UDPAddress = s.StreamInUDPAddress;
|
||||
}
|
||||
public bool IsTestSpecificStreamInput()
|
||||
{
|
||||
return SerialNumber.StartsWith("TSS_");
|
||||
}
|
||||
}
|
||||
public class StreamInComparer : IComparer<IStreamInputSetting>
|
||||
{
|
||||
public StreamInSettingFields SortField { get; set; }
|
||||
public bool SortAscending { get; set; }
|
||||
public int Compare(IStreamInputSetting left, IStreamInputSetting right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left; var b = right;
|
||||
if (!SortAscending) { a = right; b = left; }
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (SortField)
|
||||
{
|
||||
case StreamInSettingFields.Included:
|
||||
return a.Included.CompareTo(b.Included);
|
||||
case StreamInSettingFields.SerialNumber:
|
||||
return string.Compare(a.SerialNumber, b.SerialNumber, StringComparison.OrdinalIgnoreCase);
|
||||
case StreamInSettingFields.Description:
|
||||
return string.Compare(a.Description, b.Description, StringComparison.OrdinalIgnoreCase);
|
||||
case StreamInSettingFields.LastModifiedBy:
|
||||
return string.Compare(a.LastModifiedBy, b.LastModifiedBy, StringComparison.OrdinalIgnoreCase);
|
||||
case StreamInSettingFields.LastModified:
|
||||
return a.LastModified.CompareTo(b.LastModified);
|
||||
case StreamInSettingFields.UDPAddress:
|
||||
return string.Compare(a.UDPAddress, b.UDPAddress, StringComparison.OrdinalIgnoreCase);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,217 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{45D282CA-92BD-4168-B79E-B84A196A90D5}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SensorsList</RootNamespace>
|
||||
<AssemblyName>SensorsList</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<RunCodeAnalysis>false</RunCodeAnalysis>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="Microsoft.Xaml.Behaviors">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Microsoft.Xaml.Behaviors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="Prism">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Unity.Wpf">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.Unity.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Wpf">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Unity.Abstractions">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Unity.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Container">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Unity.Container.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="Xceed.Wpf.Toolkit">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\Xceed.Wpf.Toolkit\Xceed.Wpf.Toolkit.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Model\AnalogSensor.cs" />
|
||||
<Compile Include="Model\DigitalInputSetting.cs" />
|
||||
<Compile Include="Model\StreamInputSetting.cs" />
|
||||
<Compile Include="Model\StreamOutputSetting.cs" />
|
||||
<Compile Include="Model\DigitalOutputSetting.cs" />
|
||||
<Compile Include="Model\Squib.cs" />
|
||||
<Compile Include="Model\UartIOSetting.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SensorsListModule.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\StringResources.Designer.cs">
|
||||
<DependentUpon>StringResources.resx</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Resources\TranslateExtension.cs" />
|
||||
<Compile Include="ViewModel\SensorsListEditGroupViewModel.cs" />
|
||||
<Compile Include="ViewModel\SensorTemplatesViewModel.cs" />
|
||||
<Compile Include="ViewModel\SensorsListViewModel.cs" />
|
||||
<Compile Include="View\SensorsListOverdueView.xaml.cs">
|
||||
<DependentUpon>SensorsListOverdueView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\SensorsListEditGroupView.xaml.cs">
|
||||
<DependentUpon>SensorsListEditGroupView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\SensorTemplatesImportView.xaml.cs">
|
||||
<DependentUpon>SensorTemplatesImportView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\SensorTemplatesExportView.xaml.cs">
|
||||
<DependentUpon>SensorTemplatesExportView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\SensorsListView.xaml.cs">
|
||||
<DependentUpon>SensorsListView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\StringResources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>StringResources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Core\DTS.Common.Core.csproj">
|
||||
<Project>{fab1f470-1574-4301-b56e-d3364aa93679}</Project>
|
||||
<Name>DTS.Common.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.DAS.Concepts\DTS.Common.DAS.Concepts.csproj">
|
||||
<Project>{03D8C736-36EB-4CD1-A6D9-130452B23239}</Project>
|
||||
<Name>DTS.Common.DAS.Concepts</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.DataModel\DTS.Common.DataModel.csproj">
|
||||
<Project>{2a2f03a9-bf85-4360-a06a-cf3016d2633b}</Project>
|
||||
<Name>DTS.Common.DataModel</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.ISO\DTS.Common.ISO.csproj">
|
||||
<Project>{4dccddd1-032f-430c-9a6f-231daca4fbd0}</Project>
|
||||
<Name>DTS.Common.ISO</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Storage\DTS.Common.Storage.csproj">
|
||||
<Project>{e0d1a7d0-dce8-403d-ba85-5a5d66ba1313}</Project>
|
||||
<Name>DTS.Common.Storage</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Utilities\DTS.Common.Utilities.csproj">
|
||||
<Project>{03eace47-ea59-44ac-b49d-956e4dc4d618}</Project>
|
||||
<Name>DTS.Common.Utilities</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common\DTS.Common.csproj">
|
||||
<Project>{114edc77-f3b5-4576-a91b-40818d503b55}</Project>
|
||||
<Name>DTS.Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\IService\IService.csproj">
|
||||
<Project>{c9c45b72-05a3-4962-bc13-a78b1f4b1925}</Project>
|
||||
<Name>IService</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\SensorDB\SensorDB.csproj">
|
||||
<Project>{444ef10c-046e-47ad-a9a5-17318d488723}</Project>
|
||||
<Name>SensorDB</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Users\Users.csproj">
|
||||
<Project>{BE8D217D-6DA9-4BCA-B62A-A82325B33979}</Project>
|
||||
<Name>Users</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\SensorsListOverdueView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\SensorsListEditGroupView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\SensorTemplatesImportView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\SensorTemplatesExportView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\SensorsListView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,176 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO.Ports;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
public class UartIOSetting : DTS.Common.Base.BasePropertyChanged, IUartIOSetting, IDragAndDropItem
|
||||
{
|
||||
private bool _bIncluded = true;
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
public string SerialNumber { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
public int DatabaseId { get; set; } = -1;
|
||||
public string LastModifiedBy { get; set; } = "";
|
||||
public DateTime LastModified { get; set; }
|
||||
public bool Assigned { get; set; } = false;
|
||||
public bool Online { get; set; } = false;
|
||||
public bool Broken { get; set; } = false;
|
||||
public bool DoNotUse { get; set; } = false;
|
||||
public uint BaudRate { get; set; } = 57600;
|
||||
public uint DataBits { get; set; } = 8;
|
||||
public StopBits StopBits { get; set; } = StopBits.None;
|
||||
public Parity Parity { get; set; } = Parity.None;
|
||||
public Handshake FlowControl { get; } = Handshake.None;
|
||||
public UartDataFormat DataFormat { get; set; } = UartDataFormat.Binary;
|
||||
public string ISOCode { get; set; } = string.Empty;
|
||||
public string ISOChannelName { get; set; } = string.Empty;
|
||||
public string UserCode { get; set; } = string.Empty;
|
||||
public string UserChannelName { get; set; } = string.Empty;
|
||||
|
||||
public bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
term = term.ToLower();
|
||||
if (SerialNumber.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (Description.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (BaudRate.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (DataBits.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (StopBits.ToString().ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (Parity.ToString().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (FlowControl.ToString().ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (DataFormat.ToString().ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public UartIOSetting() { }
|
||||
|
||||
public UartIOSetting(IUARTRecord record)
|
||||
{
|
||||
DatabaseId = record.Id;
|
||||
Description = "";
|
||||
LastModified = record.LastModified;
|
||||
LastModifiedBy = record.LastUpdatedBy;
|
||||
SerialNumber = record.SerialNumber;
|
||||
|
||||
ISOCode = "";
|
||||
ISOChannelName = "";
|
||||
UserCode = "";
|
||||
UserChannelName = "";
|
||||
|
||||
BaudRate = record.UartBaudRate;
|
||||
DataBits = record.UartDataBits;
|
||||
StopBits = record.UartStopBits;
|
||||
Parity = record.UartParity;
|
||||
//FB 30486 Hardcode FlowControl to NONE for UART sensor type -removed FlowControl
|
||||
DataFormat = record.UartDataFormat;
|
||||
}
|
||||
public UartIOSetting(ISensorData s) : this()
|
||||
{
|
||||
DatabaseId = s.DatabaseId;
|
||||
Description = s.Comment;
|
||||
LastModified = s.LastModified;
|
||||
LastModifiedBy = s.LastUpdatedBy;
|
||||
SerialNumber = s.SerialNumber;
|
||||
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
|
||||
BaudRate = s.UartBaudRate;
|
||||
DataBits = s.UartDataBits;
|
||||
StopBits = s.UartStopBits;
|
||||
Parity = s.UartParity;
|
||||
//FB 30486 Hardcode FlowControl to NONE for UART sensor type -removed FlowControl
|
||||
DataFormat = s.UartDataFormat;
|
||||
}
|
||||
}
|
||||
|
||||
public class UartIOComparer : IComparer<IUartIOSetting>
|
||||
{
|
||||
public UartSettingFields SortField { get; set; }
|
||||
public bool SortAscending { get; set; }
|
||||
|
||||
public int Compare(IUartIOSetting left, IUartIOSetting right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left; var b = right;
|
||||
if (!SortAscending) { a = right; b = left; }
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
var stringComparer = new DTS.Common.Utilities.NaturalStringComparer();
|
||||
switch (SortField)
|
||||
{
|
||||
case UartSettingFields.Included:
|
||||
return a.Included.CompareTo(b.Included);
|
||||
case UartSettingFields.SerialNumber:
|
||||
return stringComparer.Compare(a.SerialNumber, b.SerialNumber);
|
||||
case UartSettingFields.BaudRate:
|
||||
return a.BaudRate.CompareTo(b.BaudRate);
|
||||
case UartSettingFields.DataBits:
|
||||
return a.DataBits.CompareTo(b.DataBits);
|
||||
case UartSettingFields.StopBits:
|
||||
return a.StopBits.CompareTo(b.StopBits);
|
||||
case UartSettingFields.Parity:
|
||||
return a.Parity.CompareTo(b.Parity);
|
||||
case UartSettingFields.FlowControl:
|
||||
return a.FlowControl.CompareTo(b.FlowControl);
|
||||
case UartSettingFields.DataFormat:
|
||||
return a.DataFormat.CompareTo(b.DataFormat);
|
||||
case UartSettingFields.LastModifiedBy:
|
||||
return stringComparer.Compare(a.LastModifiedBy, b.LastModifiedBy);
|
||||
case UartSettingFields.LastModified:
|
||||
return a.LastModified.CompareTo(b.LastModified);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,881 @@
|
||||
<base:BaseView x:Class="SensorsList.SensorsListView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:behaviors="clr-namespace:DTS.Common.Behaviors;assembly=DTS.Common"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:strings="clr-namespace:SensorsList"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:my="clr-namespace:DTS.Common.Enums;assembly=DTS.Common">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Controls/combobox.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style TargetType="ToggleButton">
|
||||
<Setter Property="Width" Value="20"/>
|
||||
<Setter Property="MaxWidth" Value="20"/>
|
||||
</Style>
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TTS_ListViewItemStyle}"/>
|
||||
</Style>
|
||||
<Style TargetType="TextBox" BasedOn="{StaticResource TTS_TextBoxStyle}"/>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource TTS_TextBlockStyle}"/>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||||
<Style TargetType="ComboBox" BasedOn="{StaticResource TTS_ComboBoxStyle}"/>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
<converters:NumericStringFormatConverter x:Key="NumericStringFormatConverter" />
|
||||
<converters:InverseBooleanToVisibilityConverter x:Key="InverseBoolToVisibility" />
|
||||
<converters:BooleanToVisibilityConverter x:Key="BoolToVisibility" />
|
||||
<converters:DateConverter x:Key="DateConverter" />
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid Background="{DynamicResource Brush_ApplicationContentBackground}">
|
||||
<TabControl AutomationProperties.AutomationId="SensorsListTab" SelectedIndex="{Binding SelectedTabIndex, Mode=TwoWay}">
|
||||
<TabItem Header="{Binding AnalogHeader}" AutomationProperties.AutomationId="AnalogTab">
|
||||
<ListView ItemsSource="{Binding AnalogSensors, UpdateSourceTrigger=PropertyChanged}" Name="ListView_SensorsListView" AutomationProperties.AutomationId="SensorsListView" SelectedIndex="{Binding SelectedAnalogIndex, Mode=TwoWay}" GridViewColumnHeader.Click="GridViewColumnHeader_OnClick"
|
||||
VirtualizingPanel.IsVirtualizing="True">
|
||||
<i:Interaction.Behaviors>
|
||||
<behaviors:MultiSelectionBehavior SelectedItems="{Binding SelectedAnalogItems}" />
|
||||
</i:Interaction.Behaviors>
|
||||
<!-- ensure we are using virtualizing stack panel for rendering speed reasons -->
|
||||
<ListView.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ListView.ItemsPanel>
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListViewItem}" BasedOn="{StaticResource TTS_ListViewItemStyle}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=SensorCalibrationOrUsageStatus}" Value="{x:Static my:UIItemStatus.Error}">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_ApplicationStatus_Failed}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=SensorCalibrationOrUsageStatus}" Value="{x:Static my:UIItemStatus.Warning}">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_Amber}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=SensorCalibrationOrUsageStatus}" Value="{x:Static my:UIItemStatus.None}">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_Table_RowBackground}" />
|
||||
</DataTrigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_ApplicationSelectedBackground}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="SensorsListGridView" VirtualizingPanel.IsVirtualizing="True">
|
||||
<GridViewColumn AutomationProperties.AutomationId="AnalogIncluded" x:Name="AnalogIncludedColumn">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding Included}" AutomationProperties.AutomationId="AnalogIncludedCheckbox" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Description">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Description" HeaderTitle="{strings:TranslateExtension Description}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Description,FallbackValue='Comment'}" AutomationProperties.AutomationId="DescriptionLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Manufacturer">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Manufacturer" HeaderTitle="{strings:TranslateExtension Manufacturer}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Manufacturer,FallbackValue='Maker'}" AutomationProperties.AutomationId="ManufacturerLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Model" x:Name="ModelColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Model" HeaderTitle="{strings:TranslateExtension Model}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Model,FallbackValue='Model'}" AutomationProperties.AutomationId="ModelLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="Assembly" x:Name="AssemblyColumn" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Assembly" HeaderTitle="{strings:TranslateExtension Assembly}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding AssemblyName}" AutomationProperties.AutomationId="AssemblyLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="IEPE">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="IEPE" HeaderTitle="{strings:TranslateExtension IEPE}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding IEPE, Mode=OneWay}" IsHitTestVisible="False" AutomationProperties.AutomationId="IEPECheckbox" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Capacity">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Capacity" HeaderTitle="{strings:TranslateExtension SensorMaxRange}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock AutomationProperties.AutomationId="CapacityLbl">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Converter="{StaticResource NumericStringFormatConverter}" FallbackValue="'Capacity'">
|
||||
<Binding Path="Capacity" />
|
||||
<Binding Path="DataContext.CapacityFormat" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type ListView}}"/>
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn x:Name="SensitivityColumn" AutomationProperties.AutomationId="Sensitivity">
|
||||
<controls:GridViewColumnHeaderSearchable x:Name="SensitivityHeader" Tag="Sensitivity" HeaderTitle="{strings:TranslateExtension Sensitivity}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Sensitivity,FallbackValue='Sensitivity'}" AutomationProperties.AutomationId="SensitivityLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn x:Name="AddedSensitivityColumn" AutomationProperties.AutomationId="addedSensitivity">
|
||||
<controls:GridViewColumnHeaderSearchable x:Name="AddedSensitivityHeader" Tag="AddedSensitivity" HeaderTitle="{strings:TranslateExtension LinearSensitivity}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding AddedSensitivity,FallbackValue='LinearSensitivity'}" AutomationProperties.AutomationId="AddedSensitivityLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Resistance">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Resistance" HeaderTitle="{strings:TranslateExtension Resistance}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Resistance,FallbackValue='Resistance'}" AutomationProperties.AutomationId="ResistanceLbl" Visibility="{Binding IEPE, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
<TextBlock Text="---" AutomationProperties.AutomationId="ResistanceLblIEPE" Visibility="{Binding IEPE, Converter={StaticResource BoolToVisibility}}" />
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Excitation">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Excitation" HeaderTitle="{strings:TranslateExtension Excitation}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Excitation,FallbackValue='Excitation'}" AutomationProperties.AutomationId="ExcitationLbl" Visibility="{Binding IEPE, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
<TextBlock Text="---" AutomationProperties.AutomationId="ExcitationLblIEPE" Visibility="{Binding IEPE, Converter={StaticResource BoolToVisibility}}" />
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Units">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Units" HeaderTitle="{strings:TranslateExtension Units}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Units,FallbackValue='Units'}" AutomationProperties.AutomationId="UnitsLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Id">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Id" HeaderTitle="{strings:TranslateExtension ID}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding EID,FallbackValue='ID'}" AutomationProperties.AutomationId="EIDLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CalDate" x:Name="CalDateColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="CalDate" HeaderTitle="{strings:TranslateExtension CalDate}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding CalDate,FallbackValue='CalDate', StringFormat='d'}" AutomationProperties.AutomationId="CalDateLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="FirstUseDate" x:Name="FirstUseColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="FirstUseDate" HeaderTitle="{strings:TranslateExtension FirstUseDate}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding FirstUseDate, StringFormat='d', Converter={StaticResource DateConverter}}" AutomationProperties.AutomationId="FirstUseDateLbl"
|
||||
/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CalDueDate">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="CalDueDate" HeaderTitle="{strings:TranslateExtension CalDueDate}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding CalDueDate,FallbackValue='CalDueDate', StringFormat='d'}" AutomationProperties.AutomationId="CalDueDateLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="OutOfDate">
|
||||
<controls:GridViewColumnHeaderSearchableCheckBox Tag="OutOfDate" HeaderTitle="{strings:TranslateExtension OutOfDate}" ClickHandler="GridViewColumnHeaderCheckBox_OnClick" ListviewId="{Binding ListViewId}" Filter="CheckBox_Filter" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding OutOfDate, Mode=OneWay}" IsHitTestVisible="False" AutomationProperties.AutomationId="OutOfDateCheckbox" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="InWarningPeriod" x:Name="InWarningPeriodColumn">
|
||||
<controls:GridViewColumnHeaderSearchableCheckBox Tag="InWarningPeriod" HeaderTitle="{strings:TranslateExtension InWarningPeriod}" ClickHandler="GridViewColumnHeaderCheckBox_OnClick" ListviewId="{Binding ListViewId}" Filter="CheckBox_Filter" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding InWarningPeriod, Mode=OneWay}" IsHitTestVisible="False" AutomationProperties.AutomationId="InWarningPeriodCheckbox" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="InspectBeforeUse" x:Name="InspectBeforeUseColumn">
|
||||
<controls:GridViewColumnHeaderSearchableCheckBox Tag="InspectBeforeUse" HeaderTitle="{strings:TranslateExtension InspectBeforeUse}" ClickHandler="GridViewColumnHeaderCheckBox_OnClick" ListviewId="{Binding ListViewId}" Filter="CheckBox_Filter" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding InspectBeforeUse, Mode=OneWay}" IsHitTestVisible="False" AutomationProperties.AutomationId="InspectBeforeUseCheckbox" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UsageCount" x:Name="UsageCountColumn" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UsageCount" HeaderTitle="{strings:TranslateExtension UsageCount}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UsageCount}" AutomationProperties.AutomationId="UsageCountLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="MaximumUsage" x:Name="MaximumUsageColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="MaximumUsage" HeaderTitle="{strings:TranslateExtension MaximumUsage}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding MaximumUsage}" AutomationProperties.AutomationId="MaximumUsageLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue1">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue1" HeaderTitle="{strings:TranslateExtension UserValue1}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UserValue1}" AutomationProperties.AutomationId="UserValue1Lbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue2">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue2" HeaderTitle="{strings:TranslateExtension UserValue2}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UserValue2}" AutomationProperties.AutomationId="UserValue2Lbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue3">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue3" HeaderTitle="{strings:TranslateExtension UserValue3}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UserValue3}" AutomationProperties.AutomationId="UserValue3Lbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ModifiedBy">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ModifiedBy" HeaderTitle="{strings:TranslateExtension ModifiedBy}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding ModifiedBy,FallbackValue='ModifiedBy'}" AutomationProperties.AutomationId="ModifiedByLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="LastModified">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="LastModified" HeaderTitle="{strings:TranslateExtension LastModified}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding LastModified,FallbackValue='LastModified'}" AutomationProperties.AutomationId="LastModifiedLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding SquibsHeader}" AutomationProperties.AutomationId="SquibsTab">
|
||||
<ListView ItemsSource="{Binding Squibs, UpdateSourceTrigger=PropertyChanged}"
|
||||
AutomationProperties.AutomationId="SquibsListView" SelectedIndex="{Binding SelectedSquibIndex, Mode=TwoWay}"
|
||||
GridViewColumnHeader.Click="GridViewColumnHeader_OnClick" x:Name="ListView_Squib">
|
||||
<i:Interaction.Behaviors>
|
||||
<behaviors:MultiSelectionBehavior SelectedItems="{Binding SelectedSquibItems}" />
|
||||
</i:Interaction.Behaviors>
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="SquibGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SquibIncluded" x:Name="SquibIncludedColumn">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding Included}" AutomationProperties.AutomationId="SquibIncludedCheckbox" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="S_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Description">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Description" HeaderTitle="{strings:TranslateExtension Description}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Description,FallbackValue='Comment'}" AutomationProperties.AutomationId="S_DescriptionLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="ResistanceLow">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ResistanceLow" HeaderTitle="{strings:TranslateExtension ResistanceLow}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding ResistanceLow,FallbackValue='ResistanceLow', StringFormat=F1}" AutomationProperties.AutomationId="S_ResistanceLowLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="ResistanceHigh">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ResistanceHigh" HeaderTitle="{strings:TranslateExtension ResistanceHigh}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding ResistanceHigh,FallbackValue='ResistanceHigh', StringFormat=F1}" AutomationProperties.AutomationId="S_ResistanceHighLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Id">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Id" HeaderTitle="{strings:TranslateExtension ID}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding ArticleId,FallbackValue='ID'}" AutomationProperties.AutomationId="S_EIDLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SQMode">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SQMode" HeaderTitle="{strings:TranslateExtension SQMode}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SQMode,FallbackValue='SQMode'}" AutomationProperties.AutomationId="S_ModeLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SQDelay">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SQDelay" HeaderTitle="{strings:TranslateExtension SQDelay}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SQDelay,FallbackValue='SQDelay'}" AutomationProperties.AutomationId="S_DelayLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SQDuration">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SQDuration" HeaderTitle="{strings:TranslateExtension SQDuration}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SQDuration,FallbackValue='SQDuration'}" AutomationProperties.AutomationId="S_DurationLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="ModifiedBy">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ModifiedBy" HeaderTitle="{strings:TranslateExtension ModifiedBy}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding ModifiedBy,FallbackValue='ModifiedBy'}" AutomationProperties.AutomationId="S_ModifiedByLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="LastModified">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="LastModified" HeaderTitle="{strings:TranslateExtension LastModified}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding LastModified,FallbackValue='LastModified'}" AutomationProperties.AutomationId="S_LastModifiedLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding DigitalInputsHeader}" AutomationProperties.AutomationId="DigitalInputsTab">
|
||||
<ListView ItemsSource="{Binding DigitalInputSettings, UpdateSourceTrigger=PropertyChanged}"
|
||||
AutomationProperties.AutomationId="DigitalInputsListView"
|
||||
SelectedIndex="{Binding SelectedDigitialInIndex, Mode=TwoWay}"
|
||||
GridViewColumnHeader.Click="GridViewColumnHeader_OnClick" x:Name="ListView_DigitalIn">
|
||||
<i:Interaction.Behaviors>
|
||||
<behaviors:MultiSelectionBehavior SelectedItems="{Binding SelectedDigitalInItems}" />
|
||||
</i:Interaction.Behaviors>
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="DigitalInputsGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="DigitalInIncluded" x:Name="DigitalInIncludedColumn">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding Included}" AutomationProperties.AutomationId="DigitalInIncludedCheckbox" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableDigitalIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="DI_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Description">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Description" HeaderTitle="{strings:TranslateExtension Description}" Search="GridViewColumnHeaderSearchableDigitalIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Description,FallbackValue='Comment'}" AutomationProperties.AutomationId="DI_DescriptionLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="DIMode">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DIMode" HeaderTitle="{strings:TranslateExtension DIMode}" Search="GridViewColumnHeaderSearchableDigitalIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding DIMode,FallbackValue='DIMode'}" AutomationProperties.AutomationId="DI_ModeLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="ModifiedBy">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ModifiedBy" HeaderTitle="{strings:TranslateExtension ModifiedBy}" Search="GridViewColumnHeaderSearchableDigitalIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding ModifiedBy,FallbackValue='ModifiedBy'}" AutomationProperties.AutomationId="DI_ModifiedByLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="LastModified">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="LastModified" HeaderTitle="{strings:TranslateExtension LastModified}" Search="GridViewColumnHeaderSearchableDigitalIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding LastModified,FallbackValue='LastModified'}" AutomationProperties.AutomationId="DI_LastModifiedLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding DigitalOutputsHeader}" AutomationProperties.AutomationId="DigitalOutputsTab">
|
||||
<ListView ItemsSource="{Binding DigitalOutputSettings, UpdateSourceTrigger=PropertyChanged}"
|
||||
AutomationProperties.AutomationId="DigitalOutputsListView"
|
||||
SelectedIndex="{Binding SelectedDigitalOutIndex, Mode=TwoWay}"
|
||||
GridViewColumnHeader.Click="GridViewColumnHeader_OnClick" x:Name="ListView_DigitalOutput">
|
||||
<i:Interaction.Behaviors>
|
||||
<behaviors:MultiSelectionBehavior SelectedItems="{Binding SelectedDigitalOutItems}" />
|
||||
</i:Interaction.Behaviors>
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="DigitalOutputsListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="DigitalOutIncluded" x:Name="DigitalOutIncludedColumn">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding Included}" AutomationProperties.AutomationId="DigitalOutIncludedCheckbox" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableDigitalOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="DO_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="DODelay">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DODelay" HeaderTitle="{strings:TranslateExtension DODelay}" Search="GridViewColumnHeaderSearchableDigitalOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding DODelay,FallbackValue='DODelay'}" AutomationProperties.AutomationId="DO_DelayLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="DODuration">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DODuration" HeaderTitle="{strings:TranslateExtension DODuration}" Search="GridViewColumnHeaderSearchableDigitalOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding DODuration,FallbackValue='DODuration'}" AutomationProperties.AutomationId="DO_DurationLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="ModifiedBy">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ModifiedBy" HeaderTitle="{strings:TranslateExtension ModifiedBy}" Search="GridViewColumnHeaderSearchableDigitalOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding ModifiedBy,FallbackValue='ModifiedBy'}" AutomationProperties.AutomationId="DO_ModifiedByLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="LastModified">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="LastModified" HeaderTitle="{strings:TranslateExtension LastModified}" Search="GridViewColumnHeaderSearchableDigitalOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding LastModified,FallbackValue='LastModified'}" AutomationProperties.AutomationId="DO_LastModifiedLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding UartSettingsHeader}" AutomationProperties.AutomationId="UARTsTab">
|
||||
<ListView ItemsSource="{Binding UartIOSettings, UpdateSourceTrigger=PropertyChanged}"
|
||||
AutomationProperties.AutomationId="UartListView"
|
||||
SelectedIndex="{Binding SelectedUartSettingIndex, Mode=TwoWay}"
|
||||
GridViewColumnHeader.Click="GridViewColumnHeader_OnClick" x:Name="ListView_Uart">
|
||||
<i:Interaction.Behaviors>
|
||||
<behaviors:MultiSelectionBehavior SelectedItems="{Binding SelectedUartSettingItems}" />
|
||||
</i:Interaction.Behaviors>
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="UartListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartIncluded" x:Name="UartIncludedColumn">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding Included}" AutomationProperties.AutomationId="UartIncludedCheckbox" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="Uart_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartBaudRate">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="BaudRate" HeaderTitle="{strings:TranslateExtension UartBaudRate}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding BaudRate,FallbackValue='BaudRate'}" AutomationProperties.AutomationId="BaudRateLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartDataBits">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DataBits" HeaderTitle="{strings:TranslateExtension UartDataBits}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding DataBits,FallbackValue='DataBits'}" AutomationProperties.AutomationId="DataBitsLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartStopBits">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StopBits" HeaderTitle="{strings:TranslateExtension UartStopBits}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding StopBits,FallbackValue='StopBits'}" AutomationProperties.AutomationId="StopBitsLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartParity">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Parity" HeaderTitle="{strings:TranslateExtension UartParity}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Parity,FallbackValue='Parity'}" AutomationProperties.AutomationId="ParityLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartDataFormat">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DataFormat" HeaderTitle="{strings:TranslateExtension UartDataFormat}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding DataFormat,FallbackValue='DataFormat'}" AutomationProperties.AutomationId="DataFormatLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="LastModifiedBy">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="LastModifiedBy" HeaderTitle="{strings:TranslateExtension ModifiedBy}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding LastModifiedBy,FallbackValue='LastModifiedBy'}" AutomationProperties.AutomationId="Uart_ModifiedByLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="LastModified">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="LastModified" HeaderTitle="{strings:TranslateExtension LastModified}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding LastModified,FallbackValue='LastModified'}" AutomationProperties.AutomationId="Uart_LastModifiedLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{Binding StreamInputSettingHeader}" AutomationProperties.AutomationId="StreamInputsTab">
|
||||
<ListView ItemsSource="{Binding StreamInputSettings, UpdateSourceTrigger=PropertyChanged}"
|
||||
AutomationProperties.AutomationId="StreamInputsListView"
|
||||
SelectedIndex="{Binding SelectedStreamInIndex, Mode=TwoWay}"
|
||||
GridViewColumnHeader.Click="GridViewColumnHeader_OnClick" x:Name="ListView_StreamInput">
|
||||
<i:Interaction.Behaviors>
|
||||
<behaviors:MultiSelectionBehavior SelectedItems="{Binding SelectedStreamInItems}" />
|
||||
</i:Interaction.Behaviors>
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="StreamInputsListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamInIncluded" x:Name="StreamInIncludedColumn">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding Included}" AutomationProperties.AutomationId="StreamInIncludedCheckbox" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableStreamIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="DO_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPAddress">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPAddress" HeaderTitle="{strings:TranslateExtension UDPAddress}" Search="GridViewColumnHeaderSearchableStreamIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UDPAddress,FallbackValue='UDPAddress'}" AutomationProperties.AutomationId="UDPAddressLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="ModifiedBy">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ModifiedBy" HeaderTitle="{strings:TranslateExtension ModifiedBy}" Search="GridViewColumnHeaderSearchableStreamIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding LastModifiedBy,FallbackValue='ModifiedBy'}" AutomationProperties.AutomationId="StreamIn_ModifiedByLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="LastModified">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="LastModified" HeaderTitle="{strings:TranslateExtension LastModified}" Search="GridViewColumnHeaderSearchableStreamIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding LastModified,FallbackValue='LastModified'}" AutomationProperties.AutomationId="StreamIn_LastModifiedLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
|
||||
<!-- OUTPUT STREAM -->
|
||||
<TabItem Header="{Binding StreamOutputSettingHeader}" AutomationProperties.AutomationId="StreamOutputsTab">
|
||||
<ListView ItemsSource="{Binding StreamOutputSettings, UpdateSourceTrigger=PropertyChanged}"
|
||||
AutomationProperties.AutomationId="StreamOutputsListView"
|
||||
SelectedIndex="{Binding SelectedStreamOutIndex, Mode=TwoWay}"
|
||||
GridViewColumnHeader.Click="GridViewColumnHeader_OnClick" x:Name="ListView_StreamOutput">
|
||||
<i:Interaction.Behaviors>
|
||||
<behaviors:MultiSelectionBehavior SelectedItems="{Binding SelectedStreamOutItems}" />
|
||||
</i:Interaction.Behaviors>
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="StreamOutputsListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutIncluded" x:Name="StreamOutIncludedColumn">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding Included}" AutomationProperties.AutomationId="StreamOutIncludedCheckbox" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="StreamOut_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPProfile">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPProfile" HeaderTitle="{strings:TranslateExtension UDPProfile}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UDPProfile,FallbackValue='UDPProfile'}" AutomationProperties.AutomationId="UDPProfileLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPAddress">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPAddress" HeaderTitle="{strings:TranslateExtension UDPAddress}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding UDPAddress,FallbackValue='UDPAddress'}" AutomationProperties.AutomationId="UDPAddressLbl" Visibility="{Binding IsUART, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsUART, Converter={StaticResource BoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<!-- CH 10 -->
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPTimeChannelId">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPTimeChannelId" HeaderTitle="{strings:TranslateExtension TimeChannelId}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding UDPTimeChannelId,FallbackValue='UDPTimeChannelId'}" AutomationProperties.AutomationId="UDPTimeChannelIdLbl"
|
||||
Visibility="{Binding IsCH10, Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsCH10, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPDataChannelId">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPDataChannelId" HeaderTitle="{strings:TranslateExtension DataChannelId}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding UDPDataChannelId,FallbackValue='UDPDataChannelId'}" AutomationProperties.AutomationId="UDPDataChannelIdLbl">
|
||||
<TextBlock.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}">
|
||||
<Binding Path="IsCH10" />
|
||||
<Binding Path="IsUART" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Visibility>
|
||||
</TextBlock>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}">
|
||||
<TextBlock.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}" ConverterParameter="False">
|
||||
<Binding Path="IsCH10" />
|
||||
<Binding Path="IsUART" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Visibility>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="IRIGTimeDataPacketIntervalMs">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="IRIGTimeDataPacketIntervalMs" HeaderTitle="{strings:TranslateExtension IRIGTimeDataPacketIntervalMs}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding IRIGTimeDataPacketIntervalMs,FallbackValue='IRIGTimeDataPacketIntervalMs'}" AutomationProperties.AutomationId="IRIGTimeDataPacketIntervalMsLbl"
|
||||
Visibility="{Binding IsCH10, Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsCH10, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="TMATSIntervalMs">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="TMATSIntervalMs" HeaderTitle="{strings:TranslateExtension TMATSIntervalMs}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_OnClick" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding TMATSIntervalMs, StringFormat='N0'}" AutomationProperties.AutomationId="TMATS_IntervalMs"
|
||||
Visibility="{Binding IsCH10,Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsCH10, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<!-- TMNS Columns -->
|
||||
<GridViewColumn AutomationProperties.AutomationId="SubFrameIDColumn" x:Name="SubFrameIDColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SubFrameIdColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMNS_SubFrameId}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_OnClick"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding TMNS_SubFrameId, StringFormat='N0'}" AutomationProperties.AutomationId="TMNS_SubFrameId"
|
||||
Visibility="{Binding IsTMNS,Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="MessageIDColumn" x:Name="MessageIDColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="MessageIdColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMNS_MessageId}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_OnClick"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding TMNS_MsgId,StringFormat='N0'}" AutomationProperties.AutomationId="TMNS_MessageId"
|
||||
Visibility="{Binding IsTMNS, Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="MinorPerMajorColumn" x:Name="MinorPerMajorColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="MinorPerMajorColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMNS_MinorPerMajor}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_OnClick"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding TMNS_MinorPerMajor,StringFormat='N0'}" AutomationProperties.AutomationId="TMNS_MinorPerMajor"
|
||||
Visibility="{Binding IsTMNS, Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="TMATSPortColumn" x:Name="TMATSPortColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="TMATSPortColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMNS_TMATSPort}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_OnClick"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding TMNS_TMATSPort, StringFormat='N0'}" AutomationProperties.AutomationId="TMNS_TMATSPort"
|
||||
Visibility="{Binding IsTMNS, Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<!-- IENA columns -->
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="IENASourcePortColumn" x:Name="IENASourcePortColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="IENASourcePortColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_IENA_SourcePort}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_OnClick"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding IENA_SourcePort,StringFormat='N0'}" AutomationProperties.AutomationId="IENA_SourcePort"
|
||||
Visibility="{Binding IsIENA, Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsIENA, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="IENAKeyColumn" x:Name="IENAKeyColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="IENAKeyColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_IENA_Key}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_OnClick"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding IENA_Key, StringFormat='N0'}" AutomationProperties.AutomationId="IENA_Key"
|
||||
Visibility="{Binding IsIENA, Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsIENA, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="ModifiedBy">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ModifiedBy" HeaderTitle="{strings:TranslateExtension ModifiedBy}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding LastModifiedBy,FallbackValue='ModifiedBy'}" AutomationProperties.AutomationId="StreamOut_ModifiedByLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="LastModified">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="LastModified" HeaderTitle="{strings:TranslateExtension LastModified}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding LastModified,FallbackValue='LastModified'}" AutomationProperties.AutomationId="StreamOut_LastModifiedLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,34 @@
|
||||
<base:BaseView x:Class="SensorsList.SensorTemplatesExportView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:behaviors="clr-namespace:DTS.Common.Behaviors;assembly=DTS.Common"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:strings="clr-namespace:SensorsList"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Controls/combobox.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TTS_ListViewItemStyle}"/>
|
||||
</Style>
|
||||
<Style TargetType="TextBox" BasedOn="{StaticResource TTS_TextBoxStyle}"/>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource TTS_TextBlockStyle}"/>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||||
<Style TargetType="ComboBox" BasedOn="{StaticResource TTS_ComboBoxStyle}"/>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid Background="{DynamicResource Brush_ApplicationContentBackground}">
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,638 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors.SoftwareFilters;
|
||||
using DTS.Common.Storage;
|
||||
using DTS.Common.Utilities.Logging;
|
||||
using DTS.SensorDB;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// this class is used to display analog sensors in lists in the UI
|
||||
/// </summary>
|
||||
public class AnalogSensor : /*DTS.Common.Base.BasePropertyChanged*/AnalogDbRecord, IAnalogSensor, IDragAndDropItem
|
||||
{
|
||||
/// <summary>
|
||||
/// indicates if the sensor is Integrated Electronics Piezo-Electric (IEPE)
|
||||
/// </summary>
|
||||
public bool IEPE => Bridge == SensorConstants.BridgeType.IEPE;
|
||||
|
||||
private bool _bIncluded = true;
|
||||
/// <summary>
|
||||
/// used to indicate that the sensor should be checked if in a list
|
||||
/// with a checkbox
|
||||
/// </summary>
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
/// <summary>
|
||||
/// returns the status of the channel considering "IsComplete" and sensor cal status
|
||||
/// 9724 Sensor cal policy needs to match hardware cal policy
|
||||
/// </summary>
|
||||
public UIItemStatus SensorCalibrationOrUsageStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
if (OutOfDate || UsageMaximized)
|
||||
{
|
||||
return UIItemStatus.Error;
|
||||
}
|
||||
return (InWarningPeriod || InUsageWarningPeriod) ? UIItemStatus.Warning : UIItemStatus.None;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// the comment or description for the sensor
|
||||
/// </summary>
|
||||
public string Description
|
||||
{
|
||||
get => Comment;
|
||||
set
|
||||
{
|
||||
Comment = value;
|
||||
OnPropertyChanged("Description");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// a user friendly representation of the sensor sensitivity
|
||||
/// </summary>
|
||||
public string Sensitivity { get; set; }
|
||||
/// <summary>
|
||||
/// a user friendly representation of the added sensitivity of a dual sensitivity sensor
|
||||
/// (linear/non linear)
|
||||
/// </summary>
|
||||
public string AddedSensitivity { get; set; }
|
||||
/// <summary>
|
||||
/// indicates what the type of nonlinear calculation is used for this sensor as a string
|
||||
/// </summary>
|
||||
public string NonLinearCalculationType { get; set; }
|
||||
/// <summary>
|
||||
/// indicates what the type of nonlinear calculation is used for this sensor as an enum
|
||||
/// </summary>
|
||||
public NonLinearStyles NonLinearCalculationTypeEnum { get; set; }
|
||||
/// <summary>
|
||||
/// the resistance in ohms for the sensor
|
||||
/// </summary>
|
||||
public double Resistance
|
||||
{
|
||||
get => BridgeResistance;
|
||||
set
|
||||
{
|
||||
BridgeResistance = value;
|
||||
OnPropertyChanged("Resistance");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// a user friendly string representation of the excitations the sensor is valid for
|
||||
/// </summary>
|
||||
public string Excitation { get; set; }
|
||||
/// <summary>
|
||||
/// engineering units for the sensor
|
||||
/// </summary>
|
||||
public string Units { get; set; } = "";
|
||||
/// <summary>
|
||||
/// electronic id associated with the sensor
|
||||
/// </summary>
|
||||
public string EID { get; set; }
|
||||
/// <summary>
|
||||
/// the last calibration date of the sensor
|
||||
/// </summary>
|
||||
public DateTime CalDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// when the calibration is due for this sensor
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
public DateTime CalDueDate
|
||||
{
|
||||
get
|
||||
{
|
||||
if (SensorConstants.IsTestSpecificEmbedded(SerialNumber))
|
||||
{
|
||||
return DateTime.Today.AddDays(CalInterval);
|
||||
}
|
||||
if (SensorConstants.UseSensorFirstUseDate && UsingLatestCalibration)
|
||||
{
|
||||
//we are using the latest cal, the first use date is valid if present, otherwise
|
||||
if (null == FirstUseDate)
|
||||
{
|
||||
return DateTime.Today.AddDays(CalInterval);
|
||||
}
|
||||
else
|
||||
{
|
||||
return ((DateTime)FirstUseDate).AddDays(CalInterval);
|
||||
}
|
||||
}
|
||||
//either we aren't using the latest cal, or use sensor first use date is false, fall back to cal date + interval
|
||||
return CalDate.AddDays(CalInterval);
|
||||
}
|
||||
set { }
|
||||
}
|
||||
/// <summary>
|
||||
/// indicates if the sensor's calibration due date is in the past
|
||||
/// </summary>
|
||||
public bool OutOfDate => DateTime.Today.Date > CalDueDate;
|
||||
/// <summary>
|
||||
/// indicates if the sensor's calibration due date is in the warning period
|
||||
/// </summary>
|
||||
public bool InWarningPeriod => DateTime.Today.Date.AddDays(SensorCalWarningPeriodDays) > CalDueDate && !OutOfDate;
|
||||
/// <summary>
|
||||
/// Inspect before use
|
||||
/// </summary>
|
||||
private bool _inspectBeforeUse = false;
|
||||
public bool InspectBeforeUse
|
||||
{
|
||||
get => _inspectBeforeUse;
|
||||
set
|
||||
{
|
||||
_inspectBeforeUse = value;
|
||||
OnPropertyChanged("InspectBeforeUse");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// from DataPROWin7.Common.SerializedSettings.SensorCalWarningPeriodDays
|
||||
/// </summary>
|
||||
public int SensorCalWarningPeriodDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// indicates if the sensor's usage has been reached or exceeded
|
||||
/// </summary>
|
||||
public bool UsageMaximized => DontAllowDataCollectionIfOverused && (SensorUsageCount >= MaximumUsage);
|
||||
|
||||
/// <summary>
|
||||
/// indicates if the sensor's usage is in the warning period
|
||||
/// </summary>
|
||||
public bool InUsageWarningPeriod => DontAllowDataCollectionIfOverused && (SensorUsageWarningCount >= (MaximumUsage - SensorUsageCount));
|
||||
|
||||
/// <summary>
|
||||
/// The number of times a sensor has been in an armed test since last calibrated.
|
||||
/// </summary>
|
||||
public int SensorUsageCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// not sure this is used ... no references
|
||||
/// [I think it's here because of some binding in the baseview]
|
||||
/// </summary>
|
||||
public bool Disabled { get; set; } = false;
|
||||
/// <summary>
|
||||
/// whether the sensor is currently associated with a channel or not
|
||||
/// </summary>
|
||||
public bool Assigned { get; set; } = false;
|
||||
/// <summary>
|
||||
/// whether the sensor is currently online or not
|
||||
/// </summary>
|
||||
public bool Online { get; set; } = false;
|
||||
/// <summary>
|
||||
/// id in the database if available
|
||||
/// only positive values are valid
|
||||
/// </summary>
|
||||
public int DatabaseId
|
||||
{
|
||||
get => Id;
|
||||
set
|
||||
{
|
||||
Id = value;
|
||||
OnPropertyChanged("DatabaseId");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// channel frequency class (CFC) associated with the sensor
|
||||
/// CFC 1000 is default
|
||||
/// </summary>
|
||||
public FilterClassType CFC { get; set; } = FilterClassType.CFC1000;
|
||||
/// <summary>
|
||||
/// whether the output of the sensor needs to be inverted or not
|
||||
/// </summary>
|
||||
public bool Polarity
|
||||
{
|
||||
get => !Invert;
|
||||
set
|
||||
{
|
||||
Invert = !value;
|
||||
OnPropertyChanged("Polarity");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// software Zero Method used by the sensor
|
||||
/// Average Over Time is the default (in SensorConstants, per FB12764)
|
||||
/// </summary>
|
||||
public ZeroMethodType ZeroMethod { get; set; } = SensorConstants.DefaultZeroMethodType;
|
||||
/// <summary>
|
||||
/// If ZeroMethod is AverageOverTime, this is the start time
|
||||
/// -0.05s is the default (in SensorConstants, per FB12764)
|
||||
/// </summary>
|
||||
public double ZeroMethodStart { get; set; } = SensorConstants.DefaultZeroMethodStart;
|
||||
/// <summary>
|
||||
/// If ZeroMethod is AverageOverTime, this is the end time
|
||||
/// -0.02s is the default (in SensorConstants, per FB12764)
|
||||
/// </summary>
|
||||
public double ZeroMethodEnd { get; set; } = SensorConstants.DefaultZeroMethodEnd;
|
||||
|
||||
/// <summary>
|
||||
/// returns true if the sensor matches filter criteria
|
||||
/// </summary>
|
||||
/// <param name="term"></param>
|
||||
/// <returns></returns>
|
||||
public new bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term)) { return true; }
|
||||
if (CultureInfo.CurrentCulture.CompareInfo.IndexOf(SerialNumber, term, CompareOptions.IgnoreCase) >= 0) { return true; }
|
||||
if (CultureInfo.CurrentCulture.CompareInfo.IndexOf(Description, term, CompareOptions.IgnoreCase) >= 0) { return true; }
|
||||
if (CultureInfo.CurrentCulture.CompareInfo.IndexOf(Capacity.ToString(), term, CompareOptions.IgnoreCase) >= 0) { return true; }
|
||||
if (CultureInfo.CurrentCulture.CompareInfo.IndexOf(Units, term, CompareOptions.IgnoreCase) >= 0) { return true; }
|
||||
if (CultureInfo.CurrentCulture.CompareInfo.IndexOf(EID, term, CompareOptions.IgnoreCase) >= 0) { return true; }
|
||||
return false;
|
||||
}
|
||||
//FB 13120 identify filter class
|
||||
public IFilterClass FilterClass
|
||||
{
|
||||
get => base.Filter;
|
||||
set
|
||||
{
|
||||
base.Filter = value;
|
||||
OnPropertyChanged("FilterClass");
|
||||
}
|
||||
}
|
||||
public AnalogSensor(IAnalogDbRecord record,
|
||||
int sensorCalWarningPeriodDays,
|
||||
bool dontAllowDataCollectionIfOverused,
|
||||
int sensorUsageWarningCount,
|
||||
bool included) : base(record)
|
||||
{
|
||||
EID = record.EId;
|
||||
SensorCalWarningPeriodDays = sensorCalWarningPeriodDays;
|
||||
DontAllowDataCollectionIfOverused = dontAllowDataCollectionIfOverused;
|
||||
SensorUsageWarningCount = sensorUsageWarningCount;
|
||||
Included = included;
|
||||
//FB 43246
|
||||
InspectBeforeUse = DTS.SensorDB.SensorData.IsInspectBeforeUseSet(record.Id);
|
||||
}
|
||||
/// <summary>
|
||||
/// constructs a new AnalogSensor given inputs
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
/// <param name="sc"></param>
|
||||
/// <param name="cals">prevent individual cal lookups by just passing them all in one bulk</param>
|
||||
public AnalogSensor(ISensorData s, ISensorCalibration sc, IReadOnlyDictionary<string, ISensorCalibration> cals)
|
||||
{
|
||||
Bridge = s.Bridge;
|
||||
//FB 13120 set filter class
|
||||
FilterClass = s.FilterClass;
|
||||
RangeHigh = s.RangeHigh;
|
||||
RangeLow = s.RangeLow;
|
||||
RangeMedium = s.RangeMedium;
|
||||
DatabaseId = s.DatabaseId;
|
||||
if (s.IsTestSpecificEmbedded)
|
||||
{
|
||||
CalDate = DateTime.Today;
|
||||
}
|
||||
else { CalDate = sc?.CalibrationDate ?? DateTime.MinValue; }
|
||||
CalInterval = s.CalInterval;
|
||||
Capacity = s.Capacity;
|
||||
Description = s.Comment;
|
||||
var excitations = new List<string>();
|
||||
CFC = s.FilterType;
|
||||
Polarity = !s.Invert;
|
||||
foreach (var exc in s.SupportedExcitation)
|
||||
{
|
||||
switch (exc)
|
||||
{
|
||||
case ExcitationVoltageOptions.ExcitationVoltageOption.Volt10:
|
||||
excitations.Add("10");
|
||||
break;
|
||||
case ExcitationVoltageOptions.ExcitationVoltageOption.Volt2:
|
||||
excitations.Add("2");
|
||||
break;
|
||||
case ExcitationVoltageOptions.ExcitationVoltageOption.Volt2_5:
|
||||
excitations.Add("2.5");
|
||||
break;
|
||||
case ExcitationVoltageOptions.ExcitationVoltageOption.Volt5:
|
||||
excitations.Add("5");
|
||||
break;
|
||||
}
|
||||
}
|
||||
Excitation = string.Join("/", excitations.ToArray());
|
||||
EID = s.EID;
|
||||
LastModified = s.LastModified;
|
||||
Manufacturer = s.Manufacturer;
|
||||
Model = s.Model;
|
||||
ModifiedBy = s.LastUpdatedBy;
|
||||
Resistance = s.BridgeResistance;
|
||||
Sensitivity = sc?.ToDisplayString(s.SupportedExcitation[0], "N4", "N4", s.Bridge == SensorConstants.BridgeType.IEPE) ?? "---";
|
||||
SerialNumber = s.SerialNumber;
|
||||
Units = s.DisplayUnit;
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
SensorCalWarningPeriodDays = s.SensorCalWarningPeriodDays;
|
||||
ZeroMethod = sc?.ZeroMethods.Methods[0].Method ?? SensorConstants.DefaultZeroMethodType; // FB12764: Default in SensorConstants
|
||||
ZeroMethodStart = sc?.ZeroMethods.Methods[0].Start ?? SensorConstants.DefaultZeroMethodStart; // FB12764: Default in SensorConstants
|
||||
ZeroMethodEnd = sc?.ZeroMethods.Methods[0].End ?? SensorConstants.DefaultZeroMethodEnd; // FB12764: Default in SensorConstants
|
||||
NonLinearCalculationType = null != sc ? sc.NonLinear ? sc.IRTraccCalculationType.ToString() : string.Empty : string.Empty;
|
||||
InitialOffsets = sc?.InitialOffsets.Offsets;
|
||||
LatestCalibrationId = s.LatestCalibrationId;
|
||||
FirstUseDate = s.FirstUseDate;
|
||||
if (sc != null)
|
||||
{
|
||||
UsageCount = sc.UsageCount;
|
||||
}
|
||||
MaximumUsage = s.MaximumUsage;
|
||||
//if we have a null in the latest calibration id, go get the latest calibration id
|
||||
//skip it however if we aren't using sensor first use date since it's a db query and takes some time
|
||||
//17893 Cal date confusion on sensor import
|
||||
//if (null == s.LatestCalibrationId && SensorConstants.UseSensorFirstUseDate)
|
||||
//{
|
||||
if (SensorConstants.UseSensorFirstUseDate)
|
||||
{
|
||||
if (null != cals && cals.ContainsKey(s.SerialNumber))
|
||||
{
|
||||
s.LatestCalibrationId = cals[s.SerialNumber].CalibrationId;
|
||||
}
|
||||
else
|
||||
{
|
||||
var temp = AnalogSensor.GetLatestCalibrationId(s.DatabaseId);
|
||||
if (temp >= 0)
|
||||
{
|
||||
s.LatestCalibrationId = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//}
|
||||
if (null != sc && null != sc.CalibrationId && sc.CalibrationId == s.LatestCalibrationId)
|
||||
{
|
||||
UsingLatestCalibration = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
UsingLatestCalibration = false;
|
||||
}
|
||||
//FB 43246
|
||||
InspectBeforeUse = DTS.SensorDB.SensorData.IsInspectBeforeUseSet(s.DatabaseId);
|
||||
}
|
||||
public InitialOffset[] InitialOffsets { get; set; }
|
||||
/// <summary>
|
||||
/// whether the sensor is using the latest calibration or not
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
public bool UsingLatestCalibration { get; set; } = false;
|
||||
public bool IsTestSpecificEmbedded()
|
||||
{
|
||||
return SerialNumber.StartsWith("TSA_");
|
||||
}
|
||||
public bool IsTestSpecificEmbeddedClock()
|
||||
{
|
||||
return SerialNumber.StartsWith("TSC_");
|
||||
}
|
||||
public bool IsTestSpecificThermocoupler()
|
||||
{
|
||||
return SerialNumber.StartsWith(SensorsListViewModel.TEST_SPECIFIC_THERMOCOUPLER_PREPEND);
|
||||
}
|
||||
public static int GetLatestCalibrationId(int sensorId)
|
||||
{
|
||||
using (var cmd = DbOperations.GetSQLCommand(true))
|
||||
{
|
||||
try
|
||||
{
|
||||
cmd.CommandType = System.Data.CommandType.Text;
|
||||
cmd.CommandText = $"SELECT TOP (1) [SensorCalibrationId] FROM [{RunTestVariables.DbName}].[dbo].[SensorCalibrations] WHERE [SensorId]=@1 ORDER BY [CalibrationDate] DESC, [ModifyDate] DESC";
|
||||
cmd.Parameters.Add(new System.Data.SqlClient.SqlParameter("@1", System.Data.SqlDbType.Int)
|
||||
{ Value = sensorId });
|
||||
using (var reader = cmd.ExecuteReader())
|
||||
{
|
||||
if (reader.Read())
|
||||
{
|
||||
return Convert.ToInt32(reader["SensorCalibrationId"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
APILogger.Log(ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
cmd.Connection.Dispose();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// used to compare two analog sensors
|
||||
/// </summary>
|
||||
public class AnalogComparer : IComparer<IAnalogSensor>
|
||||
{
|
||||
/// <summary>
|
||||
/// current sort field
|
||||
/// </summary>
|
||||
public AnalogSensorFields SortField { get; set; }
|
||||
/// <summary>
|
||||
/// whether to sort ascending or descending
|
||||
/// </summary>
|
||||
public bool SortAscending { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// compares first use date between two sensors
|
||||
/// </summary>
|
||||
private static int FirstUseCompare(DateTime? a, DateTime? b)
|
||||
{
|
||||
if (null == a && a == b)
|
||||
{
|
||||
//both null, return =
|
||||
return 0;
|
||||
}
|
||||
|
||||
// only a is null, return <
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
// only b is null, return >
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
//compare the dates
|
||||
return ((DateTime)a).CompareTo((DateTime)b);
|
||||
}
|
||||
public int Compare(IAnalogSensor left, IAnalogSensor right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left; var b = right;
|
||||
if (!SortAscending) { a = right; b = left; }
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
var stringComparer = new DTS.Common.Utilities.NaturalStringComparer();
|
||||
switch (SortField)
|
||||
{
|
||||
case AnalogSensorFields.FirstUseDate:
|
||||
{
|
||||
return FirstUseCompare(a.FirstUseDate, b.FirstUseDate);
|
||||
}
|
||||
case AnalogSensorFields.Included:
|
||||
return a.Included.CompareTo(b.Included);
|
||||
case AnalogSensorFields.SerialNumber:
|
||||
return stringComparer.Compare(a.SerialNumber, b.SerialNumber);
|
||||
case AnalogSensorFields.IEPE:
|
||||
return a.IEPE.CompareTo(b.IEPE);
|
||||
case AnalogSensorFields.Description:
|
||||
return stringComparer.Compare(a.Description, b.Description);
|
||||
case AnalogSensorFields.Manufacturer:
|
||||
return stringComparer.Compare(a.Manufacturer, b.Manufacturer);
|
||||
case AnalogSensorFields.Model:
|
||||
return stringComparer.Compare(a.Model, b.Model);
|
||||
case AnalogSensorFields.Capacity:
|
||||
return a.Capacity.CompareTo(b.Capacity);
|
||||
case AnalogSensorFields.Sensitivity:
|
||||
return stringComparer.Compare(a.Sensitivity, b.Sensitivity);
|
||||
case AnalogSensorFields.NonLinearCalucationType:
|
||||
return stringComparer.Compare(a.NonLinearCalculationType, b.NonLinearCalculationType);
|
||||
case AnalogSensorFields.ZeroMethod:
|
||||
return a.ZeroMethod.CompareTo(b.ZeroMethod);
|
||||
case AnalogSensorFields.ZeroMethodStart:
|
||||
return a.ZeroMethodStart.CompareTo(b.ZeroMethodStart);
|
||||
case AnalogSensorFields.ZeroMethodEnd:
|
||||
return a.ZeroMethodEnd.CompareTo(b.ZeroMethodEnd);
|
||||
case AnalogSensorFields.Resistance:
|
||||
if (a.IEPE)
|
||||
{
|
||||
if (b.IEPE)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (b.IEPE)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return a.Resistance.CompareTo(b.Resistance);
|
||||
case AnalogSensorFields.Excitation:
|
||||
if (a.IEPE)
|
||||
{
|
||||
if (b.IEPE)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (b.IEPE)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return stringComparer.Compare(a.Excitation, b.Excitation);
|
||||
case AnalogSensorFields.Units:
|
||||
return stringComparer.Compare(a.Units, b.Units);
|
||||
case AnalogSensorFields.Id:
|
||||
return stringComparer.Compare(a.EID, b.EID);
|
||||
case AnalogSensorFields.CalDate:
|
||||
return a.CalDate.CompareTo(b.CalDate);
|
||||
case AnalogSensorFields.UserValue1:
|
||||
return a.UserValue1.CompareTo(b.UserValue1);
|
||||
case AnalogSensorFields.UserValue2:
|
||||
return a.UserValue2.CompareTo(b.UserValue2);
|
||||
case AnalogSensorFields.UserValue3:
|
||||
return a.UserValue3.CompareTo(b.UserValue3);
|
||||
case AnalogSensorFields.CalDueDate:
|
||||
return a.CalDueDate.CompareTo(b.CalDueDate);
|
||||
case AnalogSensorFields.ModifiedBy:
|
||||
return stringComparer.Compare(a.ModifiedBy, b.ModifiedBy);
|
||||
case AnalogSensorFields.LastModified:
|
||||
return a.LastModified.CompareTo(b.LastModified);
|
||||
case AnalogSensorFields.OutOfDate:
|
||||
if (DateTime.Now > (a as AnalogSensor).CalDueDate)
|
||||
{
|
||||
if (DateTime.Now > (b as AnalogSensor).CalDueDate)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (DateTime.Now > (b as AnalogSensor).CalDueDate)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
case AnalogSensorFields.InWarningPeriod:
|
||||
if (DateTime.Now.AddDays((a as AnalogSensor).SensorCalWarningPeriodDays) > (a as AnalogSensor).CalDueDate &&
|
||||
DateTime.Now <= (a as AnalogSensor).CalDueDate)
|
||||
{
|
||||
if (DateTime.Now.AddDays((b as AnalogSensor).SensorCalWarningPeriodDays) > (b as AnalogSensor).CalDueDate &&
|
||||
DateTime.Now <= (b as AnalogSensor).CalDueDate)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (DateTime.Now.AddDays((b as AnalogSensor).SensorCalWarningPeriodDays) > (b as AnalogSensor).CalDueDate &&
|
||||
DateTime.Now <= (b as AnalogSensor).CalDueDate)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
case AnalogSensorFields.UsageMaximized:
|
||||
if ((a as AnalogSensor).SensorUsageCount >= (a as AnalogSensor).MaximumUsage)
|
||||
{
|
||||
if ((b as AnalogSensor).SensorUsageCount >= (b as AnalogSensor).MaximumUsage)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if ((b as AnalogSensor).SensorUsageCount >= (b as AnalogSensor).MaximumUsage)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
case AnalogSensorFields.InUsageWarningPeriod:
|
||||
if ((((a as AnalogSensor).MaximumUsage - (a as AnalogSensor).SensorUsageCount) <= (a as AnalogSensor).SensorUsageWarningCount) &&
|
||||
((a as AnalogSensor).SensorUsageCount <= (a as AnalogSensor).MaximumUsage))
|
||||
{
|
||||
if ((((b as AnalogSensor).MaximumUsage - (b as AnalogSensor).SensorUsageCount) <= (b as AnalogSensor).SensorUsageWarningCount) &&
|
||||
((b as AnalogSensor).SensorUsageCount <= (b as AnalogSensor).MaximumUsage))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if ((((b as AnalogSensor).MaximumUsage - (b as AnalogSensor).SensorUsageCount) <= (b as AnalogSensor).SensorUsageWarningCount) &&
|
||||
((b as AnalogSensor).SensorUsageCount <= (b as AnalogSensor).MaximumUsage))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
case AnalogSensorFields.Assembly:
|
||||
return stringComparer.Compare(a.AssemblyName, b.AssemblyName);
|
||||
case AnalogSensorFields.UsageCount:
|
||||
return a.SensorUsageCount.CompareTo(b.SensorUsageCount);
|
||||
case AnalogSensorFields.MaximumUsage:
|
||||
return a.MaximumUsage.CompareTo(b.MaximumUsage);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,196 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Threading.Tasks;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
using Prism.Regions;
|
||||
using DTS.Common.Interactivity;
|
||||
using Prism.Events;
|
||||
using Unity;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace SensorsList
|
||||
{
|
||||
/// <summary>
|
||||
/// this class handles SensorTemplates Import/Export functionality
|
||||
/// </summary>
|
||||
[PartCreationPolicy(CreationPolicy.Shared)]
|
||||
public class SensorTemplatesViewModel : ISensorTemplatesViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The SensorList view
|
||||
/// </summary>
|
||||
public ISensorTemplatesImportView ImportView { get; set; }
|
||||
public ISensorTemplatesExportView ExportView { get; set; }
|
||||
|
||||
private IEventAggregator _eventAggregator { get; }
|
||||
private IRegionManager _regionManager;
|
||||
private IUnityContainer UnityContainer { get; }
|
||||
|
||||
public InteractionRequest<Notification> NotificationRequest { get; }
|
||||
public InteractionRequest<Confirmation> ConfirmationRequest { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Occurs when a property value changes.
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
public void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
#region constructors and initializers
|
||||
/// <summary>
|
||||
/// Creates a new instance of the SensorsListViewModel
|
||||
/// </summary>
|
||||
/// <param name="view"></param>
|
||||
/// <param name="regionManager">The logical placeholder defined within the application's UI (in the shell or within views) into which views are displayed.</param>
|
||||
/// <param name="eventAggregator">The EventAggregator which allows different components to publish/subscribe to events without being coupled to each other.</param>
|
||||
/// <param name="unityContainer">The unityContainer.</param>
|
||||
public SensorTemplatesViewModel(ISensorTemplatesImportView view1, ISensorTemplatesExportView view2, IRegionManager regionManager,
|
||||
IEventAggregator eventAggregator, IUnityContainer unityContainer)
|
||||
{
|
||||
ImportView = view1;
|
||||
ExportView = view2;
|
||||
ImportView.DataContext = this;
|
||||
ExportView.DataContext = this;
|
||||
|
||||
NotificationRequest = new InteractionRequest<Notification>();
|
||||
ConfirmationRequest = new InteractionRequest<Confirmation>();
|
||||
|
||||
_eventAggregator = eventAggregator;
|
||||
UnityContainer = unityContainer;
|
||||
_regionManager = regionManager;
|
||||
_eventAggregator.GetEvent<RaiseNotification>().Subscribe(OnRaiseNotification);
|
||||
_eventAggregator.GetEvent<BusyIndicatorChangeNotification>()
|
||||
.Subscribe(OnBusyIndicatorNotification, ThreadOption.PublisherThread, true);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
public void Unset()
|
||||
{
|
||||
}
|
||||
|
||||
public void Cleanup()
|
||||
{
|
||||
}
|
||||
|
||||
public Task CleanupAsync()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
}
|
||||
|
||||
public void Initialize(object parameter)
|
||||
{
|
||||
}
|
||||
|
||||
public void Initialize(object parameter, object model)
|
||||
{
|
||||
}
|
||||
|
||||
public Task InitializeAsync()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public Task InitializeAsync(object parameter)
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public void Activated()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// Private Event handler for RaiseNotification event.
|
||||
/// </summary>
|
||||
private void OnBusyIndicatorNotification(bool eventArg)
|
||||
{
|
||||
IsBusy = eventArg;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Private Event handler for RaiseNotification event.
|
||||
/// </summary>
|
||||
private void OnRaiseNotification(NotificationContentEventArgs eventArgsWithTitle)
|
||||
{
|
||||
// The NotificationRequest.Raise triggers the Invoke() method of the PopupWindowAction object to show the NotificationWindow window
|
||||
// Notification object expects a NotificationContentEventArgsWithoutTitle object and a Title string.
|
||||
var eventArgsWithoutTitle = new NotificationContentEventArgs(eventArgsWithTitle.Message, "",
|
||||
eventArgsWithTitle.Image, string.Empty);
|
||||
|
||||
NotificationRequest.Raise(new Notification
|
||||
{
|
||||
Content = eventArgsWithoutTitle,
|
||||
Title = eventArgsWithTitle.Title
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
public bool IsDirty => false;
|
||||
private bool _isBusy;
|
||||
public bool IsBusy
|
||||
{
|
||||
get => _isBusy;
|
||||
set
|
||||
{
|
||||
_isBusy = value;
|
||||
OnPropertyChanged("IsBusy");
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isMenuIncluded;
|
||||
public bool IsMenuIncluded
|
||||
{
|
||||
get => _isMenuIncluded;
|
||||
set
|
||||
{
|
||||
_isMenuIncluded = value;
|
||||
OnPropertyChanged("IsMenuIncluded");
|
||||
}
|
||||
}
|
||||
|
||||
private bool _isNavigationIncluded;
|
||||
public bool IsNavigationIncluded
|
||||
{
|
||||
get => _isNavigationIncluded;
|
||||
set
|
||||
{
|
||||
_isNavigationIncluded = value;
|
||||
OnPropertyChanged("IsNavigationIncluded");
|
||||
}
|
||||
}
|
||||
|
||||
private string _capacityFormat = "N2";
|
||||
public string CapacityFormat
|
||||
{
|
||||
get => _capacityFormat;
|
||||
set
|
||||
{
|
||||
if (null != value)
|
||||
{
|
||||
_capacityFormat = value;
|
||||
OnPropertyChanged("CapacityFormat");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Commands
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,309 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Analog" xml:space="preserve">
|
||||
<value>Analog</value>
|
||||
</data>
|
||||
<data name="CalDate" xml:space="preserve">
|
||||
<value>Cal Date</value>
|
||||
</data>
|
||||
<data name="CalDueDate" xml:space="preserve">
|
||||
<value>Cal Due Date</value>
|
||||
</data>
|
||||
<data name="Capacity" xml:space="preserve">
|
||||
<value>Capacity (EU)</value>
|
||||
</data>
|
||||
<data name="Description" xml:space="preserve">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
<data name="DIMode" xml:space="preserve">
|
||||
<value>Input Mode</value>
|
||||
</data>
|
||||
<data name="DODelay" xml:space="preserve">
|
||||
<value>Delay (ms)</value>
|
||||
</data>
|
||||
<data name="DODuration" xml:space="preserve">
|
||||
<value>Duration (ms)</value>
|
||||
</data>
|
||||
<data name="Excitation" xml:space="preserve">
|
||||
<value>Excitation (V)</value>
|
||||
</data>
|
||||
<data name="ID" xml:space="preserve">
|
||||
<value>Sensor EID</value>
|
||||
</data>
|
||||
<data name="Manufacturer" xml:space="preserve">
|
||||
<value>Manufacturer</value>
|
||||
</data>
|
||||
<data name="Model" xml:space="preserve">
|
||||
<value>Model</value>
|
||||
</data>
|
||||
<data name="Resistance" xml:space="preserve">
|
||||
<value>Resistance (Ω)</value>
|
||||
</data>
|
||||
<data name="ResistanceHigh" xml:space="preserve">
|
||||
<value>Resistance High (Ω)</value>
|
||||
</data>
|
||||
<data name="ResistanceLow" xml:space="preserve">
|
||||
<value>Resistance Low (Ω)</value>
|
||||
</data>
|
||||
<data name="Sensitivity" xml:space="preserve">
|
||||
<value>Sensitivity</value>
|
||||
</data>
|
||||
<data name="SerialNumber" xml:space="preserve">
|
||||
<value>Serial Number</value>
|
||||
</data>
|
||||
<data name="SQDelay" xml:space="preserve">
|
||||
<value>Delay (ms)</value>
|
||||
</data>
|
||||
<data name="SQDuration" xml:space="preserve">
|
||||
<value>Duration (ms)</value>
|
||||
</data>
|
||||
<data name="SQMode" xml:space="preserve">
|
||||
<value>Squib Fire Mode</value>
|
||||
</data>
|
||||
<data name="Units" xml:space="preserve">
|
||||
<value>Units</value>
|
||||
</data>
|
||||
<data name="DigitalInputs" xml:space="preserve">
|
||||
<value>Digital Input Settings</value>
|
||||
</data>
|
||||
<data name="DigitalOutputs" xml:space="preserve">
|
||||
<value>Digital Output Settings</value>
|
||||
</data>
|
||||
<data name="LastModified" xml:space="preserve">
|
||||
<value>Last Modified</value>
|
||||
</data>
|
||||
<data name="ModifiedBy" xml:space="preserve">
|
||||
<value>Modified By</value>
|
||||
</data>
|
||||
<data name="Squibs" xml:space="preserve">
|
||||
<value>Squib Settings</value>
|
||||
</data>
|
||||
<data name="LinearSensitivity" xml:space="preserve">
|
||||
<value>Linear Sensitivity</value>
|
||||
</data>
|
||||
<data name="NonLinearSensitivity" xml:space="preserve">
|
||||
<value>Non-Linear Sensitivity</value>
|
||||
</data>
|
||||
<data name="IEPE" xml:space="preserve">
|
||||
<value>IEPE</value>
|
||||
</data>
|
||||
<data name="InWarningPeriod" xml:space="preserve">
|
||||
<value>In Warning Period</value>
|
||||
</data>
|
||||
<data name="InspectBeforeUse" xml:space="preserve">
|
||||
<value>Inspect Before Use</value>
|
||||
</data>
|
||||
<data name="OutOfDate" xml:space="preserve">
|
||||
<value>Out Of Date</value>
|
||||
</data>
|
||||
<data name="FirstUseDate" xml:space="preserve">
|
||||
<value>First use date</value>
|
||||
</data>
|
||||
<data name="Uarts" xml:space="preserve">
|
||||
<value>UART Settings</value>
|
||||
</data>
|
||||
<data name="UartBaudRate" xml:space="preserve">
|
||||
<value>Baud Rate (bps)</value>
|
||||
</data>
|
||||
<data name="UartDataBits" xml:space="preserve">
|
||||
<value>Data Bits</value>
|
||||
</data>
|
||||
<data name="UartDataFormat" xml:space="preserve">
|
||||
<value>Data Format</value>
|
||||
</data>
|
||||
<data name="UartFlowControl" xml:space="preserve">
|
||||
<value>Flow Control</value>
|
||||
</data>
|
||||
<data name="UartParity" xml:space="preserve">
|
||||
<value>Parity</value>
|
||||
</data>
|
||||
<data name="UartStopBits" xml:space="preserve">
|
||||
<value>Stop Bits</value>
|
||||
</data>
|
||||
<data name="StreamOutputs" xml:space="preserve">
|
||||
<value>Stream Output Settings</value>
|
||||
</data>
|
||||
<data name="DataChannelId" xml:space="preserve">
|
||||
<value>Data channel id</value>
|
||||
</data>
|
||||
<data name="IRIGTimeDataPacketIntervalMs" xml:space="preserve">
|
||||
<value>Time packet interval (ms)</value>
|
||||
</data>
|
||||
<data name="TimeChannelId" xml:space="preserve">
|
||||
<value>Time channel id</value>
|
||||
</data>
|
||||
<data name="TmNSConfig" xml:space="preserve">
|
||||
<value>TmNS config</value>
|
||||
</data>
|
||||
<data name="UDPAddress" xml:space="preserve">
|
||||
<value>UDP address</value>
|
||||
</data>
|
||||
<data name="UDPProfile" xml:space="preserve">
|
||||
<value>Stream profile</value>
|
||||
</data>
|
||||
<data name="StreamInputs" xml:space="preserve">
|
||||
<value>Stream Input Settings</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_IENA_Key" xml:space="preserve">
|
||||
<value>IENA key</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_IENA_SourcePort" xml:space="preserve">
|
||||
<value>IENA source port</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_TMNS_MessageId" xml:space="preserve">
|
||||
<value>Message id</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_TMNS_MinorPerMajor" xml:space="preserve">
|
||||
<value>PCM minor per major</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_TMNS_SubFrameId" xml:space="preserve">
|
||||
<value>Subframe id</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_TMNS_TMATSPort" xml:space="preserve">
|
||||
<value>TMATS port</value>
|
||||
</data>
|
||||
<data name="Table_NA" xml:space="preserve">
|
||||
<value>---</value>
|
||||
</data>
|
||||
<data name="TMATSIntervalMs" xml:space="preserve">
|
||||
<value>TMATS interval (ms)</value>
|
||||
</data>
|
||||
<data name="UserValue1" xml:space="preserve">
|
||||
<value>UserValue1</value>
|
||||
</data>
|
||||
<data name="UserValue2" xml:space="preserve">
|
||||
<value>UserValue2</value>
|
||||
</data>
|
||||
<data name="UserValue3" xml:space="preserve">
|
||||
<value>UserValue3</value>
|
||||
</data>
|
||||
<data name="SensorMaxRange" xml:space="preserve">
|
||||
<value>Sensor max range</value>
|
||||
</data>
|
||||
<data name="MaximumUsage" xml:space="preserve">
|
||||
<value>Maximum Usage</value>
|
||||
</data>
|
||||
<data name="UsageCount" xml:space="preserve">
|
||||
<value>Usage Count</value>
|
||||
</data>
|
||||
<data name="Assembly" xml:space="preserve">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,103 @@
|
||||
<base:BaseView x:Class="SensorsList.SensorsListOverdueView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:strings="clr-namespace:SensorsList"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Controls/combobox.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TTS_ListViewItemStyleNoSelection}"/>
|
||||
</Style>
|
||||
<Style TargetType="TextBox" BasedOn="{StaticResource TTS_TextBoxStyle}"/>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource TTS_TextBlockStyle}"/>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||||
<Style TargetType="ComboBox" BasedOn="{StaticResource TTS_ComboBoxStyle}"/>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
<BooleanToVisibilityConverter x:Key="BoolToVisibility" />
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
|
||||
<Grid Background="{DynamicResource Brush_ApplicationContentBackground}">
|
||||
|
||||
<ListView ItemsSource="{Binding OverdueSensors, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="SensorsListView"
|
||||
VirtualizingPanel.IsVirtualizing="True">
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="SensorsListOverdueGridView" VirtualizingPanel.IsVirtualizing="True">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<GridViewColumn.Header>
|
||||
<GridViewColumnHeader Tag="SerialNumber" Content="{strings:TranslateExtension SerialNumber}" Click="ListViewHeader_Click" />
|
||||
</GridViewColumn.Header>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Description">
|
||||
<GridViewColumn.Header>
|
||||
<GridViewColumnHeader Tag="Description" Content="{strings:TranslateExtension Description}" Click="ListViewHeader_Click" />
|
||||
</GridViewColumn.Header>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Description,FallbackValue='Comment'}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Manufacturer">
|
||||
<GridViewColumn.Header>
|
||||
<GridViewColumnHeader Tag="Manufacturer" Content="{strings:TranslateExtension Manufacturer}" Click="ListViewHeader_Click" />
|
||||
</GridViewColumn.Header>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Manufacturer,FallbackValue='Maker'}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Model">
|
||||
<GridViewColumn.Header>
|
||||
<GridViewColumnHeader Tag="Model" Content="{strings:TranslateExtension Model}" Click="ListViewHeader_Click" />
|
||||
</GridViewColumn.Header>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Model,FallbackValue='Model'}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CalDate">
|
||||
<GridViewColumn.Header>
|
||||
<GridViewColumnHeader Tag="CalDate" Content="{strings:TranslateExtension CalDate}" Click="ListViewHeader_Click" />
|
||||
</GridViewColumn.Header>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding CalDate,FallbackValue='CalDate', StringFormat='d'}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CalDueDate">
|
||||
<GridViewColumn.Header>
|
||||
<GridViewColumnHeader Tag="CalDueDate" Content="{strings:TranslateExtension CalDueDate}" Click="ListViewHeader_Click" />
|
||||
</GridViewColumn.Header>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding CalDueDate,FallbackValue='CalDueDate', StringFormat='d'}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,283 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using DTS.Common.Classes.DASFactory;
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
public class StreamOutputSetting : DTS.Common.Base.BasePropertyChanged, IStreamOutputSetting, IDragAndDropItem
|
||||
{
|
||||
private bool _bIncluded = true;
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
public string SerialNumber { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
public string LastModifiedBy { get; set; }
|
||||
public DateTime LastModified { get; set; }
|
||||
public bool Assigned { get; set; } = false;
|
||||
public bool Online { get; set; } = false;
|
||||
public int DatabaseId { get; set; } = -1;
|
||||
public string ISOCode { get; set; } = "";
|
||||
public string ISOChannelName { get; set; } = "";
|
||||
public string UserCode { get; set; } = "";
|
||||
public string UserChannelName { get; set; } = "";
|
||||
public bool Broken { get; set; } = false;
|
||||
public bool DoNotUse { get; set; } = false;
|
||||
public UDPStreamProfile UDPProfile { get; set; } = UDPStreamProfile.CH10_PCM_128BIT_2HDR;
|
||||
public string UDPAddress { get; set; } = "UDP://239.1.2.10:8400";
|
||||
public ushort UDPTimeChannelId { get; set; } = 1;
|
||||
public ushort UDPDataChannelId { get; set; } = 3;
|
||||
public string UDPTmNSConfig { get; set; } = "(1,6,60,0,0,0,0,0)";
|
||||
public ushort IRIGTimeDataPacketIntervalMs { get; set; } = 500;
|
||||
/// <summary>
|
||||
/// time between sending TMATS information while streaming
|
||||
/// http://manuscript.dts.local/f/cases/29987/Add-CG-DP-TMATS-interval-UI-support
|
||||
/// </summary>
|
||||
public ushort TMATSIntervalMs { get; set; } = StreamOutputRecord.DEFAULT_TMATS_INTERVAL_MS;
|
||||
public bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term)) { return true; }
|
||||
term = term.ToLower();
|
||||
if (SerialNumber.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (Description.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (UDPProfile.ToString().ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (UDPAddress.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (UDPTimeChannelId.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (UDPDataChannelId.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (UDPTmNSConfig.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (IRIGTimeDataPacketIntervalMs.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (TMATSIntervalMs.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public StreamOutputSetting()
|
||||
{
|
||||
}
|
||||
|
||||
public StreamOutputSetting(ISensorData s)
|
||||
{
|
||||
DatabaseId = s.DatabaseId;
|
||||
Description = s.Comment;
|
||||
LastModified = s.LastModified;
|
||||
LastModifiedBy = s.LastUpdatedBy;
|
||||
SerialNumber = s.SerialNumber;
|
||||
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
|
||||
UDPProfile = s.StreamOutUDPProfile;
|
||||
UDPAddress = s.StreamOutUDPAddress;
|
||||
UDPTimeChannelId = s.StreamOutUDPTimeChannelId;
|
||||
UDPDataChannelId = s.StreamOutUDPDataChannelId;
|
||||
UDPTmNSConfig = s.StreamOutUDPTmNSConfig;
|
||||
IRIGTimeDataPacketIntervalMs = s.StreamOutIRIGTimeDataPacketIntervalMs;
|
||||
TMATSIntervalMs = s.StreamOutTMATSIntervalMs;
|
||||
}
|
||||
public bool IsTestSpecificStreamOutput()
|
||||
{
|
||||
return SerialNumber.StartsWith("TSS_");
|
||||
}
|
||||
|
||||
public bool IsCH10 => TMNSConfig.IsCh10(UDPProfile);
|
||||
|
||||
public bool IsTMNS => TMNSConfig.IsTMNS(UDPProfile);
|
||||
public bool IsIENA => TMNSConfig.IsIENA(UDPProfile);
|
||||
public bool IsUART => TMNSConfig.IsUART(UDPProfile);
|
||||
|
||||
/// <summary>
|
||||
/// TMNS sub frame id for output streaming
|
||||
/// </summary>
|
||||
public uint TMNS_SubFrameId
|
||||
{
|
||||
get
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
return tmns.TMNS_PCMSubFrameId;
|
||||
}
|
||||
set
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
tmns.TMNS_PCMSubFrameId = value;
|
||||
UDPTmNSConfig = tmns.ToCSVString();
|
||||
OnPropertyChanged("TMNS_SubFrameId");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// TMNS message id for output streaming
|
||||
/// </summary>
|
||||
public uint TMNS_MsgId
|
||||
{
|
||||
get
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
return tmns.TMNS_MsgId;
|
||||
}
|
||||
set
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
tmns.TMNS_MsgId = value;
|
||||
UDPTmNSConfig = tmns.ToCSVString();
|
||||
OnPropertyChanged("TMNS_MsgId");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// tmns PCM minor per major setting for output streaming
|
||||
/// </summary>
|
||||
public uint TMNS_MinorPerMajor
|
||||
{
|
||||
get
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
return tmns.TMNS_PCMMinorPerMajor;
|
||||
}
|
||||
set
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
tmns.TMNS_PCMMinorPerMajor = value;
|
||||
UDPTmNSConfig = tmns.ToCSVString();
|
||||
OnPropertyChanged("TMNS_MinorPerMajor");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// TMNS TMATs port for output streaming
|
||||
/// </summary>
|
||||
public uint TMNS_TMATSPort
|
||||
{
|
||||
get
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
return tmns.TMNS_TMATSPortNumber;
|
||||
}
|
||||
set
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
tmns.TMNS_TMATSPortNumber = value;
|
||||
UDPTmNSConfig = tmns.ToCSVString();
|
||||
OnPropertyChanged("TMNS_TMATSPort");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// IENA key for output streaming
|
||||
/// </summary>
|
||||
public ushort IENA_Key
|
||||
{
|
||||
get
|
||||
{
|
||||
return UDPDataChannelId;
|
||||
}
|
||||
set
|
||||
{
|
||||
UDPDataChannelId = value;
|
||||
OnPropertyChanged("IENA_Key");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// IENA source port for streaming
|
||||
/// </summary>
|
||||
public uint IENA_SourcePort
|
||||
{
|
||||
get
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
return tmns.IENAUDP_PortNumber;
|
||||
}
|
||||
set
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
tmns.IENAUDP_PortNumber = value;
|
||||
UDPTmNSConfig = tmns.ToCSVString();
|
||||
OnPropertyChanged("IENA_SourcePort");
|
||||
}
|
||||
}
|
||||
}
|
||||
public class StreamOutComparer : IComparer<IStreamOutputSetting>
|
||||
{
|
||||
public StreamOutSettingFields SortField { get; set; }
|
||||
public bool SortAscending { get; set; }
|
||||
public int Compare(IStreamOutputSetting left, IStreamOutputSetting right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left; var b = right;
|
||||
if (!SortAscending) { a = right; b = left; }
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (SortField)
|
||||
{
|
||||
case StreamOutSettingFields.Included:
|
||||
return a.Included.CompareTo(b.Included);
|
||||
case StreamOutSettingFields.SerialNumber:
|
||||
return string.Compare(a.SerialNumber, b.SerialNumber, StringComparison.OrdinalIgnoreCase);
|
||||
case StreamOutSettingFields.Description:
|
||||
return string.Compare(a.Description, b.Description, StringComparison.OrdinalIgnoreCase);
|
||||
case StreamOutSettingFields.LastModifiedBy:
|
||||
return string.Compare(a.LastModifiedBy, b.LastModifiedBy, StringComparison.OrdinalIgnoreCase);
|
||||
case StreamOutSettingFields.LastModified:
|
||||
return a.LastModified.CompareTo(b.LastModified);
|
||||
case StreamOutSettingFields.UDPProfile:
|
||||
return a.UDPProfile.CompareTo(b.UDPProfile);
|
||||
case StreamOutSettingFields.UDPAddress:
|
||||
return string.Compare(a.UDPAddress, b.UDPAddress, StringComparison.OrdinalIgnoreCase);
|
||||
case StreamOutSettingFields.UDPTimeChannelId:
|
||||
return a.UDPTimeChannelId.CompareTo(b.UDPTimeChannelId);
|
||||
case StreamOutSettingFields.UDPDataChannelId:
|
||||
return a.UDPDataChannelId.CompareTo(b.UDPDataChannelId);
|
||||
case StreamOutSettingFields.UDPTmNSConfig:
|
||||
return string.Compare(a.UDPTmNSConfig, b.UDPTmNSConfig, StringComparison.OrdinalIgnoreCase);
|
||||
case StreamOutSettingFields.IRIGTimeDataPacketIntervalMs:
|
||||
return a.IRIGTimeDataPacketIntervalMs.CompareTo(b.IRIGTimeDataPacketIntervalMs);
|
||||
case StreamOutSettingFields.TMATSIntervalMs:
|
||||
return a.TMATSIntervalMs.CompareTo(b.TMATSIntervalMs);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,334 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using DTS.Common.Controls;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
using DTS.Common.Utils;
|
||||
using SensorsList.Resources;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace SensorsList
|
||||
{
|
||||
/// <inheritdoc cref="ISensorsListView" />
|
||||
/// <summary>
|
||||
/// Interaction logic for SensorsListView.xaml
|
||||
/// </summary>
|
||||
public partial class SensorsListView : ISensorsListView
|
||||
{
|
||||
public SensorsListView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderSearchable_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListViewModel)DataContext;
|
||||
viewModel.Filter(columnTag, searchTerm);
|
||||
}
|
||||
private void GridViewColumnHeaderSearchableSquib_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListViewModel)DataContext;
|
||||
viewModel.FilterSquib(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderSearchableDigitalIn_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListViewModel)DataContext;
|
||||
viewModel.FilterDigitalIn(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderSearchableDigitalOut_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListViewModel)DataContext;
|
||||
viewModel.FilterDigitalOut(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderSearchableUart_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListViewModel)DataContext;
|
||||
viewModel.FilterUartIO(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderSearchableStreamIn_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListViewModel)DataContext;
|
||||
viewModel.FilterStreamIn(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderSearchableStreamOut_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListViewModel)DataContext;
|
||||
viewModel.FilterStreamOut(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
private void GridViewColumnHeader_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var viewModel = (ISensorsListViewModel)DataContext;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag ?? Utils.FindChild<GridViewColumnHeaderSearchable>((DependencyObject)e.OriginalSource, null)?.Tag;
|
||||
viewModel?.Sort(columnTag, true);
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderCheckBox_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var viewModel = (ISensorsListViewModel)DataContext;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchableCheckBox)?.Tag ?? Utils.FindChild<GridViewColumnHeaderSearchableCheckBox>((DependencyObject)e.OriginalSource, null)?.Tag;
|
||||
viewModel?.Sort(columnTag, true);
|
||||
}
|
||||
|
||||
public void SetIncludedVisible(bool bUsesIncludeColumn)
|
||||
{
|
||||
var vwAnalog = (GridView)ListView_SensorsListView.View;
|
||||
var vwSquib = (GridView)ListView_Squib.View;
|
||||
var vwDigitalIn = (GridView)ListView_DigitalIn.View;
|
||||
var vwDigitalOut = (GridView)ListView_DigitalOutput.View;
|
||||
var vwUart = (GridView)ListView_Uart.View;
|
||||
var vwStreamOut = (GridView)ListView_StreamOutput.View;
|
||||
var vwStreamIn = (GridView)ListView_StreamInput.View;
|
||||
|
||||
if (bUsesIncludeColumn)
|
||||
{
|
||||
if (!vwAnalog.Columns.Contains(AnalogIncludedColumn))
|
||||
{
|
||||
vwAnalog.Columns.Insert(0, AnalogIncludedColumn);
|
||||
vwSquib.Columns.Insert(0, SquibIncludedColumn);
|
||||
vwDigitalIn.Columns.Insert(0, DigitalInIncludedColumn);
|
||||
vwDigitalOut.Columns.Insert(0, DigitalOutIncludedColumn);
|
||||
vwUart.Columns.Insert(0, UartIncludedColumn);
|
||||
vwStreamOut.Columns.Insert(0, StreamOutIncludedColumn);
|
||||
vwStreamIn.Columns.Insert(0, StreamInIncludedColumn);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vwAnalog.Columns.Contains(AnalogIncludedColumn))
|
||||
{
|
||||
vwAnalog.Columns.Remove(AnalogIncludedColumn);
|
||||
vwSquib.Columns.Remove(SquibIncludedColumn);
|
||||
vwDigitalIn.Columns.Remove(DigitalInIncludedColumn);
|
||||
vwDigitalOut.Columns.Remove(DigitalOutIncludedColumn);
|
||||
vwUart.Columns.Remove(UartIncludedColumn);
|
||||
vwStreamOut.Columns.Remove(StreamOutIncludedColumn);
|
||||
vwStreamIn.Columns.Remove(StreamInIncludedColumn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void HandleColumns(CalibrationBehaviors calibrationBehavior)
|
||||
{
|
||||
switch (calibrationBehavior)
|
||||
{
|
||||
case CalibrationBehaviors.LinearIfAvailable:
|
||||
case CalibrationBehaviors.NonLinearIfAvailable:
|
||||
RemoveAddedLinearColumn();
|
||||
break;
|
||||
case CalibrationBehaviors.UseBothIfAvailable:
|
||||
AddAddedLinearColumn();
|
||||
break;
|
||||
}
|
||||
|
||||
//remove the first use column if we aren't using first use date functionality
|
||||
if (SensorConstants.UseSensorFirstUseDate)
|
||||
{
|
||||
|
||||
AddFirstUseColumn();
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveFirstUseColumn();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// removes first use column from view if present
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
private void RemoveFirstUseColumn()
|
||||
{
|
||||
if (!(ListView_SensorsListView.View is GridView view)) { return; }
|
||||
|
||||
if (view.Columns.Contains(FirstUseColumn))
|
||||
{
|
||||
view.Columns.Remove(FirstUseColumn);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// adds first use column if not present
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
private void AddFirstUseColumn()
|
||||
{
|
||||
if (!(ListView_SensorsListView.View is GridView view)) { return; }
|
||||
|
||||
if (!view.Columns.Contains(FirstUseColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(CalDateColumn);
|
||||
view.Columns.Insert(index + 1, FirstUseColumn);
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveAddedLinearColumn()
|
||||
{
|
||||
SensitivityHeader.HeaderTitle = StringResources.Sensitivity;
|
||||
if (((GridView)ListView_SensorsListView.View).Columns.Contains(AddedSensitivityColumn))
|
||||
{
|
||||
((GridView)ListView_SensorsListView.View).Columns.Remove(AddedSensitivityColumn);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddAddedLinearColumn()
|
||||
{
|
||||
//if (!(ListView_SensorsListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
//{
|
||||
// return;
|
||||
//}
|
||||
SensitivityHeader.HeaderTitle = StringResources.NonLinearSensitivity;
|
||||
if (!((GridView)ListView_SensorsListView.View).Columns.Contains(AddedSensitivityColumn))
|
||||
{
|
||||
((GridView)ListView_SensorsListView.View).Columns.Insert(((GridView)ListView_SensorsListView.View).Columns.IndexOf(SensitivityColumn) + 1, AddedSensitivityColumn);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void HandleInspectBeforeUseVisibilityColumn(bool show)
|
||||
{
|
||||
if (show)
|
||||
{
|
||||
AddInspectBeforeUseColumn();
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveInspectBeforeUseColumn();
|
||||
}
|
||||
}
|
||||
|
||||
public void HandleAssemblyVisibilityColumns(bool bDontAllowDataCollectionIfOverused)
|
||||
{
|
||||
if (bDontAllowDataCollectionIfOverused)
|
||||
{
|
||||
AddAssemblyColumn();
|
||||
AddUsageCountColumn();
|
||||
AddMaximumUsageColumn();
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveAssemblyColumn();
|
||||
RemoveUsageCountColumn();
|
||||
RemoveMaximumUsageColumn();
|
||||
}
|
||||
}
|
||||
private void AddInspectBeforeUseColumn()
|
||||
{
|
||||
if (!(ListView_SensorsListView.View is GridView view)) { return; }
|
||||
|
||||
if (!view.Columns.Contains(InspectBeforeUseColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(InWarningPeriodColumn);
|
||||
view.Columns.Insert(index + 1, InspectBeforeUseColumn);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// adds Assembly column if not present
|
||||
/// </summary>
|
||||
private void AddAssemblyColumn()
|
||||
{
|
||||
if (!(ListView_SensorsListView.View is GridView view)) { return; }
|
||||
|
||||
if (!view.Columns.Contains(AssemblyColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(ModelColumn);
|
||||
view.Columns.Insert(index + 1, AssemblyColumn);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// adds Usage Count column if not present
|
||||
/// </summary>
|
||||
private void AddUsageCountColumn()
|
||||
{
|
||||
if (!(ListView_SensorsListView.View is GridView view)) { return; }
|
||||
|
||||
if (!view.Columns.Contains(UsageCountColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(InWarningPeriodColumn);
|
||||
view.Columns.Insert(index + 1, UsageCountColumn);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// adds Maximum Usages column if not present
|
||||
/// </summary>
|
||||
private void AddMaximumUsageColumn()
|
||||
{
|
||||
if (!(ListView_SensorsListView.View is GridView view)) { return; }
|
||||
|
||||
if (!view.Columns.Contains(MaximumUsageColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(UsageCountColumn);
|
||||
view.Columns.Insert(index + 1, MaximumUsageColumn);
|
||||
}
|
||||
}
|
||||
private void RemoveInspectBeforeUseColumn()
|
||||
{
|
||||
if (!(ListView_SensorsListView.View is GridView view)) { return; }
|
||||
|
||||
if (view.Columns.Contains(InspectBeforeUseColumn))
|
||||
{
|
||||
view.Columns.Remove(InspectBeforeUseColumn);
|
||||
}
|
||||
}
|
||||
private void RemoveAssemblyColumn()
|
||||
{
|
||||
if (!(ListView_SensorsListView.View is GridView view)) { return; }
|
||||
|
||||
if (view.Columns.Contains(AssemblyColumn))
|
||||
{
|
||||
view.Columns.Remove(AssemblyColumn);
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveUsageCountColumn()
|
||||
{
|
||||
if (!(ListView_SensorsListView.View is GridView view)) { return; }
|
||||
|
||||
if (view.Columns.Contains(UsageCountColumn))
|
||||
{
|
||||
view.Columns.Remove(UsageCountColumn);
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveMaximumUsageColumn()
|
||||
{
|
||||
if (!(ListView_SensorsListView.View is GridView view)) { return; }
|
||||
|
||||
if (view.Columns.Contains(MaximumUsageColumn))
|
||||
{
|
||||
view.Columns.Remove(MaximumUsageColumn);
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckBox_Filter(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
if (searchTerm == "All") { searchTerm = null; }
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchableCheckBox)?.Tag;
|
||||
var viewModel = (ISensorsListViewModel)DataContext;
|
||||
viewModel.Filter(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
BIN
DataPRO/Modules/SensorsList/SensorsList/.svn/wc.db
Normal file
BIN
DataPRO/Modules/SensorsList/SensorsList/.svn/wc.db
Normal file
Binary file not shown.
12
DataPRO/Modules/SensorsList/SensorsList/App.config
Normal file
12
DataPRO/Modules/SensorsList/SensorsList/App.config
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="SensorsList.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<SensorsList.Properties.Settings>
|
||||
</SensorsList.Properties.Settings>
|
||||
</userSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||
653
DataPRO/Modules/SensorsList/SensorsList/Model/AnalogSensor.cs
Normal file
653
DataPRO/Modules/SensorsList/SensorsList/Model/AnalogSensor.cs
Normal file
@@ -0,0 +1,653 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors.SoftwareFilters;
|
||||
using DTS.Common.Storage;
|
||||
using DTS.Common.Utilities.Logging;
|
||||
using DTS.SensorDB;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// this class is used to display analog sensors in lists in the UI
|
||||
/// </summary>
|
||||
public class AnalogSensor : /*DTS.Common.Base.BasePropertyChanged*/AnalogDbRecord, IAnalogSensor, IDragAndDropItem
|
||||
{
|
||||
/// <summary>
|
||||
/// indicates if the sensor is Integrated Electronics Piezo-Electric (IEPE)
|
||||
/// </summary>
|
||||
public bool IEPE => Bridge == SensorConstants.BridgeType.IEPE;
|
||||
|
||||
private bool _bIncluded = true;
|
||||
/// <summary>
|
||||
/// used to indicate that the sensor should be checked if in a list
|
||||
/// with a checkbox
|
||||
/// </summary>
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
/// <summary>
|
||||
/// returns the status of the channel considering "IsComplete" and sensor cal status
|
||||
/// 9724 Sensor cal policy needs to match hardware cal policy
|
||||
/// </summary>
|
||||
public UIItemStatus SensorCalibrationOrUsageStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
if (OutOfDate || UsageMaximized)
|
||||
{
|
||||
return UIItemStatus.Error;
|
||||
}
|
||||
return (InWarningPeriod || InUsageWarningPeriod) ? UIItemStatus.Warning : UIItemStatus.None;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// the comment or description for the sensor
|
||||
/// </summary>
|
||||
public string Description
|
||||
{
|
||||
get => Comment;
|
||||
set
|
||||
{
|
||||
Comment = value;
|
||||
OnPropertyChanged("Description");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// a user friendly representation of the sensor sensitivity
|
||||
/// </summary>
|
||||
public string Sensitivity { get; set; }
|
||||
/// <summary>
|
||||
/// a user friendly representation of the added sensitivity of a dual sensitivity sensor
|
||||
/// (linear/non linear)
|
||||
/// </summary>
|
||||
public string AddedSensitivity { get; set; }
|
||||
/// <summary>
|
||||
/// indicates what the type of nonlinear calculation is used for this sensor as a string
|
||||
/// </summary>
|
||||
public string NonLinearCalculationType { get; set; }
|
||||
/// <summary>
|
||||
/// indicates what the type of nonlinear calculation is used for this sensor as an enum
|
||||
/// </summary>
|
||||
public NonLinearStyles NonLinearCalculationTypeEnum { get; set; }
|
||||
/// <summary>
|
||||
/// the resistance in ohms for the sensor
|
||||
/// </summary>
|
||||
public double Resistance
|
||||
{
|
||||
get => BridgeResistance;
|
||||
set
|
||||
{
|
||||
BridgeResistance = value;
|
||||
OnPropertyChanged("Resistance");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// a user friendly string representation of the excitations the sensor is valid for
|
||||
/// </summary>
|
||||
public string Excitation { get; set; }
|
||||
/// <summary>
|
||||
/// engineering units for the sensor
|
||||
/// </summary>
|
||||
public string Units { get; set; } = "";
|
||||
/// <summary>
|
||||
/// electronic id associated with the sensor
|
||||
/// </summary>
|
||||
public string EID { get; set; }
|
||||
/// <summary>
|
||||
/// the last calibration date of the sensor
|
||||
/// </summary>
|
||||
public DateTime CalDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// when the calibration is due for this sensor
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
public DateTime CalDueDate
|
||||
{
|
||||
get
|
||||
{
|
||||
if (SensorConstants.IsTestSpecificEmbedded(SerialNumber) || SensorConstants.IsTestSpecificThermoCouple(SerialNumber))
|
||||
{
|
||||
return DateTime.Today.AddDays(CalInterval);
|
||||
}
|
||||
if (SensorConstants.UseSensorFirstUseDate && UsingLatestCalibration)
|
||||
{
|
||||
//we are using the latest cal, the first use date is valid if present, otherwise
|
||||
if (null == FirstUseDate)
|
||||
{
|
||||
return DateTime.Today.AddDays(CalInterval);
|
||||
}
|
||||
else
|
||||
{
|
||||
return ((DateTime)FirstUseDate).AddDays(CalInterval);
|
||||
}
|
||||
}
|
||||
//either we aren't using the latest cal, or use sensor first use date is false, fall back to cal date + interval
|
||||
return CalDate.AddDays(CalInterval);
|
||||
}
|
||||
set { }
|
||||
}
|
||||
/// <summary>
|
||||
/// indicates if the sensor's calibration due date is in the past
|
||||
/// </summary>
|
||||
public bool OutOfDate => DateTime.Today.Date > CalDueDate;
|
||||
/// <summary>
|
||||
/// indicates if the sensor's calibration due date is in the warning period
|
||||
/// </summary>
|
||||
public bool InWarningPeriod => DateTime.Today.Date.AddDays(SensorCalWarningPeriodDays) > CalDueDate && !OutOfDate;
|
||||
/// <summary>
|
||||
/// Inspect before use
|
||||
/// </summary>
|
||||
private bool _inspectBeforeUse = false;
|
||||
public bool InspectBeforeUse
|
||||
{
|
||||
get => _inspectBeforeUse;
|
||||
set
|
||||
{
|
||||
_inspectBeforeUse = value;
|
||||
OnPropertyChanged("InspectBeforeUse");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// from DataPROWin7.Common.SerializedSettings.SensorCalWarningPeriodDays
|
||||
/// </summary>
|
||||
public int SensorCalWarningPeriodDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// indicates if the sensor's usage has been reached or exceeded
|
||||
/// </summary>
|
||||
public bool UsageMaximized => DontAllowDataCollectionIfOverused && (SensorUsageCount >= MaximumUsage);
|
||||
|
||||
/// <summary>
|
||||
/// indicates if the sensor's usage is in the warning period
|
||||
/// </summary>
|
||||
public bool InUsageWarningPeriod => DontAllowDataCollectionIfOverused && (SensorUsageWarningCount >= (MaximumUsage - SensorUsageCount));
|
||||
|
||||
/// <summary>
|
||||
/// The number of times a sensor has been in an armed test since last calibrated.
|
||||
/// </summary>
|
||||
public int SensorUsageCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// not sure this is used ... no references
|
||||
/// [I think it's here because of some binding in the baseview]
|
||||
/// </summary>
|
||||
public bool Disabled { get; set; } = false;
|
||||
/// <summary>
|
||||
/// whether the sensor is currently associated with a channel or not
|
||||
/// </summary>
|
||||
public bool Assigned { get; set; } = false;
|
||||
/// <summary>
|
||||
/// whether the sensor is currently online or not
|
||||
/// </summary>
|
||||
public bool Online { get; set; } = false;
|
||||
/// <summary>
|
||||
/// id in the database if available
|
||||
/// only positive values are valid
|
||||
/// </summary>
|
||||
public int DatabaseId
|
||||
{
|
||||
get => Id;
|
||||
set
|
||||
{
|
||||
Id = value;
|
||||
OnPropertyChanged("DatabaseId");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// channel frequency class (CFC) associated with the sensor
|
||||
/// CFC 1000 is default
|
||||
/// </summary>
|
||||
public FilterClassType CFC { get; set; } = FilterClassType.CFC1000;
|
||||
/// <summary>
|
||||
/// whether the output of the sensor needs to be inverted or not
|
||||
/// </summary>
|
||||
public bool Polarity
|
||||
{
|
||||
get => !Invert;
|
||||
set
|
||||
{
|
||||
Invert = !value;
|
||||
OnPropertyChanged("Polarity");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// software Zero Method used by the sensor
|
||||
/// Average Over Time is the default (in SensorConstants, per FB12764)
|
||||
/// </summary>
|
||||
public ZeroMethodType ZeroMethod { get; set; } = SensorConstants.DefaultZeroMethodType;
|
||||
/// <summary>
|
||||
/// If ZeroMethod is AverageOverTime, this is the start time
|
||||
/// -0.05s is the default (in SensorConstants, per FB12764)
|
||||
/// </summary>
|
||||
public double ZeroMethodStart { get; set; } = SensorConstants.DefaultZeroMethodStart;
|
||||
/// <summary>
|
||||
/// If ZeroMethod is AverageOverTime, this is the end time
|
||||
/// -0.02s is the default (in SensorConstants, per FB12764)
|
||||
/// </summary>
|
||||
public double ZeroMethodEnd { get; set; } = SensorConstants.DefaultZeroMethodEnd;
|
||||
|
||||
/// <summary>
|
||||
/// returns true if the sensor matches filter criteria
|
||||
/// </summary>
|
||||
/// <param name="term"></param>
|
||||
/// <returns></returns>
|
||||
public new bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term)) { return true; }
|
||||
if (CultureInfo.CurrentCulture.CompareInfo.IndexOf(SerialNumber, term, CompareOptions.IgnoreCase) >= 0) { return true; }
|
||||
if (CultureInfo.CurrentCulture.CompareInfo.IndexOf(Description, term, CompareOptions.IgnoreCase) >= 0) { return true; }
|
||||
if (CultureInfo.CurrentCulture.CompareInfo.IndexOf(Capacity.ToString(), term, CompareOptions.IgnoreCase) >= 0) { return true; }
|
||||
if (CultureInfo.CurrentCulture.CompareInfo.IndexOf(Units, term, CompareOptions.IgnoreCase) >= 0) { return true; }
|
||||
if (CultureInfo.CurrentCulture.CompareInfo.IndexOf(EID, term, CompareOptions.IgnoreCase) >= 0) { return true; }
|
||||
return false;
|
||||
}
|
||||
//FB 13120 identify filter class
|
||||
public IFilterClass FilterClass
|
||||
{
|
||||
get => base.Filter;
|
||||
set
|
||||
{
|
||||
base.Filter = value;
|
||||
OnPropertyChanged("FilterClass");
|
||||
}
|
||||
}
|
||||
public AnalogSensor(IAnalogDbRecord record,
|
||||
int sensorCalWarningPeriodDays,
|
||||
bool dontAllowDataCollectionIfOverused,
|
||||
int sensorUsageWarningCount,
|
||||
bool included) : base(record)
|
||||
{
|
||||
EID = record.EId;
|
||||
SensorCalWarningPeriodDays = sensorCalWarningPeriodDays;
|
||||
DontAllowDataCollectionIfOverused = dontAllowDataCollectionIfOverused;
|
||||
SensorUsageWarningCount = sensorUsageWarningCount;
|
||||
Included = included;
|
||||
//FB 43246
|
||||
InspectBeforeUse = DTS.SensorDB.SensorData.IsInspectBeforeUseSet(record.Id);
|
||||
}
|
||||
public AnalogSensor(IAnalogDbRecord record,
|
||||
int sensorCalWarningPeriodDays,
|
||||
bool dontAllowDataCollectionIfOverused,
|
||||
int sensorUsageWarningCount,
|
||||
bool included,
|
||||
bool inspectBeforeUse) : base(record)
|
||||
{
|
||||
EID = record.EId;
|
||||
SensorCalWarningPeriodDays = sensorCalWarningPeriodDays;
|
||||
DontAllowDataCollectionIfOverused = dontAllowDataCollectionIfOverused;
|
||||
SensorUsageWarningCount = sensorUsageWarningCount;
|
||||
Included = included;
|
||||
//FB 43246
|
||||
InspectBeforeUse = inspectBeforeUse;
|
||||
}
|
||||
/// <summary>
|
||||
/// constructs a new AnalogSensor given inputs
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
/// <param name="sc"></param>
|
||||
/// <param name="cals">prevent individual cal lookups by just passing them all in one bulk</param>
|
||||
public AnalogSensor(ISensorData s, ISensorCalibration sc, IReadOnlyDictionary<string, ISensorCalibration> cals)
|
||||
{
|
||||
Bridge = s.Bridge;
|
||||
//FB 13120 set filter class
|
||||
FilterClass = s.FilterClass;
|
||||
RangeHigh = s.RangeHigh;
|
||||
RangeLow = s.RangeLow;
|
||||
RangeMedium = s.RangeMedium;
|
||||
DatabaseId = s.DatabaseId;
|
||||
if (s.IsTestSpecificEmbedded || s.IsTestSpecificThermo)
|
||||
{
|
||||
CalDate = DateTime.Today;
|
||||
}
|
||||
else { CalDate = sc?.CalibrationDate ?? DateTime.MinValue; }
|
||||
CalInterval = s.CalInterval;
|
||||
Capacity = s.Capacity;
|
||||
Description = s.Comment;
|
||||
var excitations = new List<string>();
|
||||
CFC = s.FilterType;
|
||||
Polarity = !s.Invert;
|
||||
foreach (var exc in s.SupportedExcitation)
|
||||
{
|
||||
switch (exc)
|
||||
{
|
||||
case ExcitationVoltageOptions.ExcitationVoltageOption.Volt10:
|
||||
excitations.Add("10");
|
||||
break;
|
||||
case ExcitationVoltageOptions.ExcitationVoltageOption.Volt2:
|
||||
excitations.Add("2");
|
||||
break;
|
||||
case ExcitationVoltageOptions.ExcitationVoltageOption.Volt2_5:
|
||||
excitations.Add("2.5");
|
||||
break;
|
||||
case ExcitationVoltageOptions.ExcitationVoltageOption.Volt5:
|
||||
excitations.Add("5");
|
||||
break;
|
||||
}
|
||||
}
|
||||
Excitation = string.Join("/", excitations.ToArray());
|
||||
EID = s.EID;
|
||||
LastModified = s.LastModified;
|
||||
Manufacturer = s.Manufacturer;
|
||||
Model = s.Model;
|
||||
ModifiedBy = s.LastUpdatedBy;
|
||||
Resistance = s.BridgeResistance;
|
||||
Sensitivity = sc?.ToDisplayString(s.SupportedExcitation[0], "N4", "N4", s.Bridge == SensorConstants.BridgeType.IEPE) ?? "---";
|
||||
SerialNumber = s.SerialNumber;
|
||||
Units = s.DisplayUnit;
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
SensorCalWarningPeriodDays = s.SensorCalWarningPeriodDays;
|
||||
ZeroMethod = sc?.ZeroMethods.Methods[0].Method ?? SensorConstants.DefaultZeroMethodType; // FB12764: Default in SensorConstants
|
||||
ZeroMethodStart = sc?.ZeroMethods.Methods[0].Start ?? SensorConstants.DefaultZeroMethodStart; // FB12764: Default in SensorConstants
|
||||
ZeroMethodEnd = sc?.ZeroMethods.Methods[0].End ?? SensorConstants.DefaultZeroMethodEnd; // FB12764: Default in SensorConstants
|
||||
NonLinearCalculationType = null != sc ? sc.NonLinear ? sc.IRTraccCalculationType.ToString() : string.Empty : string.Empty;
|
||||
InitialOffsets = sc?.InitialOffsets.Offsets;
|
||||
LatestCalibrationId = s.LatestCalibrationId;
|
||||
FirstUseDate = s.FirstUseDate;
|
||||
if (sc != null)
|
||||
{
|
||||
UsageCount = sc.UsageCount;
|
||||
}
|
||||
MaximumUsage = s.MaximumUsage;
|
||||
//if we have a null in the latest calibration id, go get the latest calibration id
|
||||
//skip it however if we aren't using sensor first use date since it's a db query and takes some time
|
||||
//17893 Cal date confusion on sensor import
|
||||
//if (null == s.LatestCalibrationId && SensorConstants.UseSensorFirstUseDate)
|
||||
//{
|
||||
if (SensorConstants.UseSensorFirstUseDate)
|
||||
{
|
||||
if (null != cals && cals.ContainsKey(s.SerialNumber))
|
||||
{
|
||||
s.LatestCalibrationId = cals[s.SerialNumber].CalibrationId;
|
||||
}
|
||||
else
|
||||
{
|
||||
var temp = AnalogSensor.GetLatestCalibrationId(s.DatabaseId);
|
||||
if (temp >= 0)
|
||||
{
|
||||
s.LatestCalibrationId = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//}
|
||||
if (null != sc && null != sc.CalibrationId && sc.CalibrationId == s.LatestCalibrationId)
|
||||
{
|
||||
UsingLatestCalibration = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
UsingLatestCalibration = false;
|
||||
}
|
||||
//FB 43246
|
||||
InspectBeforeUse = DTS.SensorDB.SensorData.IsInspectBeforeUseSet(s.DatabaseId);
|
||||
}
|
||||
public InitialOffset[] InitialOffsets { get; set; }
|
||||
/// <summary>
|
||||
/// whether the sensor is using the latest calibration or not
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
public bool UsingLatestCalibration { get; set; } = false;
|
||||
public bool IsTestSpecificEmbedded()
|
||||
{
|
||||
return SerialNumber.StartsWith("TSA_");
|
||||
}
|
||||
public bool IsTestSpecificEmbeddedClock()
|
||||
{
|
||||
return SerialNumber.StartsWith("TSC_");
|
||||
}
|
||||
public bool IsTestSpecificThermocoupler()
|
||||
{
|
||||
return SerialNumber.StartsWith(SensorsListViewModel.TEST_SPECIFIC_THERMOCOUPLER_PREPEND);
|
||||
}
|
||||
public static int GetLatestCalibrationId(int sensorId)
|
||||
{
|
||||
using (var cmd = DbOperations.GetSQLCommand(true))
|
||||
{
|
||||
try
|
||||
{
|
||||
cmd.CommandType = System.Data.CommandType.Text;
|
||||
cmd.CommandText = $"SELECT TOP (1) [SensorCalibrationId] FROM [{RunTestVariables.DbName}].[dbo].[SensorCalibrations] WHERE [SensorId]=@1 ORDER BY [CalibrationDate] DESC, [ModifyDate] DESC";
|
||||
cmd.Parameters.Add(new System.Data.SqlClient.SqlParameter("@1", System.Data.SqlDbType.Int)
|
||||
{ Value = sensorId });
|
||||
using (var reader = cmd.ExecuteReader())
|
||||
{
|
||||
if (reader.Read())
|
||||
{
|
||||
return Convert.ToInt32(reader["SensorCalibrationId"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
APILogger.Log(ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
cmd.Connection.Dispose();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// used to compare two analog sensors
|
||||
/// </summary>
|
||||
public class AnalogComparer : IComparer<IAnalogSensor>
|
||||
{
|
||||
/// <summary>
|
||||
/// current sort field
|
||||
/// </summary>
|
||||
public AnalogSensorFields SortField { get; set; }
|
||||
/// <summary>
|
||||
/// whether to sort ascending or descending
|
||||
/// </summary>
|
||||
public bool SortAscending { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// compares first use date between two sensors
|
||||
/// </summary>
|
||||
private static int FirstUseCompare(DateTime? a, DateTime? b)
|
||||
{
|
||||
if (null == a && a == b)
|
||||
{
|
||||
//both null, return =
|
||||
return 0;
|
||||
}
|
||||
|
||||
// only a is null, return <
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
// only b is null, return >
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
//compare the dates
|
||||
return ((DateTime)a).CompareTo((DateTime)b);
|
||||
}
|
||||
public int Compare(IAnalogSensor left, IAnalogSensor right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left; var b = right;
|
||||
if (!SortAscending) { a = right; b = left; }
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
var stringComparer = new DTS.Common.Utilities.NaturalStringComparer();
|
||||
switch (SortField)
|
||||
{
|
||||
case AnalogSensorFields.FirstUseDate:
|
||||
{
|
||||
return FirstUseCompare(a.FirstUseDate, b.FirstUseDate);
|
||||
}
|
||||
case AnalogSensorFields.Included:
|
||||
return a.Included.CompareTo(b.Included);
|
||||
case AnalogSensorFields.SerialNumber:
|
||||
return stringComparer.Compare(a.SerialNumber, b.SerialNumber);
|
||||
case AnalogSensorFields.IEPE:
|
||||
return a.IEPE.CompareTo(b.IEPE);
|
||||
case AnalogSensorFields.Description:
|
||||
return stringComparer.Compare(a.Description, b.Description);
|
||||
case AnalogSensorFields.Manufacturer:
|
||||
return stringComparer.Compare(a.Manufacturer, b.Manufacturer);
|
||||
case AnalogSensorFields.Model:
|
||||
return stringComparer.Compare(a.Model, b.Model);
|
||||
case AnalogSensorFields.Capacity:
|
||||
return a.Capacity.CompareTo(b.Capacity);
|
||||
case AnalogSensorFields.Sensitivity:
|
||||
return stringComparer.Compare(a.Sensitivity, b.Sensitivity);
|
||||
case AnalogSensorFields.NonLinearCalucationType:
|
||||
return stringComparer.Compare(a.NonLinearCalculationType, b.NonLinearCalculationType);
|
||||
case AnalogSensorFields.ZeroMethod:
|
||||
return a.ZeroMethod.CompareTo(b.ZeroMethod);
|
||||
case AnalogSensorFields.ZeroMethodStart:
|
||||
return a.ZeroMethodStart.CompareTo(b.ZeroMethodStart);
|
||||
case AnalogSensorFields.ZeroMethodEnd:
|
||||
return a.ZeroMethodEnd.CompareTo(b.ZeroMethodEnd);
|
||||
case AnalogSensorFields.Resistance:
|
||||
if (a.IEPE)
|
||||
{
|
||||
if (b.IEPE)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (b.IEPE)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return a.Resistance.CompareTo(b.Resistance);
|
||||
case AnalogSensorFields.Excitation:
|
||||
if (a.IEPE)
|
||||
{
|
||||
if (b.IEPE)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (b.IEPE)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return stringComparer.Compare(a.Excitation, b.Excitation);
|
||||
case AnalogSensorFields.Units:
|
||||
return stringComparer.Compare(a.Units, b.Units);
|
||||
case AnalogSensorFields.Id:
|
||||
return stringComparer.Compare(a.EID, b.EID);
|
||||
case AnalogSensorFields.CalDate:
|
||||
return a.CalDate.CompareTo(b.CalDate);
|
||||
case AnalogSensorFields.UserValue1:
|
||||
return a.UserValue1.CompareTo(b.UserValue1);
|
||||
case AnalogSensorFields.UserValue2:
|
||||
return a.UserValue2.CompareTo(b.UserValue2);
|
||||
case AnalogSensorFields.UserValue3:
|
||||
return a.UserValue3.CompareTo(b.UserValue3);
|
||||
case AnalogSensorFields.CalDueDate:
|
||||
return a.CalDueDate.CompareTo(b.CalDueDate);
|
||||
case AnalogSensorFields.ModifiedBy:
|
||||
return stringComparer.Compare(a.ModifiedBy, b.ModifiedBy);
|
||||
case AnalogSensorFields.LastModified:
|
||||
return a.LastModified.CompareTo(b.LastModified);
|
||||
case AnalogSensorFields.OutOfDate:
|
||||
if (DateTime.Now > (a as AnalogSensor).CalDueDate)
|
||||
{
|
||||
if (DateTime.Now > (b as AnalogSensor).CalDueDate)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (DateTime.Now > (b as AnalogSensor).CalDueDate)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
case AnalogSensorFields.InWarningPeriod:
|
||||
if (DateTime.Now.AddDays((a as AnalogSensor).SensorCalWarningPeriodDays) > (a as AnalogSensor).CalDueDate &&
|
||||
DateTime.Now <= (a as AnalogSensor).CalDueDate)
|
||||
{
|
||||
if (DateTime.Now.AddDays((b as AnalogSensor).SensorCalWarningPeriodDays) > (b as AnalogSensor).CalDueDate &&
|
||||
DateTime.Now <= (b as AnalogSensor).CalDueDate)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (DateTime.Now.AddDays((b as AnalogSensor).SensorCalWarningPeriodDays) > (b as AnalogSensor).CalDueDate &&
|
||||
DateTime.Now <= (b as AnalogSensor).CalDueDate)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
case AnalogSensorFields.UsageMaximized:
|
||||
if ((a as AnalogSensor).SensorUsageCount >= (a as AnalogSensor).MaximumUsage)
|
||||
{
|
||||
if ((b as AnalogSensor).SensorUsageCount >= (b as AnalogSensor).MaximumUsage)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if ((b as AnalogSensor).SensorUsageCount >= (b as AnalogSensor).MaximumUsage)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
case AnalogSensorFields.InUsageWarningPeriod:
|
||||
if ((((a as AnalogSensor).MaximumUsage - (a as AnalogSensor).SensorUsageCount) <= (a as AnalogSensor).SensorUsageWarningCount) &&
|
||||
((a as AnalogSensor).SensorUsageCount <= (a as AnalogSensor).MaximumUsage))
|
||||
{
|
||||
if ((((b as AnalogSensor).MaximumUsage - (b as AnalogSensor).SensorUsageCount) <= (b as AnalogSensor).SensorUsageWarningCount) &&
|
||||
((b as AnalogSensor).SensorUsageCount <= (b as AnalogSensor).MaximumUsage))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if ((((b as AnalogSensor).MaximumUsage - (b as AnalogSensor).SensorUsageCount) <= (b as AnalogSensor).SensorUsageWarningCount) &&
|
||||
((b as AnalogSensor).SensorUsageCount <= (b as AnalogSensor).MaximumUsage))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
case AnalogSensorFields.Assembly:
|
||||
return stringComparer.Compare(a.AssemblyName, b.AssemblyName);
|
||||
case AnalogSensorFields.UsageCount:
|
||||
return a.SensorUsageCount.CompareTo(b.SensorUsageCount);
|
||||
case AnalogSensorFields.MaximumUsage:
|
||||
return a.MaximumUsage.CompareTo(b.MaximumUsage);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
168
DataPRO/Modules/SensorsList/SensorsList/Model/CanIOSetting.cs
Normal file
168
DataPRO/Modules/SensorsList/SensorsList/Model/CanIOSetting.cs
Normal file
@@ -0,0 +1,168 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO.Ports;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
public class CanIOSetting : DTS.Common.Base.BasePropertyChanged, ICanIOSetting, IDragAndDropItem
|
||||
{
|
||||
private bool _bIncluded = true;
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
public string SerialNumber { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
public int DatabaseId { get; set; } = -1;
|
||||
public string LastModifiedBy { get; set; } = "";
|
||||
public DateTime LastModified { get; set; }
|
||||
public bool Assigned { get; set; } = false;
|
||||
public bool Online { get; set; } = false;
|
||||
public bool Broken { get; set; } = false;
|
||||
public bool DoNotUse { get; set; } = false;
|
||||
public bool CanIsFD { get; set; } = false;
|
||||
public int CanArbBaseBitrate { get; set; } = 0;
|
||||
public int CanArbBaseSJW { get; set; } = 0;
|
||||
public int CanDataBitrate { get; set; } = 0;
|
||||
public int CanDataSJW { get; set; } = 0;
|
||||
public string CanFileType { get; set; } = string.Empty;
|
||||
public string ISOCode { get; set; } = string.Empty;
|
||||
public string ISOChannelName { get; set; } = string.Empty;
|
||||
public string UserCode { get; set; } = string.Empty;
|
||||
public string UserChannelName { get; set; } = string.Empty;
|
||||
|
||||
public bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
term = term.ToLower();
|
||||
if (SerialNumber.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (Description.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (CanIsFD.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (CanArbBaseBitrate.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (CanArbBaseSJW.ToString().ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (CanDataBitrate.ToString().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (CanDataSJW.ToString().ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (CanFileType.ToString().ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public CanIOSetting() { }
|
||||
|
||||
public CanIOSetting(ICANRecord record)
|
||||
{
|
||||
DatabaseId = record.Id;
|
||||
Description = "";
|
||||
LastModified = record.LastModified;
|
||||
LastModifiedBy = record.LastUpdatedBy;
|
||||
SerialNumber = record.SerialNumber;
|
||||
|
||||
ISOCode = "";
|
||||
ISOChannelName = "";
|
||||
UserCode = "";
|
||||
UserChannelName = "";
|
||||
|
||||
CanIsFD = record.CanIsFD;
|
||||
CanArbBaseBitrate = record.CanArbBaseBitrate;
|
||||
CanArbBaseSJW = record.CanArbBaseSJW;
|
||||
CanDataBitrate = record.CanDataBitrate;
|
||||
CanDataSJW = record.CanDataSJW;
|
||||
CanFileType = record.CanFileType;
|
||||
}
|
||||
public CanIOSetting(ISensorData s) : this()
|
||||
{
|
||||
DatabaseId = s.DatabaseId;
|
||||
Description = s.Comment;
|
||||
LastModified = s.LastModified;
|
||||
LastModifiedBy = s.LastUpdatedBy;
|
||||
SerialNumber = s.SerialNumber;
|
||||
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
|
||||
CanIsFD = s.CanIsFD;
|
||||
CanArbBaseBitrate = s.CanArbBaseBitrate;
|
||||
CanArbBaseSJW = s.CanArbBaseSJW;
|
||||
CanDataBitrate = s.CanDataBitrate;
|
||||
CanDataSJW = s.CanDataSJW;
|
||||
CanFileType = s.CanFileType;
|
||||
}
|
||||
}
|
||||
|
||||
public class CanIOComparer : IComparer<ICanIOSetting>
|
||||
{
|
||||
public CanSettingFields SortField { get; set; }
|
||||
public bool SortAscending { get; set; }
|
||||
|
||||
public int Compare(ICanIOSetting left, ICanIOSetting right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left; var b = right;
|
||||
if (!SortAscending) { a = right; b = left; }
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
var stringComparer = new DTS.Common.Utilities.NaturalStringComparer();
|
||||
switch (SortField)
|
||||
{
|
||||
case CanSettingFields.CanIsFD:
|
||||
return a.CanIsFD.CompareTo(b.CanIsFD);
|
||||
case CanSettingFields.CanArbBaseBitrate:
|
||||
return a.CanArbBaseBitrate.CompareTo(b.CanArbBaseBitrate);
|
||||
case CanSettingFields.CanArbBaseSJW:
|
||||
return a.CanArbBaseSJW.CompareTo(b.CanArbBaseSJW);
|
||||
case CanSettingFields.CanDataBitrate:
|
||||
return a.CanDataBitrate.CompareTo(b.CanDataBitrate);
|
||||
case CanSettingFields.CanDataSJW:
|
||||
return a.CanDataSJW.CompareTo(b.CanDataSJW);
|
||||
case CanSettingFields.CanFileType:
|
||||
return stringComparer.Compare(a.CanFileType, b.CanFileType);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// this class is used to represent digital inputs in lists in the UI
|
||||
/// </summary>
|
||||
public class DigitalInputSetting : DigitalInDbRecord, IDigitalInputSetting, IDragAndDropItem
|
||||
{
|
||||
private bool _bIncluded = true;
|
||||
/// <summary>
|
||||
/// whether the item should have a check in lists with a checkbox
|
||||
/// </summary>
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// the description or comment of the digital input
|
||||
/// </summary>
|
||||
public string Description
|
||||
{
|
||||
get => UserValue1;
|
||||
set
|
||||
{
|
||||
UserValue1 = value;
|
||||
OnPropertyChanged("Description");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// a string representation of the digital input mode of the sensor
|
||||
/// </summary>
|
||||
public string DIMode
|
||||
{
|
||||
get => base.Mode.ToString();
|
||||
set
|
||||
{
|
||||
if (Enum.TryParse(value, out DigitalInputModes mode))
|
||||
{
|
||||
base.Mode = mode;
|
||||
}
|
||||
OnPropertyChanged("DIMode");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// the user who last modified the digital input
|
||||
/// </summary>
|
||||
public string ModifiedBy
|
||||
{
|
||||
get => LastModifiedBy;
|
||||
set
|
||||
{
|
||||
LastModifiedBy = value;
|
||||
OnPropertyChanged("ModifiedBy");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// not used? no references
|
||||
/// [I think it may be there because of some binding in the baseview]
|
||||
/// </summary>
|
||||
public bool Disabled { get; set; } = false;
|
||||
/// <summary>
|
||||
/// whether the digital input setting is associated with a channel or not
|
||||
/// </summary>
|
||||
public bool Assigned { get; set; } = false;
|
||||
/// <summary>
|
||||
/// whether the digital input was found online or not
|
||||
/// </summary>
|
||||
public bool Online { get; set; } = false;
|
||||
/// <summary>
|
||||
/// the database id for the digital input setting
|
||||
/// valid values must be > 0
|
||||
/// </summary>
|
||||
public int DatabaseId
|
||||
{
|
||||
get => Id;
|
||||
set
|
||||
{
|
||||
Id = value;
|
||||
OnPropertyChanged("DatabaseId");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// a string representation of the active state of the digital input
|
||||
/// this is what to display when the digital input is active (as opposed to the default state)
|
||||
/// </summary>
|
||||
public string ActiveValue //{ get; set; } = "5";
|
||||
{
|
||||
get => ScaleMultiplier.ActiveValue.ToString();
|
||||
set
|
||||
{
|
||||
if (double.TryParse(value, out var d))
|
||||
{
|
||||
ScaleMultiplier.ActiveValue = d;
|
||||
}
|
||||
OnPropertyChanged("ActiveValue");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// a string representation of the default state of the input
|
||||
/// this is what to display when the digital input is not in active state
|
||||
/// (the input is in it's default or normal state)
|
||||
/// </summary>
|
||||
public string DefaultValue //{ get; set; } = "0";
|
||||
{
|
||||
get => ScaleMultiplier.DefaultValue.ToString();
|
||||
set
|
||||
{
|
||||
if (double.TryParse(value, out var d))
|
||||
{
|
||||
ScaleMultiplier.DefaultValue = d;
|
||||
}
|
||||
OnPropertyChanged("DefaultValue");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// returns true if the digital input matches filter criteria
|
||||
/// </summary>
|
||||
/// <param name="term"></param>
|
||||
/// <returns></returns>
|
||||
public bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term)) { return true; }
|
||||
term = term.ToLower();
|
||||
if (SerialNumber.ToLower().Contains(term)) { return true; }
|
||||
if (Description.ToLower().Contains(term)) { return true; }
|
||||
if (DIMode.ToLower().Contains(term)) { return true; }
|
||||
return false;
|
||||
}
|
||||
|
||||
public DigitalInputSetting()
|
||||
{
|
||||
}
|
||||
public DigitalInputSetting(IDigitalInDbRecord record)
|
||||
: base(record)
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// constructs a new digital input from sensor data
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
public DigitalInputSetting(ISensorData s)
|
||||
{
|
||||
Description = s.Comment;
|
||||
DIMode = s.InputMode.ToString();
|
||||
LastModified = s.LastModified;
|
||||
ModifiedBy = s.LastUpdatedBy;
|
||||
SerialNumber = s.SerialNumber;
|
||||
DatabaseId = s.DatabaseId;
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
EID = s.EID;
|
||||
ActiveValue = s.InputActiveValue.ToString("N0");
|
||||
DefaultValue = s.InputDefaultValue.ToString("N0");
|
||||
Mode = s.InputMode;
|
||||
}
|
||||
public bool IsTestSpecificDigitalInput()
|
||||
{
|
||||
return SerialNumber.StartsWith("TSI_");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// compares digital inputs
|
||||
/// </summary>
|
||||
public class DigitalInComparer : IComparer<IDigitalInputSetting>
|
||||
{
|
||||
/// <summary>
|
||||
/// what field to sort on
|
||||
/// </summary>
|
||||
public DigitalInputFields SortField { get; set; }
|
||||
/// <summary>
|
||||
/// whether to sort ascending or not
|
||||
/// </summary>
|
||||
public bool SortAscending { get; set; }
|
||||
|
||||
public int Compare(IDigitalInputSetting left, IDigitalInputSetting right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left;
|
||||
var b = right;
|
||||
if (!SortAscending)
|
||||
{
|
||||
a = right;
|
||||
b = left;
|
||||
}
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
var stringComparer = new DTS.Common.Utilities.NaturalStringComparer();
|
||||
|
||||
switch (SortField)
|
||||
{
|
||||
case DigitalInputFields.Included:
|
||||
return a.Included.CompareTo(b.Included);
|
||||
case DigitalInputFields.SerialNumber:
|
||||
return stringComparer.Compare(a.SerialNumber, b.SerialNumber);
|
||||
case DigitalInputFields.Description:
|
||||
return stringComparer.Compare(a.Description, b.Description);
|
||||
case DigitalInputFields.Mode:
|
||||
return stringComparer.Compare(a.DIMode, b.DIMode);
|
||||
case DigitalInputFields.ModifiedBy:
|
||||
return stringComparer.Compare(a.ModifiedBy, b.ModifiedBy);
|
||||
case DigitalInputFields.LastModified:
|
||||
return a.LastModified.CompareTo(b.LastModified);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
public class DigitalOutputSetting : DigitalOutDbRecord, IDigitalOutputSetting, IDragAndDropItem
|
||||
{
|
||||
private bool _bIncluded = true;
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
public string Description { get; set; } = "";
|
||||
public bool Disabled { get; set; } = false;
|
||||
public bool Assigned { get; set; } = false;
|
||||
public bool Online { get; set; } = false;
|
||||
public bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term)) { return true; }
|
||||
term = term.ToLower();
|
||||
if (SerialNumber.ToLower().Contains(term)) { return true; }
|
||||
if (DODelay.ToString(CultureInfo.CurrentCulture).Contains(term)) { return true; }
|
||||
if (DODuration.ToString(CultureInfo.CurrentCulture).Contains(term)) { return true; }
|
||||
return false;
|
||||
}
|
||||
public DigitalOutputSetting(IDigitalOutDbRecord record)
|
||||
: base(record)
|
||||
{
|
||||
}
|
||||
public DigitalOutputSetting()
|
||||
{
|
||||
}
|
||||
|
||||
public DigitalOutputSetting(ISensorData s)
|
||||
{
|
||||
DatabaseId = s.DatabaseId;
|
||||
Description = s.Comment;
|
||||
DODelay = s.DigitalOutputDelayMS;
|
||||
DODuration = s.DigitalOutputDurationMS;
|
||||
LastModified = s.LastModified;
|
||||
ModifiedBy = s.LastUpdatedBy;
|
||||
SerialNumber = s.SerialNumber;
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
DOMode = s.DigitalOutputMode;
|
||||
LimitDuration = s.DigitalOutputLimitDuration;
|
||||
}
|
||||
public bool IsTestSpecificDigitalOutput()
|
||||
{
|
||||
return SerialNumber.StartsWith("TSD_");
|
||||
}
|
||||
}
|
||||
public class DigitalOutComparer : IComparer<IDigitalOutputSetting>
|
||||
{
|
||||
public DigitalOutFields SortField { get; set; }
|
||||
public bool SortAscending { get; set; }
|
||||
public int Compare(IDigitalOutputSetting left, IDigitalOutputSetting right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left; var b = right;
|
||||
if (!SortAscending) { a = right; b = left; }
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (SortField)
|
||||
{
|
||||
case DigitalOutFields.Included:
|
||||
return a.Included.CompareTo(b.Included);
|
||||
case DigitalOutFields.SerialNumber:
|
||||
return string.Compare(a.SerialNumber, b.SerialNumber, StringComparison.OrdinalIgnoreCase);
|
||||
case DigitalOutFields.Description:
|
||||
return string.Compare(a.Description, b.Description, StringComparison.OrdinalIgnoreCase);
|
||||
case DigitalOutFields.Delay:
|
||||
return a.DODelay.CompareTo(b.DODelay);
|
||||
case DigitalOutFields.Duration:
|
||||
return a.DODuration.CompareTo(b.DODuration);
|
||||
case DigitalOutFields.ModifiedBy:
|
||||
return string.Compare(a.ModifiedBy, b.ModifiedBy, StringComparison.OrdinalIgnoreCase);
|
||||
case DigitalOutFields.LastModified:
|
||||
return a.LastModified.CompareTo(b.LastModified);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
265
DataPRO/Modules/SensorsList/SensorsList/Model/Squib.cs
Normal file
265
DataPRO/Modules/SensorsList/SensorsList/Model/Squib.cs
Normal file
@@ -0,0 +1,265 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
public class Squib : SquibDbRecord, ISquib, IDragAndDropItem
|
||||
{
|
||||
private bool _bIncluded = true;
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get => UserValue1;
|
||||
set
|
||||
{
|
||||
UserValue1 = value;
|
||||
OnPropertyChanged("Description");
|
||||
}
|
||||
}
|
||||
public double ResistanceLow
|
||||
{
|
||||
get => SquibToleranceLow;
|
||||
set
|
||||
{
|
||||
SquibToleranceLow = value;
|
||||
OnPropertyChanged("ResistanceLow");
|
||||
}
|
||||
}
|
||||
public double ResistanceHigh
|
||||
{
|
||||
get => SquibToleranceHigh;
|
||||
set
|
||||
{
|
||||
SquibToleranceHigh = value;
|
||||
OnPropertyChanged("ResistanceHigh");
|
||||
}
|
||||
}
|
||||
public string ID
|
||||
{
|
||||
get => ArticleId;
|
||||
set
|
||||
{
|
||||
ArticleId = value;
|
||||
OnPropertyChanged("ID");
|
||||
}
|
||||
}
|
||||
public string SQMode
|
||||
{
|
||||
get => FireMode.ToString();
|
||||
set
|
||||
{
|
||||
if (Enum.TryParse(value, out SquibFireMode mode))
|
||||
{
|
||||
FireMode = mode;
|
||||
}
|
||||
OnPropertyChanged("SQMode");
|
||||
}
|
||||
}
|
||||
public double SQDelay
|
||||
{
|
||||
get => DelayMs;
|
||||
set
|
||||
{
|
||||
DelayMs = value;
|
||||
OnPropertyChanged("SQDelay");
|
||||
}
|
||||
}
|
||||
public double SQCurrent
|
||||
{
|
||||
get => SquibOutputCurrent;
|
||||
set
|
||||
{
|
||||
SquibOutputCurrent = value;
|
||||
OnPropertyChanged("SQCurrent");
|
||||
}
|
||||
}
|
||||
public double SQDuration
|
||||
{
|
||||
get => DurationMs;
|
||||
set
|
||||
{
|
||||
DurationMs = value;
|
||||
OnPropertyChanged("SQDuration");
|
||||
}
|
||||
}
|
||||
public string ModifiedBy
|
||||
{
|
||||
get => LastModifiedBy;
|
||||
set
|
||||
{
|
||||
LastModifiedBy = value;
|
||||
OnPropertyChanged("ModifiedBy");
|
||||
}
|
||||
}
|
||||
public bool Disabled { get; set; } = false;
|
||||
public bool Assigned { get; set; } = false;
|
||||
public bool Online { get; set; } = false;
|
||||
public int DatabaseId
|
||||
{
|
||||
get => Id;
|
||||
set
|
||||
{
|
||||
Id = value;
|
||||
OnPropertyChanged("DatabaseId");
|
||||
}
|
||||
}
|
||||
public string ISOCode
|
||||
{
|
||||
get => IsoCode;
|
||||
set
|
||||
{
|
||||
IsoCode = value;
|
||||
OnPropertyChanged("ISOCode");
|
||||
}
|
||||
}
|
||||
public string ISOChannelName
|
||||
{
|
||||
get => IsoChannelName;
|
||||
set
|
||||
{
|
||||
IsoChannelName = value;
|
||||
OnPropertyChanged("ISOChannelName");
|
||||
}
|
||||
}
|
||||
|
||||
public SquibFireMode Mode
|
||||
{
|
||||
get => FireMode;
|
||||
set
|
||||
{
|
||||
FireMode = value;
|
||||
OnPropertyChanged("Mode");
|
||||
}
|
||||
}
|
||||
public bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
term = term.ToLower();
|
||||
if (SerialNumber.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (Description.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (SQDelay.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (SQCurrent.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (SQDuration.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (SQMode.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public Squib()
|
||||
{
|
||||
}
|
||||
public Squib(ISquibDbRecord record) : base(record)
|
||||
{
|
||||
|
||||
}
|
||||
public Squib(ISensorData s)
|
||||
{
|
||||
DatabaseId = s.DatabaseId;
|
||||
Description = s.Comment;
|
||||
ID = s.EID;
|
||||
LastModified = s.LastModified;
|
||||
ModifiedBy = s.LastUpdatedBy;
|
||||
ResistanceHigh = s.SquibToleranceHigh;
|
||||
ResistanceLow = s.SquibToleranceLow;
|
||||
SerialNumber = s.SerialNumber;
|
||||
SQDelay = s.SquibFireDelayMS;
|
||||
SQCurrent = s.SquibOutputCurrent;
|
||||
SQDuration = s.SquibFireDurationMS;
|
||||
SQMode = s.SquibFireMode.ToString();
|
||||
LimitDuration = s.LimitSquibFireDuration;
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
Mode = s.SquibFireMode;
|
||||
}
|
||||
public bool IsTestSpecificSquib()
|
||||
{
|
||||
return SerialNumber.StartsWith("TSQ_");
|
||||
}
|
||||
}
|
||||
public class SquibComparer : IComparer<ISquib>
|
||||
{
|
||||
public SquibFields SortField { get; set; }
|
||||
public bool SortAscending { get; set; }
|
||||
public int Compare(ISquib left, ISquib right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left; var b = right;
|
||||
if (!SortAscending) { a = right; b = left; }
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
var stringComparer = new DTS.Common.Utilities.NaturalStringComparer();
|
||||
switch (SortField)
|
||||
{
|
||||
case SquibFields.Included:
|
||||
return a.Included.CompareTo(b.Included);
|
||||
case SquibFields.SerialNumber:
|
||||
return stringComparer.Compare(a.SerialNumber, b.SerialNumber);
|
||||
case SquibFields.Description:
|
||||
return stringComparer.Compare(a.Description, b.Description);
|
||||
case SquibFields.ResistanceLow:
|
||||
return a.ResistanceLow.CompareTo(b.ResistanceLow);
|
||||
case SquibFields.ResistanceHigh:
|
||||
return a.ResistanceHigh.CompareTo(b.ResistanceHigh);
|
||||
case SquibFields.Id:
|
||||
return stringComparer.Compare(a.ID, b.ID);
|
||||
case SquibFields.Mode:
|
||||
return stringComparer.Compare(a.SQMode, b.SQMode);
|
||||
case SquibFields.Delay:
|
||||
return a.SQDelay.CompareTo(b.SQDelay);
|
||||
case SquibFields.Current:
|
||||
return a.SQCurrent.CompareTo(b.SQCurrent);
|
||||
case SquibFields.Duration:
|
||||
return a.SQDuration.CompareTo(b.SQDuration);
|
||||
case SquibFields.ModifiedBy:
|
||||
return stringComparer.Compare(a.ModifiedBy, b.ModifiedBy);
|
||||
case SquibFields.LastModified:
|
||||
return a.LastModified.CompareTo(b.LastModified);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
public class StreamInputSetting : DTS.Common.Base.BasePropertyChanged, IStreamInputSetting, IDragAndDropItem
|
||||
{
|
||||
private bool _bIncluded = true;
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
public string SerialNumber { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
public string LastModifiedBy { get; set; }
|
||||
public DateTime LastModified { get; set; }
|
||||
public bool Assigned { get; set; } = false;
|
||||
public bool Online { get; set; } = false;
|
||||
public int DatabaseId { get; set; } = -1;
|
||||
public string ISOCode { get; set; } = "";
|
||||
public string ISOChannelName { get; set; } = "";
|
||||
public string UserCode { get; set; } = "";
|
||||
public string UserChannelName { get; set; } = "";
|
||||
public bool Broken { get; set; } = false;
|
||||
public bool DoNotUse { get; set; } = false;
|
||||
public string UDPAddress { get; set; } = "UDP://239.1.2.10:8400";
|
||||
public bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term)) { return true; }
|
||||
term = term.ToLower();
|
||||
if (SerialNumber.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (Description.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (UDPAddress.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public StreamInputSetting()
|
||||
{
|
||||
}
|
||||
|
||||
public StreamInputSetting(ISensorData s)
|
||||
{
|
||||
DatabaseId = s.DatabaseId;
|
||||
Description = s.Comment;
|
||||
LastModified = s.LastModified;
|
||||
LastModifiedBy = s.LastUpdatedBy;
|
||||
SerialNumber = s.SerialNumber;
|
||||
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
|
||||
UDPAddress = s.StreamInUDPAddress;
|
||||
}
|
||||
public bool IsTestSpecificStreamInput()
|
||||
{
|
||||
return SerialNumber.StartsWith("TSS_");
|
||||
}
|
||||
}
|
||||
public class StreamInComparer : IComparer<IStreamInputSetting>
|
||||
{
|
||||
public StreamInSettingFields SortField { get; set; }
|
||||
public bool SortAscending { get; set; }
|
||||
public int Compare(IStreamInputSetting left, IStreamInputSetting right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left; var b = right;
|
||||
if (!SortAscending) { a = right; b = left; }
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (SortField)
|
||||
{
|
||||
case StreamInSettingFields.Included:
|
||||
return a.Included.CompareTo(b.Included);
|
||||
case StreamInSettingFields.SerialNumber:
|
||||
return string.Compare(a.SerialNumber, b.SerialNumber, StringComparison.OrdinalIgnoreCase);
|
||||
case StreamInSettingFields.Description:
|
||||
return string.Compare(a.Description, b.Description, StringComparison.OrdinalIgnoreCase);
|
||||
case StreamInSettingFields.LastModifiedBy:
|
||||
return string.Compare(a.LastModifiedBy, b.LastModifiedBy, StringComparison.OrdinalIgnoreCase);
|
||||
case StreamInSettingFields.LastModified:
|
||||
return a.LastModified.CompareTo(b.LastModified);
|
||||
case StreamInSettingFields.UDPAddress:
|
||||
return string.Compare(a.UDPAddress, b.UDPAddress, StringComparison.OrdinalIgnoreCase);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,283 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using DTS.Common.Classes.DASFactory;
|
||||
using DTS.Common.Classes.Sensors;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
public class StreamOutputSetting : DTS.Common.Base.BasePropertyChanged, IStreamOutputSetting, IDragAndDropItem
|
||||
{
|
||||
private bool _bIncluded = true;
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
public string SerialNumber { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
public string LastModifiedBy { get; set; }
|
||||
public DateTime LastModified { get; set; }
|
||||
public bool Assigned { get; set; } = false;
|
||||
public bool Online { get; set; } = false;
|
||||
public int DatabaseId { get; set; } = -1;
|
||||
public string ISOCode { get; set; } = "";
|
||||
public string ISOChannelName { get; set; } = "";
|
||||
public string UserCode { get; set; } = "";
|
||||
public string UserChannelName { get; set; } = "";
|
||||
public bool Broken { get; set; } = false;
|
||||
public bool DoNotUse { get; set; } = false;
|
||||
public UDPStreamProfile UDPProfile { get; set; } = UDPStreamProfile.CH10_PCM_128BIT_2HDR;
|
||||
public string UDPAddress { get; set; } = "UDP://239.1.2.10:8400";
|
||||
public ushort UDPTimeChannelId { get; set; } = 1;
|
||||
public ushort UDPDataChannelId { get; set; } = 3;
|
||||
public string UDPTmNSConfig { get; set; } = "(1,6,60,0,0,0,0,0)";
|
||||
public ushort IRIGTimeDataPacketIntervalMs { get; set; } = 500;
|
||||
/// <summary>
|
||||
/// time between sending TMATS information while streaming
|
||||
/// http://manuscript.dts.local/f/cases/29987/Add-CG-DP-TMATS-interval-UI-support
|
||||
/// </summary>
|
||||
public ushort TMATSIntervalMs { get; set; } = StreamOutputRecord.DEFAULT_TMATS_INTERVAL_MS;
|
||||
public bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term)) { return true; }
|
||||
term = term.ToLower();
|
||||
if (SerialNumber.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (Description.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (UDPProfile.ToString().ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (UDPAddress.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (UDPTimeChannelId.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (UDPDataChannelId.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (UDPTmNSConfig.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (IRIGTimeDataPacketIntervalMs.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (TMATSIntervalMs.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public StreamOutputSetting()
|
||||
{
|
||||
}
|
||||
|
||||
public StreamOutputSetting(ISensorData s)
|
||||
{
|
||||
DatabaseId = s.DatabaseId;
|
||||
Description = s.Comment;
|
||||
LastModified = s.LastModified;
|
||||
LastModifiedBy = s.LastUpdatedBy;
|
||||
SerialNumber = s.SerialNumber;
|
||||
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
|
||||
UDPProfile = s.StreamOutUDPProfile;
|
||||
UDPAddress = s.StreamOutUDPAddress;
|
||||
UDPTimeChannelId = s.StreamOutUDPTimeChannelId;
|
||||
UDPDataChannelId = s.StreamOutUDPDataChannelId;
|
||||
UDPTmNSConfig = s.StreamOutUDPTmNSConfig;
|
||||
IRIGTimeDataPacketIntervalMs = s.StreamOutIRIGTimeDataPacketIntervalMs;
|
||||
TMATSIntervalMs = s.StreamOutTMATSIntervalMs;
|
||||
}
|
||||
public bool IsTestSpecificStreamOutput()
|
||||
{
|
||||
return SerialNumber.StartsWith("TSS_");
|
||||
}
|
||||
|
||||
public bool IsCH10 => TMNSConfig.IsCh10(UDPProfile);
|
||||
|
||||
public bool IsTMNS => TMNSConfig.IsTMNS(UDPProfile);
|
||||
public bool IsIENA => TMNSConfig.IsIENA(UDPProfile);
|
||||
public bool IsUART => TMNSConfig.IsUART(UDPProfile);
|
||||
|
||||
/// <summary>
|
||||
/// TMNS sub frame id for output streaming
|
||||
/// </summary>
|
||||
public uint TMNS_SubFrameId
|
||||
{
|
||||
get
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
return tmns.TMNS_PCMSubFrameId;
|
||||
}
|
||||
set
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
tmns.TMNS_PCMSubFrameId = value;
|
||||
UDPTmNSConfig = tmns.ToCSVString();
|
||||
OnPropertyChanged("TMNS_SubFrameId");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// TMNS message id for output streaming
|
||||
/// </summary>
|
||||
public uint TMNS_MsgId
|
||||
{
|
||||
get
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
return tmns.TMNS_MsgId;
|
||||
}
|
||||
set
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
tmns.TMNS_MsgId = value;
|
||||
UDPTmNSConfig = tmns.ToCSVString();
|
||||
OnPropertyChanged("TMNS_MsgId");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// tmns PCM minor per major setting for output streaming
|
||||
/// </summary>
|
||||
public uint TMNS_MinorPerMajor
|
||||
{
|
||||
get
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
return tmns.TMNS_PCMMinorPerMajor;
|
||||
}
|
||||
set
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
tmns.TMNS_PCMMinorPerMajor = value;
|
||||
UDPTmNSConfig = tmns.ToCSVString();
|
||||
OnPropertyChanged("TMNS_MinorPerMajor");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// TMNS TMATs port for output streaming
|
||||
/// </summary>
|
||||
public uint TMNS_TMATSPort
|
||||
{
|
||||
get
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
return tmns.TMNS_TMATSPortNumber;
|
||||
}
|
||||
set
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
tmns.TMNS_TMATSPortNumber = value;
|
||||
UDPTmNSConfig = tmns.ToCSVString();
|
||||
OnPropertyChanged("TMNS_TMATSPort");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// IENA key for output streaming
|
||||
/// </summary>
|
||||
public ushort IENA_Key
|
||||
{
|
||||
get
|
||||
{
|
||||
return UDPDataChannelId;
|
||||
}
|
||||
set
|
||||
{
|
||||
UDPDataChannelId = value;
|
||||
OnPropertyChanged("IENA_Key");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// IENA source port for streaming
|
||||
/// </summary>
|
||||
public uint IENA_SourcePort
|
||||
{
|
||||
get
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
return tmns.IENAUDP_PortNumber;
|
||||
}
|
||||
set
|
||||
{
|
||||
var tmns = new TMNSConfig(UDPTmNSConfig);
|
||||
tmns.IENAUDP_PortNumber = value;
|
||||
UDPTmNSConfig = tmns.ToCSVString();
|
||||
OnPropertyChanged("IENA_SourcePort");
|
||||
}
|
||||
}
|
||||
}
|
||||
public class StreamOutComparer : IComparer<IStreamOutputSetting>
|
||||
{
|
||||
public StreamOutSettingFields SortField { get; set; }
|
||||
public bool SortAscending { get; set; }
|
||||
public int Compare(IStreamOutputSetting left, IStreamOutputSetting right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left; var b = right;
|
||||
if (!SortAscending) { a = right; b = left; }
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (SortField)
|
||||
{
|
||||
case StreamOutSettingFields.Included:
|
||||
return a.Included.CompareTo(b.Included);
|
||||
case StreamOutSettingFields.SerialNumber:
|
||||
return string.Compare(a.SerialNumber, b.SerialNumber, StringComparison.OrdinalIgnoreCase);
|
||||
case StreamOutSettingFields.Description:
|
||||
return string.Compare(a.Description, b.Description, StringComparison.OrdinalIgnoreCase);
|
||||
case StreamOutSettingFields.LastModifiedBy:
|
||||
return string.Compare(a.LastModifiedBy, b.LastModifiedBy, StringComparison.OrdinalIgnoreCase);
|
||||
case StreamOutSettingFields.LastModified:
|
||||
return a.LastModified.CompareTo(b.LastModified);
|
||||
case StreamOutSettingFields.UDPProfile:
|
||||
return a.UDPProfile.CompareTo(b.UDPProfile);
|
||||
case StreamOutSettingFields.UDPAddress:
|
||||
return string.Compare(a.UDPAddress, b.UDPAddress, StringComparison.OrdinalIgnoreCase);
|
||||
case StreamOutSettingFields.UDPTimeChannelId:
|
||||
return a.UDPTimeChannelId.CompareTo(b.UDPTimeChannelId);
|
||||
case StreamOutSettingFields.UDPDataChannelId:
|
||||
return a.UDPDataChannelId.CompareTo(b.UDPDataChannelId);
|
||||
case StreamOutSettingFields.UDPTmNSConfig:
|
||||
return string.Compare(a.UDPTmNSConfig, b.UDPTmNSConfig, StringComparison.OrdinalIgnoreCase);
|
||||
case StreamOutSettingFields.IRIGTimeDataPacketIntervalMs:
|
||||
return a.IRIGTimeDataPacketIntervalMs.CompareTo(b.IRIGTimeDataPacketIntervalMs);
|
||||
case StreamOutSettingFields.TMATSIntervalMs:
|
||||
return a.TMATSIntervalMs.CompareTo(b.TMATSIntervalMs);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
176
DataPRO/Modules/SensorsList/SensorsList/Model/UartIOSetting.cs
Normal file
176
DataPRO/Modules/SensorsList/SensorsList/Model/UartIOSetting.cs
Normal file
@@ -0,0 +1,176 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO.Ports;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Sensors.SensorsList;
|
||||
using DTS.Common.Interface.Sensors;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
namespace SensorsList.Model
|
||||
{
|
||||
public class UartIOSetting : DTS.Common.Base.BasePropertyChanged, IUartIOSetting, IDragAndDropItem
|
||||
{
|
||||
private bool _bIncluded = true;
|
||||
public bool Included
|
||||
{
|
||||
get => _bIncluded;
|
||||
set => SetProperty(ref _bIncluded, value, "Included");
|
||||
}
|
||||
public string SerialNumber { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
public int DatabaseId { get; set; } = -1;
|
||||
public string LastModifiedBy { get; set; } = "";
|
||||
public DateTime LastModified { get; set; }
|
||||
public bool Assigned { get; set; } = false;
|
||||
public bool Online { get; set; } = false;
|
||||
public bool Broken { get; set; } = false;
|
||||
public bool DoNotUse { get; set; } = false;
|
||||
public uint BaudRate { get; set; } = 57600;
|
||||
public uint DataBits { get; set; } = 8;
|
||||
public StopBits StopBits { get; set; } = StopBits.None;
|
||||
public Parity Parity { get; set; } = Parity.None;
|
||||
public Handshake FlowControl { get; } = Handshake.None;
|
||||
public UartDataFormat DataFormat { get; set; } = UartDataFormat.Binary;
|
||||
public string ISOCode { get; set; } = string.Empty;
|
||||
public string ISOChannelName { get; set; } = string.Empty;
|
||||
public string UserCode { get; set; } = string.Empty;
|
||||
public string UserChannelName { get; set; } = string.Empty;
|
||||
|
||||
public bool Filter(string term)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
term = term.ToLower();
|
||||
if (SerialNumber.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (Description.ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (BaudRate.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (DataBits.ToString(CultureInfo.CurrentCulture).Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (StopBits.ToString().ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (Parity.ToString().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (FlowControl.ToString().ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (DataFormat.ToString().ToLower().Contains(term))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public UartIOSetting() { }
|
||||
|
||||
public UartIOSetting(IUARTRecord record)
|
||||
{
|
||||
DatabaseId = record.Id;
|
||||
Description = "";
|
||||
LastModified = record.LastModified;
|
||||
LastModifiedBy = record.LastUpdatedBy;
|
||||
SerialNumber = record.SerialNumber;
|
||||
|
||||
ISOCode = "";
|
||||
ISOChannelName = "";
|
||||
UserCode = "";
|
||||
UserChannelName = "";
|
||||
|
||||
BaudRate = record.UartBaudRate;
|
||||
DataBits = record.UartDataBits;
|
||||
StopBits = record.UartStopBits;
|
||||
Parity = record.UartParity;
|
||||
//FB 30486 Hardcode FlowControl to NONE for UART sensor type -removed FlowControl
|
||||
DataFormat = record.UartDataFormat;
|
||||
}
|
||||
public UartIOSetting(ISensorData s) : this()
|
||||
{
|
||||
DatabaseId = s.DatabaseId;
|
||||
Description = s.Comment;
|
||||
LastModified = s.LastModified;
|
||||
LastModifiedBy = s.LastUpdatedBy;
|
||||
SerialNumber = s.SerialNumber;
|
||||
|
||||
ISOCode = s.ISOCode;
|
||||
ISOChannelName = s.ISOChannelName;
|
||||
UserCode = s.UserCode;
|
||||
UserChannelName = s.UserChannelName;
|
||||
|
||||
BaudRate = s.UartBaudRate;
|
||||
DataBits = s.UartDataBits;
|
||||
StopBits = s.UartStopBits;
|
||||
Parity = s.UartParity;
|
||||
//FB 30486 Hardcode FlowControl to NONE for UART sensor type -removed FlowControl
|
||||
DataFormat = s.UartDataFormat;
|
||||
}
|
||||
}
|
||||
|
||||
public class UartIOComparer : IComparer<IUartIOSetting>
|
||||
{
|
||||
public UartSettingFields SortField { get; set; }
|
||||
public bool SortAscending { get; set; }
|
||||
|
||||
public int Compare(IUartIOSetting left, IUartIOSetting right)
|
||||
{
|
||||
if (left == right)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
var a = left; var b = right;
|
||||
if (!SortAscending) { a = right; b = left; }
|
||||
if (null == a)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (null == b)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
var stringComparer = new DTS.Common.Utilities.NaturalStringComparer();
|
||||
switch (SortField)
|
||||
{
|
||||
case UartSettingFields.Included:
|
||||
return a.Included.CompareTo(b.Included);
|
||||
case UartSettingFields.SerialNumber:
|
||||
return stringComparer.Compare(a.SerialNumber, b.SerialNumber);
|
||||
case UartSettingFields.BaudRate:
|
||||
return a.BaudRate.CompareTo(b.BaudRate);
|
||||
case UartSettingFields.DataBits:
|
||||
return a.DataBits.CompareTo(b.DataBits);
|
||||
case UartSettingFields.StopBits:
|
||||
return a.StopBits.CompareTo(b.StopBits);
|
||||
case UartSettingFields.Parity:
|
||||
return a.Parity.CompareTo(b.Parity);
|
||||
case UartSettingFields.FlowControl:
|
||||
return a.FlowControl.CompareTo(b.FlowControl);
|
||||
case UartSettingFields.DataFormat:
|
||||
return a.DataFormat.CompareTo(b.DataFormat);
|
||||
case UartSettingFields.LastModifiedBy:
|
||||
return stringComparer.Compare(a.LastModifiedBy, b.LastModifiedBy);
|
||||
case UartSettingFields.LastModified:
|
||||
return a.LastModified.CompareTo(b.LastModified);
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("SensorsList")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("DTS")]
|
||||
[assembly: AssemblyProduct("SensorsList")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("9aa6d22f-5df9-4702-a16a-2c7f38b466f8")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
26
DataPRO/Modules/SensorsList/SensorsList/Properties/Settings.Designer.cs
generated
Normal file
26
DataPRO/Modules/SensorsList/SensorsList/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SensorsList.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="SensorsList.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
630
DataPRO/Modules/SensorsList/SensorsList/Resources/StringResources.Designer.cs
generated
Normal file
630
DataPRO/Modules/SensorsList/SensorsList/Resources/StringResources.Designer.cs
generated
Normal file
@@ -0,0 +1,630 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SensorsList.Resources {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class StringResources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal StringResources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SensorsList.Resources.StringResources", typeof(StringResources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Analog.
|
||||
/// </summary>
|
||||
internal static string Analog {
|
||||
get {
|
||||
return ResourceManager.GetString("Analog", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Assembly.
|
||||
/// </summary>
|
||||
internal static string Assembly {
|
||||
get {
|
||||
return ResourceManager.GetString("Assembly", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cal Date.
|
||||
/// </summary>
|
||||
internal static string CalDate {
|
||||
get {
|
||||
return ResourceManager.GetString("CalDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cal Due Date.
|
||||
/// </summary>
|
||||
internal static string CalDueDate {
|
||||
get {
|
||||
return ResourceManager.GetString("CalDueDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Capacity (EU).
|
||||
/// </summary>
|
||||
internal static string Capacity {
|
||||
get {
|
||||
return ResourceManager.GetString("Capacity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data channel id.
|
||||
/// </summary>
|
||||
internal static string DataChannelId {
|
||||
get {
|
||||
return ResourceManager.GetString("DataChannelId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Name.
|
||||
/// </summary>
|
||||
internal static string Description {
|
||||
get {
|
||||
return ResourceManager.GetString("Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Digital Input Settings.
|
||||
/// </summary>
|
||||
internal static string DigitalInputs {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalInputs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Digital Output Settings.
|
||||
/// </summary>
|
||||
internal static string DigitalOutputs {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutputs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Input Mode.
|
||||
/// </summary>
|
||||
internal static string DIMode {
|
||||
get {
|
||||
return ResourceManager.GetString("DIMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delay (ms).
|
||||
/// </summary>
|
||||
internal static string DODelay {
|
||||
get {
|
||||
return ResourceManager.GetString("DODelay", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Duration (ms).
|
||||
/// </summary>
|
||||
internal static string DODuration {
|
||||
get {
|
||||
return ResourceManager.GetString("DODuration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Excitation (V).
|
||||
/// </summary>
|
||||
internal static string Excitation {
|
||||
get {
|
||||
return ResourceManager.GetString("Excitation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to First use date.
|
||||
/// </summary>
|
||||
internal static string FirstUseDate {
|
||||
get {
|
||||
return ResourceManager.GetString("FirstUseDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor EID.
|
||||
/// </summary>
|
||||
internal static string ID {
|
||||
get {
|
||||
return ResourceManager.GetString("ID", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to IEPE.
|
||||
/// </summary>
|
||||
internal static string IEPE {
|
||||
get {
|
||||
return ResourceManager.GetString("IEPE", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Inspect Before Use.
|
||||
/// </summary>
|
||||
internal static string InspectBeforeUse {
|
||||
get {
|
||||
return ResourceManager.GetString("InspectBeforeUse", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to In Warning Period.
|
||||
/// </summary>
|
||||
internal static string InWarningPeriod {
|
||||
get {
|
||||
return ResourceManager.GetString("InWarningPeriod", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Time packet interval (ms).
|
||||
/// </summary>
|
||||
internal static string IRIGTimeDataPacketIntervalMs {
|
||||
get {
|
||||
return ResourceManager.GetString("IRIGTimeDataPacketIntervalMs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Last Modified.
|
||||
/// </summary>
|
||||
internal static string LastModified {
|
||||
get {
|
||||
return ResourceManager.GetString("LastModified", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Linear Sensitivity.
|
||||
/// </summary>
|
||||
internal static string LinearSensitivity {
|
||||
get {
|
||||
return ResourceManager.GetString("LinearSensitivity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Manufacturer.
|
||||
/// </summary>
|
||||
internal static string Manufacturer {
|
||||
get {
|
||||
return ResourceManager.GetString("Manufacturer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Maximum Usage.
|
||||
/// </summary>
|
||||
internal static string MaximumUsage {
|
||||
get {
|
||||
return ResourceManager.GetString("MaximumUsage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Model.
|
||||
/// </summary>
|
||||
internal static string Model {
|
||||
get {
|
||||
return ResourceManager.GetString("Model", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Modified By.
|
||||
/// </summary>
|
||||
internal static string ModifiedBy {
|
||||
get {
|
||||
return ResourceManager.GetString("ModifiedBy", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Non-Linear Sensitivity.
|
||||
/// </summary>
|
||||
internal static string NonLinearSensitivity {
|
||||
get {
|
||||
return ResourceManager.GetString("NonLinearSensitivity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Out Of Date.
|
||||
/// </summary>
|
||||
internal static string OutOfDate {
|
||||
get {
|
||||
return ResourceManager.GetString("OutOfDate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Resistance (Ω).
|
||||
/// </summary>
|
||||
internal static string Resistance {
|
||||
get {
|
||||
return ResourceManager.GetString("Resistance", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Resistance High (Ω).
|
||||
/// </summary>
|
||||
internal static string ResistanceHigh {
|
||||
get {
|
||||
return ResourceManager.GetString("ResistanceHigh", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Resistance Low (Ω).
|
||||
/// </summary>
|
||||
internal static string ResistanceLow {
|
||||
get {
|
||||
return ResourceManager.GetString("ResistanceLow", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensitivity.
|
||||
/// </summary>
|
||||
internal static string Sensitivity {
|
||||
get {
|
||||
return ResourceManager.GetString("Sensitivity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor max range.
|
||||
/// </summary>
|
||||
internal static string SensorMaxRange {
|
||||
get {
|
||||
return ResourceManager.GetString("SensorMaxRange", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Serial Number.
|
||||
/// </summary>
|
||||
internal static string SerialNumber {
|
||||
get {
|
||||
return ResourceManager.GetString("SerialNumber", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delay (ms).
|
||||
/// </summary>
|
||||
internal static string SQDelay {
|
||||
get {
|
||||
return ResourceManager.GetString("SQDelay", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Duration (ms).
|
||||
/// </summary>
|
||||
internal static string SQDuration {
|
||||
get {
|
||||
return ResourceManager.GetString("SQDuration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Squib Fire Mode.
|
||||
/// </summary>
|
||||
internal static string SQMode {
|
||||
get {
|
||||
return ResourceManager.GetString("SQMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Squib Settings.
|
||||
/// </summary>
|
||||
internal static string Squibs {
|
||||
get {
|
||||
return ResourceManager.GetString("Squibs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream Input Settings.
|
||||
/// </summary>
|
||||
internal static string StreamInputs {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamInputs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to IENA key.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_IENA_Key {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_IENA_Key", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to IENA source port.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_IENA_SourcePort {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_IENA_SourcePort", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Message id.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_TMNS_MessageId {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_TMNS_MessageId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to PCM minor per major.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_TMNS_MinorPerMajor {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_TMNS_MinorPerMajor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Subframe id.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_TMNS_SubFrameId {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_TMNS_SubFrameId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to TMATS port.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_TMNS_TMATSPort {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_TMNS_TMATSPort", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream Output Settings.
|
||||
/// </summary>
|
||||
internal static string StreamOutputs {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutputs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ---.
|
||||
/// </summary>
|
||||
internal static string Table_NA {
|
||||
get {
|
||||
return ResourceManager.GetString("Table_NA", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Time channel id.
|
||||
/// </summary>
|
||||
internal static string TimeChannelId {
|
||||
get {
|
||||
return ResourceManager.GetString("TimeChannelId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to TMATS interval (ms).
|
||||
/// </summary>
|
||||
internal static string TMATSIntervalMs {
|
||||
get {
|
||||
return ResourceManager.GetString("TMATSIntervalMs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to TmNS config.
|
||||
/// </summary>
|
||||
internal static string TmNSConfig {
|
||||
get {
|
||||
return ResourceManager.GetString("TmNSConfig", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Baud Rate (bps).
|
||||
/// </summary>
|
||||
internal static string UartBaudRate {
|
||||
get {
|
||||
return ResourceManager.GetString("UartBaudRate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data Bits.
|
||||
/// </summary>
|
||||
internal static string UartDataBits {
|
||||
get {
|
||||
return ResourceManager.GetString("UartDataBits", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data Format.
|
||||
/// </summary>
|
||||
internal static string UartDataFormat {
|
||||
get {
|
||||
return ResourceManager.GetString("UartDataFormat", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flow Control.
|
||||
/// </summary>
|
||||
internal static string UartFlowControl {
|
||||
get {
|
||||
return ResourceManager.GetString("UartFlowControl", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Parity.
|
||||
/// </summary>
|
||||
internal static string UartParity {
|
||||
get {
|
||||
return ResourceManager.GetString("UartParity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UART Settings.
|
||||
/// </summary>
|
||||
internal static string Uarts {
|
||||
get {
|
||||
return ResourceManager.GetString("Uarts", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stop Bits.
|
||||
/// </summary>
|
||||
internal static string UartStopBits {
|
||||
get {
|
||||
return ResourceManager.GetString("UartStopBits", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UDP address.
|
||||
/// </summary>
|
||||
internal static string UDPAddress {
|
||||
get {
|
||||
return ResourceManager.GetString("UDPAddress", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream profile.
|
||||
/// </summary>
|
||||
internal static string UDPProfile {
|
||||
get {
|
||||
return ResourceManager.GetString("UDPProfile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Units.
|
||||
/// </summary>
|
||||
internal static string Units {
|
||||
get {
|
||||
return ResourceManager.GetString("Units", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Usage Count.
|
||||
/// </summary>
|
||||
internal static string UsageCount {
|
||||
get {
|
||||
return ResourceManager.GetString("UsageCount", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UserValue1.
|
||||
/// </summary>
|
||||
internal static string UserValue1 {
|
||||
get {
|
||||
return ResourceManager.GetString("UserValue1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UserValue2.
|
||||
/// </summary>
|
||||
internal static string UserValue2 {
|
||||
get {
|
||||
return ResourceManager.GetString("UserValue2", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UserValue3.
|
||||
/// </summary>
|
||||
internal static string UserValue3 {
|
||||
get {
|
||||
return ResourceManager.GetString("UserValue3", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,309 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Analog" xml:space="preserve">
|
||||
<value>Analog</value>
|
||||
</data>
|
||||
<data name="CalDate" xml:space="preserve">
|
||||
<value>Cal Date</value>
|
||||
</data>
|
||||
<data name="CalDueDate" xml:space="preserve">
|
||||
<value>Cal Due Date</value>
|
||||
</data>
|
||||
<data name="Capacity" xml:space="preserve">
|
||||
<value>Capacity (EU)</value>
|
||||
</data>
|
||||
<data name="Description" xml:space="preserve">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
<data name="DIMode" xml:space="preserve">
|
||||
<value>Input Mode</value>
|
||||
</data>
|
||||
<data name="DODelay" xml:space="preserve">
|
||||
<value>Delay (ms)</value>
|
||||
</data>
|
||||
<data name="DODuration" xml:space="preserve">
|
||||
<value>Duration (ms)</value>
|
||||
</data>
|
||||
<data name="Excitation" xml:space="preserve">
|
||||
<value>Excitation (V)</value>
|
||||
</data>
|
||||
<data name="ID" xml:space="preserve">
|
||||
<value>Sensor EID</value>
|
||||
</data>
|
||||
<data name="Manufacturer" xml:space="preserve">
|
||||
<value>Manufacturer</value>
|
||||
</data>
|
||||
<data name="Model" xml:space="preserve">
|
||||
<value>Model</value>
|
||||
</data>
|
||||
<data name="Resistance" xml:space="preserve">
|
||||
<value>Resistance (Ω)</value>
|
||||
</data>
|
||||
<data name="ResistanceHigh" xml:space="preserve">
|
||||
<value>Resistance High (Ω)</value>
|
||||
</data>
|
||||
<data name="ResistanceLow" xml:space="preserve">
|
||||
<value>Resistance Low (Ω)</value>
|
||||
</data>
|
||||
<data name="Sensitivity" xml:space="preserve">
|
||||
<value>Sensitivity</value>
|
||||
</data>
|
||||
<data name="SerialNumber" xml:space="preserve">
|
||||
<value>Serial Number</value>
|
||||
</data>
|
||||
<data name="SQDelay" xml:space="preserve">
|
||||
<value>Delay (ms)</value>
|
||||
</data>
|
||||
<data name="SQDuration" xml:space="preserve">
|
||||
<value>Duration (ms)</value>
|
||||
</data>
|
||||
<data name="SQMode" xml:space="preserve">
|
||||
<value>Squib Fire Mode</value>
|
||||
</data>
|
||||
<data name="Units" xml:space="preserve">
|
||||
<value>Units</value>
|
||||
</data>
|
||||
<data name="DigitalInputs" xml:space="preserve">
|
||||
<value>Digital Input Settings</value>
|
||||
</data>
|
||||
<data name="DigitalOutputs" xml:space="preserve">
|
||||
<value>Digital Output Settings</value>
|
||||
</data>
|
||||
<data name="LastModified" xml:space="preserve">
|
||||
<value>Last Modified</value>
|
||||
</data>
|
||||
<data name="ModifiedBy" xml:space="preserve">
|
||||
<value>Modified By</value>
|
||||
</data>
|
||||
<data name="Squibs" xml:space="preserve">
|
||||
<value>Squib Settings</value>
|
||||
</data>
|
||||
<data name="LinearSensitivity" xml:space="preserve">
|
||||
<value>Linear Sensitivity</value>
|
||||
</data>
|
||||
<data name="NonLinearSensitivity" xml:space="preserve">
|
||||
<value>Non-Linear Sensitivity</value>
|
||||
</data>
|
||||
<data name="IEPE" xml:space="preserve">
|
||||
<value>IEPE</value>
|
||||
</data>
|
||||
<data name="InWarningPeriod" xml:space="preserve">
|
||||
<value>In Warning Period</value>
|
||||
</data>
|
||||
<data name="InspectBeforeUse" xml:space="preserve">
|
||||
<value>Inspect Before Use</value>
|
||||
</data>
|
||||
<data name="OutOfDate" xml:space="preserve">
|
||||
<value>Out Of Date</value>
|
||||
</data>
|
||||
<data name="FirstUseDate" xml:space="preserve">
|
||||
<value>First use date</value>
|
||||
</data>
|
||||
<data name="Uarts" xml:space="preserve">
|
||||
<value>UART Settings</value>
|
||||
</data>
|
||||
<data name="UartBaudRate" xml:space="preserve">
|
||||
<value>Baud Rate (bps)</value>
|
||||
</data>
|
||||
<data name="UartDataBits" xml:space="preserve">
|
||||
<value>Data Bits</value>
|
||||
</data>
|
||||
<data name="UartDataFormat" xml:space="preserve">
|
||||
<value>Data Format</value>
|
||||
</data>
|
||||
<data name="UartFlowControl" xml:space="preserve">
|
||||
<value>Flow Control</value>
|
||||
</data>
|
||||
<data name="UartParity" xml:space="preserve">
|
||||
<value>Parity</value>
|
||||
</data>
|
||||
<data name="UartStopBits" xml:space="preserve">
|
||||
<value>Stop Bits</value>
|
||||
</data>
|
||||
<data name="StreamOutputs" xml:space="preserve">
|
||||
<value>Stream Output Settings</value>
|
||||
</data>
|
||||
<data name="DataChannelId" xml:space="preserve">
|
||||
<value>Data channel id</value>
|
||||
</data>
|
||||
<data name="IRIGTimeDataPacketIntervalMs" xml:space="preserve">
|
||||
<value>Time packet interval (ms)</value>
|
||||
</data>
|
||||
<data name="TimeChannelId" xml:space="preserve">
|
||||
<value>Time channel id</value>
|
||||
</data>
|
||||
<data name="TmNSConfig" xml:space="preserve">
|
||||
<value>TmNS config</value>
|
||||
</data>
|
||||
<data name="UDPAddress" xml:space="preserve">
|
||||
<value>UDP address</value>
|
||||
</data>
|
||||
<data name="UDPProfile" xml:space="preserve">
|
||||
<value>Stream profile</value>
|
||||
</data>
|
||||
<data name="StreamInputs" xml:space="preserve">
|
||||
<value>Stream Input Settings</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_IENA_Key" xml:space="preserve">
|
||||
<value>IENA key</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_IENA_SourcePort" xml:space="preserve">
|
||||
<value>IENA source port</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_TMNS_MessageId" xml:space="preserve">
|
||||
<value>Message id</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_TMNS_MinorPerMajor" xml:space="preserve">
|
||||
<value>PCM minor per major</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_TMNS_SubFrameId" xml:space="preserve">
|
||||
<value>Subframe id</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_TMNS_TMATSPort" xml:space="preserve">
|
||||
<value>TMATS port</value>
|
||||
</data>
|
||||
<data name="Table_NA" xml:space="preserve">
|
||||
<value>---</value>
|
||||
</data>
|
||||
<data name="TMATSIntervalMs" xml:space="preserve">
|
||||
<value>TMATS interval (ms)</value>
|
||||
</data>
|
||||
<data name="UserValue1" xml:space="preserve">
|
||||
<value>UserValue1</value>
|
||||
</data>
|
||||
<data name="UserValue2" xml:space="preserve">
|
||||
<value>UserValue2</value>
|
||||
</data>
|
||||
<data name="UserValue3" xml:space="preserve">
|
||||
<value>UserValue3</value>
|
||||
</data>
|
||||
<data name="SensorMaxRange" xml:space="preserve">
|
||||
<value>Sensor max range</value>
|
||||
</data>
|
||||
<data name="MaximumUsage" xml:space="preserve">
|
||||
<value>Maximum Usage</value>
|
||||
</data>
|
||||
<data name="UsageCount" xml:space="preserve">
|
||||
<value>Usage Count</value>
|
||||
</data>
|
||||
<data name="Assembly" xml:space="preserve">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Windows.Markup;
|
||||
using SensorsList.Resources;
|
||||
|
||||
namespace SensorsList
|
||||
{
|
||||
[MarkupExtensionReturnType(typeof(string))]
|
||||
public class TranslateExtension : MarkupExtension
|
||||
{
|
||||
private readonly string _key;
|
||||
public TranslateExtension(string key) { _key = key; }
|
||||
|
||||
private const string NotFound = "#stringnotfound#";
|
||||
|
||||
public override object ProvideValue(IServiceProvider serviceProvider)
|
||||
{
|
||||
if (string.IsNullOrEmpty(_key)) { return NotFound; }
|
||||
return StringResources.ResourceManager.GetString(_key) ?? NotFound + " " + _key;
|
||||
}
|
||||
}
|
||||
}
|
||||
218
DataPRO/Modules/SensorsList/SensorsList/SensorsList.csproj
Normal file
218
DataPRO/Modules/SensorsList/SensorsList/SensorsList.csproj
Normal file
@@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{45D282CA-92BD-4168-B79E-B84A196A90D5}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SensorsList</RootNamespace>
|
||||
<AssemblyName>SensorsList</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<RunCodeAnalysis>false</RunCodeAnalysis>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>CODE_ANALYSIS;DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="Microsoft.Xaml.Behaviors">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Microsoft.Xaml.Behaviors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="Prism">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Unity.Wpf">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.Unity.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Wpf">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Prism.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Unity.Abstractions">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Unity.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Container">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Unity.Container.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="Xceed.Wpf.Toolkit">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\Xceed.Wpf.Toolkit\Xceed.Wpf.Toolkit.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Model\AnalogSensor.cs" />
|
||||
<Compile Include="Model\CanIOSetting.cs" />
|
||||
<Compile Include="Model\DigitalInputSetting.cs" />
|
||||
<Compile Include="Model\StreamInputSetting.cs" />
|
||||
<Compile Include="Model\StreamOutputSetting.cs" />
|
||||
<Compile Include="Model\DigitalOutputSetting.cs" />
|
||||
<Compile Include="Model\Squib.cs" />
|
||||
<Compile Include="Model\UartIOSetting.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SensorsListModule.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\StringResources.Designer.cs">
|
||||
<DependentUpon>StringResources.resx</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Resources\TranslateExtension.cs" />
|
||||
<Compile Include="ViewModel\SensorsListEditGroupViewModel.cs" />
|
||||
<Compile Include="ViewModel\SensorTemplatesViewModel.cs" />
|
||||
<Compile Include="ViewModel\SensorsListViewModel.cs" />
|
||||
<Compile Include="View\SensorsListOverdueView.xaml.cs">
|
||||
<DependentUpon>SensorsListOverdueView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\SensorsListEditGroupView.xaml.cs">
|
||||
<DependentUpon>SensorsListEditGroupView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\SensorTemplatesImportView.xaml.cs">
|
||||
<DependentUpon>SensorTemplatesImportView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\SensorTemplatesExportView.xaml.cs">
|
||||
<DependentUpon>SensorTemplatesExportView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\SensorsListView.xaml.cs">
|
||||
<DependentUpon>SensorsListView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\StringResources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>StringResources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Core\DTS.Common.Core.csproj">
|
||||
<Project>{fab1f470-1574-4301-b56e-d3364aa93679}</Project>
|
||||
<Name>DTS.Common.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.DAS.Concepts\DTS.Common.DAS.Concepts.csproj">
|
||||
<Project>{03D8C736-36EB-4CD1-A6D9-130452B23239}</Project>
|
||||
<Name>DTS.Common.DAS.Concepts</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.DataModel\DTS.Common.DataModel.csproj">
|
||||
<Project>{2a2f03a9-bf85-4360-a06a-cf3016d2633b}</Project>
|
||||
<Name>DTS.Common.DataModel</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.ISO\DTS.Common.ISO.csproj">
|
||||
<Project>{4dccddd1-032f-430c-9a6f-231daca4fbd0}</Project>
|
||||
<Name>DTS.Common.ISO</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Storage\DTS.Common.Storage.csproj">
|
||||
<Project>{e0d1a7d0-dce8-403d-ba85-5a5d66ba1313}</Project>
|
||||
<Name>DTS.Common.Storage</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common.Utilities\DTS.Common.Utilities.csproj">
|
||||
<Project>{03eace47-ea59-44ac-b49d-956e4dc4d618}</Project>
|
||||
<Name>DTS.Common.Utilities</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common\DTS.Common.csproj">
|
||||
<Project>{114edc77-f3b5-4576-a91b-40818d503b55}</Project>
|
||||
<Name>DTS.Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\IService\IService.csproj">
|
||||
<Project>{c9c45b72-05a3-4962-bc13-a78b1f4b1925}</Project>
|
||||
<Name>IService</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\SensorDB\SensorDB.csproj">
|
||||
<Project>{444ef10c-046e-47ad-a9a5-17318d488723}</Project>
|
||||
<Name>SensorDB</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\Users\Users.csproj">
|
||||
<Project>{BE8D217D-6DA9-4BCA-B62A-A82325B33979}</Project>
|
||||
<Name>Users</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\SensorsListOverdueView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\SensorsListEditGroupView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\SensorTemplatesImportView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\SensorTemplatesExportView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\SensorsListView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
142
DataPRO/Modules/SensorsList/SensorsList/SensorsListModule.cs
Normal file
142
DataPRO/Modules/SensorsList/SensorsList/SensorsListModule.cs
Normal file
@@ -0,0 +1,142 @@
|
||||
using System;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DTS.Common;
|
||||
using DTS.Common.Interface;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
using Prism.Ioc;
|
||||
using Prism.Modularity;
|
||||
using SensorsList;
|
||||
using Unity;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable RedundantAttributeUsageProperty
|
||||
// ReSharper disable UnusedParameter.Local
|
||||
|
||||
[assembly: SensorsListModuleName]
|
||||
[assembly: SensorsListModuleImageAttribute]
|
||||
namespace SensorsList
|
||||
{
|
||||
[Export(typeof(IModule))]
|
||||
[Module(ModuleName = "SensorsListModule")]
|
||||
public class SensorsListModule : IModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Injected unity container
|
||||
/// </summary>
|
||||
private readonly IUnityContainer _unityContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SensorsListModule"/> class.
|
||||
/// </summary>
|
||||
/// <param name="unityContainer">Obtained reference of the unity container by using dependency injection.</param>
|
||||
public SensorsListModule(IUnityContainer unityContainer)
|
||||
{
|
||||
|
||||
_unityContainer = unityContainer;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// Register View & View-Model with Unity dependency injection container as a singleton.
|
||||
_unityContainer.RegisterType<ISensorsListView, SensorsListView>();
|
||||
_unityContainer.RegisterType<ISensorsListViewModel, SensorsListViewModel>();
|
||||
_unityContainer.RegisterType<ISensorsListEditGroupView, SensorsListEditGroupView>();
|
||||
_unityContainer.RegisterType<ISensorsListEditGroupViewModel, SensorsListEditGroupViewModel>();
|
||||
}
|
||||
|
||||
public void OnInitialized(IContainerProvider containerProvider)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attribute class contains assembly name
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
|
||||
public class SensorsListModuleNameAttribute : TextAttribute
|
||||
{
|
||||
public SensorsListModuleNameAttribute() : this(null) { }
|
||||
|
||||
public SensorsListModuleNameAttribute(string s)
|
||||
{
|
||||
AssemblyName = AssemblyNames.SensorsList.ToString();
|
||||
}
|
||||
|
||||
public override string AssemblyName { get; }
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(TextAttribute);
|
||||
}
|
||||
|
||||
public override string GetAssemblyName()
|
||||
{
|
||||
return AssemblyName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attribute class contains assembly image and name - used on the Main screen to SummaryModule available components
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
|
||||
public class SensorsListModuleImageAttribute : ImageAttribute
|
||||
{
|
||||
private BitmapImage _img;
|
||||
|
||||
public SensorsListModuleImageAttribute() : this(null) { }
|
||||
public override BitmapImage AssemblyImage
|
||||
{
|
||||
get { _img = AssemblyInfo.GetImage(AssemblyNames.SensorsList.ToString()); return _img; }
|
||||
}
|
||||
public SensorsListModuleImageAttribute(string s)
|
||||
{
|
||||
_img = AssemblyInfo.GetImage(AssemblyNames.SensorsList.ToString());
|
||||
}
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(ImageAttribute);
|
||||
}
|
||||
public override BitmapImage GetAssemblyImage()
|
||||
{
|
||||
return AssemblyImage;
|
||||
}
|
||||
private string _name;
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { _name = AssemblyNames.SensorsList.ToString(); return _name; }
|
||||
}
|
||||
|
||||
public override string GetAssemblyName()
|
||||
{
|
||||
return AssemblyName;
|
||||
}
|
||||
private string _group;
|
||||
public override string AssemblyGroup
|
||||
{
|
||||
get { _group = eAssemblyGroups.Prepare.ToString(); return _group; }
|
||||
}
|
||||
|
||||
public override string GetAssemblyGroup()
|
||||
{
|
||||
return AssemblyGroup;
|
||||
}
|
||||
|
||||
private eAssemblyRegion _region;
|
||||
public override eAssemblyRegion AssemblyRegion
|
||||
{
|
||||
get { _region = eAssemblyRegion.SensorsListRegion; return _region; }
|
||||
}
|
||||
public override eAssemblyRegion GetAssemblyRegion()
|
||||
{
|
||||
return AssemblyRegion;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<base:BaseView x:Class="SensorsList.SensorTemplatesExportView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:behaviors="clr-namespace:DTS.Common.Behaviors;assembly=DTS.Common"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:strings="clr-namespace:SensorsList"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Controls/combobox.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TTS_ListViewItemStyle}"/>
|
||||
</Style>
|
||||
<Style TargetType="TextBox" BasedOn="{StaticResource TTS_TextBoxStyle}"/>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource TTS_TextBlockStyle}"/>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||||
<Style TargetType="ComboBox" BasedOn="{StaticResource TTS_ComboBoxStyle}"/>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid Background="{DynamicResource Brush_ApplicationContentBackground}">
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,18 @@
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace SensorsList
|
||||
{
|
||||
/// <inheritdoc cref="ISensorTemplatesExportView" />
|
||||
/// <summary>
|
||||
/// Interaction logic for SensorTemplatesExportView.xaml
|
||||
/// </summary>
|
||||
public partial class SensorTemplatesExportView : ISensorTemplatesExportView
|
||||
{
|
||||
public SensorTemplatesExportView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<base:BaseView x:Class="SensorsList.SensorTemplatesImportView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:behaviors="clr-namespace:DTS.Common.Behaviors;assembly=DTS.Common"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:strings="clr-namespace:SensorsList"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Controls/combobox.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TTS_ListViewItemStyle}"/>
|
||||
</Style>
|
||||
<Style TargetType="TextBox" BasedOn="{StaticResource TTS_TextBoxStyle}"/>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource TTS_TextBlockStyle}"/>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||||
<Style TargetType="ComboBox" BasedOn="{StaticResource TTS_ComboBoxStyle}"/>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid Background="{DynamicResource Brush_ApplicationContentBackground}">
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,18 @@
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace SensorsList
|
||||
{
|
||||
/// <inheritdoc cref="ISensorTemplatesImportView" />
|
||||
/// <summary>
|
||||
/// Interaction logic for SensorTemplatesImportView.xaml
|
||||
/// </summary>
|
||||
public partial class SensorTemplatesImportView : ISensorTemplatesImportView
|
||||
{
|
||||
public SensorTemplatesImportView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,522 @@
|
||||
<base:BaseView x:Class="SensorsList.SensorsListEditGroupView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:strings="clr-namespace:SensorsList"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:my="clr-namespace:DTS.Common.Enums;assembly=DTS.Common">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Controls/combobox.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style TargetType="ToggleButton">
|
||||
<Setter Property="Width" Value="20"/>
|
||||
<Setter Property="MaxWidth" Value="20"/>
|
||||
</Style>
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TTS_ListViewItemStyle}"/>
|
||||
</Style>
|
||||
<Style TargetType="TextBox" BasedOn="{StaticResource TTS_TextBoxStyle}"/>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource TTS_TextBlockStyle}"/>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||||
<Style TargetType="ComboBox" BasedOn="{StaticResource TTS_ComboBoxStyle}"/>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
<BooleanToVisibilityConverter x:Key="BoolToVisibility" />
|
||||
<converters:BooleanOrToVisibilityMultiConverter x:Key="BooleanOrToVisibilityMultiConverter" />
|
||||
<converters:InverseBooleanToVisibilityConverter x:Key="InverseBoolToVisibility" />
|
||||
<converters:NumericStringFormatConverter x:Key="NumericStringFormatConverter" />
|
||||
<converters:DateConverter x:Key="DateConverter" />
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid Background="{DynamicResource Brush_ApplicationContentBackground}">
|
||||
<TabControl AutomationProperties.AutomationId="SensorsListTab" SelectedIndex="{Binding SelectedTabIndex, Mode=TwoWay}">
|
||||
<TabItem Header="{strings:Translate Analog}" AutomationProperties.AutomationId="AnalogTab">
|
||||
<ListView x:Name="lvAnalog" ItemsSource="{Binding AnalogSensors, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="SensorsListView" SelectedIndex="{Binding SelectedAnalogIndex, Mode=TwoWay}" AllowDrop="True" DragOver="AnalogDropOver" DragLeave="AnalogDragLeave" DragEnter="AnalogDragEnter" Drop="AnalogDrop" PreviewMouseLeftButtonDown="Analog_PreviewMouseLeftButtonDown" SelectionMode="Extended" GridViewColumnHeader.Click="GridViewColumnHeader_OnClick">
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListViewItem}" BasedOn="{StaticResource TTS_ListViewItemStyle}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=SensorCalibrationOrUsageStatus}" Value="{x:Static my:UIItemStatus.Error}">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_ApplicationStatus_Failed}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=SensorCalibrationOrUsageStatus}" Value="{x:Static my:UIItemStatus.Warning}">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_Amber}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=SensorCalibrationOrUsageStatus}" Value="{x:Static my:UIItemStatus.None}">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_Table_RowBackground}" />
|
||||
</DataTrigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_ApplicationSelectedBackground}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="SensorsListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Description" x:Name="DescriptionColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Description" HeaderTitle="{strings:TranslateExtension Description}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Description,FallbackValue='Comment'}" AutomationProperties.AutomationId="DescriptionLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="Assembly" x:Name="AssemblyColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Assembly" HeaderTitle="{strings:TranslateExtension Assembly}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding AssemblyName}" AutomationProperties.AutomationId="AssemblyLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="IEPE">
|
||||
<controls:GridViewColumnHeaderSearchableCheckBox Tag="IEPE" HeaderTitle="{strings:TranslateExtension IEPE}" ClickHandler="GridViewColumnHeaderCheckBox_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged"
|
||||
ListviewId="{Binding ListViewId}" Filter="CheckBox_Filter" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding IEPE, Mode=OneWay}" IsEnabled="False" AutomationProperties.AutomationId="IEPECheckBox"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Capacity">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Capacity" HeaderTitle="{strings:TranslateExtension SensorMaxRange}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock AutomationProperties.AutomationId="CapacityLbl">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Converter="{StaticResource NumericStringFormatConverter}" FallbackValue="'Capacity'">
|
||||
<Binding Path="Capacity" />
|
||||
<Binding Path="DataContext.CapacityFormat" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type ListView}}"/>
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Units" x:Name="Units">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Units" HeaderTitle="{strings:TranslateExtension Units}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Units,FallbackValue='Units'}" AutomationProperties.AutomationId="UnitsLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UsageCount" x:Name="UsageCountColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UsageCount" HeaderTitle="{strings:TranslateExtension UsageCount}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UsageCount}" AutomationProperties.AutomationId="UsageCountLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="MaximumUsage" x:Name="MaximumUsageColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="MaximumUsage" HeaderTitle="{strings:TranslateExtension MaximumUsage}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding MaximumUsage}" AutomationProperties.AutomationId="MaximumUsageLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue1">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue1" HeaderTitle="{strings:TranslateExtension UserValue1}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UserValue1}" AutomationProperties.AutomationId="UserValue1Lbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue2">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue2" HeaderTitle="{strings:TranslateExtension UserValue2}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UserValue2}" AutomationProperties.AutomationId="UserValue2Lbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue3">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue3" HeaderTitle="{strings:TranslateExtension UserValue3}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UserValue3}" AutomationProperties.AutomationId="UserValue3Lbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="FirstUseDate" x:Name="FirstUseColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="FirstUseDate" HeaderTitle="{strings:TranslateExtension FirstUseDate}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding FirstUseDate, StringFormat='d', Converter={StaticResource DateConverter}}" AutomationProperties.AutomationId="FirstUseDateLbl"
|
||||
/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SensorsListCalDueDate" x:Name="CalDateColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="CalDueDate" HeaderTitle="{strings:TranslateExtension CalDueDate}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding CalDueDate,FallbackValue='CalDueDate', StringFormat='d'}" AutomationProperties.AutomationId="SensorsListCalDueDateLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="OutOfDate">
|
||||
<controls:GridViewColumnHeaderSearchableCheckBox Tag="OutOfDate" HeaderTitle="{strings:TranslateExtension OutOfDate}" ClickHandler="GridViewColumnHeaderCheckBox_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}" Filter="CheckBox_Filter" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding OutOfDate, Mode=OneWay}" IsEnabled="False" AutomationProperties.AutomationId="OutOfDateCheckbox" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="InWarningPeriod" x:Name="InWarningPeriodColumn">
|
||||
<controls:GridViewColumnHeaderSearchableCheckBox Tag="InWarningPeriod" HeaderTitle="{strings:TranslateExtension InWarningPeriod}" ClickHandler="GridViewColumnHeaderCheckBox_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}" Filter="CheckBox_Filter" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding InWarningPeriod, Mode=OneWay}" IsEnabled="False" AutomationProperties.AutomationId="InWarningPeriodCheckBox"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="InspectBeforeUse" x:Name="InspectBeforeUseColumn">
|
||||
<controls:GridViewColumnHeaderSearchableCheckBox Tag="InspectBeforeUse" HeaderTitle="{strings:TranslateExtension InspectBeforeUse}" ClickHandler="GridViewColumnHeaderCheckBox_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}" Filter="CheckBox_Filter" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding InspectBeforeUse, Mode=OneWay}" IsEnabled="False" AutomationProperties.AutomationId="InspectBeforeUseCheckBox"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{strings:Translate Squibs}" AutomationProperties.AutomationId="SquibsTab">
|
||||
<ListView x:Name="lvSquibs" ItemsSource="{Binding Squibs, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="SquibsListView" SelectedIndex="{Binding SelectedSquibIndex, Mode=TwoWay}" AllowDrop="True" DragEnter="Squibs_DragEnter" DragLeave="SquibsDragLeave" DragOver="SquibsDragOver" Drop="SquibsDragDrop" PreviewMouseLeftButtonDown="Squibs_PreviewMouseLeftButtonDown" SelectionMode="Extended" GridViewColumnHeader.Click="GridViewColumnHeader_OnClick">
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="SquibGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="S_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Description">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Description" HeaderTitle="{strings:TranslateExtension Description}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Description,FallbackValue='Comment'}" AutomationProperties.AutomationId="S_DescriptionLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SQMode">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SQMode" HeaderTitle="{strings:TranslateExtension SQMode}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SQMode,FallbackValue='SQMode'}" AutomationProperties.AutomationId="S_ModeLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SQDelay">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SQDelay" HeaderTitle="{strings:TranslateExtension SQDelay}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SQDelay,FallbackValue='SQDelay'}" AutomationProperties.AutomationId="S_DelayLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SQDuration">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SQDuration" HeaderTitle="{strings:TranslateExtension SQDuration}" Search="GridViewColumnHeaderSearchableSquib_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SQDuration,FallbackValue='SQDuration'}" AutomationProperties.AutomationId="S_DurationLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{strings:Translate DigitalInputs}" AutomationProperties.AutomationId="DigitalInputsTab">
|
||||
<ListView x:Name="lvDigitalInputs" ItemsSource="{Binding DigitalInputSettings, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="DigitalInputsListView" SelectedIndex="{Binding SelectedDigitialInIndex, Mode=TwoWay}" AllowDrop="True" DragEnter="DigitalInDragEnter" DragLeave="DigitalInDragLeave" DragOver="DigitalInDragOver" Drop="DigitalInDragDrop" PreviewMouseLeftButtonDown="DigitalInput_PreviewMouseLeftButtonDown" SelectionMode="Extended" GridViewColumnHeader.Click="GridViewColumnHeader_OnClick">
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="DigitalInputsGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableDigitalIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="DI_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Description">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Description" HeaderTitle="{strings:TranslateExtension Description}" Search="GridViewColumnHeaderSearchableDigitalIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Description,FallbackValue='Comment'}" AutomationProperties.AutomationId="DI_DescriptionLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="DIMode">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DIMode" HeaderTitle="{strings:TranslateExtension DIMode}" Search="GridViewColumnHeaderSearchableDigitalIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding DIMode,FallbackValue='DIMode'}" AutomationProperties.AutomationId="DI_ModeLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{strings:Translate DigitalOutputs}" AutomationProperties.AutomationId="DigitalOutputsTab">
|
||||
<ListView x:Name="lvDigitalOutput" ItemsSource="{Binding DigitalOutputSettings, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="DigitalOutputsListView" SelectedIndex="{Binding SelectedDigitalOutIndex, Mode=TwoWay}" AllowDrop="True" DragEnter="DigitalOutDragEnter" DragLeave="DigitalOutDragLeave" DragOver="DigitalOutDragOver" Drop="DigitalOutDragDrop" PreviewMouseLeftButtonDown="DigitalOutput_PreviewMouseLeftButtonDown" SelectionMode="Extended" GridViewColumnHeader.Click="GridViewColumnHeader_OnClick">
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="DigitalOutputsListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableDigitalOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="DO_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="DODelay">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DODelay" HeaderTitle="{strings:TranslateExtension DODelay}" Search="GridViewColumnHeaderSearchableDigitalOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding DODelay,FallbackValue='DODelay'}" AutomationProperties.AutomationId="DO_DelayLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="DODuration">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DODuration" HeaderTitle="{strings:TranslateExtension DODuration}" Search="GridViewColumnHeaderSearchableDigitalOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" OpenChanged="GridViewColumnHeader_OpenChanged" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding DODuration,FallbackValue='DODuration'}" AutomationProperties.AutomationId="DO_DurationLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{strings:Translate Uarts}" AutomationProperties.AutomationId="UartsTab">
|
||||
<ListView x:Name="lvUart" ItemsSource="{Binding UartSettings, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="UartsListView" SelectedIndex="{Binding SelectedUartSettingsIndex, Mode=TwoWay}" AllowDrop="True" DragEnter="UartSettingsDragEnter" DragLeave="UartSettingsDragLeave" DragOver="UartSettingsDragOver" Drop="UartSettingsDragDrop" PreviewMouseLeftButtonDown="Uart_PreviewMouseLeftButtonDown" SelectionMode="Extended" GridViewColumnHeader.Click="GridViewColumnHeader_OnClick">
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="UartsListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="Uart_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartBaudRate">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="BaudRate" HeaderTitle="{strings:TranslateExtension UartBaudRate}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding BaudRate,FallbackValue='BaudRate'}" AutomationProperties.AutomationId="BaudRateLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartDataBits">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DataBits" HeaderTitle="{strings:TranslateExtension UartDataBits}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding DataBits,FallbackValue='DataBits'}" AutomationProperties.AutomationId="DataBitsLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartStopBits">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StopBits" HeaderTitle="{strings:TranslateExtension UartStopBits}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding StopBits,FallbackValue='StopBits'}" AutomationProperties.AutomationId="StopBitsLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartParity">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Parity" HeaderTitle="{strings:TranslateExtension UartParity}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Parity,FallbackValue='Parity'}" AutomationProperties.AutomationId="ParityLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartDataFormat">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DataFormat" HeaderTitle="{strings:TranslateExtension UartDataFormat}" Search="GridViewColumnHeaderSearchableUart_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding DataFormat,FallbackValue='DataFormat'}" AutomationProperties.AutomationId="DataFormatLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{strings:Translate StreamInputs}" AutomationProperties.AutomationId="StreamInputsTab">
|
||||
<ListView x:Name="lvStreamIn" ItemsSource="{Binding StreamInputSettings, UpdateSourceTrigger=PropertyChanged}"
|
||||
AllowDrop="True" DragEnter="StreamInDragEnter" DragLeave="StreamInDragLeave" DragOver="StreamInDragOver" Drop="StreamInDragDrop" PreviewMouseLeftButtonDown="StreamIn_PreviewMouseLeftButtonDown" SelectionMode="Extended"
|
||||
AutomationProperties.AutomationId="StreamInputsListView"
|
||||
SelectedIndex="{Binding SelectedStreamInIndex, Mode=TwoWay}"
|
||||
GridViewColumnHeader.Click="GridViewColumnHeader_OnClick">
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="StreamInputsListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableStreamIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="SO_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPAddress">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPAddress" HeaderTitle="{strings:TranslateExtension UDPAddress}" Search="GridViewColumnHeaderSearchableStreamIn_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UDPAddress,FallbackValue='UDPAddress'}" AutomationProperties.AutomationId="UDPAddressLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
<TabItem Header="{strings:Translate StreamOutputs}" AutomationProperties.AutomationId="StreamOutputsTab">
|
||||
<ListView x:Name="lvStreamOut" ItemsSource="{Binding StreamOutputSettings, UpdateSourceTrigger=PropertyChanged}"
|
||||
AllowDrop="True" DragEnter="StreamOutDragEnter" DragLeave="StreamOutDragLeave" DragOver="StreamOutDragOver" Drop="StreamOutDragDrop" PreviewMouseLeftButtonDown="StreamOut_PreviewMouseLeftButtonDown" SelectionMode="Extended"
|
||||
AutomationProperties.AutomationId="StreamOutputsListView"
|
||||
SelectedIndex="{Binding SelectedStreamOutIndex, Mode=TwoWay}"
|
||||
GridViewColumnHeader.Click="GridViewColumnHeader_OnClick">
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="StreamOutputsListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SerialNumber" HeaderTitle="{strings:TranslateExtension SerialNumber}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" AutomationProperties.AutomationId="SO_SerialNumberLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPProfile">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPProfile" HeaderTitle="{strings:TranslateExtension UDPProfile}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UDPProfile,FallbackValue='UDPProfile'}" AutomationProperties.AutomationId="UDPProfileLbl"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPAddress">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPAddress" HeaderTitle="{strings:TranslateExtension UDPAddress}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding UDPAddress,FallbackValue='UDPAddress'}" AutomationProperties.AutomationId="UDPAddressLbl" Visibility="{Binding IsUART, Converter={StaticResource InverseBoolToVisibility}}" />
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsUART, Converter={StaticResource BoolToVisibility}}" />
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPTimeChannelId">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPTimeChannelId" HeaderTitle="{strings:TranslateExtension TimeChannelId}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding UDPTimeChannelId,FallbackValue='UDPTimeChannelId'}" AutomationProperties.AutomationId="UDPTimeChannelIdLbl"
|
||||
Visibility="{Binding IsCH10, Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsCH10, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPDataChannelId">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPDataChannelId" HeaderTitle="{strings:TranslateExtension DataChannelId}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding UDPDataChannelId,FallbackValue='UDPDataChannelId'}" AutomationProperties.AutomationId="UDPDataChannelIdLbl">
|
||||
<TextBlock.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}">
|
||||
<Binding Path="IsCH10" />
|
||||
<Binding Path="IsUART" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Visibility>
|
||||
</TextBlock>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}">
|
||||
<TextBlock.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}" ConverterParameter="False">
|
||||
<Binding Path="IsCH10" />
|
||||
<Binding Path="IsUART" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Visibility>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UDPTmNSConfig">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UDPTmNSConfig" HeaderTitle="{strings:TranslateExtension TmNSConfig}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding UDPTmNSConfig,FallbackValue='UDPTmNSConfig'}" AutomationProperties.AutomationId="UDPTmNSConfigLbl"
|
||||
Visibility="{Binding IsTMNS,Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="IRIGTimeDataPacketIntervalMs">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="IRIGTimeDataPacketIntervalMs" HeaderTitle="{strings:TranslateExtension IRIGTimeDataPacketIntervalMs}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding IRIGTimeDataPacketIntervalMs,FallbackValue='IRIGTimeDataPacketIntervalMs'}" AutomationProperties.AutomationId="IRIGTimeDataPacketIntervalMsLbl"
|
||||
Visibility="{Binding IsCH10, Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsCH10, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="TMATSIntervalMs">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="TMATSIntervalMs" HeaderTitle="{strings:TranslateExtension TMATSIntervalMs}" Search="GridViewColumnHeaderSearchableStreamOut_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding TMATSIntervalMs, FallbackValue='1000'}" AutomationProperties.AutomationId="TMATSIntervalMsLbl"
|
||||
Visibility="{Binding IsCH10, Converter={StaticResource BoolToVisibility}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsCH10, Converter={StaticResource InverseBoolToVisibility}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,650 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using DTS.Common.Controls;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
using DTS.Common.Utilities.Logging;
|
||||
using DTS.Common.Utils;
|
||||
using Prism.Ioc;
|
||||
using Prism.Events;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace SensorsList
|
||||
{
|
||||
/// <inheritdoc cref="ISensorsListEditGroupView" />
|
||||
/// <summary>
|
||||
/// Interaction logic for SensorsListView.xaml
|
||||
/// </summary>
|
||||
public partial class SensorsListEditGroupView : ISensorsListEditGroupView
|
||||
{
|
||||
public SensorsListEditGroupView()
|
||||
{
|
||||
InitializeComponent();
|
||||
var eventAggregator =ContainerLocator.Container.Resolve<IEventAggregator>();
|
||||
eventAggregator.GetEvent<ListViewStatusEvent>().Subscribe(OnListViewEvent);
|
||||
}
|
||||
|
||||
private void OnListViewEvent(ListViewStatusArg arg)
|
||||
{
|
||||
if (arg.Status != ListViewStatusArg.ListViewStatus.ScrollToBottom)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(DataContext is SensorsListEditGroupViewModel model))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (model.ListViewId != arg.Id) { return; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// handles removing/adding columns prior to displaying view
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
public void HandleColumns()
|
||||
{
|
||||
|
||||
//remove the first use column if we aren't using first use date functionality
|
||||
if (SensorConstants.UseSensorFirstUseDate)
|
||||
{
|
||||
|
||||
AddFirstUseColumn();
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveFirstUseColumn();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// removes first use column from view if present
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
private void RemoveFirstUseColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (view.Columns.Contains(FirstUseColumn))
|
||||
{
|
||||
view.Columns.Remove(FirstUseColumn);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// adds first use column if not present
|
||||
/// 13065 Sensor "First Use" Date
|
||||
/// </summary>
|
||||
private void AddFirstUseColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (!view.Columns.Contains(FirstUseColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(CalDateColumn);
|
||||
view.Columns.Insert(index + 1, FirstUseColumn);
|
||||
}
|
||||
}
|
||||
public void HandleAssemblyVisibilityColumns(bool bDontAllowDataCollectionIfOverused)
|
||||
{
|
||||
if (bDontAllowDataCollectionIfOverused)
|
||||
{
|
||||
AddAssemblyColumn();
|
||||
AddUsageCountColumn();
|
||||
AddMaximumUsageColumn();
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveAssemblyColumn();
|
||||
RemoveUsageCountColumn();
|
||||
RemoveMaximumUsageColumn();
|
||||
}
|
||||
}
|
||||
public void HandleInspectBeforeUseVisibilityColumn(bool show)
|
||||
{
|
||||
if (show)
|
||||
{
|
||||
AddInspectBeforeUseColumn();
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveInspectBeforeUseColumn();
|
||||
}
|
||||
}
|
||||
private void AddInspectBeforeUseColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (!view.Columns.Contains(InspectBeforeUseColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(InWarningPeriodColumn);
|
||||
view.Columns.Insert(index + 1, InspectBeforeUseColumn);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// adds Assembly column if not present
|
||||
/// </summary>
|
||||
private void AddAssemblyColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (!view.Columns.Contains(AssemblyColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(DescriptionColumn);
|
||||
view.Columns.Insert(index + 1, AssemblyColumn);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// adds Usage Count column if not present
|
||||
/// </summary>
|
||||
private void AddUsageCountColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (!view.Columns.Contains(UsageCountColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(Units);
|
||||
view.Columns.Insert(index + 1, UsageCountColumn);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// adds Maximum Usages column if not present
|
||||
/// </summary>
|
||||
private void AddMaximumUsageColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (!view.Columns.Contains(MaximumUsageColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(UsageCountColumn);
|
||||
view.Columns.Insert(index + 1, MaximumUsageColumn);
|
||||
}
|
||||
}
|
||||
private void RemoveInspectBeforeUseColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (view.Columns.Contains(InspectBeforeUseColumn))
|
||||
{
|
||||
view.Columns.Remove(InspectBeforeUseColumn);
|
||||
}
|
||||
}
|
||||
private void RemoveAssemblyColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (view.Columns.Contains(AssemblyColumn))
|
||||
{
|
||||
view.Columns.Remove(AssemblyColumn);
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveUsageCountColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (view.Columns.Contains(UsageCountColumn))
|
||||
{
|
||||
view.Columns.Remove(UsageCountColumn);
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveMaximumUsageColumn()
|
||||
{
|
||||
if (!(lvAnalog.View is GridView view)) { return; }
|
||||
|
||||
if (view.Columns.Contains(MaximumUsageColumn))
|
||||
{
|
||||
view.Columns.Remove(MaximumUsageColumn);
|
||||
}
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderSearchable_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
viewModel.Filter(columnTag, searchTerm);
|
||||
}
|
||||
private void GridViewColumnHeaderSearchableSquib_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
viewModel.FilterSquib(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderSearchableDigitalIn_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
viewModel.FilterDigitalIn(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderSearchableDigitalOut_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
viewModel.FilterDigitalOut(columnTag, searchTerm);
|
||||
}
|
||||
private void GridViewColumnHeaderSearchableUart_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
viewModel.FilterUartIO(columnTag, searchTerm);
|
||||
}
|
||||
private void GridViewColumnHeaderSearchableStreamOut_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
viewModel.FilterStreamOut(columnTag, searchTerm);
|
||||
}
|
||||
private void GridViewColumnHeaderSearchableStreamIn_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
viewModel.FilterStreamIn(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
private void GridViewColumnHeader_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
object columnTag = null;
|
||||
if (sender is GridViewColumnHeaderSearchable headerSearchable)
|
||||
{
|
||||
columnTag = headerSearchable.Tag;
|
||||
}
|
||||
else if (sender is GridViewColumnHeaderSearchableCheckBox)
|
||||
{
|
||||
//We want this handled by GridViewColumnHeaderCheckBox_OnClick
|
||||
//only so that the Sort isn't done twice.
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
var o = Utils.FindChild<GridViewColumnHeaderSearchable>((DependencyObject)e.OriginalSource, null);
|
||||
if (null == o)
|
||||
{
|
||||
//We want header clicks on GridViewColumnHeaderSearchableCheckBox items
|
||||
//handled by GridViewColumnHeaderCheckBox_OnClick only so that the Sort isn't done twice.
|
||||
return;
|
||||
}
|
||||
columnTag = o.Tag;
|
||||
}
|
||||
|
||||
if (null == columnTag)
|
||||
{
|
||||
return;
|
||||
}
|
||||
viewModel?.Sort(columnTag, true);
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderCheckBox_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchableCheckBox)?.Tag ?? Utils.FindChild<GridViewColumnHeaderSearchableCheckBox>((DependencyObject)e.OriginalSource, null)?.Tag;
|
||||
viewModel?.Sort(columnTag, true);
|
||||
}
|
||||
|
||||
private bool _bPopupOpen = false;
|
||||
private void GridViewColumnHeader_OpenChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var header = (sender as GridViewColumnHeaderSearchable);
|
||||
if (null != header)
|
||||
{
|
||||
_bPopupOpen = header.ToggleButtonIsChecked;
|
||||
}
|
||||
else
|
||||
{
|
||||
var checkBoxHeader = (sender as GridViewColumnHeaderSearchableCheckBox);
|
||||
if (checkBoxHeader != null)
|
||||
{
|
||||
_bPopupOpen = checkBoxHeader.ToggleButtonIsChecked;
|
||||
}
|
||||
}
|
||||
}
|
||||
private void AnalogDropOver(object sender, DragEventArgs e)
|
||||
{
|
||||
DragOverHandler(e);
|
||||
}
|
||||
|
||||
private void AnalogDragLeave(object sender, DragEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void AnalogDragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
DragEnterHandler(e);
|
||||
}
|
||||
|
||||
private static void DragEnterHandler(DragEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (null != e.Data)
|
||||
{
|
||||
var formats = e.Data.GetFormats();
|
||||
foreach (var format in formats)
|
||||
{
|
||||
var decoratedFormat = format;
|
||||
if (((int)e.KeyStates & (int)DragDropKeyStates.ControlKey) == (int)DragDropKeyStates.ControlKey)
|
||||
{
|
||||
decoratedFormat = "CTRL_" + format;
|
||||
}
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { APILogger.Log("GenericTable2::GenericTable2_DragOver", ex); }
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
}
|
||||
private void AnalogDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void Squibs_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
DragEnterHandler(e);
|
||||
}
|
||||
|
||||
private void SquibsDragLeave(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void SquibsDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
DragOverHandler(e);
|
||||
}
|
||||
|
||||
private void SquibsDragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void UartSettingsDragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
DragEnterHandler(e);
|
||||
}
|
||||
|
||||
private void UartSettingsDragLeave(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void UartSettingsDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
DragOverHandler(e);
|
||||
}
|
||||
|
||||
private void UartSettingsDragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void DigitalInDragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
DragEnterHandler(e);
|
||||
}
|
||||
|
||||
private void DigitalInDragLeave(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void DigitalInDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
DragOverHandler(e);
|
||||
}
|
||||
|
||||
private void DigitalInDragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void DigitalOutDragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
DragEnterHandler(e);
|
||||
}
|
||||
|
||||
private void DigitalOutDragLeave(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void DigitalOutDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
DragOverHandler(e);
|
||||
}
|
||||
|
||||
private void StreamOutDragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
DragEnterHandler(e);
|
||||
}
|
||||
|
||||
private void StreamOutDragLeave(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void StreamOutDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
DragOverHandler(e);
|
||||
}
|
||||
private void StreamOutDragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void StreamInDragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
DragEnterHandler(e);
|
||||
}
|
||||
|
||||
private void StreamInDragLeave(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void StreamInDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
DragOverHandler(e);
|
||||
}
|
||||
private void StreamInDragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
private static void DragOverHandler(DragEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (null != e.Data)
|
||||
{
|
||||
var formats = e.Data.GetFormats();
|
||||
foreach (var format in formats)
|
||||
{
|
||||
var decoratedFormat = format;
|
||||
if (((int)e.KeyStates & (int)DragDropKeyStates.ControlKey) == (int)DragDropKeyStates.ControlKey)
|
||||
{
|
||||
decoratedFormat = "CTRL_" + format;
|
||||
}
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { APILogger.Log("DragOver", ex); }
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
}
|
||||
private void DigitalOutDragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
// delegate for GetPosition function of DragEventArgs and
|
||||
// MouseButtonEventArgs event argument objects. This delegate is used to reuse the code
|
||||
// for processing both types of events.
|
||||
private delegate Point GetPositionDelegate(IInputElement element);
|
||||
|
||||
private static int GetIndex(GetPositionDelegate getPosition, ListView lv)
|
||||
{
|
||||
for (var i = 0; i < lv.Items.Count; i++)
|
||||
{
|
||||
var item = GetListViewItem(lv, i);
|
||||
if (null == item) { continue; }
|
||||
if (IsMouseOverTarget(item, getPosition))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
private static ListViewItem GetListViewItem(ListView lv, int index)
|
||||
{
|
||||
if (lv.ItemContainerGenerator.Status !=
|
||||
System.Windows.Controls.Primitives.GeneratorStatus.ContainersGenerated)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return (ListViewItem)lv.ItemContainerGenerator.ContainerFromIndex(index);
|
||||
}
|
||||
private static bool IsMouseOverTarget(UIElement target, GetPositionDelegate getPosition)
|
||||
{
|
||||
if (null == target) { return false; }
|
||||
var bounds = VisualTreeHelper.GetDescendantBounds(target);
|
||||
var mousePos = getPosition(target);
|
||||
return bounds.Contains(mousePos);
|
||||
}
|
||||
private void Analog_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
MouseDownHandler(lvAnalog, e);
|
||||
}
|
||||
|
||||
private bool MouseDownHandler(ListView lv, MouseButtonEventArgs e)
|
||||
{
|
||||
if (_bPopupOpen) { return false; }
|
||||
try
|
||||
{
|
||||
if (null == lv || null == e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var index = GetIndex(e.GetPosition, lv);
|
||||
|
||||
//don't initiate drag and drop if we are not _on_ an item
|
||||
if (index < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//don't initiate drag and drop if no items are selected, select them first
|
||||
if (lv.SelectedItems.Count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (lv.Items.Count <= index)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
//also don't initiage drag and drop if we aren't on a selected item
|
||||
var item = lv.Items[index];
|
||||
if (item == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!lv.SelectedItems.Contains(item))
|
||||
{
|
||||
if (Keyboard.Modifiers != ModifierKeys.Control && Keyboard.Modifiers != ModifierKeys.Shift)
|
||||
{
|
||||
var objects = lv.SelectedItems.Cast<object>().ToList();
|
||||
foreach (var previouslySelectedItem in objects)
|
||||
{
|
||||
GetListViewItem(lv, lv.Items.IndexOf(previouslySelectedItem)).IsSelected = false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
var items = new List<IDragAndDropItem>();
|
||||
items.AddRange(lv.SelectedItems.Cast<IDragAndDropItem>());
|
||||
|
||||
items.Sort((a, b) => lv.Items.IndexOf(a).CompareTo(lv.Items.IndexOf(b)));
|
||||
|
||||
var payload =
|
||||
new DTS.Common.Classes.Sensors.SensorsList.DragAndDropPayload(items.ToArray());
|
||||
|
||||
DragDrop.DoDragDrop(lv, payload, DragDropEffects.Copy);
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
APILogger.Log(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
private void Squibs_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
MouseDownHandler(lvSquibs, e);
|
||||
}
|
||||
|
||||
private void DigitalInput_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
MouseDownHandler(lvDigitalInputs, e);
|
||||
}
|
||||
|
||||
private void DigitalOutput_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
MouseDownHandler(lvDigitalOutput, e);
|
||||
}
|
||||
private void Uart_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
MouseDownHandler(lvUart, e);
|
||||
}
|
||||
private void StreamOut_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
MouseDownHandler(lvStreamOut, e);
|
||||
}
|
||||
private void StreamIn_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
MouseDownHandler(lvStreamIn, e);
|
||||
}
|
||||
|
||||
private void CheckBox_Filter(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
if (searchTerm == "All") { searchTerm = null; }
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchableCheckBox)?.Tag;
|
||||
var viewModel = (ISensorsListEditGroupViewModel)DataContext;
|
||||
viewModel.Filter(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
private void StreamOutSettingsDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void StreamInSettingsDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
<base:BaseView x:Class="SensorsList.SensorsListOverdueView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:strings="clr-namespace:SensorsList"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1366"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Controls/combobox.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TTS_ListViewItemStyleNoSelection}"/>
|
||||
</Style>
|
||||
<Style TargetType="TextBox" BasedOn="{StaticResource TTS_TextBoxStyle}"/>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource TTS_TextBlockStyle}"/>
|
||||
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
|
||||
<Style TargetType="ComboBox" BasedOn="{StaticResource TTS_ComboBoxStyle}"/>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
<BooleanToVisibilityConverter x:Key="BoolToVisibility" />
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
|
||||
<Grid Background="{DynamicResource Brush_ApplicationContentBackground}">
|
||||
|
||||
<ListView ItemsSource="{Binding OverdueSensors, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="SensorsListView"
|
||||
VirtualizingPanel.IsVirtualizing="True">
|
||||
<ListView.View>
|
||||
<GridView AutomationProperties.AutomationId="SensorsListOverdueGridView" VirtualizingPanel.IsVirtualizing="True">
|
||||
<GridViewColumn AutomationProperties.AutomationId="SerialNumber">
|
||||
<GridViewColumn.Header>
|
||||
<GridViewColumnHeader Tag="SerialNumber" Content="{strings:TranslateExtension SerialNumber}" Click="ListViewHeader_Click" />
|
||||
</GridViewColumn.Header>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding SerialNumber,FallbackValue='SerialNumber'}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Description">
|
||||
<GridViewColumn.Header>
|
||||
<GridViewColumnHeader Tag="Description" Content="{strings:TranslateExtension Description}" Click="ListViewHeader_Click" />
|
||||
</GridViewColumn.Header>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Description,FallbackValue='Comment'}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Manufacturer">
|
||||
<GridViewColumn.Header>
|
||||
<GridViewColumnHeader Tag="Manufacturer" Content="{strings:TranslateExtension Manufacturer}" Click="ListViewHeader_Click" />
|
||||
</GridViewColumn.Header>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Manufacturer,FallbackValue='Maker'}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="Model">
|
||||
<GridViewColumn.Header>
|
||||
<GridViewColumnHeader Tag="Model" Content="{strings:TranslateExtension Model}" Click="ListViewHeader_Click" />
|
||||
</GridViewColumn.Header>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Model,FallbackValue='Model'}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CalDate">
|
||||
<GridViewColumn.Header>
|
||||
<GridViewColumnHeader Tag="CalDate" Content="{strings:TranslateExtension CalDate}" Click="ListViewHeader_Click" />
|
||||
</GridViewColumn.Header>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding CalDate,FallbackValue='CalDate', StringFormat='d'}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CalDueDate">
|
||||
<GridViewColumn.Header>
|
||||
<GridViewColumnHeader Tag="CalDueDate" Content="{strings:TranslateExtension CalDueDate}" Click="ListViewHeader_Click" />
|
||||
</GridViewColumn.Header>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding CalDueDate,FallbackValue='CalDueDate', StringFormat='d'}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using DTS.Common.Controls;
|
||||
using DTS.Common.Interface.Sensors.SensorsList;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace SensorsList
|
||||
{
|
||||
/// <inheritdoc cref="ISensorsListOverdueView" />
|
||||
/// <summary>
|
||||
/// Interaction logic for SensorsListView.xaml
|
||||
/// </summary>
|
||||
public partial class SensorsListOverdueView : ISensorsListOverdueView
|
||||
{
|
||||
public SensorsListOverdueView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private void ListViewHeader_Click(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
var colHeader = (GridViewColumnHeader)e.OriginalSource;
|
||||
var viewModel = (ISensorsListViewModel)colHeader.DataContext;
|
||||
viewModel.SortOverdue(colHeader.Tag, true);
|
||||
}
|
||||
private void GridViewColumnHeaderSearchable_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
|
||||
// Do search
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user