init
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface
|
||||
{
|
||||
public interface ICursorViewModel : IBaseViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the Tab View.
|
||||
/// </summary>
|
||||
ICursorView View { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<UserControl x:Class="DTS.Common.Controls.GridViewColumnHeaderSearchableCheckBox"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:DTS.Common.Controls"
|
||||
xmlns:strings="clr-namespace:DTS.Common.Strings"
|
||||
mc:Ignorable="d"
|
||||
x:Name="dtsGridViewColumnHeader"
|
||||
d:DesignHeight="20" d:DesignWidth="200">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<Geometry x:Key="DownArrowIconGeometry">F0 M 0,0L 10,0L 5,7L 0,0 Z</Geometry>
|
||||
<local:BoolToInvertedBoolConverter x:Key="BoolToInvertedBoolConverter"/>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource PageContentButtonDark}" />
|
||||
</ResourceDictionary>
|
||||
|
||||
</UserControl.Resources>
|
||||
<Grid DataContext="{Binding ElementName=dtsGridViewColumnHeader}" x:Name="mainGrid" Height="20" MaxHeight="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderThickness="0" Grid.Column="0" PreviewMouseLeftButtonDown="PreviewLeftButtonUp">
|
||||
<TextBlock Text="{Binding Path=HeaderTitle, FallbackValue='I Should Not Be Here'}" HorizontalAlignment="Left" Margin="5,0,5,0" />
|
||||
</Border>
|
||||
<!--<Button Grid.Column="0" Content="{Binding Path=HeaderTitle, FallbackValue='I should not be here'}" HorizontalAlignment="Left" Margin="5,0,5,0" Click="ButtonClick" /> -->
|
||||
<ToggleButton Grid.Column="1" x:Name="TogglePopupButton" Width="20" Height="20" MaxWidth="20" MaxHeight="20" IsEnabled="{Binding ElementName=ToggledPopup, Path=IsOpen, Converter={StaticResource BoolToInvertedBoolConverter}}"
|
||||
IsChecked="{Binding ToggleButtonIsChecked, Mode=TwoWay, FallbackValue=True}">
|
||||
<Path x:Name="BtnArrow" VerticalAlignment="Center" HorizontalAlignment="Center" Width="8" Fill="#FF527DB5" Stretch="Uniform"
|
||||
Data="{Binding ToggleIconGeometry, FallbackValue={StaticResource DownArrowIconGeometry}}"/>
|
||||
</ToggleButton>
|
||||
<Popup Grid.Column="0" Grid.ColumnSpan="2" x:Name="ToggledPopup" HorizontalAlignment="Stretch" Placement="Bottom" VerticalAlignment="Stretch" StaysOpen="False" IsOpen="{Binding ToggleButtonIsChecked, Mode=TwoWay}" >
|
||||
<Border Background="#FFEEEEEE" BorderBrush="#FF888888" BorderThickness="1">
|
||||
<StackPanel Orientation="Vertical" VerticalAlignment="Stretch">
|
||||
<Button Padding="10 5" Content="{x:Static strings:Strings.SelectAllParen}" Click="SelectAllButton_OnClick" />
|
||||
<Button Padding="10, 5" Content="{x:Static strings:Strings.True}" Click="TrueButton_OnClick" />
|
||||
<Button Padding="10, 5" Content="{x:Static strings:Strings.False}" Click="FalseButton_OnClick" />
|
||||
</StackPanel>
|
||||
<!--<<Grid HorizontalAlignment="Stretch" Margin="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
Button Grid.Column="0" Padding="10 5" Content="{x:Static strings:Strings.SelectAll}" Click="SelectAllButton_OnClick" />
|
||||
<Button Grid.Column="1" Padding="10 5" Content="{x:Static strings:Strings.ClearAll}" Click="ClearAllButton_OnClick"/>
|
||||
|
||||
</Grid>-->
|
||||
</Border>
|
||||
</Popup>
|
||||
</Grid>
|
||||
<!--</GridViewColumnHeader>-->
|
||||
</UserControl>
|
||||
@@ -0,0 +1,309 @@
|
||||
using DTS.Common.Enums.DASFactory;
|
||||
using System;
|
||||
using System.Xml;
|
||||
using System.Xml.Schema;
|
||||
using DTS.Common.Enums;
|
||||
|
||||
namespace DTS.Common.Interface.DASFactory.Config
|
||||
{
|
||||
public interface IDASModule
|
||||
{
|
||||
/// <summary>
|
||||
/// An array of <see cref="DASChannel" /> objects representing the channels attatched to this
|
||||
/// module, indexable by ModuleChannelNumber of the Channel.
|
||||
/// </summary>
|
||||
IDASChannel[] Channels { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// EID's for the module corresponding to the sensors on each of the channels.
|
||||
/// </summary>
|
||||
IEID[] IDs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Index of this Module in any array of Modules. The first module in a DAS unit will have a
|
||||
/// ModuleArrayIndex of 0.
|
||||
/// </summary>
|
||||
int ModuleArrayIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For use only with Circular-Buffer mode.
|
||||
/// See <see cref="DASModule.RecordingMode" />.
|
||||
/// The number of requested seconds for this Module to sample data before a 'Trigger' event; the number of
|
||||
/// seconds to sample BEFORE time-zero.
|
||||
/// </summary>
|
||||
double RequestedPreTriggerSeconds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For use with all recording modes.
|
||||
/// See <see cref="DASModule.RecordingMode" />.
|
||||
/// The number of requested seconds to sample data from sensors after time-zero, that is after
|
||||
/// a trigger or start event.
|
||||
/// </summary>
|
||||
double RequestedPostTriggerSeconds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For use only with Circular-Buffer mode.
|
||||
/// See <see cref="DASModule.RecordingMode" />.
|
||||
/// The number of seconds for this Module to sample data before a 'Trigger' event; the number of
|
||||
/// seconds to sampel BEFORE time-zero.
|
||||
/// </summary>
|
||||
double PreTriggerSeconds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For use with all recording modes.
|
||||
/// See <see cref="DASModule.RecordingMode" />.
|
||||
/// The number of seconds to sample data from sensors after time-zero, that is after
|
||||
/// a trigger or start event.
|
||||
/// </summary>
|
||||
double PostTriggerSeconds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of events to collect before disarming.
|
||||
/// </summary>
|
||||
int NumberOfEvents { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of seconds of inactivity before going to sleep.
|
||||
/// </summary>
|
||||
int WakeUpMotionTimeout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The version of the firmware on a module.
|
||||
/// </summary>
|
||||
string FirmwareVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A string that describes the module, for example, to know if it was created for the
|
||||
/// purposes of adding it to the .dts file during download of Slice6 Distributor attributes.
|
||||
/// </summary>
|
||||
string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The maximum storage space for a module.
|
||||
/// </summary>
|
||||
ulong? MaxEventStorageSpaceInBytes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This is set after a recording session and is the total number of samples this Module
|
||||
/// captured during the last data acquisition run.
|
||||
/// </summary>
|
||||
ulong NumberOfSamples { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// An array of sample numbers where a trigger was activated.
|
||||
/// </summary>
|
||||
ulong[] TriggerSampleNumbers { get; set; }
|
||||
|
||||
int GetLevelTriggerT0AdjustmentSamplesAutoApplied();
|
||||
|
||||
/// <summary>
|
||||
/// The sample number where recording started.
|
||||
/// </summary>
|
||||
ulong StartRecordSampleNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
uint StartRecordTimestampSec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
uint TriggerTimestampSec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
uint StartRecordTimestampNanoSec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
uint TriggerTimestampNanoSec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
bool PTPMasterSync { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
double TiltSensorAxisXDegreesPre { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
double TiltSensorAxisYDegreesPre { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
double TiltSensorAxisZDegreesPre { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
double TiltSensorAxisXDegreesPost { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
double TiltSensorAxisYDegreesPost { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
double TiltSensorAxisZDegreesPost { get; set; }
|
||||
float TemperatureLocation1Pre { get; set; }
|
||||
float TemperatureLocation2Pre { get; set; }
|
||||
float TemperatureLocation3Pre { get; set; }
|
||||
float TemperatureLocation4Pre { get; set; }
|
||||
float TemperatureLocation1Post { get; set; }
|
||||
float TemperatureLocation2Post { get; set; }
|
||||
float TemperatureLocation3Post { get; set; }
|
||||
float TemperatureLocation4Post { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The sample rate in Hz at which the Module will sample sensor data.
|
||||
/// </summary>
|
||||
uint SampleRateHz { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// FB 25558 Actual sample rate currently is used in realtime for TSR AIR type only in future it might be used for other hardware types
|
||||
/// </summary>
|
||||
uint ActualSampleRateHz { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Hardware anti-alias filter rate.
|
||||
/// </summary>
|
||||
float AAFilterRateHz { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// What type of recording mode is this Module in?
|
||||
/// See <see cref="Test.Module.RecordingMode.RecorderMode" />.
|
||||
/// </summary>
|
||||
DFConstantsAndEnums.RecordingMode RecordingMode { get; set; }
|
||||
DateTime ScheduledStartTime { get; set; }
|
||||
int RecordingInterval { get; set; }
|
||||
|
||||
UDPStreamProfile StreamProfile { get; set; }
|
||||
|
||||
#region Slice 6 Tilt Feature
|
||||
|
||||
/// <summary>
|
||||
/// Defines which 2 axis will be used for the bubble level feature for Slice 6.
|
||||
/// </summary>
|
||||
DFConstantsAndEnums.TiltAxes TiltAxes { get; set; }
|
||||
|
||||
double TargetAxisOne { get; set; }
|
||||
|
||||
double TargetAxisTwo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The target angle threshold in degrees for Axis 1
|
||||
/// </summary>
|
||||
float TargetAngleAxisX { get; set; }
|
||||
/// <summary>
|
||||
/// The target angle threshold in degrees for Axis 2
|
||||
/// </summary>
|
||||
float TargetAngleAxisY { get; set; }
|
||||
/// <summary>
|
||||
/// The target angle threshold in degrees for Axis 3
|
||||
/// </summary>
|
||||
float TargetAngleAxisZ { get; set; }
|
||||
|
||||
double MountOffsetAxisOne { get; set; }
|
||||
|
||||
double MountOffsetAxisTwo { get; set; }
|
||||
|
||||
string SystemLocation { get; set; }
|
||||
|
||||
string SystemID { get; set; }
|
||||
|
||||
int AxisIgnored { get; set; }
|
||||
|
||||
double LevelTolerance { get; set; }
|
||||
|
||||
bool UseForTiltCalculation { get; set; }
|
||||
double InputVoltage { get; set; }
|
||||
double BatteryVoltage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The external tilt enumeration given by the attached DAS
|
||||
/// </summary>
|
||||
byte TiltID { get; set; }
|
||||
/// <summary>
|
||||
/// The serial number of the external tilt
|
||||
/// </summary>
|
||||
string TiltSerialNumber { get; set; }
|
||||
#endregion
|
||||
|
||||
//public IDASCommunication OwningDAS { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Count how many channels are configured in this Module.
|
||||
/// See <see cref="AnalogInputDASChannel.IsConfigured" />.
|
||||
/// </summary>
|
||||
/// <returns>Number of configured channels</returns>
|
||||
int NumberOfConfiguredChannels();
|
||||
|
||||
/// <summary>
|
||||
/// Count how many TOM channels are configured in this module
|
||||
/// </summary>
|
||||
/// <returns>Number of configured TOM channels</returns>
|
||||
int NumberOfConfiguredTOMChannels();
|
||||
|
||||
bool IsDummyArmed();
|
||||
|
||||
/// <summary>
|
||||
/// Count how many channels this module has (regardless if they are configured
|
||||
/// or not).
|
||||
/// </summary>
|
||||
/// <returns>Total number of channels</returns>
|
||||
int NumberOfChannels();
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve the serial number from DASInfo
|
||||
/// </summary>
|
||||
/// <returns>The serial number of this module</returns>
|
||||
string SerialNumber();
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve the module type from DASInfo
|
||||
/// </summary>
|
||||
/// <returns>The type of this module</returns>
|
||||
DFConstantsAndEnums.ModuleType ModuleType();
|
||||
/// <summary>
|
||||
/// Retrieve the module type from DASInfo and return whether or not it's a stream in type
|
||||
/// </summary>
|
||||
/// <returns>Whether the type of this module is a stream in</returns>
|
||||
bool IsStreamIn();
|
||||
/// <summary>
|
||||
/// Retrieve the module type from DASInfo and return whether or not it's a stream out type
|
||||
/// </summary>
|
||||
/// <returns>Whether the type of this module is a stream out</returns>
|
||||
bool IsStreamOut();
|
||||
/// <summary>
|
||||
/// Retrieve the module type from DASInfo and return whether or not it's a uart type
|
||||
/// </summary>
|
||||
/// <returns>Whether the type of this module is a uart</returns>
|
||||
bool IsUart();
|
||||
/// <summary>
|
||||
/// Retrieve the module type from DASInfo and return whether or not it's a clock type
|
||||
/// </summary>
|
||||
/// <returns>Whether the type of this module is a clock</returns>
|
||||
bool IsClock();
|
||||
/// <summary>
|
||||
/// Retrieve the module type from DASInfo and return whether or not it's an embedded type
|
||||
/// </summary>
|
||||
/// <returns>Whether the type of this module is embedded</returns>
|
||||
bool IsEmbedded();
|
||||
bool IsThermocoupler();
|
||||
void WriteXmlCRC32(XmlWriter writer);
|
||||
void WriteXml(XmlWriter writer);
|
||||
void ReadXml(XmlReader reader);
|
||||
XmlSchema GetSchema();
|
||||
|
||||
ushort GetCRC32();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using DTS.Common.Interface.Hardware;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
// ReSharper disable PossibleNullReferenceException
|
||||
|
||||
namespace DTS.Common.Converters
|
||||
{
|
||||
public class DASStatusColorConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
if (value is DASStatuses status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case DASStatuses.MissingNotBooted:
|
||||
return BrushesAndColors.Brush_ApplicationStatus_Idle;
|
||||
case DASStatuses.BootedNotArmedYet:
|
||||
return BrushesAndColors.Brush_ApplicationStatus_Busy;
|
||||
case DASStatuses.BootedNeverArmed:
|
||||
return BrushesAndColors.Brush_ApplicationStatus_Failed;
|
||||
case DASStatuses.ArmedReady:
|
||||
return BrushesAndColors.Brush_ApplicationStatus_Complete;
|
||||
case DASStatuses.ArmedButFailedDiag:
|
||||
return BrushesAndColors.Brush_ApplicationStatus_Failed;
|
||||
case DASStatuses.ReadyForDownload:
|
||||
return BrushesAndColors.Brush_ApplicationStatus_Complete;
|
||||
}
|
||||
}
|
||||
return BrushesAndColors.Brush_ApplicationStatus_Idle;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
return value.Equals(true) ? parameter : Binding.DoNothing;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user