init
This commit is contained in:
1
DataPRO/Modules/Groups/GroupChannelList/.svn/entries
Normal file
1
DataPRO/Modules/Groups/GroupChannelList/.svn/entries
Normal file
@@ -0,0 +1 @@
|
||||
12
|
||||
1
DataPRO/Modules/Groups/GroupChannelList/.svn/format
Normal file
1
DataPRO/Modules/Groups/GroupChannelList/.svn/format
Normal file
@@ -0,0 +1 @@
|
||||
12
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,339 @@
|
||||
<base:BaseView x:Class="GroupChannelList.GroupChannelListView"
|
||||
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:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:strings="clr-namespace:GroupChannelList"
|
||||
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:converters="clr-namespace:GroupChannelList.Converters"
|
||||
xmlns:converters1="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:cc="clr-namespace:ChannelCodes.Model;assembly=ChannelCodes"
|
||||
xmlns:behaviors="clr-namespace:DTS.Common.Behaviors;assembly=DTS.Common"
|
||||
xmlns:my="clr-namespace:DTS.Common.Enums;assembly=DTS.Common"
|
||||
x:Name="ChannelListView">
|
||||
<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:SensorIdBackgroundConverter x:Key="BackgroundConverter" />
|
||||
<BooleanToVisibilityConverter x:Key="BoolToVisConverter"/>
|
||||
<converters1:InverseBooleanToVisibilityConverter x:Key="InverseBoolToVisConverter" />
|
||||
<converters:BooleanToWidthConverter x:Key="BooleanToWidthConverter" />
|
||||
<converters1:InverseBooleanConverter x:Key="BooleanInverseConverter" />
|
||||
<converters1:BooleanOrToVisibilityMultiConverter x:Key="BooleanOrToVisibilityMultiConverter"/>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid Background="{DynamicResource Brush_ApplicationContentBackground}" ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Auto">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<WrapPanel Grid.Row="0" Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding ChannelCount, FallbackValue='0'}" Margin="10,0,0,0" AutomationProperties.AutomationId="ChannelCountLabel"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Channels}" AutomationProperties.AutomationId="ChannelsLabel"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Test}" Visibility="{Binding UseTestSetupOrder, Converter={StaticResource BoolToVisConverter}}" AutomationProperties.AutomationId="TestLabel"/>
|
||||
<TextBlock Text="{strings:TranslateExtension GroupLower}" Visibility="{Binding UseTestSetupOrder, Converter={StaticResource InverseBoolToVisConverter}}" AutomationProperties.AutomationId="GroupLabel"/>
|
||||
<TextBlock Margin="5,0,5,0" Text="" />
|
||||
<TextBlock Text="{Binding AssignedPhysicalChannelCount}" />
|
||||
<TextBlock Text="{strings:TranslateExtension Of}" />
|
||||
<TextBlock Text="{Binding AvailableChannelCount}" />
|
||||
<TextBlock Text="{strings:TranslateExtension PhysicalChannelsAssigned}" />
|
||||
</WrapPanel>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="2">
|
||||
<Button Content="TOP" Width="30" IsEnabled="{Binding CanMoveSelectedUp}" Command="{Binding MoveSelectedChannelsToTopCommand}" AutomationProperties.AutomationId="SelectedTopButton" />
|
||||
<Button Content="5" FontFamily="Marlett" Width="20" IsEnabled="{Binding CanMoveSelectedUp}" Command="{Binding MoveSelectedChannelsUpCommand}" AutomationProperties.AutomationId="SelectedUpButton" />
|
||||
<Button Content="6" FontFamily="Marlett" Width="20" IsEnabled="{Binding CanMoveSelectedDown}" Command="{Binding MoveSelectedChannelsDownCommand}" AutomationProperties.AutomationId="SelectedDownButton"/>
|
||||
<Button Content="BOT" Width="30" IsEnabled="{Binding CanMoveSelectedDown}" Command="{Binding MoveSelectedChannelsToBottomCommand}" AutomationProperties.AutomationId="SelectedBottomButton" />
|
||||
<Button Content="{strings:TranslateExtension RemoveSensor}" IsEnabled="{Binding ElementName=ChannelListListView, Path=SelectedItems.Count}" Command="{Binding RemoveSelectedSensorsCommand}" AutomationProperties.AutomationId="ClearSelectedBtn" Width="120" />
|
||||
<Button Content="{strings:TranslateExtension Delete}" IsEnabled="{Binding SelectedDeleteShouldBeEnabled}" ToolTipService.ShowOnDisabled="True" Command="{Binding DeleteSelectedChannelsCommand}" AutomationProperties.AutomationId="DeleteSelectedBtn" Width="70" >
|
||||
<Button.ToolTip>
|
||||
<ToolTip Visibility="{Binding SelectedDeleteShouldDisplayTooltip, Converter={StaticResource BoolToVisConverter}}">
|
||||
<TextBlock Text="{strings:TranslateExtension ChannelDelete_Tooltip}"/>
|
||||
</ToolTip>
|
||||
</Button.ToolTip>
|
||||
</Button>
|
||||
<Button Margin="12,3,3,0" Content="Move after row" Width="100" IsEnabled="{Binding SelectedDeleteShouldBeEnabled}" Command="{Binding MoveSelectedChannelsToIndexCommand}" AutomationProperties.AutomationId="MoveToIndexButton" />
|
||||
<xctk:DoubleUpDown Value="{Binding Path=ExpectedIndex}" Margin="3,3,3,0" Width="60" Minimum="0" Maximum="{Binding ChannelCount}" />
|
||||
</StackPanel>
|
||||
<ListView Grid.Row="2" ItemsSource="{Binding Channels, UpdateSourceTrigger=PropertyChanged}"
|
||||
AutomationProperties.AutomationId="ChannelListView" AllowDrop="True" DragOver="ChannelList_DragOver"
|
||||
x:Name="ChannelListListView" Drop="ChannelList_Drop" SelectionMode="Extended"
|
||||
VirtualizingStackPanel.IsVirtualizing="True" KeyUp="ListView_KeyUp"
|
||||
>
|
||||
<i:Interaction.Behaviors>
|
||||
<behaviors:MultiSelectionBehavior SelectedItems="{Binding SelectedChannelItems}" />
|
||||
</i:Interaction.Behaviors>
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListViewItem}" BasedOn="{StaticResource TTS_ListViewItemStyle}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=ChannelStatus}" Value="{x:Static my:UIItemStatus.Success}">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_ApplicationStatus_Complete}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=ChannelStatus}" Value="{x:Static my:UIItemStatus.Error}">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_ApplicationStatus_Failed}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=ChannelStatus}" Value="{x:Static my:UIItemStatus.Warning}">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_Amber}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=ChannelStatus}" 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>
|
||||
<DataTrigger Binding="{Binding ElementName=ChannelListView, Path=ReadOnlyChannelsMode}" Value="True">
|
||||
<Setter Property="IsEnabled" Value="False" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
<ListView.View>
|
||||
<controls:AutoSizedGridView AutomationProperties.AutomationId="CustomChannelsListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="GroupColumn" x:Name="GroupColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="GroupName" HeaderTitle="{strings:TranslateExtension Group}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox AutomationProperties.AutomationId="GroupNameTextBox" MinWidth="200" IsEnabled="{Binding GroupNameEditable}" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" behaviors:TextBoxPasteBehavior.PasteCommand="{Binding PasteCommand}" Tag="GroupName"
|
||||
Binding.SourceUpdated="TextBoxSourceUpdated">
|
||||
<TextBox.Text>
|
||||
<Binding NotifyOnSourceUpdated="True" Path="GroupName" UpdateSourceTrigger="PropertyChanged" />
|
||||
</TextBox.Text>
|
||||
</TextBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserCodeColumn" x:Name="UserCodeColumn"
|
||||
Width="{Binding ShowUserCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserCode" HeaderTitle="{strings:TranslateExtension UserCode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<controls:ChannelCodeBuilder Code="{Binding UserCode, Mode=TwoWay}" CodeType="User" ChannelCodeSelected="ChannelCodeBuilder_OnChannelCodeSelected"
|
||||
ChannelCodesFunc="{Binding DataContext.ChannelCodesFunc, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
ShowChannelCodeLookupHelper="{Binding DataContext.ShowChannelCodeLookupHelper, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
KeyDown="TextBox_KeyDown" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" MinWidth="200"
|
||||
AutomationProperties.AutomationId="UserCodeChannelCodeBuilder" Tag="UserCode">
|
||||
<controls:ChannelCodeBuilder.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}" ConverterParameter="FALSE|HIDE">
|
||||
<Binding Path="IsUart" />
|
||||
<Binding Path="IsStreamIn" />
|
||||
<Binding Path="IsStreamOut" />
|
||||
</MultiBinding>
|
||||
</controls:ChannelCodeBuilder.Visibility>
|
||||
</controls:ChannelCodeBuilder>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserChannelNameColumn" x:Name="UserChannelNameColumn"
|
||||
Width="{Binding ShowUserCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserChannelName" HeaderTitle="{strings:TranslateExtension UserChannelName}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<controls:ChannelNameBuilder ChannelName="{Binding UserChannelName, Mode=TwoWay}" CodeType="User"
|
||||
ChannelCodeSelected="ChannelNameBuilder_OnChannelCodeSelected"
|
||||
ChannelNamesFunc="{Binding DataContext.ChannelCodesFunc, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
ShowChannelCodeLookupHelper="{Binding DataContext.ShowChannelCodeLookupHelper, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
KeyDown="TextBox_KeyDown" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" MinWidth="200"
|
||||
AutomationProperties.AutomationId="UserChannelNameTextBox" Tag="UserChannelName">
|
||||
<controls:ChannelNameBuilder.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}" ConverterParameter="FALSE|HIDE">
|
||||
<Binding Path="IsUart" />
|
||||
<Binding Path="IsStreamIn" />
|
||||
<Binding Path="IsStreamOut" />
|
||||
</MultiBinding>
|
||||
</controls:ChannelNameBuilder.Visibility>
|
||||
</controls:ChannelNameBuilder>
|
||||
<!--<TextBox Text="{Binding UserChannelName}" AutomationProperties.AutomationId="UserChannelNameTextBox"
|
||||
MinWidth="200" KeyDown="TextBox_KeyDown" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" MaxLength="250" behaviors:TextBoxPasteBehavior.PasteCommand="{Binding PasteCommand}"
|
||||
Tag="UserChannelName"/>
|
||||
-->
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ChannelNameColumn" x:Name="ChannelNameColumn"
|
||||
Width="{Binding ChannelNamesOnly, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserChannelName" HeaderTitle="{strings:TranslateExtension ChannelName}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox Text="{Binding UserChannelName}" AutomationProperties.AutomationId="ChannelNameTextBox" MinWidth="200" KeyDown="TextBox_KeyDown" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" MaxLength="250" behaviors:TextBoxPasteBehavior.PasteCommand="{Binding PasteCommand}" Tag="ChannelName"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ISOCodeColumn" x:Name="ISOCodeColumn"
|
||||
Width="{Binding ShowISOCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ISOCode" HeaderTitle="{strings:TranslateExtension ISOCode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<!--<TextBox Text="{Binding IsoCode, Mode=TwoWay}" KeyDown="TextBox_KeyDown" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" MinWidth="200"/>AllChannelCodes="{x:Static cc:ChannelCode.ChannelCodes}"-->
|
||||
<controls:ChannelCodeBuilder Code="{Binding IsoCode, Mode=TwoWay}" CodeType="ISO" ChannelCodeSelected="ChannelCodeBuilder_OnChannelCodeSelected"
|
||||
ChannelCodesFunc="{Binding DataContext.ChannelCodesFunc, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
ShowChannelCodeLookupHelper="{Binding DataContext.ShowChannelCodeLookupHelper, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
ShowISOStringBuilder="{Binding DataContext.ShowISOStringBuilder, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
UniqueISOCodesRequired="{Binding DataContext.UniqueISOCodesRequired, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
KeyDown="TextBox_KeyDown" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" MinWidth="200"
|
||||
AutomationProperties.AutomationId="ISOCodeChannelCodeBuilder" Tag="ISOCode"
|
||||
LostFocus="ISOCode_LostFocus"
|
||||
UseISOCodeFilterMapping="{Binding DataContext.UseISOCodeFilterMapping, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
CoerceISOCode="{Binding CoerceISOCodeFunc}"
|
||||
>
|
||||
<controls:ChannelCodeBuilder.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}" ConverterParameter="FALSE|HIDE">
|
||||
<Binding Path="IsUart" />
|
||||
<Binding Path="IsStreamIn" />
|
||||
<Binding Path="IsStreamOut" />
|
||||
</MultiBinding>
|
||||
</controls:ChannelCodeBuilder.Visibility>
|
||||
</controls:ChannelCodeBuilder>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ISOChannelNameColumn" x:Name="ISOChannelNameColumn"
|
||||
Width="{Binding ShowISOCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ISOChannelName" HeaderTitle="{strings:TranslateExtension ISOChannelName}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<controls:ChannelNameBuilder ChannelName="{Binding IsoChannelName, Mode=TwoWay}" CodeType="ISO"
|
||||
ChannelCodeSelected="ChannelNameBuilder_OnChannelCodeSelected"
|
||||
ChannelNamesFunc="{Binding DataContext.ChannelCodesFunc, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
ShowChannelCodeLookupHelper="{Binding DataContext.ShowChannelCodeLookupHelper, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
KeyDown="TextBox_KeyDown" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" MinWidth="200"
|
||||
AutomationProperties.AutomationId="ISOChannelNameTextBox" Tag="ISOChannelName"
|
||||
LostFocus="ISOCode_LostFocus" >
|
||||
<controls:ChannelNameBuilder.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}" ConverterParameter="FALSE|HIDE">
|
||||
<Binding Path="IsUart" />
|
||||
<Binding Path="IsStreamIn" />
|
||||
<Binding Path="IsStreamOut" />
|
||||
</MultiBinding>
|
||||
</controls:ChannelNameBuilder.Visibility>
|
||||
</controls:ChannelNameBuilder>
|
||||
<!--<TextBox Text="{Binding IsoChannelName}" AutomationProperties.AutomationId="ISOChannelNameTextBox"
|
||||
MinWidth="200" KeyDown="TextBox_KeyDown" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop"
|
||||
MaxLength="250" behaviors:TextBoxPasteBehavior.PasteCommand="{Binding PasteCommand}" Tag="ISOChannelName"/>
|
||||
-->
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="IEPEColumn" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="IEPE" HeaderTitle="{strings:TranslateExtension ChannelType}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding IEPESupport}" AutomationProperties.AutomationId="IEPESupportBlock" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SensorColumn" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Sensor" HeaderTitle="{strings:TranslateExtension Sensor}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid>
|
||||
<Label Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}">
|
||||
<Hyperlink Click="Hyperlink_Click" IsEnabled="{Binding EmbeddedSensor, Converter={StaticResource BooleanInverseConverter}}">
|
||||
<TextBlock Text="{Binding Sensor}" AutomationProperties.AutomationId="SensorTextBlock" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" />
|
||||
</Hyperlink>
|
||||
</Label>
|
||||
<TextBlock Text="{Binding Sensor}" AutomationProperties.AutomationId="SensorTextBlock" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="DallasIdColumn" x:Name="DallasIdColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DallasId" HeaderTitle="{strings:TranslateExtension DallasId}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Path=SensorData.EID, FallbackValue='---'}" AutomationProperties.AutomationId="EIDTextBlock" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop"
|
||||
Visibility="Visible"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="HardwareColumn" x:Name="HardwareColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Hardware" HeaderTitle="{strings:TranslateExtension Hardware}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Border Background="{Binding Path=HasEID, Converter={StaticResource BackgroundConverter}}" HorizontalAlignment="Stretch" >
|
||||
<TextBlock Margin="2,0,2,0" Text="{Binding Hardware}" AutomationProperties.AutomationId="HardwareTextBlock" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" />
|
||||
</Border>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="GroupOrderColumn" x:Name="GroupOrderColumn">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ChannelListView, Path=DataContext.UseTestSetupOrder, Converter={StaticResource InverseBoolToVisConverter}}">
|
||||
<Button Content="TOP" Width="30" IsEnabled="{Binding CanMoveUp}" Click="MoveTop_Click" AutomationProperties.AutomationId="TopButton" />
|
||||
<Button Content="5" FontFamily="Marlett" Width="20" IsEnabled="{Binding CanMoveUp}" Click="MoveUp_Click" AutomationProperties.AutomationId="UpButton" />
|
||||
<TextBlock Text="{Binding GroupChannelOrder,FallbackValue='-1',StringFormat={}000}" VerticalAlignment="Center" AutomationProperties.AutomationId="ChannelOrderTextBlock" />
|
||||
<Button Content="6" FontFamily="Marlett" Width="20" IsEnabled="{Binding CanMoveDown}" Click="MoveDown_Click" AutomationProperties.AutomationId="DownButton"/>
|
||||
<Button Content="BOT" Width="30" IsEnabled="{Binding CanMoveDown}" Click="MoveBottom_Click" AutomationProperties.AutomationId="BottomButton" />
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="TestSetupOrderColumn" x:Name="TestSetupOrderColumn">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ChannelListView, Path=DataContext.UseTestSetupOrder, Converter={StaticResource BoolToVisConverter}}">
|
||||
<Button Content="TOP" Width="30" IsEnabled="{Binding CanMoveUp}" Click="MoveTop_Click" AutomationProperties.AutomationId="TopButton"/>
|
||||
<Button Content="5" FontFamily="Marlett" Width="20" IsEnabled="{Binding CanMoveUp}" Click="MoveUp_Click" AutomationProperties.AutomationId="UpButton"/>
|
||||
<TextBlock Text="{Binding TestSetupOrder,FallbackValue='-1',StringFormat={}000}" VerticalAlignment="Center" AutomationProperties.AutomationId="ChannelOrderTextBlock"/>
|
||||
<Button Content="6" FontFamily="Marlett" Width="20" IsEnabled="{Binding CanMoveDown}" Click="MoveDown_Click" AutomationProperties.AutomationId="DownButton"/>
|
||||
<Button Content="BOT" Width="30" IsEnabled="{Binding CanMoveDown}" Click="MoveBottom_Click" AutomationProperties.AutomationId="BottomButton"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ActionsColumn">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Content="{strings:TranslateExtension RemoveSensor}" Click="Clear_Click" AutomationProperties.AutomationId="ClearBtn" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" Width="120" Visibility="{Binding RemoveSensorVisibility}"/>
|
||||
<Button Content="{strings:TranslateExtension Delete}" Click="Delete_Click" AutomationProperties.AutomationId="DeleteBtn" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" Width="70"
|
||||
IsEnabled="{Binding DeleteShouldBeEnabled}" ToolTipService.ShowOnDisabled="True">
|
||||
<Button.ToolTip>
|
||||
<ToolTip Visibility="{Binding DeleteShouldBeEnabled, Converter={StaticResource InverseBoolToVisConverter}}">
|
||||
<TextBlock Text="{strings:TranslateExtension ChannelDelete_Tooltip}"/>
|
||||
</ToolTip>
|
||||
</Button.ToolTip>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</controls:AutoSizedGridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,812 @@
|
||||
<base:BaseView x:Class="GroupChannelList.GroupChannelSettingsListView"
|
||||
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:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:strings="clr-namespace:GroupChannelList"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="500"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:converters="clr-namespace:GroupChannelList.Converters"
|
||||
xmlns:converters1="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:cc="clr-namespace:ChannelCodes.Model;assembly=ChannelCodes"
|
||||
xmlns:behaviors="clr-namespace:DTS.Common.Behaviors;assembly=DTS.Common"
|
||||
xmlns:sensors="clr-namespace:DTS.Common.Enums.Sensors;assembly=DTS.Common"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:validators="clr-namespace:DTS.Common.Validators;assembly=DTS.Common"
|
||||
xmlns:constants="clr-namespace:DTS.Common.Constant;assembly=DTS.Common"
|
||||
x:Name="ChannelListView">
|
||||
<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>
|
||||
<Style TargetType="RadioButton" BasedOn="{StaticResource FlatRadioButtonStyle}" >
|
||||
<Setter Property="Height" Value="24" />
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</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}">
|
||||
<Setter Property="Height" Value="20"/>
|
||||
</Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
<Style TargetType="{x:Type xctk:DoubleUpDown}" BasedOn="{StaticResource PageContentXCDoubleUpDown}" />
|
||||
<converters:SensorIdBackgroundConverter x:Key="BackgroundConverter" />
|
||||
<converters1:NumericStringFormatConverter x:Key="NumericStringFormatConverter" />
|
||||
<!--<BooleanToVisibilityConverter x:Key="BoolToVisConverter"/>-->
|
||||
<converters1:BooleanToVisibilityConverter x:Key="BoolToVisConverter" />
|
||||
<converters1:InverseBooleanToVisibilityConverter x:Key="InverseBoolToVisConverter" />
|
||||
<converters:BooleanToWidthConverter x:Key="BooleanToWidthConverter" />
|
||||
<converters1:EnumVisibilityConverter x:Key="EnumVisibilityConverter" />
|
||||
<converters1:InverseEnumVisibilityConverter x:Key="InverseEnumVisibilityConverter" />
|
||||
<converters1:BooleanToBorderBrushConverter x:Key="BooleanToBorderBrushConverter" />
|
||||
<converters1:InverseBooleanConverter x:Key="InverseBoolConverter" />
|
||||
<system:String x:Key="CapacityFormat">{0:N2}</system:String>
|
||||
<converters1:GreaterEqualThanToBoolConverter x:Key="GreaterThanConverter" />
|
||||
<system:UInt16 x:Key="IntervalOnBound">1</system:UInt16>
|
||||
<converters1:IntervalToVisibilityConverter x:Key="InterveralToVisConverter" />
|
||||
<converters1:BooleanOrMultiConverter x:Key="BooleanOrMultiConverter" />
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid Background="{DynamicResource Brush_ApplicationContentBackground}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<WrapPanel Grid.Row="0" Orientation="Horizontal">
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_Analog}" x:Name="rbParametersAnalog" Click="Analog_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_Squib}" x:Name="rbParametersSquib" Click="Squib_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_DigitalOut}" x:Name="rbParametersDigitalOut" Click="DigitalOut_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_DigitalIn}" x:Name="rbParametersDigitalIn" Click="DigitalIn_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_Uart}" x:Name="rbParametersUart" Click="Uart_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_StreamOut}" x:Name="rbParametersStreamOut" Click="StreamOut_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_StreamIn}" x:Name="rbParametersStreamIn" Click="StreamIn_Click" />
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ChannelListView, Path=GCAC_Visibility, Converter={StaticResource BoolToVisConverter}}" Margin="15,0,0,0">
|
||||
<ToggleButton Content="{strings:TranslateExtension ModifyGlobalRangeCAC}" MinWidth="200"
|
||||
x:Name="btnModifyGlobalRangeCAC" IsEnabled="{Binding ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}}"/>
|
||||
<StackPanel Margin="15,0,0,0" Orientation="Horizontal" Visibility="{Binding IsChecked,ElementName=btnModifyGlobalRangeCAC, Converter={StaticResource BoolToVisConverter}}">
|
||||
<TextBlock Text="{strings:TranslateExtension GlobalRangeCAC}" />
|
||||
<ComboBox SelectedItem="{Binding ElementName=ChannelListView, Path=SelectedGlobalRangeCACOption}" Grid.Column="1" MinWidth="300" HorizontalAlignment="Left"
|
||||
HorizontalContentAlignment="Right" ItemsSource="{Binding ElementName=ChannelListView, Path=GlobalCACOptions}" x:Name="cbGlobalRangeCAC"
|
||||
IsEnabled="{Binding ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}}" AutomationProperties.AutomationId="cb_GlobalRangeCAC"
|
||||
/>
|
||||
<Button Content="{strings:TranslateExtension btnApplyGlobalRangeCAC}" x:Name="btnGlobalRangeApply" Click="btnGlobalRangeApply_Click"
|
||||
IsEnabled="{Binding ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
<!--<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">-->
|
||||
<ListView Grid.Row="1" ItemsSource="{Binding SettingChannels}" AutomationProperties.AutomationId="Parameters" VirtualizingStackPanel.IsVirtualizing="True"
|
||||
x:Name="ChannelSettingsListListView" GridViewColumnHeader.Click="GridViewColumnHeader_Click" Loaded="ChannelSettingsListListView_OnLoaded">
|
||||
<ListView.View><!-- -->
|
||||
<controls:AutoSizedGridView AutomationProperties.AutomationId="CustomChannelsListGridView">
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="GroupOrderColumn" x:Name="GroupOrderColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Order" HeaderTitle="{strings:TranslateExtension Order}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding GroupChannelOrder,FallbackValue='-1',StringFormat={}000}" VerticalAlignment="Center" AutomationProperties.AutomationId="ChannelOrderTextBlock"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="TestSetupOrderColumn" x:Name="TestSetupOrderColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Order" HeaderTitle="{strings:TranslateExtension Order}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding TestSetupOrder,FallbackValue='-1',StringFormat={}000}" VerticalAlignment="Center" AutomationProperties.AutomationId="ChannelOrderTextBlock"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="GroupColumn" x:Name="GroupColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="GroupName" HeaderTitle="{strings:TranslateExtension Group}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock AutomationProperties.AutomationId="GroupNameTextBlock" MinWidth="200" Tag="GroupName" Text="{Binding GroupName}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserCodeColumn" x:Name="UserCodeColumn" Width="{Binding ShowUserCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserCode" HeaderTitle="{strings:TranslateExtension UserCode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock MinWidth="200" AutomationProperties.AutomationId="UserCodeTextBlock" Tag="UserCode" Text="{Binding UserCode}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserChannelNameColumn" x:Name="UserChannelNameColumn"
|
||||
Width="{Binding ShowUserCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserChannelName" HeaderTitle="{strings:TranslateExtension UserChannelName}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UserChannelName}" AutomationProperties.AutomationId="UserChannelNameTextBlock" MinWidth="200" Tag="UserChannelName"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ChannelNameColumn" x:Name="ChannelNameColumn"
|
||||
Width="{Binding ChannelNamesOnly, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserChannelName" HeaderTitle="{strings:TranslateExtension ChannelName}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UserChannelName}" AutomationProperties.AutomationId="ChannelNameTextBlock" MinWidth="200" Tag="UserChannelName"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ISOCodeColumn" x:Name="ISOCodeColumn"
|
||||
Width="{Binding ShowISOCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ISOCode" HeaderTitle="{strings:TranslateExtension ISOCode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding IsoCode}" MinWidth="200" AutomationProperties.AutomationId="ISOCodeTextBlock" Tag="ISOCode"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ISOChannelNameColumn" x:Name="ISOChannelNameColumn"
|
||||
Width="{Binding ShowISOCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ISOChannelName" HeaderTitle="{strings:TranslateExtension ISOChannelName}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding IsoChannelName}" AutomationProperties.AutomationId="ISOChannelNameTextBlock" MinWidth="200" Tag="ISOChannelName"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SensorColumn" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Sensor" HeaderTitle="{strings:TranslateExtension Sensor}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<Label Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}">
|
||||
<Hyperlink Click="Hyperlink_Click" IsEnabled="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolConverter}}">
|
||||
<TextBlock Text="{Binding Sensor}" AutomationProperties.AutomationId="SensorTextBlock" />
|
||||
</Hyperlink>
|
||||
</Label>
|
||||
<TextBlock Text="{Binding Sensor}" AutomationProperties.AutomationId="SensorTextBlock" Visibility="{Binding EmbeddedSensor, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="RangeColumn" x:Name="AnalogRangeColumn" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Range" HeaderTitle="{strings:TranslateExtension AnalogParameters_Range}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" VerticalAlignment="Center"
|
||||
Visibility="{Binding NonRangeModifiableSensor, Converter={StaticResource BoolToVisConverter}}" />
|
||||
<xctk:DoubleUpDown AutomationProperties.AutomationId="AnalogParameters_Range" Minimum=".1" FormatString="N2" Value="{Binding Range}"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsRangeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_RangeLowG" HorizontalAlignment="Left"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableRangesLowG}" SelectedItem="{Binding RangeLowG}"
|
||||
Visibility="{Binding RangeModifiableSensorLowG, Converter={StaticResource BoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsRangeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
LostFocus="RangeLowG_LostFocus"
|
||||
/>
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_RangeARS" HorizontalAlignment="Left"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableRangesARS}" SelectedItem="{Binding Range}"
|
||||
Visibility="{Binding RangeModifiableSensorARS, Converter={StaticResource BoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsRangeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
LostFocus="RangeARS_LostFocus"/>
|
||||
<xctk:DoubleUpDown AutomationProperties.AutomationId="AnalogParameters_RangeVoltageInsert" Minimum=".1" FormatString="N2" Value="{Binding Range}"
|
||||
Visibility="{Binding VoltageInsertionSensor, Converter={StaticResource BoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsRangeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="CapacityColumn" x:Name="AnalogCapacityColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Capacity" HeaderTitle="{strings:TranslateExtension AnalogParameters_Capacity}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBlock Text="{Binding EmbeddedCapacityDisplay}" VerticalAlignment="Center"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource BoolToVisConverter}}" />
|
||||
<TextBlock AutomationProperties.AutomationId="AnalogParameters_Capacity" Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}">
|
||||
<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>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SensitivityColumn" x:Name="AnalogSensitivityColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Sensitivity" HeaderTitle="{strings:TranslateExtension AnalogParameters_Sensitivity}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock AutomationProperties.AutomationId="AnalogParameters _Sensitivity" Text="{Binding Sensitivity}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UnitsColumn" x:Name="AnalogUnitsColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Units" HeaderTitle="{strings:TranslateExtension AnalogParameters_Units}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock AutomationProperties.AutomationId="AnalogParameters_Units" Text="{Binding Units}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="CFCColumn" x:Name="AnalogCFCColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="FilterClass" HeaderTitle="{strings:TranslateExtension AnalogParameters_CFC}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_CFC" DisplayMemberPath="FilterName" ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableCFC}"
|
||||
HorizontalAlignment="Left" SelectedItem="{Binding FilterClass}" MinWidth="125"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsFilterClassDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="PolarityColumn" x:Name="AnalogPolarityColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Polarity" HeaderTitle="{strings:TranslateExtension AnalogParameters_Polarity}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_Polarity" HorizontalAlignment="Left"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailablePolarity}" SelectedItem="{Binding Polarity}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsPolarityDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
<!--BorderBrush="{Binding PolarityBorderBrushColor}" BorderThickness="2.0"/>-->
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ZeroMethodColumn" x:Name="AnalogZeroMethodColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ZeroMethod" HeaderTitle="{strings:TranslateExtension AnalogParameters_ZeroMethod}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<!--FB16269 Show user setting but lock it rather than hide it if NonLinear-->
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_ZeroMethod" HorizontalAlignment="Left" MinWidth="125"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableZeroMethodEmbeddedSensor}" SelectedItem="{Binding ZeroMethod}"
|
||||
IsEnabled="{Binding NonLinear, Converter={StaticResource InverseBoolConverter}}"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource BoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsZeroMethodDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_ZeroMethod" HorizontalAlignment="Left" MinWidth="125"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableZeroMethod}" SelectedItem="{Binding ZeroMethod}"
|
||||
IsEnabled="{Binding NonLinearAndNotPolynomial, Converter={StaticResource InverseBoolConverter}}"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsZeroMethodDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="ZeroMethodColumn" x:Name="AnalogZeroMethodStartColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ZeroMethodStart" HeaderTitle="{strings:TranslateExtension AnalogParameters_ZeroMethodStart}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBlock Text="{strings:TranslateExtension Not_Applicable}" VerticalAlignment="Center"
|
||||
Visibility="{Binding ZeroMethod, Converter={StaticResource InverseEnumVisibilityConverter}, ConverterParameter={x:Static sensors:ZeroMethodType.AverageOverTime}}" />
|
||||
<xctk:DoubleUpDown AutomationProperties.AutomationId="AnalogParameters_ZeroMethodStart"
|
||||
FormatString="F5" Value="{Binding ZeroMethodStart}" Visibility="{Binding ZeroMethod,
|
||||
Converter={StaticResource EnumVisibilityConverter}, ConverterParameter={x:Static sensors:ZeroMethodType.AverageOverTime}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsZeroMethodStartDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="ZeroMethodColumn" x:Name="AnalogZeroMethodEndColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ZeroMethodEnd" HeaderTitle="{strings:TranslateExtension AnalogParameters_ZeroMethodEnd}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBlock Text="{strings:TranslateExtension Not_Applicable}" VerticalAlignment="Center"
|
||||
Visibility="{Binding ZeroMethod, Converter={StaticResource InverseEnumVisibilityConverter}, ConverterParameter={x:Static sensors:ZeroMethodType.AverageOverTime}}" />
|
||||
<xctk:DoubleUpDown AutomationProperties.AutomationId="AnalogParameters_ZeroMethodEnd"
|
||||
FormatString="F5" Value="{Binding ZeroMethodEnd}" Visibility="{Binding ZeroMethod,
|
||||
Converter={StaticResource EnumVisibilityConverter}, ConverterParameter={x:Static sensors:ZeroMethodType.AverageOverTime}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsZeroMethodEndDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue1Column" x:Name="AnalogUserValue1Column" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue1" HeaderTitle="{strings:TranslateExtension AnalogParameters_UserValue1}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox AutomationProperties.AutomationId="AnalogParameters_UserValue1" Width="90" MaxWidth="90" MinWidth="90" Text="{Binding UserValue1}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue2Column" x:Name="AnalogUserValue2Column" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue2" HeaderTitle="{strings:TranslateExtension AnalogParameters_UserValue2}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox AutomationProperties.AutomationId="AnalogParameters_UserValue2" Width="90" MaxWidth="90" MinWidth="90" Text="{Binding UserValue2}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue3Column" x:Name="AnalogUserValue3Column" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue3" HeaderTitle="{strings:TranslateExtension AnalogParameters_UserValue3}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox AutomationProperties.AutomationId="AnalogParameters_UserValue3" Width="90" MaxWidth="90" MinWidth="90" Text="{Binding UserValue3}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="InitialOffsetColumn" x:Name="AnalogInitialOffsetColumn" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="InitialOffset" HeaderTitle="{strings:TranslateExtension AnalogParameters_InitialOffset}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" VerticalAlignment="Center"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource BoolToVisConverter}}" />
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_InitialOffset" Width="90" MaxWidth="90" MinWidth="90"
|
||||
ItemsSource="{Binding AvailableInitialOffsets}" SelectedItem="{Binding InitialOffset}"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsInitialOffsetDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<!-- http://manuscript.dts.local/f/cases/29760/Implement-ACCoupleEnable-for-TSR-AIR -->
|
||||
<GridViewColumn AutomationProperties.AutomationId="ACCouplingEnable" x:Name="AnalogACCouplingEnableColumn"
|
||||
Header="{strings:Translate AnalogParameter_ACCouplingEnable}">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox AutomationProperties.AutomationId="AnalogParameters_ACCouplingEnable"
|
||||
IsChecked="{Binding ACCouplingEnabled}" Click="ACCouplingEnable_Click"
|
||||
Visibility="{Binding IsTSRAIRLowG, Converter={StaticResource BoolToVisConverter}}" >
|
||||
<CheckBox.IsEnabled>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrMultiConverter}">
|
||||
<Binding Path="ViewDbVersion" ElementName="ChannelListView" Converter="{StaticResource GreaterThanConverter}" ConverterParameter="{StaticResource MIN_DB_VERSION_AC_COUPLING}" />
|
||||
<Binding Path="DataContext.ReadOnlyParametersMode" Converter="{StaticResource InverseBoolConverter}" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type ListView}}" />
|
||||
</MultiBinding>
|
||||
</CheckBox.IsEnabled>
|
||||
</CheckBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="InputModeColumn" x:Name="DigitalInInputModeColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="InputMode" HeaderTitle="{strings:TranslateExtension DigitalInParameters_InputMode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="DigitalInParameters_InputMode" HorizontalAlignment="Left" Width="180"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableDigitalInputModes}" SelectedItem="{Binding DigitalInputMode}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDigitalInputModeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="DefaultValueColumn" x:Name="DigitalInDefaultValueColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DefaultValue" HeaderTitle="{strings:TranslateExtension DigitalInParameters_DefaultValue}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox Text="{Binding DefaultValue, Mode=TwoWay}" AutomationProperties.AutomationId="DigitialInParameters_DefaultValue"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDefaultValueDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ActiveValueColumn" x:Name="DigitalInActiveValueColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ActiveValue" HeaderTitle="{strings:TranslateExtension DigitalInParameters_ActiveValue}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox Text="{Binding ActiveValue, Mode=TwoWay}" AutomationProperties.AutomationId="DigitalInParameters_ActiveValue"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsActiveValueDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="OutputModeColumn" x:Name="DigitalOutOutputModeColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="OutputMode" HeaderTitle="{strings:TranslateExtension DigitalOutParameters_OutputMode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox HorizontalAlignment="Left" ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableDigitalOutputModes}"
|
||||
SelectedItem="{Binding DigitalOutputMode}" Width="180" AutomationProperties.AutomationId="DigitalOutParameters_OutputMode"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDigitalOutputModeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="OutputDelayColumn" x:Name="DigitalOutDelayColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="OutputDelay" HeaderTitle="{strings:TranslateExtension DigitalOutParameters_Delay}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding DigitalOutDelay}" FormatString="N2" AutomationProperties.AutomationId="DigitalOutParameters_Delay"
|
||||
Minimum="{StaticResource DIGITALOUT_DELAY_MIN}" Increment=".1"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDigitalOutDelayDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="OutputLimitDurationColumn" x:Name="DigitalOutLimitDurationColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="OutputLimitDuration" HeaderTitle="{strings:TranslateExtension DigitalOutParameters_LimitDuration}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding DigitalOutLimitDuration}" AutomationProperties.AutomationId="DigitalOutParameters_LimitDuration"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDigitalOutLimitDurationDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="OutputDurationColumn" x:Name="DigitalOutDurationColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="OutputDuration" HeaderTitle="{strings:TranslateExtension DigitalOutParameters_Duration}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding DigitalOutDuration}" FormatString="N1" AutomationProperties.AutomationId="DigitalOutParameters_Duration"
|
||||
Visibility="{Binding DigitalOutLimitDuration, Converter={StaticResource BoolToVisConverter}}" Increment=".1" Maximum="{Binding DigitalOutDurationMax}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDigitalOutDurationDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SquibFireModeColumn" x:Name="SquibFireModeColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SquibFireMode" HeaderTitle="{strings:TranslateExtension SquibParameters_FireMode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="SquibParameters_FireMode" HorizontalAlignment="Left" Width="150"
|
||||
ItemsSource="{Binding ElementName=ChannelListView,Path=AvailableSquibFireModes}" SelectedItem="{Binding SquibFireMode}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsSquibFireModeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SquibDelayColumn" x:Name="SquibDelayColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SquibDelay" HeaderTitle="{strings:TranslateExtension SquibParameters_Delay}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding SquibDelay}" FormatString="N2" AutomationProperties.AutomationId="SquibParameters_Delay" Width="100" Increment=".1"
|
||||
Minimum="{StaticResource SQUIB_DELAY_MIN}" Maximum="{StaticResource SQUIB_DELAY_MAX}" Watermark="{strings:TranslateExtension EnterValue}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsSquibDelayDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SquibLimitDurationColumn" x:Name="SquibLimitDurationColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SquibLimitDuration" HeaderTitle="{strings:TranslateExtension SquibParameters_LimitDuration}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding SquibLimitDuration}" AutomationProperties.AutomationId="SquibParameters_LimitDuration"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsSquibLimitDurationDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SquibDurationColumn" x:Name="SquibDurationColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SquibDuration" HeaderTitle="{strings:TranslateExtension SquibParameters_Duration}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding SquibDuration}" FormatString="N1" AutomationProperties.AutomationId="SquibParameters_Duration"
|
||||
Minimum="{StaticResource SQUIB_DURATION_MIN}" Maximum="{StaticResource SQUIB_DURATION_MAX}"
|
||||
Visibility="{Binding SquibLimitDuration, Converter={StaticResource BoolToVisConverter}}" Increment=".1"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsSquibDurationDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SquibCurrentColumn" x:Name="SquibCurrentColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SquibCurrent" HeaderTitle="{strings:TranslateExtension SquibParameters_Current}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding SquibCurrent}" FormatString="N2" AutomationProperties.AutomationId="SquibParameters_Current"
|
||||
Minimum="{StaticResource SQUIB_CURRENT_LOW}" Maximum="{StaticResource SQUIB_CURRENT_HIGH}"
|
||||
Visibility="{Binding IsConstantCurrent, Converter={StaticResource BoolToVisConverter}}" Increment=".1"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsSquibCurrentDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartBaudRateColumn" x:Name="UartBaudRateColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UartBaudRate" HeaderTitle="{strings:TranslateExtension UartParameters_BaudRate}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox ItemsSource="{x:Static constants:EmbeddedSensors.BAUD_RATES}" BorderThickness="2.0" BorderBrush="{Binding IsUartBaudRateDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}"
|
||||
IsEditable="True">
|
||||
<ComboBox.Text>
|
||||
<Binding Path="UartBaudRate" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" ValidatesOnNotifyDataErrors="True" ValidatesOnExceptions="True">
|
||||
<Binding.ValidationRules>
|
||||
<validators:UARTBAUDRateValidator />
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</ComboBox.Text>
|
||||
</ComboBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartDataBitsColumn" x:Name="UartDataBitsColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UartDataBits" HeaderTitle="{strings:TranslateExtension UartParameters_DataBits}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding UartDataBits}" FormatString="N0" AutomationProperties.AutomationId="UartParameters_DataBits"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="{StaticResource UART_DATA_BITS_MIN}" Maximum="{StaticResource UART_DATA_BITS_MAX}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsUartDataBitsDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartStopBitsColumn" x:Name="UartStopBitsColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UartStopBits" HeaderTitle="{strings:TranslateExtension UartParameters_StopBits}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="UartParameters_StopBits" HorizontalAlignment="Left" Width="150"
|
||||
ItemsSource="{Binding ElementName=ChannelListView,Path=AvailableUartStopBits}" SelectedItem="{Binding UartStopBits}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsUartStopBitsDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartParityColumn" x:Name="UartParityColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UartParity" HeaderTitle="{strings:TranslateExtension UartParameters_Parity}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="UartParameters_Parity" HorizontalAlignment="Left" Width="150"
|
||||
ItemsSource="{Binding ElementName=ChannelListView,Path=AvailableUartParities}" SelectedItem="{Binding UartParity}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsUartParityDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<!--FB 30486 Remove option from UI-->
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartDataFormatColumn" x:Name="UartDataFormatColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UartDataFormat" HeaderTitle="{strings:TranslateExtension UartParameters_DataFormat}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="UartParameters_DataFormat" HorizontalAlignment="Left" Width="150"
|
||||
ItemsSource="{Binding ElementName=ChannelListView,Path=AvailableUartDataFormats}" SelectedItem="{Binding UartDataFormat}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsUartDataFormatDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamInUDPAddressColumn" x:Name="StreamInUDPAddressColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamInUDPAddress" HeaderTitle="{strings:TranslateExtension StreamInParameters_UDPAddress}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox Text="{Binding StreamInUDPAddress, Mode=TwoWay}" AutomationProperties.AutomationId="StreamInParameters_UDPAddress"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamInUDPAddressDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutUDPProfileColumn" x:Name="StreamOutUDPProfileColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutUDPProfile" HeaderTitle="{strings:TranslateExtension StreamOutParameters_StreamProfile}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="StreamOutParameters_StreamProfile" HorizontalAlignment="Left" MinWidth="180" Width="Auto"
|
||||
ItemsSource="{Binding ElementName=ChannelListView,Path=AvailableStreamOutUDPProfiles}" SelectedItem="{Binding StreamOutUDPProfile}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutUDPProfileDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutUDPAddressColumn" x:Name="StreamOutUDPAddressColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutUDPAddress" HeaderTitle="{strings:TranslateExtension StreamOutParameters_UDPAddress}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBox Text="{Binding StreamOutUDPAddress, Mode=TwoWay}" AutomationProperties.AutomationId="StreamOutParameters_UDPAddress"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutUDPAddressDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
Visibility="{Binding IsUARTStream, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsUARTStream, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutUDPTimeChannelIdColumn" x:Name="StreamOutUDPTimeChannelIdColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutUDPTimeChannelId" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TimeChannelId}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding StreamOutUDPTimeChannelId}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TimeChannelId"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="{StaticResource STREAMOUT_TIMECHANNELID_MIN}" Maximum="{StaticResource STREAMOUT_TIMECHANNELID_MAX}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutUDPTimeChannelIdDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
Visibility="{Binding IsCH10, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsCH10, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutUDPDataChannelIdColumn" x:Name="StreamOutUDPDataChannelIdColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutUDPDataChannelId" HeaderTitle="{strings:TranslateExtension StreamOutParameters_DataChannelId}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding StreamOutUDPDataChannelId}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_DataChannelId"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="{StaticResource STREAMOUT_DATACHANNELID_MIN}" Maximum="{StaticResource STREAMOUT_DATACHANNELID_MAX}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutUDPDataChannelIdDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}">
|
||||
<xctk:DoubleUpDown.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}">
|
||||
<Binding Path="IsCH10" />
|
||||
<Binding Path="IsUARTStream" />
|
||||
</MultiBinding>
|
||||
</xctk:DoubleUpDown.Visibility>
|
||||
</xctk:DoubleUpDown>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}">
|
||||
<TextBlock.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}" ConverterParameter="False">
|
||||
<Binding Path="IsCH10" />
|
||||
<Binding Path="IsUARTStream" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Visibility>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutIRIGTimeDataPacketIntervalMsColumn" x:Name="StreamOutIRIGTimeDataPacketIntervalMsColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutIRIGTimeDataPacketIntervalMs" HeaderTitle="{strings:TranslateExtension StreamOutParameters_IRIGTimeDataPacketIntervalMs}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding IsCH10, Converter={StaticResource BoolToVisConverter}}">
|
||||
<CheckBox Content="{strings:TranslateExtension IntervalOn}" IsChecked="{Binding StreamOutIRIGTimeDataPacketIntervalMs, Converter={StaticResource GreaterThanConverter}, ConverterParameter={StaticResource IntervalOnBound}, Mode=OneWay}"
|
||||
Click="TimePacketIntervalOn_Click"
|
||||
/>
|
||||
<xctk:DoubleUpDown Value="{Binding StreamOutIRIGTimeDataPacketIntervalMs}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_DataChannelId"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="{StaticResource STREAMOUT_IRIG_TDP_MIN}" Maximum="{StaticResource STREAMOUT_IRIG_TDP_MAX}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutIRIGTimeDataPacketIntervalMsDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
Visibility="{Binding StreamOutIRIGTimeDataPacketIntervalMs, Converter={StaticResource InterveralToVisConverter}, ConverterParameter={StaticResource IntervalOnBound}}"
|
||||
/>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsCH10, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutTMATSIntervalMsColumn" x:Name="StreamOutTMATSIntervalMsColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutTMATSIntervalMs" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMATSIntervalMs}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding IsIENA, Converter={StaticResource InverseBoolToVisConverter}}"
|
||||
IsEnabled="{Binding ElementName=ChannelListView, Path=DbVersion, Converter={StaticResource GreaterThanConverter}, ConverterParameter={StaticResource TMATSIntervalDbVesion}}">
|
||||
<CheckBox Content="{strings:TranslateExtension IntervalOn}" IsChecked="{Binding StreamOutTMATSIntervalMs, Converter={StaticResource GreaterThanConverter},ConverterParameter={StaticResource IntervalOnBound},Mode=OneWay}"
|
||||
Click="TMATSIntervalON_Click"
|
||||
/>
|
||||
<xctk:DoubleUpDown Value="{Binding StreamOutTMATSIntervalMs}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TMATSIntervalMs"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="{StaticResource STREAMOUT_TMAT_INTERVAL_MIN}" Maximum="{StaticResource STREAMOUT_TMAT_INTERVAL_MAX}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutTMATSIntervalMsDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
Visibility="{Binding StreamOutTMATSIntervalMs, Converter={StaticResource InterveralToVisConverter}, ConverterParameter={StaticResource IntervalOnBound}}"
|
||||
/>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsIENA, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<!-- TMNS Columns -->
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutSubFrameIDColumn" x:Name="StreamOutSubFrameIDColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutSubFrameIdColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMNS_SubFrameId}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding TMNS_SubFrameId}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TMNS_SubFrameId"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsTMNS,Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutMessageIDColumn" x:Name="StreamOutMessageIDColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutMessageIdColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMNS_MessageId}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding TMNS_MsgId}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TMNS_MessageId"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsTMNS, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutMinorPerMajorColumn" x:Name="StreamOutMinorPerMajorColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutMinorPerMajorColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMNS_MinorPerMajor}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding TMNS_MinorPerMajor}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TMNS_MinorPerMajor"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsTMNS, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutTMATSPortColumn" x:Name="StreamOutTMATSPortColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutTMATSPortColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMNS_TMATSPort}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding TMNS_TMATSPort}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TMNS_TMATSPort"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsTMNS, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<!-- IENA columns -->
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutIENASourcePortColumn" x:Name="StreamOutIENASourcePortColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutIENASourcePortColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_IENA_SourcePort}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding IENA_SourcePort}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_IENA_SourcePort"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsIENA, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsIENA, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutIENAKeyColumn" x:Name="StreamOutIENAKeyColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutIENAKeyColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_IENA_Key}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding IENA_Key}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_IENA_Key"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsIENA, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsIENA, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
</controls:AutoSizedGridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
<!--</ScrollViewer>-->
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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 GroupChannelList.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,21 @@
|
||||
using System;
|
||||
using System.Windows.Markup;
|
||||
using GroupChannelList.Resources;
|
||||
|
||||
namespace GroupChannelList
|
||||
{
|
||||
[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,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="GroupChannelList.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<GroupChannelList.Properties.Settings>
|
||||
</GroupChannelList.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("GroupChannelList")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("DTS")]
|
||||
[assembly: AssemblyProduct("GroupChannelList")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[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("12abc17e-f76d-4ce0-9aee-faccc2c9ab49")]
|
||||
|
||||
// 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,438 @@
|
||||
<?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="AssignedBySensorId" xml:space="preserve">
|
||||
<value>(Assigned by ID)</value>
|
||||
</data>
|
||||
<data name="Clear" xml:space="preserve">
|
||||
<value>Clear</value>
|
||||
</data>
|
||||
<data name="DisplayName" xml:space="preserve">
|
||||
<value>Display name</value>
|
||||
</data>
|
||||
<data name="DuplicateSensor" xml:space="preserve">
|
||||
<value>Sensor appears more than once</value>
|
||||
</data>
|
||||
<data name="Group" xml:space="preserve">
|
||||
<value>Group</value>
|
||||
</data>
|
||||
<data name="Hardware" xml:space="preserve">
|
||||
<value>Hardware</value>
|
||||
</data>
|
||||
<data name="InvalidAnalogAssignment" xml:space="preserve">
|
||||
<value>Sensor {0} can not be assigned to channel {1}</value>
|
||||
</data>
|
||||
<data name="InvalidDigitalInputAssignment" xml:space="preserve">
|
||||
<value>DigitalInput {0} can not be assigned to channel {1}</value>
|
||||
</data>
|
||||
<data name="InvalidDigitalOutputAssignment" xml:space="preserve">
|
||||
<value>DigitalOutput {0} can not be assigned to channel {1}</value>
|
||||
</data>
|
||||
<data name="InvalidExcitationAssignment" xml:space="preserve">
|
||||
<value>Sensor {0} does not support any of the excitation options provided by channel {1}</value>
|
||||
</data>
|
||||
<data name="InvalidSquibAssignment" xml:space="preserve">
|
||||
<value>Squib {0} can not be assigned to channel {1}</value>
|
||||
</data>
|
||||
<data name="ISOChannelName" xml:space="preserve">
|
||||
<value>ISO channel name</value>
|
||||
</data>
|
||||
<data name="ISOCode" xml:space="preserve">
|
||||
<value>ISO (13499) code</value>
|
||||
</data>
|
||||
<data name="Sensor" xml:space="preserve">
|
||||
<value>Sensor (SN)</value>
|
||||
</data>
|
||||
<data name="UserChannelName" xml:space="preserve">
|
||||
<value>User channel name</value>
|
||||
</data>
|
||||
<data name="UserCode" xml:space="preserve">
|
||||
<value>User code</value>
|
||||
</data>
|
||||
<data name="DisplayOrder" xml:space="preserve">
|
||||
<value>Display order</value>
|
||||
</data>
|
||||
<data name="Delete" xml:space="preserve">
|
||||
<value>Delete</value>
|
||||
</data>
|
||||
<data name="InvalidLine" xml:space="preserve">
|
||||
<value>Invalid pasted group channel, line: {0}</value>
|
||||
</data>
|
||||
<data name="InvalidSensor" xml:space="preserve">
|
||||
<value>Invalid sensor, line: {0}</value>
|
||||
</data>
|
||||
<data name="Channels" xml:space="preserve">
|
||||
<value> channel(s) in </value>
|
||||
</data>
|
||||
<data name="GroupLower" xml:space="preserve">
|
||||
<value>group</value>
|
||||
</data>
|
||||
<data name="Test" xml:space="preserve">
|
||||
<value>test</value>
|
||||
</data>
|
||||
<data name="ISOAndUserCode" xml:space="preserve">
|
||||
<value>ISO 13499 and user codes</value>
|
||||
</data>
|
||||
<data name="ISOOnly" xml:space="preserve">
|
||||
<value>ISO 13499 only</value>
|
||||
</data>
|
||||
<data name="UserCodeOnly" xml:space="preserve">
|
||||
<value>User codes only</value>
|
||||
</data>
|
||||
<data name="TestChannelsGroupName" xml:space="preserve">
|
||||
<value>Test channels</value>
|
||||
</data>
|
||||
<data name="Of" xml:space="preserve">
|
||||
<value> of </value>
|
||||
</data>
|
||||
<data name="PhysicalChannelsAssigned" xml:space="preserve">
|
||||
<value> physical channel(s) assigned</value>
|
||||
</data>
|
||||
<data name="DragAndDropFilterWarning" xml:space="preserve">
|
||||
<value>Drag and drop operation completed. Note that the table is currently being filtered, but items that were part of the drag and drop operation will remain after this operation.</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_Capacity" xml:space="preserve">
|
||||
<value>Sensor max range</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_CFC" xml:space="preserve">
|
||||
<value>Channel filter class</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_Polarity" xml:space="preserve">
|
||||
<value>Polarity</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_Range" xml:space="preserve">
|
||||
<value>Channel full-scale</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_Sensitivity" xml:space="preserve">
|
||||
<value>Sensitivity</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_Units" xml:space="preserve">
|
||||
<value>Units</value>
|
||||
</data>
|
||||
<data name="DigitalInParameters_ActiveValue" xml:space="preserve">
|
||||
<value>Active value</value>
|
||||
</data>
|
||||
<data name="DigitalInParameters_DefaultValue" xml:space="preserve">
|
||||
<value>Default value</value>
|
||||
</data>
|
||||
<data name="DigitalInParameters_InputMode" xml:space="preserve">
|
||||
<value>Input mode</value>
|
||||
</data>
|
||||
<data name="DigitalOutParameters_Delay" xml:space="preserve">
|
||||
<value>Delay (ms)</value>
|
||||
</data>
|
||||
<data name="EnterValue" xml:space="preserve">
|
||||
<value>Enter value</value>
|
||||
</data>
|
||||
<data name="DigitalOutParameters_Duration" xml:space="preserve">
|
||||
<value>Duration (ms)</value>
|
||||
</data>
|
||||
<data name="DigitalOutParameters_LimitDuration" xml:space="preserve">
|
||||
<value>Limit duration</value>
|
||||
</data>
|
||||
<data name="DigitalOutParameters_OutputMode" xml:space="preserve">
|
||||
<value>Output mode</value>
|
||||
</data>
|
||||
<data name="Parameters_Analog" xml:space="preserve">
|
||||
<value>Analog</value>
|
||||
</data>
|
||||
<data name="Parameters_DigitalIn" xml:space="preserve">
|
||||
<value>Digital in</value>
|
||||
</data>
|
||||
<data name="Parameters_DigitalOut" xml:space="preserve">
|
||||
<value>Digital out</value>
|
||||
</data>
|
||||
<data name="Parameters_Squib" xml:space="preserve">
|
||||
<value>Squib</value>
|
||||
</data>
|
||||
<data name="SquibParameters_Delay" xml:space="preserve">
|
||||
<value>Delay (ms)</value>
|
||||
</data>
|
||||
<data name="SquibParameters_Duration" xml:space="preserve">
|
||||
<value>Duration (ms)</value>
|
||||
</data>
|
||||
<data name="SquibParameters_FireMode" xml:space="preserve">
|
||||
<value>Fire mode</value>
|
||||
</data>
|
||||
<data name="SquibParameters_LimitDuration" xml:space="preserve">
|
||||
<value>Limit duration</value>
|
||||
</data>
|
||||
<data name="btnApplyGlobalRangeCAC" xml:space="preserve">
|
||||
<value>Apply</value>
|
||||
</data>
|
||||
<data name="GlobalRangeCAC" xml:space="preserve">
|
||||
<value>Global range (CAC)</value>
|
||||
</data>
|
||||
<data name="ModifyGlobalRangeCAC" xml:space="preserve">
|
||||
<value>Modify global range CAC</value>
|
||||
</data>
|
||||
<data name="Order" xml:space="preserve">
|
||||
<value>Order</value>
|
||||
</data>
|
||||
<data name="SquibParameters_Current" xml:space="preserve">
|
||||
<value>Current (A)</value>
|
||||
</data>
|
||||
<data name="IEPESupport" xml:space="preserve">
|
||||
<value>IEPE support</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_ZeroMethod" xml:space="preserve">
|
||||
<value>Zero Method</value>
|
||||
</data>
|
||||
<data name="ChannelType" xml:space="preserve">
|
||||
<value>Type</value>
|
||||
</data>
|
||||
<data name="RemoveSensor" xml:space="preserve">
|
||||
<value>Remove Sensor</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_ZeroMethodEnd" xml:space="preserve">
|
||||
<value>End (sec)</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_ZeroMethodStart" xml:space="preserve">
|
||||
<value>Start (sec)</value>
|
||||
</data>
|
||||
<data name="Not_Applicable" xml:space="preserve">
|
||||
<value>N/A</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_UserValue1" xml:space="preserve">
|
||||
<value>User Value 1</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_UserValue2" xml:space="preserve">
|
||||
<value>User Value 2</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_UserValue3" xml:space="preserve">
|
||||
<value>User Value 3</value>
|
||||
</data>
|
||||
<data name="ChannelDelete_Tooltip" xml:space="preserve">
|
||||
<value>To delete a channel, please contact an Administrator</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_InitialOffset" xml:space="preserve">
|
||||
<value>Initial offset</value>
|
||||
</data>
|
||||
<data name="ChannelName" xml:space="preserve">
|
||||
<value>Channel name</value>
|
||||
</data>
|
||||
<data name="Table_NA" xml:space="preserve">
|
||||
<value>---</value>
|
||||
</data>
|
||||
<data name="Parameters_Uart" xml:space="preserve">
|
||||
<value>UART</value>
|
||||
</data>
|
||||
<data name="UartParameters_BaudRate" xml:space="preserve">
|
||||
<value>Baud rate</value>
|
||||
</data>
|
||||
<data name="UartParameters_DataBits" xml:space="preserve">
|
||||
<value>Data bits</value>
|
||||
</data>
|
||||
<data name="UartParameters_DataFormat" xml:space="preserve">
|
||||
<value>Data format</value>
|
||||
</data>
|
||||
<data name="UartParameters_FlowControl" xml:space="preserve">
|
||||
<value>Flow control</value>
|
||||
</data>
|
||||
<data name="UartParameters_Parity" xml:space="preserve">
|
||||
<value>Parity</value>
|
||||
</data>
|
||||
<data name="UartParameters_StopBits" xml:space="preserve">
|
||||
<value>Stop bits</value>
|
||||
</data>
|
||||
<data name="Parameters_StreamOut" xml:space="preserve">
|
||||
<value>Stream out</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_DataChannelId" xml:space="preserve">
|
||||
<value>Data channel id</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_IRIGTimeDataPacketIntervalMs" xml:space="preserve">
|
||||
<value>IRIG time data packet interval (ms)</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_StreamProfile" xml:space="preserve">
|
||||
<value>Stream profile</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_TimeChannelId" xml:space="preserve">
|
||||
<value>Time channel id</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_TmNSConfig" xml:space="preserve">
|
||||
<value>TmNS config</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_UDPAddress" xml:space="preserve">
|
||||
<value>UDP Address</value>
|
||||
</data>
|
||||
<data name="Parameters_StreamIn" xml:space="preserve">
|
||||
<value>Stream in</value>
|
||||
</data>
|
||||
<data name="StreamInParameters_UDPAddress" xml:space="preserve">
|
||||
<value>UDP Address</value>
|
||||
</data>
|
||||
<data name="AnalogParameter_ACCouplingEnable" xml:space="preserve">
|
||||
<value>AC coupling enabled</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_IENA_Key" xml:space="preserve">
|
||||
<value>IENA key</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_IENA_SourcePort" xml:space="preserve">
|
||||
<value>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>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="StreamOutParameters_TMATSIntervalMs" xml:space="preserve">
|
||||
<value>TMATS interval (ms)</value>
|
||||
</data>
|
||||
<data name="DallasId" xml:space="preserve">
|
||||
<value>Dallas ID</value>
|
||||
</data>
|
||||
<data name="IntervalOn" xml:space="preserve">
|
||||
<value>On</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_MaximumUsage" xml:space="preserve">
|
||||
<value>Maximum Usage</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_UsageCount" xml:space="preserve">
|
||||
<value>Usage Count</value>
|
||||
</data>
|
||||
<data name="Parameters_CAN" xml:space="preserve">
|
||||
<value>CAN</value>
|
||||
</data>
|
||||
<data name="CanParameters_ArbBaseBitrate" xml:space="preserve">
|
||||
<value>Arb/Base Bitrate</value>
|
||||
</data>
|
||||
<data name="CanParameters_IsFD" xml:space="preserve">
|
||||
<value>CAN is FD</value>
|
||||
</data>
|
||||
<data name="CanParameters_ArbBaseSJW" xml:space="preserve">
|
||||
<value>Arb/Base SJW</value>
|
||||
</data>
|
||||
<data name="CanParameters_DataBitrate" xml:space="preserve">
|
||||
<value>Data Bitrate</value>
|
||||
</data>
|
||||
<data name="CanParameters_DataSJW" xml:space="preserve">
|
||||
<value>Data SJW</value>
|
||||
</data>
|
||||
<data name="CanParameters_FileType" xml:space="preserve">
|
||||
<value>FileType</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="GroupChannelList.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace GroupChannelList.Converters
|
||||
{
|
||||
public class BooleanToWidthConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (null == value) return 0;
|
||||
double width = double.NaN;
|
||||
if (parameter != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
width = double.Parse(parameter.ToString());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
return (bool)value ? width : 0;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,913 @@
|
||||
<base:BaseView x:Class="GroupChannelList.GroupChannelSettingsListView"
|
||||
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:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:strings="clr-namespace:GroupChannelList"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="500"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:converters="clr-namespace:GroupChannelList.Converters"
|
||||
xmlns:converters1="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:cc="clr-namespace:ChannelCodes.Model;assembly=ChannelCodes"
|
||||
xmlns:behaviors="clr-namespace:DTS.Common.Behaviors;assembly=DTS.Common"
|
||||
xmlns:sensors="clr-namespace:DTS.Common.Enums.Sensors;assembly=DTS.Common"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:validators="clr-namespace:DTS.Common.Validators;assembly=DTS.Common"
|
||||
xmlns:constants="clr-namespace:DTS.Common.Constant;assembly=DTS.Common"
|
||||
x:Name="ChannelListView">
|
||||
<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>
|
||||
<Style TargetType="RadioButton" BasedOn="{StaticResource FlatRadioButtonStyle}" >
|
||||
<Setter Property="Height" Value="24" />
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</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}">
|
||||
<Setter Property="Height" Value="20"/>
|
||||
</Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
<Style TargetType="{x:Type xctk:DoubleUpDown}" BasedOn="{StaticResource PageContentXCDoubleUpDown}" />
|
||||
<converters:SensorIdBackgroundConverter x:Key="BackgroundConverter" />
|
||||
<converters1:NumericStringFormatConverter x:Key="NumericStringFormatConverter" />
|
||||
<!--<BooleanToVisibilityConverter x:Key="BoolToVisConverter"/>-->
|
||||
<converters1:BooleanToVisibilityConverter x:Key="BoolToVisConverter" />
|
||||
<converters1:InverseBooleanToVisibilityConverter x:Key="InverseBoolToVisConverter" />
|
||||
<converters:BooleanToWidthConverter x:Key="BooleanToWidthConverter" />
|
||||
<converters1:EnumVisibilityConverter x:Key="EnumVisibilityConverter" />
|
||||
<converters1:InverseEnumVisibilityConverter x:Key="InverseEnumVisibilityConverter" />
|
||||
<converters1:BooleanToBorderBrushConverter x:Key="BooleanToBorderBrushConverter" />
|
||||
<converters1:InverseBooleanConverter x:Key="InverseBoolConverter" />
|
||||
<system:String x:Key="CapacityFormat">{0:N2}</system:String>
|
||||
<converters1:GreaterEqualThanToBoolConverter x:Key="GreaterThanConverter" />
|
||||
<system:UInt16 x:Key="IntervalOnBound">1</system:UInt16>
|
||||
<converters1:IntervalToVisibilityConverter x:Key="InterveralToVisConverter" />
|
||||
<converters1:BooleanOrMultiConverter x:Key="BooleanOrMultiConverter" />
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid Background="{DynamicResource Brush_ApplicationContentBackground}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<WrapPanel Grid.Row="0" Orientation="Horizontal">
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_Analog}" x:Name="rbParametersAnalog" Click="Analog_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_Squib}" x:Name="rbParametersSquib" Click="Squib_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_DigitalOut}" x:Name="rbParametersDigitalOut" Click="DigitalOut_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_DigitalIn}" x:Name="rbParametersDigitalIn" Click="DigitalIn_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_Uart}" x:Name="rbParametersUart" Click="Uart_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_StreamOut}" x:Name="rbParametersStreamOut" Click="StreamOut_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_StreamIn}" x:Name="rbParametersStreamIn" Click="StreamIn_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_CAN}" x:Name="rbParametersCAN" Click="CAN_Click" />
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ChannelListView, Path=GCAC_Visibility, Converter={StaticResource BoolToVisConverter}}" Margin="15,0,0,0">
|
||||
<ToggleButton Content="{strings:TranslateExtension ModifyGlobalRangeCAC}" MinWidth="200"
|
||||
x:Name="btnModifyGlobalRangeCAC" IsEnabled="{Binding ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}}"/>
|
||||
<StackPanel Margin="15,0,0,0" Orientation="Horizontal" Visibility="{Binding IsChecked,ElementName=btnModifyGlobalRangeCAC, Converter={StaticResource BoolToVisConverter}}">
|
||||
<TextBlock Text="{strings:TranslateExtension GlobalRangeCAC}" />
|
||||
<ComboBox SelectedItem="{Binding ElementName=ChannelListView, Path=SelectedGlobalRangeCACOption}" Grid.Column="1" MinWidth="300" HorizontalAlignment="Left"
|
||||
HorizontalContentAlignment="Right" ItemsSource="{Binding ElementName=ChannelListView, Path=GlobalCACOptions}" x:Name="cbGlobalRangeCAC"
|
||||
IsEnabled="{Binding ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}}" AutomationProperties.AutomationId="cb_GlobalRangeCAC"
|
||||
/>
|
||||
<Button Content="{strings:TranslateExtension btnApplyGlobalRangeCAC}" x:Name="btnGlobalRangeApply" Click="btnGlobalRangeApply_Click"
|
||||
IsEnabled="{Binding ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
<!--<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">-->
|
||||
<ListView Grid.Row="1" ItemsSource="{Binding SettingChannels}" AutomationProperties.AutomationId="Parameters" VirtualizingStackPanel.IsVirtualizing="True"
|
||||
x:Name="ChannelSettingsListListView" GridViewColumnHeader.Click="GridViewColumnHeader_Click" Loaded="ChannelSettingsListListView_OnLoaded">
|
||||
<ListView.View><!-- -->
|
||||
<controls:AutoSizedGridView AutomationProperties.AutomationId="CustomChannelsListGridView">
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="GroupOrderColumn" x:Name="GroupOrderColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Order" HeaderTitle="{strings:TranslateExtension Order}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding GroupChannelOrder,FallbackValue='-1',StringFormat={}000}" VerticalAlignment="Center" AutomationProperties.AutomationId="ChannelOrderTextBlock"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="TestSetupOrderColumn" x:Name="TestSetupOrderColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Order" HeaderTitle="{strings:TranslateExtension Order}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding TestSetupOrder,FallbackValue='-1',StringFormat={}000}" VerticalAlignment="Center" AutomationProperties.AutomationId="ChannelOrderTextBlock"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="GroupColumn" x:Name="GroupColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="GroupName" HeaderTitle="{strings:TranslateExtension Group}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock AutomationProperties.AutomationId="GroupNameTextBlock" MinWidth="200" Tag="GroupName" Text="{Binding GroupName}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserCodeColumn" x:Name="UserCodeColumn" Width="{Binding ShowUserCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserCode" HeaderTitle="{strings:TranslateExtension UserCode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock MinWidth="200" AutomationProperties.AutomationId="UserCodeTextBlock" Tag="UserCode" Text="{Binding UserCode}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserChannelNameColumn" x:Name="UserChannelNameColumn"
|
||||
Width="{Binding ShowUserCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserChannelName" HeaderTitle="{strings:TranslateExtension UserChannelName}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UserChannelName}" AutomationProperties.AutomationId="UserChannelNameTextBlock" MinWidth="200" Tag="UserChannelName"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ChannelNameColumn" x:Name="ChannelNameColumn"
|
||||
Width="{Binding ChannelNamesOnly, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserChannelName" HeaderTitle="{strings:TranslateExtension ChannelName}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UserChannelName}" AutomationProperties.AutomationId="ChannelNameTextBlock" MinWidth="200" Tag="UserChannelName"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ISOCodeColumn" x:Name="ISOCodeColumn"
|
||||
Width="{Binding ShowISOCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ISOCode" HeaderTitle="{strings:TranslateExtension ISOCode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding IsoCode}" MinWidth="200" AutomationProperties.AutomationId="ISOCodeTextBlock" Tag="ISOCode"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ISOChannelNameColumn" x:Name="ISOChannelNameColumn"
|
||||
Width="{Binding ShowISOCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ISOChannelName" HeaderTitle="{strings:TranslateExtension ISOChannelName}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding IsoChannelName}" AutomationProperties.AutomationId="ISOChannelNameTextBlock" MinWidth="200" Tag="ISOChannelName"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SensorColumn" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Sensor" HeaderTitle="{strings:TranslateExtension Sensor}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<Label Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}">
|
||||
<Hyperlink Click="Hyperlink_Click" IsEnabled="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolConverter}}">
|
||||
<TextBlock Text="{Binding Sensor}" AutomationProperties.AutomationId="SensorTextBlock" />
|
||||
</Hyperlink>
|
||||
</Label>
|
||||
<TextBlock Text="{Binding Sensor}" AutomationProperties.AutomationId="SensorTextBlock" Visibility="{Binding EmbeddedSensor, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="RangeColumn" x:Name="AnalogRangeColumn" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Range" HeaderTitle="{strings:TranslateExtension AnalogParameters_Range}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" VerticalAlignment="Center"
|
||||
Visibility="{Binding NonRangeModifiableSensor, Converter={StaticResource BoolToVisConverter}}" />
|
||||
<xctk:DoubleUpDown AutomationProperties.AutomationId="AnalogParameters_Range" Minimum=".1" FormatString="N2" Value="{Binding Range}"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsRangeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_RangeLowG" HorizontalAlignment="Left"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableRangesLowG}" SelectedItem="{Binding RangeLowG}"
|
||||
Visibility="{Binding RangeModifiableSensorLowG, Converter={StaticResource BoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsRangeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
LostFocus="RangeLowG_LostFocus"
|
||||
/>
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_RangeARS" HorizontalAlignment="Left"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableRangesARS}" SelectedItem="{Binding Range}"
|
||||
Visibility="{Binding RangeModifiableSensorARS, Converter={StaticResource BoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsRangeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
LostFocus="RangeARS_LostFocus"/>
|
||||
<xctk:DoubleUpDown AutomationProperties.AutomationId="AnalogParameters_RangeVoltageInsert" Minimum=".1" FormatString="N2" Value="{Binding Range}"
|
||||
Visibility="{Binding VoltageInsertionSensor, Converter={StaticResource BoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsRangeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="CapacityColumn" x:Name="AnalogCapacityColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Capacity" HeaderTitle="{strings:TranslateExtension AnalogParameters_Capacity}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBlock Text="{Binding EmbeddedCapacityDisplay}" VerticalAlignment="Center"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource BoolToVisConverter}}" />
|
||||
<TextBlock AutomationProperties.AutomationId="AnalogParameters_Capacity" Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}">
|
||||
<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>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SensitivityColumn" x:Name="AnalogSensitivityColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Sensitivity" HeaderTitle="{strings:TranslateExtension AnalogParameters_Sensitivity}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock AutomationProperties.AutomationId="AnalogParameters _Sensitivity" Text="{Binding Sensitivity}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UnitsColumn" x:Name="AnalogUnitsColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Units" HeaderTitle="{strings:TranslateExtension AnalogParameters_Units}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock AutomationProperties.AutomationId="AnalogParameters_Units" Text="{Binding Units}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="CFCColumn" x:Name="AnalogCFCColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="FilterClass" HeaderTitle="{strings:TranslateExtension AnalogParameters_CFC}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_CFC" DisplayMemberPath="FilterName" ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableCFC}"
|
||||
HorizontalAlignment="Left" SelectedItem="{Binding FilterClass}" MinWidth="125"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsFilterClassDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="PolarityColumn" x:Name="AnalogPolarityColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Polarity" HeaderTitle="{strings:TranslateExtension AnalogParameters_Polarity}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_Polarity" HorizontalAlignment="Left"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailablePolarity}" SelectedItem="{Binding Polarity}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsPolarityDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
<!--BorderBrush="{Binding PolarityBorderBrushColor}" BorderThickness="2.0"/>-->
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ZeroMethodColumn" x:Name="AnalogZeroMethodColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ZeroMethod" HeaderTitle="{strings:TranslateExtension AnalogParameters_ZeroMethod}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<!--FB16269 Show user setting but lock it rather than hide it if NonLinear-->
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_ZeroMethod" HorizontalAlignment="Left" MinWidth="125"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableZeroMethodEmbeddedSensor}" SelectedItem="{Binding ZeroMethod}"
|
||||
IsEnabled="{Binding NonLinear, Converter={StaticResource InverseBoolConverter}}"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource BoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsZeroMethodDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_ZeroMethod" HorizontalAlignment="Left" MinWidth="125"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableZeroMethod}" SelectedItem="{Binding ZeroMethod}"
|
||||
IsEnabled="{Binding NonLinearAndNotPolynomial, Converter={StaticResource InverseBoolConverter}}"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsZeroMethodDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="ZeroMethodColumn" x:Name="AnalogZeroMethodStartColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ZeroMethodStart" HeaderTitle="{strings:TranslateExtension AnalogParameters_ZeroMethodStart}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBlock Text="{strings:TranslateExtension Not_Applicable}" VerticalAlignment="Center"
|
||||
Visibility="{Binding ZeroMethod, Converter={StaticResource InverseEnumVisibilityConverter}, ConverterParameter={x:Static sensors:ZeroMethodType.AverageOverTime}}" />
|
||||
<xctk:DoubleUpDown AutomationProperties.AutomationId="AnalogParameters_ZeroMethodStart"
|
||||
FormatString="F5" Value="{Binding ZeroMethodStart}" Visibility="{Binding ZeroMethod,
|
||||
Converter={StaticResource EnumVisibilityConverter}, ConverterParameter={x:Static sensors:ZeroMethodType.AverageOverTime}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsZeroMethodStartDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="ZeroMethodColumn" x:Name="AnalogZeroMethodEndColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ZeroMethodEnd" HeaderTitle="{strings:TranslateExtension AnalogParameters_ZeroMethodEnd}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBlock Text="{strings:TranslateExtension Not_Applicable}" VerticalAlignment="Center"
|
||||
Visibility="{Binding ZeroMethod, Converter={StaticResource InverseEnumVisibilityConverter}, ConverterParameter={x:Static sensors:ZeroMethodType.AverageOverTime}}" />
|
||||
<xctk:DoubleUpDown AutomationProperties.AutomationId="AnalogParameters_ZeroMethodEnd"
|
||||
FormatString="F5" Value="{Binding ZeroMethodEnd}" Visibility="{Binding ZeroMethod,
|
||||
Converter={StaticResource EnumVisibilityConverter}, ConverterParameter={x:Static sensors:ZeroMethodType.AverageOverTime}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsZeroMethodEndDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue1Column" x:Name="AnalogUserValue1Column" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue1" HeaderTitle="{strings:TranslateExtension AnalogParameters_UserValue1}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox AutomationProperties.AutomationId="AnalogParameters_UserValue1" Width="90" MaxWidth="90" MinWidth="90" Text="{Binding UserValue1}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue2Column" x:Name="AnalogUserValue2Column" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue2" HeaderTitle="{strings:TranslateExtension AnalogParameters_UserValue2}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox AutomationProperties.AutomationId="AnalogParameters_UserValue2" Width="90" MaxWidth="90" MinWidth="90" Text="{Binding UserValue2}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue3Column" x:Name="AnalogUserValue3Column" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue3" HeaderTitle="{strings:TranslateExtension AnalogParameters_UserValue3}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox AutomationProperties.AutomationId="AnalogParameters_UserValue3" Width="90" MaxWidth="90" MinWidth="90" Text="{Binding UserValue3}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="InitialOffsetColumn" x:Name="AnalogInitialOffsetColumn" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="InitialOffset" HeaderTitle="{strings:TranslateExtension AnalogParameters_InitialOffset}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" VerticalAlignment="Center"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource BoolToVisConverter}}" />
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_InitialOffset" Width="90" MaxWidth="90" MinWidth="90"
|
||||
ItemsSource="{Binding AvailableInitialOffsets}" SelectedItem="{Binding InitialOffset}"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsInitialOffsetDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<!-- http://manuscript.dts.local/f/cases/29760/Implement-ACCoupleEnable-for-TSR-AIR -->
|
||||
<GridViewColumn AutomationProperties.AutomationId="ACCouplingEnable" x:Name="AnalogACCouplingEnableColumn"
|
||||
Header="{strings:Translate AnalogParameter_ACCouplingEnable}">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox AutomationProperties.AutomationId="AnalogParameters_ACCouplingEnable"
|
||||
IsChecked="{Binding ACCouplingEnabled}" Click="ACCouplingEnable_Click"
|
||||
Visibility="{Binding IsTSRAIRLowG, Converter={StaticResource BoolToVisConverter}}" >
|
||||
<CheckBox.IsEnabled>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrMultiConverter}">
|
||||
<Binding Path="ViewDbVersion" ElementName="ChannelListView" Converter="{StaticResource GreaterThanConverter}" ConverterParameter="{StaticResource MIN_DB_VERSION_AC_COUPLING}" />
|
||||
<Binding Path="DataContext.ReadOnlyParametersMode" Converter="{StaticResource InverseBoolConverter}" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type ListView}}" />
|
||||
</MultiBinding>
|
||||
</CheckBox.IsEnabled>
|
||||
</CheckBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="InputModeColumn" x:Name="DigitalInInputModeColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="InputMode" HeaderTitle="{strings:TranslateExtension DigitalInParameters_InputMode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="DigitalInParameters_InputMode" HorizontalAlignment="Left" Width="180"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableDigitalInputModes}" SelectedItem="{Binding DigitalInputMode}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDigitalInputModeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="DefaultValueColumn" x:Name="DigitalInDefaultValueColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DefaultValue" HeaderTitle="{strings:TranslateExtension DigitalInParameters_DefaultValue}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox Text="{Binding DefaultValue, Mode=TwoWay}" AutomationProperties.AutomationId="DigitialInParameters_DefaultValue"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDefaultValueDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ActiveValueColumn" x:Name="DigitalInActiveValueColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ActiveValue" HeaderTitle="{strings:TranslateExtension DigitalInParameters_ActiveValue}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox Text="{Binding ActiveValue, Mode=TwoWay}" AutomationProperties.AutomationId="DigitalInParameters_ActiveValue"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsActiveValueDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="OutputModeColumn" x:Name="DigitalOutOutputModeColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="OutputMode" HeaderTitle="{strings:TranslateExtension DigitalOutParameters_OutputMode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox HorizontalAlignment="Left" ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableDigitalOutputModes}"
|
||||
SelectedItem="{Binding DigitalOutputMode}" Width="180" AutomationProperties.AutomationId="DigitalOutParameters_OutputMode"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDigitalOutputModeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="OutputDelayColumn" x:Name="DigitalOutDelayColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="OutputDelay" HeaderTitle="{strings:TranslateExtension DigitalOutParameters_Delay}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding DigitalOutDelay}" FormatString="N2" AutomationProperties.AutomationId="DigitalOutParameters_Delay"
|
||||
Minimum="{StaticResource DIGITALOUT_DELAY_MIN}" Increment=".1"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDigitalOutDelayDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="OutputLimitDurationColumn" x:Name="DigitalOutLimitDurationColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="OutputLimitDuration" HeaderTitle="{strings:TranslateExtension DigitalOutParameters_LimitDuration}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding DigitalOutLimitDuration}" AutomationProperties.AutomationId="DigitalOutParameters_LimitDuration"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDigitalOutLimitDurationDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="OutputDurationColumn" x:Name="DigitalOutDurationColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="OutputDuration" HeaderTitle="{strings:TranslateExtension DigitalOutParameters_Duration}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding DigitalOutDuration}" FormatString="N1" AutomationProperties.AutomationId="DigitalOutParameters_Duration"
|
||||
Visibility="{Binding DigitalOutLimitDuration, Converter={StaticResource BoolToVisConverter}}" Increment=".1" Maximum="{Binding DigitalOutDurationMax}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDigitalOutDurationDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SquibFireModeColumn" x:Name="SquibFireModeColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SquibFireMode" HeaderTitle="{strings:TranslateExtension SquibParameters_FireMode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="SquibParameters_FireMode" HorizontalAlignment="Left" Width="150"
|
||||
ItemsSource="{Binding ElementName=ChannelListView,Path=AvailableSquibFireModes}" SelectedItem="{Binding SquibFireMode}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsSquibFireModeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SquibDelayColumn" x:Name="SquibDelayColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SquibDelay" HeaderTitle="{strings:TranslateExtension SquibParameters_Delay}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding SquibDelay}" FormatString="N2" AutomationProperties.AutomationId="SquibParameters_Delay" Width="100" Increment=".1"
|
||||
Minimum="{StaticResource SQUIB_DELAY_MIN}" Maximum="{StaticResource SQUIB_DELAY_MAX}" Watermark="{strings:TranslateExtension EnterValue}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsSquibDelayDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SquibLimitDurationColumn" x:Name="SquibLimitDurationColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SquibLimitDuration" HeaderTitle="{strings:TranslateExtension SquibParameters_LimitDuration}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding SquibLimitDuration}" AutomationProperties.AutomationId="SquibParameters_LimitDuration"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsSquibLimitDurationDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SquibDurationColumn" x:Name="SquibDurationColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SquibDuration" HeaderTitle="{strings:TranslateExtension SquibParameters_Duration}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding SquibDuration}" FormatString="N1" AutomationProperties.AutomationId="SquibParameters_Duration"
|
||||
Minimum="{StaticResource SQUIB_DURATION_MIN}" Maximum="{StaticResource SQUIB_DURATION_MAX}"
|
||||
Visibility="{Binding SquibLimitDuration, Converter={StaticResource BoolToVisConverter}}" Increment=".1"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsSquibDurationDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SquibCurrentColumn" x:Name="SquibCurrentColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SquibCurrent" HeaderTitle="{strings:TranslateExtension SquibParameters_Current}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding SquibCurrent}" FormatString="N2" AutomationProperties.AutomationId="SquibParameters_Current"
|
||||
Minimum="{StaticResource SQUIB_CURRENT_LOW}" Maximum="{StaticResource SQUIB_CURRENT_HIGH}"
|
||||
Visibility="{Binding IsConstantCurrent, Converter={StaticResource BoolToVisConverter}}" Increment=".1"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsSquibCurrentDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartBaudRateColumn" x:Name="UartBaudRateColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UartBaudRate" HeaderTitle="{strings:TranslateExtension UartParameters_BaudRate}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox ItemsSource="{x:Static constants:EmbeddedSensors.BAUD_RATES}" BorderThickness="2.0" BorderBrush="{Binding IsUartBaudRateDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}"
|
||||
IsEditable="True">
|
||||
<ComboBox.Text>
|
||||
<Binding Path="UartBaudRate" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" ValidatesOnNotifyDataErrors="True" ValidatesOnExceptions="True">
|
||||
<Binding.ValidationRules>
|
||||
<validators:UARTBAUDRateValidator />
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</ComboBox.Text>
|
||||
</ComboBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartDataBitsColumn" x:Name="UartDataBitsColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UartDataBits" HeaderTitle="{strings:TranslateExtension UartParameters_DataBits}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding UartDataBits}" FormatString="N0" AutomationProperties.AutomationId="UartParameters_DataBits"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="{StaticResource UART_DATA_BITS_MIN}" Maximum="{StaticResource UART_DATA_BITS_MAX}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsUartDataBitsDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartStopBitsColumn" x:Name="UartStopBitsColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UartStopBits" HeaderTitle="{strings:TranslateExtension UartParameters_StopBits}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="UartParameters_StopBits" HorizontalAlignment="Left" Width="150"
|
||||
ItemsSource="{Binding ElementName=ChannelListView,Path=AvailableUartStopBits}" SelectedItem="{Binding UartStopBits}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsUartStopBitsDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartParityColumn" x:Name="UartParityColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UartParity" HeaderTitle="{strings:TranslateExtension UartParameters_Parity}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="UartParameters_Parity" HorizontalAlignment="Left" Width="150"
|
||||
ItemsSource="{Binding ElementName=ChannelListView,Path=AvailableUartParities}" SelectedItem="{Binding UartParity}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsUartParityDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<!--FB 30486 Remove option from UI-->
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartDataFormatColumn" x:Name="UartDataFormatColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UartDataFormat" HeaderTitle="{strings:TranslateExtension UartParameters_DataFormat}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="UartParameters_DataFormat" HorizontalAlignment="Left" Width="150"
|
||||
ItemsSource="{Binding ElementName=ChannelListView,Path=AvailableUartDataFormats}" SelectedItem="{Binding UartDataFormat}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsUartDataFormatDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamInUDPAddressColumn" x:Name="StreamInUDPAddressColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamInUDPAddress" HeaderTitle="{strings:TranslateExtension StreamInParameters_UDPAddress}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox Text="{Binding StreamInUDPAddress, Mode=TwoWay}" AutomationProperties.AutomationId="StreamInParameters_UDPAddress"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamInUDPAddressDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutUDPProfileColumn" x:Name="StreamOutUDPProfileColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutUDPProfile" HeaderTitle="{strings:TranslateExtension StreamOutParameters_StreamProfile}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="StreamOutParameters_StreamProfile" HorizontalAlignment="Left" MinWidth="180" Width="Auto"
|
||||
ItemsSource="{Binding ElementName=ChannelListView,Path=AvailableStreamOutUDPProfiles}" SelectedItem="{Binding StreamOutUDPProfile}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutUDPProfileDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutUDPAddressColumn" x:Name="StreamOutUDPAddressColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutUDPAddress" HeaderTitle="{strings:TranslateExtension StreamOutParameters_UDPAddress}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBox Text="{Binding StreamOutUDPAddress, Mode=TwoWay}" AutomationProperties.AutomationId="StreamOutParameters_UDPAddress"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutUDPAddressDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
Visibility="{Binding IsUARTStream, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsUARTStream, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutUDPTimeChannelIdColumn" x:Name="StreamOutUDPTimeChannelIdColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutUDPTimeChannelId" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TimeChannelId}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding StreamOutUDPTimeChannelId}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TimeChannelId"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="{StaticResource STREAMOUT_TIMECHANNELID_MIN}" Maximum="{StaticResource STREAMOUT_TIMECHANNELID_MAX}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutUDPTimeChannelIdDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
Visibility="{Binding IsCH10, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsCH10, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutUDPDataChannelIdColumn" x:Name="StreamOutUDPDataChannelIdColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutUDPDataChannelId" HeaderTitle="{strings:TranslateExtension StreamOutParameters_DataChannelId}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding StreamOutUDPDataChannelId}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_DataChannelId"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="{StaticResource STREAMOUT_DATACHANNELID_MIN}" Maximum="{StaticResource STREAMOUT_DATACHANNELID_MAX}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutUDPDataChannelIdDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}">
|
||||
<xctk:DoubleUpDown.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}">
|
||||
<Binding Path="IsCH10" />
|
||||
<Binding Path="IsUARTStream" />
|
||||
</MultiBinding>
|
||||
</xctk:DoubleUpDown.Visibility>
|
||||
</xctk:DoubleUpDown>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}">
|
||||
<TextBlock.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}" ConverterParameter="False">
|
||||
<Binding Path="IsCH10" />
|
||||
<Binding Path="IsUARTStream" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Visibility>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutIRIGTimeDataPacketIntervalMsColumn" x:Name="StreamOutIRIGTimeDataPacketIntervalMsColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutIRIGTimeDataPacketIntervalMs" HeaderTitle="{strings:TranslateExtension StreamOutParameters_IRIGTimeDataPacketIntervalMs}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding IsCH10, Converter={StaticResource BoolToVisConverter}}">
|
||||
<CheckBox Content="{strings:TranslateExtension IntervalOn}" IsChecked="{Binding StreamOutIRIGTimeDataPacketIntervalMs, Converter={StaticResource GreaterThanConverter}, ConverterParameter={StaticResource IntervalOnBound}, Mode=OneWay}"
|
||||
Click="TimePacketIntervalOn_Click"
|
||||
/>
|
||||
<xctk:DoubleUpDown Value="{Binding StreamOutIRIGTimeDataPacketIntervalMs}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_DataChannelId"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="{StaticResource STREAMOUT_IRIG_TDP_MIN}" Maximum="{StaticResource STREAMOUT_IRIG_TDP_MAX}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutIRIGTimeDataPacketIntervalMsDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
Visibility="{Binding StreamOutIRIGTimeDataPacketIntervalMs, Converter={StaticResource InterveralToVisConverter}, ConverterParameter={StaticResource IntervalOnBound}}"
|
||||
/>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsCH10, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutTMATSIntervalMsColumn" x:Name="StreamOutTMATSIntervalMsColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutTMATSIntervalMs" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMATSIntervalMs}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding IsIENA, Converter={StaticResource InverseBoolToVisConverter}}"
|
||||
IsEnabled="{Binding ElementName=ChannelListView, Path=DbVersion, Converter={StaticResource GreaterThanConverter}, ConverterParameter={StaticResource TMATSIntervalDbVesion}}">
|
||||
<CheckBox Content="{strings:TranslateExtension IntervalOn}" IsChecked="{Binding StreamOutTMATSIntervalMs, Converter={StaticResource GreaterThanConverter},ConverterParameter={StaticResource IntervalOnBound},Mode=OneWay}"
|
||||
Click="TMATSIntervalON_Click"
|
||||
/>
|
||||
<xctk:DoubleUpDown Value="{Binding StreamOutTMATSIntervalMs}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TMATSIntervalMs"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="{StaticResource STREAMOUT_TMAT_INTERVAL_MIN}" Maximum="{StaticResource STREAMOUT_TMAT_INTERVAL_MAX}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutTMATSIntervalMsDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
Visibility="{Binding StreamOutTMATSIntervalMs, Converter={StaticResource InterveralToVisConverter}, ConverterParameter={StaticResource IntervalOnBound}}"
|
||||
/>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsIENA, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<!-- TMNS Columns -->
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutSubFrameIDColumn" x:Name="StreamOutSubFrameIDColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutSubFrameIdColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMNS_SubFrameId}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding TMNS_SubFrameId}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TMNS_SubFrameId"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsTMNS,Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutMessageIDColumn" x:Name="StreamOutMessageIDColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutMessageIdColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMNS_MessageId}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding TMNS_MsgId}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TMNS_MessageId"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsTMNS, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutMinorPerMajorColumn" x:Name="StreamOutMinorPerMajorColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutMinorPerMajorColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMNS_MinorPerMajor}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding TMNS_MinorPerMajor}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TMNS_MinorPerMajor"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsTMNS, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutTMATSPortColumn" x:Name="StreamOutTMATSPortColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutTMATSPortColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMNS_TMATSPort}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding TMNS_TMATSPort}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TMNS_TMATSPort"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsTMNS, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<!-- IENA columns -->
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutIENASourcePortColumn" x:Name="StreamOutIENASourcePortColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutIENASourcePortColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_IENA_SourcePort}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding IENA_SourcePort}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_IENA_SourcePort"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsIENA, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsIENA, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutIENAKeyColumn" x:Name="StreamOutIENAKeyColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutIENAKeyColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_IENA_Key}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding IENA_Key}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_IENA_Key"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsIENA, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsIENA, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CanIsFDColumn" x:Name="CanIsFDColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="CanIsFD" HeaderTitle="{strings:TranslateExtension CanParameters_IsFD}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding CanIsFD}" AutomationProperties.AutomationId="CanIsFDColumn"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsCanIsCanFDDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CanArbBaseBitrateColumn" x:Name="CanArbBaseBitrateColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="CanArbBaseBitrate" HeaderTitle="{strings:TranslateExtension CanParameters_ArbBaseBitrate}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox ItemsSource="{Binding ArbBaseBitrate_Values}" BorderThickness="2.0" BorderBrush="{Binding IsCanArbBaseBitrateDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}"
|
||||
IsEditable="True">
|
||||
<ComboBox.Text>
|
||||
<Binding Path="CanArbBaseBitrate" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" ValidatesOnNotifyDataErrors="True" ValidatesOnExceptions="True">
|
||||
<Binding.ValidationRules>
|
||||
<!--<validators:CANArbBaseBitrateValidator />-->
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</ComboBox.Text>
|
||||
</ComboBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CanArbBaseSJWColumn" x:Name="CanArbBaseSJWColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="CanArbBaseSJW" HeaderTitle="{strings:TranslateExtension CanParameters_ArbBaseSJW}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox ItemsSource="{Binding ArbBaseSJW_Values}" BorderThickness="2.0" BorderBrush="{Binding IsCanArbBaseSJWDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}"
|
||||
IsEditable="True">
|
||||
<ComboBox.Text>
|
||||
<Binding Path="CanArbBaseSJW" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" ValidatesOnNotifyDataErrors="True" ValidatesOnExceptions="True">
|
||||
<Binding.ValidationRules>
|
||||
<!--<validators:CANArbBaseBitrateValidator />-->
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</ComboBox.Text>
|
||||
</ComboBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CanDataBitrateColumn" x:Name="CanDataBitrateColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="CanDataBitrate" HeaderTitle="{strings:TranslateExtension CanParameters_DataBitrate}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox ItemsSource="{x:Static constants:EmbeddedSensors.DATABITRATE_VALUES}" BorderThickness="2.0" BorderBrush="{Binding IsCanArbBaseSJWDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}"
|
||||
IsEditable="True" Visibility="{Binding CanIsFD, Converter={StaticResource BoolToVisConverter}}">
|
||||
<ComboBox.Text>
|
||||
<Binding Path="CanDataBitrate" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" ValidatesOnNotifyDataErrors="True" ValidatesOnExceptions="True">
|
||||
<Binding.ValidationRules>
|
||||
<!--<validators:CANArbBaseBitrateValidator />-->
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</ComboBox.Text>
|
||||
</ComboBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CanDataSJWColumn" x:Name="CanDataSJWColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="CanDataSJW" HeaderTitle="{strings:TranslateExtension CanParameters_DataSJW}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox ItemsSource="{Binding DataSJW_Values}" BorderThickness="2.0" BorderBrush="{Binding IsCanArbBaseSJWDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}"
|
||||
IsEditable="True" Visibility="{Binding CanIsFD, Converter={StaticResource BoolToVisConverter}}">
|
||||
<ComboBox.Text>
|
||||
<Binding Path="CanDataSJW" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" ValidatesOnNotifyDataErrors="True" ValidatesOnExceptions="True">
|
||||
<Binding.ValidationRules>
|
||||
<!--<validators:CANArbBaseBitrateValidator />-->
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</ComboBox.Text>
|
||||
</ComboBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CanFileTypeColumn" x:Name="CanFileTypeColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="CanFileType" HeaderTitle="{strings:TranslateExtension CanParameters_FileType}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox ItemsSource="{x:Static constants:EmbeddedSensors.FILETYPE_VALUES}" BorderThickness="2.0" BorderBrush="{Binding IsCanArbBaseSJWDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}"
|
||||
IsEditable="True">
|
||||
<ComboBox.Text>
|
||||
<Binding Path="CanFileType" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" ValidatesOnNotifyDataErrors="True" ValidatesOnExceptions="True">
|
||||
<Binding.ValidationRules>
|
||||
<!--<validators:CANArbBaseBitrateValidator />-->
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</ComboBox.Text>
|
||||
</ComboBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
</controls:AutoSizedGridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
<!--</ScrollViewer>-->
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,954 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GroupChannelList.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("GroupChannelList.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 AC coupling enabled.
|
||||
/// </summary>
|
||||
internal static string AnalogParameter_ACCouplingEnable {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogParameter_ACCouplingEnable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor max range.
|
||||
/// </summary>
|
||||
internal static string AnalogParameters_Capacity {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogParameters_Capacity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Channel filter class.
|
||||
/// </summary>
|
||||
internal static string AnalogParameters_CFC {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogParameters_CFC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Initial offset.
|
||||
/// </summary>
|
||||
internal static string AnalogParameters_InitialOffset {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogParameters_InitialOffset", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Maximum Usage.
|
||||
/// </summary>
|
||||
internal static string AnalogParameters_MaximumUsage {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogParameters_MaximumUsage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Polarity.
|
||||
/// </summary>
|
||||
internal static string AnalogParameters_Polarity {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogParameters_Polarity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Channel full-scale.
|
||||
/// </summary>
|
||||
internal static string AnalogParameters_Range {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogParameters_Range", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensitivity.
|
||||
/// </summary>
|
||||
internal static string AnalogParameters_Sensitivity {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogParameters_Sensitivity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Units.
|
||||
/// </summary>
|
||||
internal static string AnalogParameters_Units {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogParameters_Units", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Usage Count.
|
||||
/// </summary>
|
||||
internal static string AnalogParameters_UsageCount {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogParameters_UsageCount", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User Value 1.
|
||||
/// </summary>
|
||||
internal static string AnalogParameters_UserValue1 {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogParameters_UserValue1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User Value 2.
|
||||
/// </summary>
|
||||
internal static string AnalogParameters_UserValue2 {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogParameters_UserValue2", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User Value 3.
|
||||
/// </summary>
|
||||
internal static string AnalogParameters_UserValue3 {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogParameters_UserValue3", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Zero Method.
|
||||
/// </summary>
|
||||
internal static string AnalogParameters_ZeroMethod {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogParameters_ZeroMethod", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to End (sec).
|
||||
/// </summary>
|
||||
internal static string AnalogParameters_ZeroMethodEnd {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogParameters_ZeroMethodEnd", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Start (sec).
|
||||
/// </summary>
|
||||
internal static string AnalogParameters_ZeroMethodStart {
|
||||
get {
|
||||
return ResourceManager.GetString("AnalogParameters_ZeroMethodStart", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to (Assigned by ID).
|
||||
/// </summary>
|
||||
internal static string AssignedBySensorId {
|
||||
get {
|
||||
return ResourceManager.GetString("AssignedBySensorId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Apply.
|
||||
/// </summary>
|
||||
internal static string btnApplyGlobalRangeCAC {
|
||||
get {
|
||||
return ResourceManager.GetString("btnApplyGlobalRangeCAC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to To delete a channel, please contact an Administrator.
|
||||
/// </summary>
|
||||
internal static string ChannelDelete_Tooltip {
|
||||
get {
|
||||
return ResourceManager.GetString("ChannelDelete_Tooltip", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Channel name.
|
||||
/// </summary>
|
||||
internal static string ChannelName {
|
||||
get {
|
||||
return ResourceManager.GetString("ChannelName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to channel(s) in .
|
||||
/// </summary>
|
||||
internal static string Channels {
|
||||
get {
|
||||
return ResourceManager.GetString("Channels", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Type.
|
||||
/// </summary>
|
||||
internal static string ChannelType {
|
||||
get {
|
||||
return ResourceManager.GetString("ChannelType", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Clear.
|
||||
/// </summary>
|
||||
internal static string Clear {
|
||||
get {
|
||||
return ResourceManager.GetString("Clear", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Dallas ID.
|
||||
/// </summary>
|
||||
internal static string DallasId {
|
||||
get {
|
||||
return ResourceManager.GetString("DallasId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delete.
|
||||
/// </summary>
|
||||
internal static string Delete {
|
||||
get {
|
||||
return ResourceManager.GetString("Delete", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Active value.
|
||||
/// </summary>
|
||||
internal static string DigitalInParameters_ActiveValue {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalInParameters_ActiveValue", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Default value.
|
||||
/// </summary>
|
||||
internal static string DigitalInParameters_DefaultValue {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalInParameters_DefaultValue", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Input mode.
|
||||
/// </summary>
|
||||
internal static string DigitalInParameters_InputMode {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalInParameters_InputMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delay (ms).
|
||||
/// </summary>
|
||||
internal static string DigitalOutParameters_Delay {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutParameters_Delay", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Duration (ms).
|
||||
/// </summary>
|
||||
internal static string DigitalOutParameters_Duration {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutParameters_Duration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Limit duration.
|
||||
/// </summary>
|
||||
internal static string DigitalOutParameters_LimitDuration {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutParameters_LimitDuration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Output mode.
|
||||
/// </summary>
|
||||
internal static string DigitalOutParameters_OutputMode {
|
||||
get {
|
||||
return ResourceManager.GetString("DigitalOutParameters_OutputMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Display name.
|
||||
/// </summary>
|
||||
internal static string DisplayName {
|
||||
get {
|
||||
return ResourceManager.GetString("DisplayName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Display order.
|
||||
/// </summary>
|
||||
internal static string DisplayOrder {
|
||||
get {
|
||||
return ResourceManager.GetString("DisplayOrder", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Drag and drop operation completed. Note that the table is currently being filtered, but items that were part of the drag and drop operation will remain after this operation..
|
||||
/// </summary>
|
||||
internal static string DragAndDropFilterWarning {
|
||||
get {
|
||||
return ResourceManager.GetString("DragAndDropFilterWarning", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor appears more than once.
|
||||
/// </summary>
|
||||
internal static string DuplicateSensor {
|
||||
get {
|
||||
return ResourceManager.GetString("DuplicateSensor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Enter value.
|
||||
/// </summary>
|
||||
internal static string EnterValue {
|
||||
get {
|
||||
return ResourceManager.GetString("EnterValue", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Global range (CAC).
|
||||
/// </summary>
|
||||
internal static string GlobalRangeCAC {
|
||||
get {
|
||||
return ResourceManager.GetString("GlobalRangeCAC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Group.
|
||||
/// </summary>
|
||||
internal static string Group {
|
||||
get {
|
||||
return ResourceManager.GetString("Group", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to group.
|
||||
/// </summary>
|
||||
internal static string GroupLower {
|
||||
get {
|
||||
return ResourceManager.GetString("GroupLower", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Hardware.
|
||||
/// </summary>
|
||||
internal static string Hardware {
|
||||
get {
|
||||
return ResourceManager.GetString("Hardware", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to IEPE support.
|
||||
/// </summary>
|
||||
internal static string IEPESupport {
|
||||
get {
|
||||
return ResourceManager.GetString("IEPESupport", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to On.
|
||||
/// </summary>
|
||||
internal static string IntervalOn {
|
||||
get {
|
||||
return ResourceManager.GetString("IntervalOn", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor {0} can not be assigned to channel {1}.
|
||||
/// </summary>
|
||||
internal static string InvalidAnalogAssignment {
|
||||
get {
|
||||
return ResourceManager.GetString("InvalidAnalogAssignment", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to DigitalInput {0} can not be assigned to channel {1}.
|
||||
/// </summary>
|
||||
internal static string InvalidDigitalInputAssignment {
|
||||
get {
|
||||
return ResourceManager.GetString("InvalidDigitalInputAssignment", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to DigitalOutput {0} can not be assigned to channel {1}.
|
||||
/// </summary>
|
||||
internal static string InvalidDigitalOutputAssignment {
|
||||
get {
|
||||
return ResourceManager.GetString("InvalidDigitalOutputAssignment", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor {0} does not support any of the excitation options provided by channel {1}.
|
||||
/// </summary>
|
||||
internal static string InvalidExcitationAssignment {
|
||||
get {
|
||||
return ResourceManager.GetString("InvalidExcitationAssignment", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid pasted group channel, line: {0}.
|
||||
/// </summary>
|
||||
internal static string InvalidLine {
|
||||
get {
|
||||
return ResourceManager.GetString("InvalidLine", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid sensor, line: {0}.
|
||||
/// </summary>
|
||||
internal static string InvalidSensor {
|
||||
get {
|
||||
return ResourceManager.GetString("InvalidSensor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Squib {0} can not be assigned to channel {1}.
|
||||
/// </summary>
|
||||
internal static string InvalidSquibAssignment {
|
||||
get {
|
||||
return ResourceManager.GetString("InvalidSquibAssignment", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ISO 13499 and user codes.
|
||||
/// </summary>
|
||||
internal static string ISOAndUserCode {
|
||||
get {
|
||||
return ResourceManager.GetString("ISOAndUserCode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ISO channel name.
|
||||
/// </summary>
|
||||
internal static string ISOChannelName {
|
||||
get {
|
||||
return ResourceManager.GetString("ISOChannelName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ISO (13499) code.
|
||||
/// </summary>
|
||||
internal static string ISOCode {
|
||||
get {
|
||||
return ResourceManager.GetString("ISOCode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ISO 13499 only.
|
||||
/// </summary>
|
||||
internal static string ISOOnly {
|
||||
get {
|
||||
return ResourceManager.GetString("ISOOnly", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Modify global range CAC.
|
||||
/// </summary>
|
||||
internal static string ModifyGlobalRangeCAC {
|
||||
get {
|
||||
return ResourceManager.GetString("ModifyGlobalRangeCAC", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to N/A.
|
||||
/// </summary>
|
||||
internal static string Not_Applicable {
|
||||
get {
|
||||
return ResourceManager.GetString("Not_Applicable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to of .
|
||||
/// </summary>
|
||||
internal static string Of {
|
||||
get {
|
||||
return ResourceManager.GetString("Of", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Order.
|
||||
/// </summary>
|
||||
internal static string Order {
|
||||
get {
|
||||
return ResourceManager.GetString("Order", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Analog.
|
||||
/// </summary>
|
||||
internal static string Parameters_Analog {
|
||||
get {
|
||||
return ResourceManager.GetString("Parameters_Analog", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Digital in.
|
||||
/// </summary>
|
||||
internal static string Parameters_DigitalIn {
|
||||
get {
|
||||
return ResourceManager.GetString("Parameters_DigitalIn", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Digital out.
|
||||
/// </summary>
|
||||
internal static string Parameters_DigitalOut {
|
||||
get {
|
||||
return ResourceManager.GetString("Parameters_DigitalOut", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Squib.
|
||||
/// </summary>
|
||||
internal static string Parameters_Squib {
|
||||
get {
|
||||
return ResourceManager.GetString("Parameters_Squib", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream in.
|
||||
/// </summary>
|
||||
internal static string Parameters_StreamIn {
|
||||
get {
|
||||
return ResourceManager.GetString("Parameters_StreamIn", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream out.
|
||||
/// </summary>
|
||||
internal static string Parameters_StreamOut {
|
||||
get {
|
||||
return ResourceManager.GetString("Parameters_StreamOut", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UART.
|
||||
/// </summary>
|
||||
internal static string Parameters_Uart {
|
||||
get {
|
||||
return ResourceManager.GetString("Parameters_Uart", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to physical channel(s) assigned.
|
||||
/// </summary>
|
||||
internal static string PhysicalChannelsAssigned {
|
||||
get {
|
||||
return ResourceManager.GetString("PhysicalChannelsAssigned", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Remove Sensor.
|
||||
/// </summary>
|
||||
internal static string RemoveSensor {
|
||||
get {
|
||||
return ResourceManager.GetString("RemoveSensor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor (SN).
|
||||
/// </summary>
|
||||
internal static string Sensor {
|
||||
get {
|
||||
return ResourceManager.GetString("Sensor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Current (A).
|
||||
/// </summary>
|
||||
internal static string SquibParameters_Current {
|
||||
get {
|
||||
return ResourceManager.GetString("SquibParameters_Current", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Delay (ms).
|
||||
/// </summary>
|
||||
internal static string SquibParameters_Delay {
|
||||
get {
|
||||
return ResourceManager.GetString("SquibParameters_Delay", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Duration (ms).
|
||||
/// </summary>
|
||||
internal static string SquibParameters_Duration {
|
||||
get {
|
||||
return ResourceManager.GetString("SquibParameters_Duration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Fire mode.
|
||||
/// </summary>
|
||||
internal static string SquibParameters_FireMode {
|
||||
get {
|
||||
return ResourceManager.GetString("SquibParameters_FireMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Limit duration.
|
||||
/// </summary>
|
||||
internal static string SquibParameters_LimitDuration {
|
||||
get {
|
||||
return ResourceManager.GetString("SquibParameters_LimitDuration", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UDP Address.
|
||||
/// </summary>
|
||||
internal static string StreamInParameters_UDPAddress {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamInParameters_UDPAddress", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data channel id.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_DataChannelId {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_DataChannelId", 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 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 IRIG time data packet interval (ms).
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_IRIGTimeDataPacketIntervalMs {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_IRIGTimeDataPacketIntervalMs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stream profile.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_StreamProfile {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_StreamProfile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Time channel id.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_TimeChannelId {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_TimeChannelId", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to TMATS interval (ms).
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_TMATSIntervalMs {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_TMATSIntervalMs", 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 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 TmNS config.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_TmNSConfig {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_TmNSConfig", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to UDP Address.
|
||||
/// </summary>
|
||||
internal static string StreamOutParameters_UDPAddress {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamOutParameters_UDPAddress", 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 test.
|
||||
/// </summary>
|
||||
internal static string Test {
|
||||
get {
|
||||
return ResourceManager.GetString("Test", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Test channels.
|
||||
/// </summary>
|
||||
internal static string TestChannelsGroupName {
|
||||
get {
|
||||
return ResourceManager.GetString("TestChannelsGroupName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Baud rate.
|
||||
/// </summary>
|
||||
internal static string UartParameters_BaudRate {
|
||||
get {
|
||||
return ResourceManager.GetString("UartParameters_BaudRate", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data bits.
|
||||
/// </summary>
|
||||
internal static string UartParameters_DataBits {
|
||||
get {
|
||||
return ResourceManager.GetString("UartParameters_DataBits", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Data format.
|
||||
/// </summary>
|
||||
internal static string UartParameters_DataFormat {
|
||||
get {
|
||||
return ResourceManager.GetString("UartParameters_DataFormat", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Flow control.
|
||||
/// </summary>
|
||||
internal static string UartParameters_FlowControl {
|
||||
get {
|
||||
return ResourceManager.GetString("UartParameters_FlowControl", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Parity.
|
||||
/// </summary>
|
||||
internal static string UartParameters_Parity {
|
||||
get {
|
||||
return ResourceManager.GetString("UartParameters_Parity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Stop bits.
|
||||
/// </summary>
|
||||
internal static string UartParameters_StopBits {
|
||||
get {
|
||||
return ResourceManager.GetString("UartParameters_StopBits", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User channel name.
|
||||
/// </summary>
|
||||
internal static string UserChannelName {
|
||||
get {
|
||||
return ResourceManager.GetString("UserChannelName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User code.
|
||||
/// </summary>
|
||||
internal static string UserCode {
|
||||
get {
|
||||
return ResourceManager.GetString("UserCode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User codes only.
|
||||
/// </summary>
|
||||
internal static string UserCodeOnly {
|
||||
get {
|
||||
return ResourceManager.GetString("UserCodeOnly", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,138 @@
|
||||
using System;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DTS.Common;
|
||||
using DTS.Common.Interface;
|
||||
using DTS.Common.Interface.Groups.GroupChannelList;
|
||||
using GroupChannelList;
|
||||
using Prism.Ioc;
|
||||
using Prism.Modularity;
|
||||
using Unity;
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable RedundantAttributeUsageProperty
|
||||
// ReSharper disable UnusedParameter.Local
|
||||
|
||||
[assembly: GroupChannelListModuleName]
|
||||
[assembly: GroupChannelListModuleImageAttribute]
|
||||
namespace GroupChannelList
|
||||
{
|
||||
[Export(typeof(IModule))]
|
||||
[Module(ModuleName = "GroupChannelListModule")]
|
||||
public class GroupChannelListModule : IModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Injected unity container
|
||||
/// </summary>
|
||||
private readonly IUnityContainer _unityContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GroupChannelListModule"/> class.
|
||||
/// </summary>
|
||||
/// <param name="unityContainer">Obtained reference of the unity container by using dependency injection.</param>
|
||||
public GroupChannelListModule(IUnityContainer unityContainer)
|
||||
{
|
||||
_unityContainer = unityContainer;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// Register View & View-Model with Unity dependency injection container as a singleton.
|
||||
_unityContainer.RegisterType<IGroupChannelListViewModel, GroupChannelListViewModel>();
|
||||
_unityContainer.RegisterType<IGroupChannelListView, GroupChannelListView>();
|
||||
_unityContainer.RegisterType<IGroupChannelSettingsListView, GroupChannelSettingsListView>();
|
||||
}
|
||||
|
||||
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 GroupChannelListModuleNameAttribute : TextAttribute
|
||||
{
|
||||
public GroupChannelListModuleNameAttribute() : this(null) { }
|
||||
|
||||
public GroupChannelListModuleNameAttribute(string s)
|
||||
{
|
||||
AssemblyName = AssemblyNames.GroupChannelList.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 GroupChannelListModuleImageAttribute : ImageAttribute
|
||||
{
|
||||
private BitmapImage _img;
|
||||
|
||||
public GroupChannelListModuleImageAttribute() : this(null) { }
|
||||
public override BitmapImage AssemblyImage
|
||||
{
|
||||
get { _img = AssemblyInfo.GetImage(AssemblyNames.GroupChannelList.ToString()); return _img; }
|
||||
}
|
||||
public GroupChannelListModuleImageAttribute(string s)
|
||||
{
|
||||
_img = AssemblyInfo.GetImage(AssemblyNames.GroupChannelList.ToString());
|
||||
}
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(ImageAttribute);
|
||||
}
|
||||
public override BitmapImage GetAssemblyImage()
|
||||
{
|
||||
return AssemblyImage;
|
||||
}
|
||||
private string _name;
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { _name = AssemblyNames.GroupChannelList.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.GroupChannelListRegion; return _region; }
|
||||
}
|
||||
public override eAssemblyRegion GetAssemblyRegion()
|
||||
{
|
||||
return AssemblyRegion;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
<?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>{AEA41635-D997-4179-9FD3-C145A2052947}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>GroupChannelList</RootNamespace>
|
||||
<AssemblyName>GroupChannelList</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="Converters\BooleanToWidthConverter.cs" />
|
||||
<Compile Include="Converters\SensorIdBackgroundConverter.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GroupChannelListModule.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\GroupChannelListViewModel.cs" />
|
||||
<Compile Include="View\GroupChannelSettingsListView.xaml.cs">
|
||||
<DependentUpon>GroupChannelSettingsListView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\GroupChannelListView.xaml.cs">
|
||||
<DependentUpon>GroupChannelListView.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.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>
|
||||
<ProjectReference Include="..\..\Channels\ChannelCodes\ChannelCodes.csproj">
|
||||
<Project>{266b86d0-6a3f-4b52-8749-fa87ecb0230f}</Project>
|
||||
<Name>ChannelCodes</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\GroupChannelSettingsListView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\GroupChannelListView.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,39 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace GroupChannelList.Converters
|
||||
{
|
||||
public class SensorIdBackgroundConverter : IValueConverter
|
||||
{
|
||||
private static SolidColorBrush SensorIdBrush = new SolidColorBrush(Color.FromArgb(0xFF, 0xE3, 0xFB, 0xE1));
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (null == value)
|
||||
{
|
||||
return Brushes.Transparent;
|
||||
}
|
||||
try
|
||||
{
|
||||
var bSensorId = (bool)value;
|
||||
if (bSensorId)
|
||||
{
|
||||
SensorIdBrush.Freeze();
|
||||
return SensorIdBrush;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Trace.WriteLine(ex.Message);
|
||||
}
|
||||
return Brushes.Transparent;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,417 @@
|
||||
<?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="AssignedBySensorId" xml:space="preserve">
|
||||
<value>(Assigned by ID)</value>
|
||||
</data>
|
||||
<data name="Clear" xml:space="preserve">
|
||||
<value>Clear</value>
|
||||
</data>
|
||||
<data name="DisplayName" xml:space="preserve">
|
||||
<value>Display name</value>
|
||||
</data>
|
||||
<data name="DuplicateSensor" xml:space="preserve">
|
||||
<value>Sensor appears more than once</value>
|
||||
</data>
|
||||
<data name="Group" xml:space="preserve">
|
||||
<value>Group</value>
|
||||
</data>
|
||||
<data name="Hardware" xml:space="preserve">
|
||||
<value>Hardware</value>
|
||||
</data>
|
||||
<data name="InvalidAnalogAssignment" xml:space="preserve">
|
||||
<value>Sensor {0} can not be assigned to channel {1}</value>
|
||||
</data>
|
||||
<data name="InvalidDigitalInputAssignment" xml:space="preserve">
|
||||
<value>DigitalInput {0} can not be assigned to channel {1}</value>
|
||||
</data>
|
||||
<data name="InvalidDigitalOutputAssignment" xml:space="preserve">
|
||||
<value>DigitalOutput {0} can not be assigned to channel {1}</value>
|
||||
</data>
|
||||
<data name="InvalidExcitationAssignment" xml:space="preserve">
|
||||
<value>Sensor {0} does not support any of the excitation options provided by channel {1}</value>
|
||||
</data>
|
||||
<data name="InvalidSquibAssignment" xml:space="preserve">
|
||||
<value>Squib {0} can not be assigned to channel {1}</value>
|
||||
</data>
|
||||
<data name="ISOChannelName" xml:space="preserve">
|
||||
<value>ISO channel name</value>
|
||||
</data>
|
||||
<data name="ISOCode" xml:space="preserve">
|
||||
<value>ISO (13499) code</value>
|
||||
</data>
|
||||
<data name="Sensor" xml:space="preserve">
|
||||
<value>Sensor (SN)</value>
|
||||
</data>
|
||||
<data name="UserChannelName" xml:space="preserve">
|
||||
<value>User channel name</value>
|
||||
</data>
|
||||
<data name="UserCode" xml:space="preserve">
|
||||
<value>User code</value>
|
||||
</data>
|
||||
<data name="DisplayOrder" xml:space="preserve">
|
||||
<value>Display order</value>
|
||||
</data>
|
||||
<data name="Delete" xml:space="preserve">
|
||||
<value>Delete</value>
|
||||
</data>
|
||||
<data name="InvalidLine" xml:space="preserve">
|
||||
<value>Invalid pasted group channel, line: {0}</value>
|
||||
</data>
|
||||
<data name="InvalidSensor" xml:space="preserve">
|
||||
<value>Invalid sensor, line: {0}</value>
|
||||
</data>
|
||||
<data name="Channels" xml:space="preserve">
|
||||
<value> channel(s) in </value>
|
||||
</data>
|
||||
<data name="GroupLower" xml:space="preserve">
|
||||
<value>group</value>
|
||||
</data>
|
||||
<data name="Test" xml:space="preserve">
|
||||
<value>test</value>
|
||||
</data>
|
||||
<data name="ISOAndUserCode" xml:space="preserve">
|
||||
<value>ISO 13499 and user codes</value>
|
||||
</data>
|
||||
<data name="ISOOnly" xml:space="preserve">
|
||||
<value>ISO 13499 only</value>
|
||||
</data>
|
||||
<data name="UserCodeOnly" xml:space="preserve">
|
||||
<value>User codes only</value>
|
||||
</data>
|
||||
<data name="TestChannelsGroupName" xml:space="preserve">
|
||||
<value>Test channels</value>
|
||||
</data>
|
||||
<data name="Of" xml:space="preserve">
|
||||
<value> of </value>
|
||||
</data>
|
||||
<data name="PhysicalChannelsAssigned" xml:space="preserve">
|
||||
<value> physical channel(s) assigned</value>
|
||||
</data>
|
||||
<data name="DragAndDropFilterWarning" xml:space="preserve">
|
||||
<value>Drag and drop operation completed. Note that the table is currently being filtered, but items that were part of the drag and drop operation will remain after this operation.</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_Capacity" xml:space="preserve">
|
||||
<value>Sensor max range</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_CFC" xml:space="preserve">
|
||||
<value>Channel filter class</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_Polarity" xml:space="preserve">
|
||||
<value>Polarity</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_Range" xml:space="preserve">
|
||||
<value>Channel full-scale</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_Sensitivity" xml:space="preserve">
|
||||
<value>Sensitivity</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_Units" xml:space="preserve">
|
||||
<value>Units</value>
|
||||
</data>
|
||||
<data name="DigitalInParameters_ActiveValue" xml:space="preserve">
|
||||
<value>Active value</value>
|
||||
</data>
|
||||
<data name="DigitalInParameters_DefaultValue" xml:space="preserve">
|
||||
<value>Default value</value>
|
||||
</data>
|
||||
<data name="DigitalInParameters_InputMode" xml:space="preserve">
|
||||
<value>Input mode</value>
|
||||
</data>
|
||||
<data name="DigitalOutParameters_Delay" xml:space="preserve">
|
||||
<value>Delay (ms)</value>
|
||||
</data>
|
||||
<data name="EnterValue" xml:space="preserve">
|
||||
<value>Enter value</value>
|
||||
</data>
|
||||
<data name="DigitalOutParameters_Duration" xml:space="preserve">
|
||||
<value>Duration (ms)</value>
|
||||
</data>
|
||||
<data name="DigitalOutParameters_LimitDuration" xml:space="preserve">
|
||||
<value>Limit duration</value>
|
||||
</data>
|
||||
<data name="DigitalOutParameters_OutputMode" xml:space="preserve">
|
||||
<value>Output mode</value>
|
||||
</data>
|
||||
<data name="Parameters_Analog" xml:space="preserve">
|
||||
<value>Analog</value>
|
||||
</data>
|
||||
<data name="Parameters_DigitalIn" xml:space="preserve">
|
||||
<value>Digital in</value>
|
||||
</data>
|
||||
<data name="Parameters_DigitalOut" xml:space="preserve">
|
||||
<value>Digital out</value>
|
||||
</data>
|
||||
<data name="Parameters_Squib" xml:space="preserve">
|
||||
<value>Squib</value>
|
||||
</data>
|
||||
<data name="SquibParameters_Delay" xml:space="preserve">
|
||||
<value>Delay (ms)</value>
|
||||
</data>
|
||||
<data name="SquibParameters_Duration" xml:space="preserve">
|
||||
<value>Duration (ms)</value>
|
||||
</data>
|
||||
<data name="SquibParameters_FireMode" xml:space="preserve">
|
||||
<value>Fire mode</value>
|
||||
</data>
|
||||
<data name="SquibParameters_LimitDuration" xml:space="preserve">
|
||||
<value>Limit duration</value>
|
||||
</data>
|
||||
<data name="btnApplyGlobalRangeCAC" xml:space="preserve">
|
||||
<value>Apply</value>
|
||||
</data>
|
||||
<data name="GlobalRangeCAC" xml:space="preserve">
|
||||
<value>Global range (CAC)</value>
|
||||
</data>
|
||||
<data name="ModifyGlobalRangeCAC" xml:space="preserve">
|
||||
<value>Modify global range CAC</value>
|
||||
</data>
|
||||
<data name="Order" xml:space="preserve">
|
||||
<value>Order</value>
|
||||
</data>
|
||||
<data name="SquibParameters_Current" xml:space="preserve">
|
||||
<value>Current (A)</value>
|
||||
</data>
|
||||
<data name="IEPESupport" xml:space="preserve">
|
||||
<value>IEPE support</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_ZeroMethod" xml:space="preserve">
|
||||
<value>Zero Method</value>
|
||||
</data>
|
||||
<data name="ChannelType" xml:space="preserve">
|
||||
<value>Type</value>
|
||||
</data>
|
||||
<data name="RemoveSensor" xml:space="preserve">
|
||||
<value>Remove Sensor</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_ZeroMethodEnd" xml:space="preserve">
|
||||
<value>End (sec)</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_ZeroMethodStart" xml:space="preserve">
|
||||
<value>Start (sec)</value>
|
||||
</data>
|
||||
<data name="Not_Applicable" xml:space="preserve">
|
||||
<value>N/A</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_UserValue1" xml:space="preserve">
|
||||
<value>User Value 1</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_UserValue2" xml:space="preserve">
|
||||
<value>User Value 2</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_UserValue3" xml:space="preserve">
|
||||
<value>User Value 3</value>
|
||||
</data>
|
||||
<data name="ChannelDelete_Tooltip" xml:space="preserve">
|
||||
<value>To delete a channel, please contact an Administrator</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_InitialOffset" xml:space="preserve">
|
||||
<value>Initial offset</value>
|
||||
</data>
|
||||
<data name="ChannelName" xml:space="preserve">
|
||||
<value>Channel name</value>
|
||||
</data>
|
||||
<data name="Table_NA" xml:space="preserve">
|
||||
<value>---</value>
|
||||
</data>
|
||||
<data name="Parameters_Uart" xml:space="preserve">
|
||||
<value>UART</value>
|
||||
</data>
|
||||
<data name="UartParameters_BaudRate" xml:space="preserve">
|
||||
<value>Baud rate</value>
|
||||
</data>
|
||||
<data name="UartParameters_DataBits" xml:space="preserve">
|
||||
<value>Data bits</value>
|
||||
</data>
|
||||
<data name="UartParameters_DataFormat" xml:space="preserve">
|
||||
<value>Data format</value>
|
||||
</data>
|
||||
<data name="UartParameters_FlowControl" xml:space="preserve">
|
||||
<value>Flow control</value>
|
||||
</data>
|
||||
<data name="UartParameters_Parity" xml:space="preserve">
|
||||
<value>Parity</value>
|
||||
</data>
|
||||
<data name="UartParameters_StopBits" xml:space="preserve">
|
||||
<value>Stop bits</value>
|
||||
</data>
|
||||
<data name="Parameters_StreamOut" xml:space="preserve">
|
||||
<value>Stream out</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_DataChannelId" xml:space="preserve">
|
||||
<value>Data channel id</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_IRIGTimeDataPacketIntervalMs" xml:space="preserve">
|
||||
<value>IRIG time data packet interval (ms)</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_StreamProfile" xml:space="preserve">
|
||||
<value>Stream profile</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_TimeChannelId" xml:space="preserve">
|
||||
<value>Time channel id</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_TmNSConfig" xml:space="preserve">
|
||||
<value>TmNS config</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_UDPAddress" xml:space="preserve">
|
||||
<value>UDP Address</value>
|
||||
</data>
|
||||
<data name="Parameters_StreamIn" xml:space="preserve">
|
||||
<value>Stream in</value>
|
||||
</data>
|
||||
<data name="StreamInParameters_UDPAddress" xml:space="preserve">
|
||||
<value>UDP Address</value>
|
||||
</data>
|
||||
<data name="AnalogParameter_ACCouplingEnable" xml:space="preserve">
|
||||
<value>AC coupling enabled</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_IENA_Key" xml:space="preserve">
|
||||
<value>IENA key</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_IENA_SourcePort" xml:space="preserve">
|
||||
<value>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>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="StreamOutParameters_TMATSIntervalMs" xml:space="preserve">
|
||||
<value>TMATS interval (ms)</value>
|
||||
</data>
|
||||
<data name="DallasId" xml:space="preserve">
|
||||
<value>Dallas ID</value>
|
||||
</data>
|
||||
<data name="IntervalOn" xml:space="preserve">
|
||||
<value>On</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_MaximumUsage" xml:space="preserve">
|
||||
<value>Maximum Usage</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_UsageCount" xml:space="preserve">
|
||||
<value>Usage Count</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,957 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using DTS.Common.Classes.Groups;
|
||||
using DTS.Common.Classes.Sensors.SensorsList;
|
||||
using DTS.Common.Controls;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Channels;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Events.Groups.GroupChannelList;
|
||||
using DTS.Common.Interface.Channels;
|
||||
using DTS.Common.Interface.DataRecorders;
|
||||
using DTS.Common.Interface.Groups.GroupChannelList;
|
||||
using DTS.Common.Settings;
|
||||
using DTS.Common.Utils;
|
||||
|
||||
using Prism.Ioc;
|
||||
using Prism.Events;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace GroupChannelList
|
||||
{
|
||||
/// <inheritdoc cref="IGroupChannelListView" />
|
||||
/// <summary>
|
||||
/// Interaction logic for GroupChannelListView.xaml
|
||||
/// </summary>
|
||||
public partial class GroupChannelListView : IGroupChannelListView
|
||||
{
|
||||
/// <summary>
|
||||
/// returns whether the user input controls in the view should be read only
|
||||
/// 16284 Channels table in EditTestSetup is enabled when it shouldn't be
|
||||
/// </summary>
|
||||
public bool ReadOnlyChannelsMode
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == DataContext) { return false; }
|
||||
if (DataContext is IGroupChannelListViewModel model)
|
||||
{
|
||||
return model.ReadOnlyChannelsMode;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public GroupChannelListView()
|
||||
{
|
||||
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 GroupChannelListViewModel model))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (model.ListViewId != arg.Id) { return; }
|
||||
|
||||
ChannelListListView.Items.MoveCurrentToLast();
|
||||
ChannelListListView.ScrollIntoView(ChannelListListView.Items.CurrentItem);
|
||||
}
|
||||
|
||||
private void Clear_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel viewModel))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(sender is Control control))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(control.DataContext is IGroupChannel channel))
|
||||
{
|
||||
return;
|
||||
}
|
||||
viewModel.Clear(channel);
|
||||
viewModel.NotifyChannelsChanged();
|
||||
}
|
||||
|
||||
private void Delete_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel viewModel)) { return; }
|
||||
|
||||
if (!(sender is Control control)) { return; }
|
||||
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
|
||||
if (channel.IsBlank())
|
||||
{
|
||||
//14546
|
||||
// Cannot use delete action button in edit group/test
|
||||
// it's possible the channel is blank but still has an order assigned, we have to allow it to be
|
||||
// deleted still then ...
|
||||
if (viewModel.UseTestSetupOrder)
|
||||
{
|
||||
if (channel.TestSetupOrder <= 0) { return; }
|
||||
}
|
||||
else
|
||||
{
|
||||
if (channel.GroupChannelOrder <= 0) { return; }
|
||||
}
|
||||
}
|
||||
var eventAggregator = ContainerLocator.Container.Resolve<IEventAggregator>();
|
||||
eventAggregator.GetEvent<GroupChannelDeleteRequestEvent>().Publish(new GroupChannelDeleteRequestEventArgs(
|
||||
viewModel.Page,
|
||||
channel));
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderSearchable_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (IGroupChannelListViewModel)DataContext;
|
||||
viewModel.Filter(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
private void TextBox_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel viewModel)) { return; }
|
||||
|
||||
if (!(sender is Control control)) { return; }
|
||||
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
|
||||
viewModel.MarkModified(channel);
|
||||
}
|
||||
|
||||
public void HandleColumns(IsoViewMode viewMode)
|
||||
{
|
||||
if (!(DataContext is IGroupChannelListViewModel vm))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var showGroups = SettingsDB.GetGlobalValueBool("ShowGroups", true);
|
||||
|
||||
if (!vm.UseTestSetupOrder || !showGroups)
|
||||
{
|
||||
RemoveGroupColumn();
|
||||
}
|
||||
else
|
||||
{
|
||||
AddGroupColumn();
|
||||
}
|
||||
|
||||
switch (viewMode)
|
||||
{
|
||||
case IsoViewMode.ISOOnly:
|
||||
RemoveUserCodeColumns();
|
||||
AddIsoCodeColumns(vm.UseTestSetupOrder);
|
||||
break;
|
||||
case IsoViewMode.ISOAndUserCode:
|
||||
AddUserAndIsoCodeColumns(vm.UseTestSetupOrder);
|
||||
break;
|
||||
case IsoViewMode.UserCodeOnly:
|
||||
RemoveIsoCodeColumns();
|
||||
AddUserCodeColumns(vm.UseTestSetupOrder, true);
|
||||
break;
|
||||
case IsoViewMode.ChannelNameOnly:
|
||||
RemoveIsoCodeColumns();
|
||||
AddUserCodeColumns(vm.UseTestSetupOrder, false);
|
||||
break;
|
||||
}
|
||||
|
||||
if (vm.UseTestSetupOrder)
|
||||
{
|
||||
ShowTestSetupOrder(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowTestSetupOrder(false);
|
||||
}
|
||||
|
||||
if (vm.ShowDallasIdColumn)
|
||||
{
|
||||
AddDallasIdColumn();
|
||||
}
|
||||
else { RemoveDallasIdColumn(); }
|
||||
}
|
||||
|
||||
private void ShowTestSetupOrder(bool test)
|
||||
{
|
||||
if (!(ChannelListListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (test)
|
||||
{
|
||||
if (view.Columns.Contains(GroupOrderColumn))
|
||||
{
|
||||
view.Columns.Remove(GroupOrderColumn);
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(TestSetupOrderColumn))
|
||||
{
|
||||
view.Columns.Insert(0, TestSetupOrderColumn);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (view.Columns.Contains(TestSetupOrderColumn))
|
||||
{
|
||||
view.Columns.Remove(TestSetupOrderColumn);
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(GroupOrderColumn))
|
||||
{
|
||||
view.Columns.Insert(0, GroupOrderColumn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveGroupColumn()
|
||||
{
|
||||
if (!(ChannelListListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (view.Columns.Contains(GroupColumn))
|
||||
{
|
||||
view.Columns.Remove(GroupColumn);
|
||||
}
|
||||
}
|
||||
private void AddDallasIdColumn()
|
||||
{
|
||||
if (!(ChannelListListView.View is AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(DallasIdColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(HardwareColumn);
|
||||
view.Columns.Insert(index, DallasIdColumn);
|
||||
}
|
||||
}
|
||||
private void RemoveDallasIdColumn()
|
||||
{
|
||||
if (!(ChannelListListView.View is AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (view.Columns.Contains(DallasIdColumn))
|
||||
{
|
||||
view.Columns.Remove(DallasIdColumn);
|
||||
}
|
||||
}
|
||||
private void AddGroupColumn()
|
||||
{
|
||||
if (!(ChannelListListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(GroupColumn))
|
||||
{
|
||||
view.Columns.Insert(1, GroupColumn);
|
||||
}
|
||||
}
|
||||
private void AddUserAndIsoCodeColumns(bool usingTestSetup)
|
||||
{
|
||||
if (!(ChannelListListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(UserCodeColumn))
|
||||
{
|
||||
view.Columns.Insert(usingTestSetup ? 1 : 0, UserCodeColumn);
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(UserChannelNameColumn))
|
||||
{
|
||||
view.Columns.Insert(usingTestSetup ? 2 : 1, UserChannelNameColumn);
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(ISOCodeColumn))
|
||||
{
|
||||
view.Columns.Insert(usingTestSetup ? 3 : 2, ISOCodeColumn);
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(ISOChannelNameColumn))
|
||||
{
|
||||
view.Columns.Insert(usingTestSetup ? 4 : 3, ISOChannelNameColumn);
|
||||
}
|
||||
}
|
||||
private void AddIsoCodeColumns(bool usingTestSetup)
|
||||
{
|
||||
if (!(ChannelListListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(ISOCodeColumn))
|
||||
{
|
||||
view.Columns.Insert(usingTestSetup ? 1 : 0, ISOCodeColumn);
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(ISOChannelNameColumn))
|
||||
{
|
||||
view.Columns.Insert(usingTestSetup ? 2 : 1, ISOChannelNameColumn);
|
||||
}
|
||||
}
|
||||
private void RemoveIsoCodeColumns()
|
||||
{
|
||||
if (!(ChannelListListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (view.Columns.Contains(ISOCodeColumn))
|
||||
{
|
||||
view.Columns.Remove(ISOCodeColumn);
|
||||
}
|
||||
|
||||
if (view.Columns.Contains(ISOChannelNameColumn))
|
||||
{
|
||||
view.Columns.Remove(ISOChannelNameColumn);
|
||||
}
|
||||
}
|
||||
private void RemoveUserCodeColumns()
|
||||
{
|
||||
if (!(ChannelListListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (view.Columns.Contains(UserCodeColumn))
|
||||
{
|
||||
view.Columns.Remove(UserCodeColumn);
|
||||
}
|
||||
|
||||
if (view.Columns.Contains(UserChannelNameColumn))
|
||||
{
|
||||
view.Columns.Remove(UserChannelNameColumn);
|
||||
}
|
||||
}
|
||||
private void AddUserCodeColumns(bool usingTestSetup, bool addCodeColumn)
|
||||
{
|
||||
if (!(ChannelListListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var insertPoint = usingTestSetup ? 1 : 0;
|
||||
if (!view.Columns.Contains(UserCodeColumn) && addCodeColumn)
|
||||
{
|
||||
view.Columns.Insert(insertPoint, UserCodeColumn);
|
||||
}
|
||||
|
||||
if (addCodeColumn)
|
||||
{
|
||||
insertPoint++;
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(UserChannelNameColumn))
|
||||
{
|
||||
view.Columns.Insert(insertPoint, UserChannelNameColumn);
|
||||
}
|
||||
}
|
||||
private void ChannelList_DragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
if (!(DataContext is IGroupChannelListViewModel vm)) { return; }
|
||||
|
||||
var lv = ChannelListListView;
|
||||
|
||||
var index = GetIndex(lv);
|
||||
if (index < 0)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (lv.Items.Count <= index)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(lv.Items[index] is GroupChannel item))
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (null == e.Data)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
var formats = e.Data.GetFormats();
|
||||
|
||||
foreach (var format in formats)
|
||||
{
|
||||
switch (format)
|
||||
{
|
||||
case DragAndDropPayload.ALT_FORMAT:
|
||||
e.Effects = DragDropEffects.Copy;
|
||||
e.Handled = true;
|
||||
return;
|
||||
case DragAndDropPayload.CTRL_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
case DragAndDropPayload.FORMAT:
|
||||
e.Effects = DragDropEffects.Copy;
|
||||
e.Handled = true;
|
||||
return;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.FORMAT:
|
||||
e.Effects = DragDropEffects.Copy;
|
||||
e.Handled = true;
|
||||
return;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.CTRL_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.ALT_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
default:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
|
||||
private static int GetIndex(ListView lv)
|
||||
{
|
||||
for (var i = 0; i < lv.Items.Count; i++)
|
||||
{
|
||||
var item = GetListViewItem(lv, i);
|
||||
if (null == item) { continue; }
|
||||
if (IsMouseOverTarget(item))
|
||||
{
|
||||
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(Visual target)
|
||||
{
|
||||
if (null == target) { return false; }
|
||||
// We need to use MouseUtilities to figure out the cursor
|
||||
// coordinates because, during a drag-drop operation, the WPF
|
||||
// mechanisms for getting the coordinates behave strangely.
|
||||
|
||||
var bounds = VisualTreeHelper.GetDescendantBounds(target);
|
||||
var mousePos = MouseUtilities.GetMousePosition(target);
|
||||
var bContained = bounds.Contains(mousePos);
|
||||
return bContained;
|
||||
}
|
||||
|
||||
private void ChannelList_Drop(object sender, DragEventArgs e)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel vm)) { return; }
|
||||
|
||||
var lv = ChannelListListView;
|
||||
|
||||
var index = GetIndex(lv);
|
||||
if (index < 0)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (lv.Items.Count <= index)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
if (null == e.Data)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
var formats = e.Data.GetFormats();
|
||||
if (((int)e.KeyStates & (int)DragDropKeyStates.AltKey) == (int)DragDropKeyStates.AltKey)
|
||||
{
|
||||
for (var i = 0; i < formats.Length; i++)
|
||||
{
|
||||
formats[i] = $"ALT_{formats[i]}";
|
||||
}
|
||||
}
|
||||
else if (((int)e.KeyStates & (int)DragDropKeyStates.ControlKey) == (int)DragDropKeyStates.ControlKey)
|
||||
{
|
||||
for (var i = 0; i < formats.Length; i++)
|
||||
{
|
||||
formats[i] = $"CTRL_{formats[i]}";
|
||||
}
|
||||
}
|
||||
foreach (var format in formats)
|
||||
{
|
||||
switch (format)
|
||||
{
|
||||
case DragAndDropPayload.FORMAT: //insert sensors on the channels in question
|
||||
vm.DoSensorAssignment((IGroupChannel)ChannelListListView.Items[index], ((DragAndDropPayload)e.Data.GetData(format)).Items);
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.FORMAT: //insert hardware assignments at the channel in question
|
||||
vm.DoHardwareAssignment((IGroupChannel)ChannelListListView.Items[index], (IHardwareChannel[])e.Data.GetData(format));
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DragAndDropPayload.ALT_FORMAT:
|
||||
case DragAndDropPayload.CTRL_FORMAT:
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.CTRL_FORMAT:
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.ALT_FORMAT:
|
||||
default:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
CheckDragAndDropFilterWarning();
|
||||
}
|
||||
private void CheckDragAndDropFilterWarning()
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel viewModel)) { return; }
|
||||
viewModel.NotifyUserIfFiltering();
|
||||
}
|
||||
private void TextBox_DragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
if (null == e.Data)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
var formats = e.Data.GetFormats();
|
||||
if (((int)e.KeyStates & (int)DragDropKeyStates.AltKey) == (int)DragDropKeyStates.AltKey)
|
||||
{
|
||||
for (var i = 0; i < formats.Length; i++)
|
||||
{
|
||||
formats[i] = $"ALT_{formats[i]}";
|
||||
}
|
||||
}
|
||||
else if (((int)e.KeyStates & (int)DragDropKeyStates.ControlKey) == (int)DragDropKeyStates.ControlKey)
|
||||
{
|
||||
for (var i = 0; i < formats.Length; i++)
|
||||
{
|
||||
formats[i] = $"CTRL_{formats[i]}";
|
||||
}
|
||||
}
|
||||
foreach (var format in formats)
|
||||
{
|
||||
switch (format)
|
||||
{
|
||||
case DragAndDropPayload.ALT_FORMAT:
|
||||
e.Effects = DragDropEffects.Copy;
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DragAndDropPayload.CTRL_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DragAndDropPayload.FORMAT: //insert sensors on the channels in question
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.FORMAT: //insert hardware assignments at the channel in question
|
||||
//DoHardwareAssignment(index, e.Data.GetData(format) as IHardwareChannel[]);
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.CTRL_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.ALT_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
break;
|
||||
default:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void TextBox_Drop(object sender, DragEventArgs e)
|
||||
{
|
||||
if (null == e.Data)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
IGroupChannel groupChannel = null;
|
||||
if (sender is Control control)
|
||||
{
|
||||
groupChannel = (IGroupChannel)control.DataContext;
|
||||
}
|
||||
else if (sender is TextBlock textBlock)
|
||||
{
|
||||
groupChannel = (IGroupChannel)textBlock.DataContext;
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(DataContext is GroupChannelListViewModel vm))
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (null == groupChannel)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
var formats = e.Data.GetFormats();
|
||||
if (((int)e.KeyStates & (int)DragDropKeyStates.AltKey) == (int)DragDropKeyStates.AltKey)
|
||||
{
|
||||
for (var i = 0; i < formats.Length; i++)
|
||||
{
|
||||
formats[i] = $"ALT_{formats[i]}";
|
||||
}
|
||||
}
|
||||
else if (((int)e.KeyStates & (int)DragDropKeyStates.ControlKey) == (int)DragDropKeyStates.ControlKey)
|
||||
{
|
||||
for (var i = 0; i < formats.Length; i++)
|
||||
{
|
||||
formats[i] = $"CTRL_{formats[i]}";
|
||||
}
|
||||
}
|
||||
foreach (var format in formats)
|
||||
{
|
||||
switch (format)
|
||||
{
|
||||
case DragAndDropPayload.ALT_FORMAT:
|
||||
e.Effects = DragDropEffects.Copy;
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DragAndDropPayload.CTRL_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DragAndDropPayload.FORMAT: //insert sensors on the channels in question
|
||||
var payload = (DragAndDropPayload)e.Data.GetData(format);
|
||||
vm.DoSensorAssignment(groupChannel, payload.Items);
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.FORMAT: //insert hardware assignments at the channel in question
|
||||
vm.DoHardwareAssignment(groupChannel, e.Data.GetData(format) as IHardwareChannel[]);
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.CTRL_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.ALT_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
break;
|
||||
default:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
CheckDragAndDropFilterWarning();
|
||||
}
|
||||
|
||||
private void MoveBottom_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(sender is Control control)) { return; }
|
||||
if (!(DataContext is IGroupChannelListViewModel vm)) { return; }
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
|
||||
var items = ChannelListListView.SelectedItems;
|
||||
if (items.Count > 1 && items.Contains(channel))
|
||||
{
|
||||
IGroupChannel[] groupChannels = GetSelectedChannelsOrdered();
|
||||
vm.MoveBottom(groupChannels);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.MoveBottom(new[] { channel });
|
||||
}
|
||||
}
|
||||
|
||||
private void MoveDown_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(sender is Control control)) { return; }
|
||||
if (!(DataContext is IGroupChannelListViewModel vm)) { return; }
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
var items = ChannelListListView.SelectedItems;
|
||||
if (items.Count > 1 && items.Contains(channel))
|
||||
{
|
||||
IGroupChannel[] groupChannels = GetSelectedChannelsOrdered();
|
||||
vm.MoveDown(groupChannels);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.MoveDown(new[] { channel });
|
||||
}
|
||||
}
|
||||
|
||||
private void MoveUp_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(sender is Control control)) { return; }
|
||||
if (!(DataContext is IGroupChannelListViewModel vm)) { return; }
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
var items = ChannelListListView.SelectedItems;
|
||||
if (items.Count > 1 && items.Contains(channel))
|
||||
{
|
||||
IGroupChannel[] groupChannels = GetSelectedChannelsOrdered();
|
||||
vm.MoveUp(groupChannels);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.MoveUp(new[] { channel });
|
||||
}
|
||||
}
|
||||
|
||||
private IGroupChannel[] GetSelectedChannelsOrdered()
|
||||
{
|
||||
var list = new List<IGroupChannel>();
|
||||
foreach (var item in ChannelListListView.SelectedItems)
|
||||
{
|
||||
if (item is IGroupChannel channel)
|
||||
{
|
||||
list.Add(channel);
|
||||
}
|
||||
}
|
||||
|
||||
list.Sort((a, b) =>
|
||||
{
|
||||
return ChannelListListView.Items.IndexOf(a).CompareTo(ChannelListListView.Items.IndexOf(b));
|
||||
});
|
||||
return list.ToArray();
|
||||
}
|
||||
private void MoveTop_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(sender is Control control)) { return; }
|
||||
if (!(DataContext is IGroupChannelListViewModel vm)) { return; }
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
|
||||
var items = ChannelListListView.SelectedItems;
|
||||
if (items.Count > 1 && items.Contains(channel))
|
||||
{
|
||||
IGroupChannel[] groupChannels = GetSelectedChannelsOrdered();
|
||||
vm.MoveTop(groupChannels);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.MoveTop(new[] { channel });
|
||||
}
|
||||
}
|
||||
|
||||
private void ChannelCodeBuilder_OnChannelCodeSelected(object sender, string code, string name, ChannelEnumsAndConstants.ChannelCodeType codeType)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel viewModel)) { return; }
|
||||
|
||||
if (!(sender is Control control)) { return; }
|
||||
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
|
||||
if (codeType == ChannelEnumsAndConstants.ChannelCodeType.ISO)
|
||||
{
|
||||
channel.IsoCode = code;
|
||||
if (string.IsNullOrWhiteSpace(channel.IsoChannelName))
|
||||
{
|
||||
channel.IsoChannelName = name;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
channel.UserCode = code;
|
||||
if (string.IsNullOrWhiteSpace(channel.UserChannelName))
|
||||
{
|
||||
channel.UserChannelName = name;
|
||||
}
|
||||
}
|
||||
viewModel.MarkModified(channel);
|
||||
}
|
||||
/// <summary>
|
||||
/// Sets channel code/name when the user clicks on a selection from the popup window
|
||||
/// 17565 - Predictive text on "ISO channel name" column when in test set up / groups to make
|
||||
/// </summary
|
||||
private void ChannelNameBuilder_OnChannelCodeSelected(object sender, string code, string name, ChannelEnumsAndConstants.ChannelCodeType codeType)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel viewModel)) { return; }
|
||||
|
||||
if (!(sender is Control control)) { return; }
|
||||
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
|
||||
if (codeType == ChannelEnumsAndConstants.ChannelCodeType.ISO)
|
||||
{
|
||||
channel.IsoChannelName = name;
|
||||
channel.IsoCode = code;
|
||||
}
|
||||
else
|
||||
{
|
||||
channel.UserChannelName = name;
|
||||
channel.UserCode = code;
|
||||
}
|
||||
viewModel.MarkModified(channel);
|
||||
}
|
||||
private void TextBoxSourceUpdated(object sender, System.Windows.Data.DataTransferEventArgs e)
|
||||
{
|
||||
//this is slightly complicated, when the group name changes:
|
||||
//1) remove this channel from the channel list for the old group
|
||||
//2) remove the old group if it's now empty
|
||||
//3) add a new group if one doesn't exist
|
||||
//4) add the channel to the group
|
||||
if (!(DataContext is GroupChannelListViewModel vm))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(((Control)sender).DataContext is IGroupChannel groupChannel))
|
||||
{
|
||||
return;
|
||||
}
|
||||
vm.GroupNameChanged(groupChannel);
|
||||
vm.MarkModified(groupChannel);
|
||||
}
|
||||
|
||||
private void ChannelListListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void ListView_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (ChannelListListView.SelectedItems.Count <= 0) { return; }
|
||||
|
||||
if (Keyboard.IsKeyDown(Key.LeftAlt) || Keyboard.IsKeyDown(Key.RightAlt))
|
||||
{
|
||||
switch (e.Key)
|
||||
{
|
||||
case Key.System:
|
||||
if (e.SystemKey == Key.Up) { Move(true); }
|
||||
else if (e.SystemKey == Key.Down) { Move(false); }
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (Keyboard.IsKeyDown(Key.Up) && e.Key == Key.LeftAlt)
|
||||
{
|
||||
Move(true);
|
||||
}
|
||||
else if (Keyboard.IsKeyDown(Key.Up) && e.Key == Key.RightAlt)
|
||||
{
|
||||
Move(true);
|
||||
}
|
||||
else if (Keyboard.IsKeyDown(Key.Down) && e.Key == Key.LeftAlt)
|
||||
{
|
||||
Move(false);
|
||||
}
|
||||
else if (Keyboard.IsKeyDown(Key.Down) && e.Key == Key.RightAlt)
|
||||
{
|
||||
Move(false);
|
||||
}
|
||||
}
|
||||
private void Move(bool bUp)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel vm))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var list = new List<IGroupChannel>();
|
||||
foreach (var item in ChannelListListView.SelectedItems)
|
||||
{
|
||||
if (!(item is IGroupChannel groupChannel))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
list.Add(groupChannel);
|
||||
}
|
||||
if (bUp)
|
||||
{
|
||||
vm.MoveUp(list.ToArray());
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.MoveDown(list.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
private void ISOCode_LostFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel viewModel)) { return; }
|
||||
|
||||
if (!(sender is Control control)) { return; }
|
||||
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
if (viewModel.UseISOCodeFilterMapping)
|
||||
{
|
||||
//FB 15523 passes available filters
|
||||
var filters = DTS.SensorDB.SoftwareFilter.GetSoftwareFilters();
|
||||
//FB 15574 FB 13120
|
||||
channel.FilterClass = channel.GetFilterClassFromISOCode(filters, channel.IsoCode);
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// handles hyperlink clicks, specifically for a sensor
|
||||
/// 15125 Navigate to selected sensor from run test diagnostics
|
||||
/// </summary>
|
||||
private void Hyperlink_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel vm)) { return; }
|
||||
if (!(sender is Hyperlink hl)) { return; }
|
||||
if (!(hl.DataContext is GroupChannel groupChannel)) { return; }
|
||||
var eventAggregator = ContainerLocator.Container.Resolve<IEventAggregator>();
|
||||
eventAggregator.GetEvent<PageNavigationRequestEvent>().Publish(new PageNavigationRequest(
|
||||
PageNavigationRequest.Destinations.Sensor,
|
||||
groupChannel,
|
||||
vm));
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
DataPRO/Modules/Groups/GroupChannelList/.svn/wc.db
Normal file
BIN
DataPRO/Modules/Groups/GroupChannelList/.svn/wc.db
Normal file
Binary file not shown.
12
DataPRO/Modules/Groups/GroupChannelList/App.config
Normal file
12
DataPRO/Modules/Groups/GroupChannelList/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="GroupChannelList.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<GroupChannelList.Properties.Settings>
|
||||
</GroupChannelList.Properties.Settings>
|
||||
</userSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace GroupChannelList.Converters
|
||||
{
|
||||
public class BooleanToWidthConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (null == value) return 0;
|
||||
double width = double.NaN;
|
||||
if (parameter != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
width = double.Parse(parameter.ToString());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
return (bool)value ? width : 0;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace GroupChannelList.Converters
|
||||
{
|
||||
public class SensorIdBackgroundConverter : IValueConverter
|
||||
{
|
||||
private static SolidColorBrush SensorIdBrush = new SolidColorBrush(Color.FromArgb(0xFF, 0xE3, 0xFB, 0xE1));
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (null == value)
|
||||
{
|
||||
return Brushes.Transparent;
|
||||
}
|
||||
try
|
||||
{
|
||||
var bSensorId = (bool)value;
|
||||
if (bSensorId)
|
||||
{
|
||||
SensorIdBrush.Freeze();
|
||||
return SensorIdBrush;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Trace.WriteLine(ex.Message);
|
||||
}
|
||||
return Brushes.Transparent;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
199
DataPRO/Modules/Groups/GroupChannelList/GroupChannelList.csproj
Normal file
199
DataPRO/Modules/Groups/GroupChannelList/GroupChannelList.csproj
Normal file
@@ -0,0 +1,199 @@
|
||||
<?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>{AEA41635-D997-4179-9FD3-C145A2052947}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>GroupChannelList</RootNamespace>
|
||||
<AssemblyName>GroupChannelList</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="Converters\BooleanToWidthConverter.cs" />
|
||||
<Compile Include="Converters\SensorIdBackgroundConverter.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GroupChannelListModule.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\GroupChannelListViewModel.cs" />
|
||||
<Compile Include="View\GroupChannelSettingsListView.xaml.cs">
|
||||
<DependentUpon>GroupChannelSettingsListView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\GroupChannelListView.xaml.cs">
|
||||
<DependentUpon>GroupChannelListView.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.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>
|
||||
<ProjectReference Include="..\..\Channels\ChannelCodes\ChannelCodes.csproj">
|
||||
<Project>{266b86d0-6a3f-4b52-8749-fa87ecb0230f}</Project>
|
||||
<Name>ChannelCodes</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\GroupChannelSettingsListView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\GroupChannelListView.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,138 @@
|
||||
using System;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DTS.Common;
|
||||
using DTS.Common.Interface;
|
||||
using DTS.Common.Interface.Groups.GroupChannelList;
|
||||
using GroupChannelList;
|
||||
using Prism.Ioc;
|
||||
using Prism.Modularity;
|
||||
using Unity;
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable RedundantAttributeUsageProperty
|
||||
// ReSharper disable UnusedParameter.Local
|
||||
|
||||
[assembly: GroupChannelListModuleName]
|
||||
[assembly: GroupChannelListModuleImageAttribute]
|
||||
namespace GroupChannelList
|
||||
{
|
||||
[Export(typeof(IModule))]
|
||||
[Module(ModuleName = "GroupChannelListModule")]
|
||||
public class GroupChannelListModule : IModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Injected unity container
|
||||
/// </summary>
|
||||
private readonly IUnityContainer _unityContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GroupChannelListModule"/> class.
|
||||
/// </summary>
|
||||
/// <param name="unityContainer">Obtained reference of the unity container by using dependency injection.</param>
|
||||
public GroupChannelListModule(IUnityContainer unityContainer)
|
||||
{
|
||||
_unityContainer = unityContainer;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// Register View & View-Model with Unity dependency injection container as a singleton.
|
||||
_unityContainer.RegisterType<IGroupChannelListViewModel, GroupChannelListViewModel>();
|
||||
_unityContainer.RegisterType<IGroupChannelListView, GroupChannelListView>();
|
||||
_unityContainer.RegisterType<IGroupChannelSettingsListView, GroupChannelSettingsListView>();
|
||||
}
|
||||
|
||||
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 GroupChannelListModuleNameAttribute : TextAttribute
|
||||
{
|
||||
public GroupChannelListModuleNameAttribute() : this(null) { }
|
||||
|
||||
public GroupChannelListModuleNameAttribute(string s)
|
||||
{
|
||||
AssemblyName = AssemblyNames.GroupChannelList.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 GroupChannelListModuleImageAttribute : ImageAttribute
|
||||
{
|
||||
private BitmapImage _img;
|
||||
|
||||
public GroupChannelListModuleImageAttribute() : this(null) { }
|
||||
public override BitmapImage AssemblyImage
|
||||
{
|
||||
get { _img = AssemblyInfo.GetImage(AssemblyNames.GroupChannelList.ToString()); return _img; }
|
||||
}
|
||||
public GroupChannelListModuleImageAttribute(string s)
|
||||
{
|
||||
_img = AssemblyInfo.GetImage(AssemblyNames.GroupChannelList.ToString());
|
||||
}
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(ImageAttribute);
|
||||
}
|
||||
public override BitmapImage GetAssemblyImage()
|
||||
{
|
||||
return AssemblyImage;
|
||||
}
|
||||
private string _name;
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { _name = AssemblyNames.GroupChannelList.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.GroupChannelListRegion; return _region; }
|
||||
}
|
||||
public override eAssemblyRegion GetAssemblyRegion()
|
||||
{
|
||||
return AssemblyRegion;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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("GroupChannelList")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("DTS")]
|
||||
[assembly: AssemblyProduct("GroupChannelList")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[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("12abc17e-f76d-4ce0-9aee-faccc2c9ab49")]
|
||||
|
||||
// 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/Groups/GroupChannelList/Properties/Settings.Designer.cs
generated
Normal file
26
DataPRO/Modules/Groups/GroupChannelList/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 GroupChannelList.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="GroupChannelList.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
1017
DataPRO/Modules/Groups/GroupChannelList/Resources/StringResources.Designer.cs
generated
Normal file
1017
DataPRO/Modules/Groups/GroupChannelList/Resources/StringResources.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,438 @@
|
||||
<?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="AssignedBySensorId" xml:space="preserve">
|
||||
<value>(Assigned by ID)</value>
|
||||
</data>
|
||||
<data name="Clear" xml:space="preserve">
|
||||
<value>Clear</value>
|
||||
</data>
|
||||
<data name="DisplayName" xml:space="preserve">
|
||||
<value>Display name</value>
|
||||
</data>
|
||||
<data name="DuplicateSensor" xml:space="preserve">
|
||||
<value>Sensor appears more than once</value>
|
||||
</data>
|
||||
<data name="Group" xml:space="preserve">
|
||||
<value>Group</value>
|
||||
</data>
|
||||
<data name="Hardware" xml:space="preserve">
|
||||
<value>Hardware</value>
|
||||
</data>
|
||||
<data name="InvalidAnalogAssignment" xml:space="preserve">
|
||||
<value>Sensor {0} can not be assigned to channel {1}</value>
|
||||
</data>
|
||||
<data name="InvalidDigitalInputAssignment" xml:space="preserve">
|
||||
<value>DigitalInput {0} can not be assigned to channel {1}</value>
|
||||
</data>
|
||||
<data name="InvalidDigitalOutputAssignment" xml:space="preserve">
|
||||
<value>DigitalOutput {0} can not be assigned to channel {1}</value>
|
||||
</data>
|
||||
<data name="InvalidExcitationAssignment" xml:space="preserve">
|
||||
<value>Sensor {0} does not support any of the excitation options provided by channel {1}</value>
|
||||
</data>
|
||||
<data name="InvalidSquibAssignment" xml:space="preserve">
|
||||
<value>Squib {0} can not be assigned to channel {1}</value>
|
||||
</data>
|
||||
<data name="ISOChannelName" xml:space="preserve">
|
||||
<value>ISO channel name</value>
|
||||
</data>
|
||||
<data name="ISOCode" xml:space="preserve">
|
||||
<value>ISO (13499) code</value>
|
||||
</data>
|
||||
<data name="Sensor" xml:space="preserve">
|
||||
<value>Sensor (SN)</value>
|
||||
</data>
|
||||
<data name="UserChannelName" xml:space="preserve">
|
||||
<value>User channel name</value>
|
||||
</data>
|
||||
<data name="UserCode" xml:space="preserve">
|
||||
<value>User code</value>
|
||||
</data>
|
||||
<data name="DisplayOrder" xml:space="preserve">
|
||||
<value>Display order</value>
|
||||
</data>
|
||||
<data name="Delete" xml:space="preserve">
|
||||
<value>Delete</value>
|
||||
</data>
|
||||
<data name="InvalidLine" xml:space="preserve">
|
||||
<value>Invalid pasted group channel, line: {0}</value>
|
||||
</data>
|
||||
<data name="InvalidSensor" xml:space="preserve">
|
||||
<value>Invalid sensor, line: {0}</value>
|
||||
</data>
|
||||
<data name="Channels" xml:space="preserve">
|
||||
<value> channel(s) in </value>
|
||||
</data>
|
||||
<data name="GroupLower" xml:space="preserve">
|
||||
<value>group</value>
|
||||
</data>
|
||||
<data name="Test" xml:space="preserve">
|
||||
<value>test</value>
|
||||
</data>
|
||||
<data name="ISOAndUserCode" xml:space="preserve">
|
||||
<value>ISO 13499 and user codes</value>
|
||||
</data>
|
||||
<data name="ISOOnly" xml:space="preserve">
|
||||
<value>ISO 13499 only</value>
|
||||
</data>
|
||||
<data name="UserCodeOnly" xml:space="preserve">
|
||||
<value>User codes only</value>
|
||||
</data>
|
||||
<data name="TestChannelsGroupName" xml:space="preserve">
|
||||
<value>Test channels</value>
|
||||
</data>
|
||||
<data name="Of" xml:space="preserve">
|
||||
<value> of </value>
|
||||
</data>
|
||||
<data name="PhysicalChannelsAssigned" xml:space="preserve">
|
||||
<value> physical channel(s) assigned</value>
|
||||
</data>
|
||||
<data name="DragAndDropFilterWarning" xml:space="preserve">
|
||||
<value>Drag and drop operation completed. Note that the table is currently being filtered, but items that were part of the drag and drop operation will remain after this operation.</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_Capacity" xml:space="preserve">
|
||||
<value>Sensor max range</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_CFC" xml:space="preserve">
|
||||
<value>Channel filter class</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_Polarity" xml:space="preserve">
|
||||
<value>Polarity</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_Range" xml:space="preserve">
|
||||
<value>Channel full-scale</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_Sensitivity" xml:space="preserve">
|
||||
<value>Sensitivity</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_Units" xml:space="preserve">
|
||||
<value>Units</value>
|
||||
</data>
|
||||
<data name="DigitalInParameters_ActiveValue" xml:space="preserve">
|
||||
<value>Active value</value>
|
||||
</data>
|
||||
<data name="DigitalInParameters_DefaultValue" xml:space="preserve">
|
||||
<value>Default value</value>
|
||||
</data>
|
||||
<data name="DigitalInParameters_InputMode" xml:space="preserve">
|
||||
<value>Input mode</value>
|
||||
</data>
|
||||
<data name="DigitalOutParameters_Delay" xml:space="preserve">
|
||||
<value>Delay (ms)</value>
|
||||
</data>
|
||||
<data name="EnterValue" xml:space="preserve">
|
||||
<value>Enter value</value>
|
||||
</data>
|
||||
<data name="DigitalOutParameters_Duration" xml:space="preserve">
|
||||
<value>Duration (ms)</value>
|
||||
</data>
|
||||
<data name="DigitalOutParameters_LimitDuration" xml:space="preserve">
|
||||
<value>Limit duration</value>
|
||||
</data>
|
||||
<data name="DigitalOutParameters_OutputMode" xml:space="preserve">
|
||||
<value>Output mode</value>
|
||||
</data>
|
||||
<data name="Parameters_Analog" xml:space="preserve">
|
||||
<value>Analog</value>
|
||||
</data>
|
||||
<data name="Parameters_DigitalIn" xml:space="preserve">
|
||||
<value>Digital in</value>
|
||||
</data>
|
||||
<data name="Parameters_DigitalOut" xml:space="preserve">
|
||||
<value>Digital out</value>
|
||||
</data>
|
||||
<data name="Parameters_Squib" xml:space="preserve">
|
||||
<value>Squib</value>
|
||||
</data>
|
||||
<data name="SquibParameters_Delay" xml:space="preserve">
|
||||
<value>Delay (ms)</value>
|
||||
</data>
|
||||
<data name="SquibParameters_Duration" xml:space="preserve">
|
||||
<value>Duration (ms)</value>
|
||||
</data>
|
||||
<data name="SquibParameters_FireMode" xml:space="preserve">
|
||||
<value>Fire mode</value>
|
||||
</data>
|
||||
<data name="SquibParameters_LimitDuration" xml:space="preserve">
|
||||
<value>Limit duration</value>
|
||||
</data>
|
||||
<data name="btnApplyGlobalRangeCAC" xml:space="preserve">
|
||||
<value>Apply</value>
|
||||
</data>
|
||||
<data name="GlobalRangeCAC" xml:space="preserve">
|
||||
<value>Global range (CAC)</value>
|
||||
</data>
|
||||
<data name="ModifyGlobalRangeCAC" xml:space="preserve">
|
||||
<value>Modify global range CAC</value>
|
||||
</data>
|
||||
<data name="Order" xml:space="preserve">
|
||||
<value>Order</value>
|
||||
</data>
|
||||
<data name="SquibParameters_Current" xml:space="preserve">
|
||||
<value>Current (A)</value>
|
||||
</data>
|
||||
<data name="IEPESupport" xml:space="preserve">
|
||||
<value>IEPE support</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_ZeroMethod" xml:space="preserve">
|
||||
<value>Zero Method</value>
|
||||
</data>
|
||||
<data name="ChannelType" xml:space="preserve">
|
||||
<value>Type</value>
|
||||
</data>
|
||||
<data name="RemoveSensor" xml:space="preserve">
|
||||
<value>Remove Sensor</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_ZeroMethodEnd" xml:space="preserve">
|
||||
<value>End (sec)</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_ZeroMethodStart" xml:space="preserve">
|
||||
<value>Start (sec)</value>
|
||||
</data>
|
||||
<data name="Not_Applicable" xml:space="preserve">
|
||||
<value>N/A</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_UserValue1" xml:space="preserve">
|
||||
<value>User Value 1</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_UserValue2" xml:space="preserve">
|
||||
<value>User Value 2</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_UserValue3" xml:space="preserve">
|
||||
<value>User Value 3</value>
|
||||
</data>
|
||||
<data name="ChannelDelete_Tooltip" xml:space="preserve">
|
||||
<value>To delete a channel, please contact an Administrator</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_InitialOffset" xml:space="preserve">
|
||||
<value>Initial offset</value>
|
||||
</data>
|
||||
<data name="ChannelName" xml:space="preserve">
|
||||
<value>Channel name</value>
|
||||
</data>
|
||||
<data name="Table_NA" xml:space="preserve">
|
||||
<value>---</value>
|
||||
</data>
|
||||
<data name="Parameters_Uart" xml:space="preserve">
|
||||
<value>UART</value>
|
||||
</data>
|
||||
<data name="UartParameters_BaudRate" xml:space="preserve">
|
||||
<value>Baud rate</value>
|
||||
</data>
|
||||
<data name="UartParameters_DataBits" xml:space="preserve">
|
||||
<value>Data bits</value>
|
||||
</data>
|
||||
<data name="UartParameters_DataFormat" xml:space="preserve">
|
||||
<value>Data format</value>
|
||||
</data>
|
||||
<data name="UartParameters_FlowControl" xml:space="preserve">
|
||||
<value>Flow control</value>
|
||||
</data>
|
||||
<data name="UartParameters_Parity" xml:space="preserve">
|
||||
<value>Parity</value>
|
||||
</data>
|
||||
<data name="UartParameters_StopBits" xml:space="preserve">
|
||||
<value>Stop bits</value>
|
||||
</data>
|
||||
<data name="Parameters_StreamOut" xml:space="preserve">
|
||||
<value>Stream out</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_DataChannelId" xml:space="preserve">
|
||||
<value>Data channel id</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_IRIGTimeDataPacketIntervalMs" xml:space="preserve">
|
||||
<value>IRIG time data packet interval (ms)</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_StreamProfile" xml:space="preserve">
|
||||
<value>Stream profile</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_TimeChannelId" xml:space="preserve">
|
||||
<value>Time channel id</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_TmNSConfig" xml:space="preserve">
|
||||
<value>TmNS config</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_UDPAddress" xml:space="preserve">
|
||||
<value>UDP Address</value>
|
||||
</data>
|
||||
<data name="Parameters_StreamIn" xml:space="preserve">
|
||||
<value>Stream in</value>
|
||||
</data>
|
||||
<data name="StreamInParameters_UDPAddress" xml:space="preserve">
|
||||
<value>UDP Address</value>
|
||||
</data>
|
||||
<data name="AnalogParameter_ACCouplingEnable" xml:space="preserve">
|
||||
<value>AC coupling enabled</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_IENA_Key" xml:space="preserve">
|
||||
<value>IENA key</value>
|
||||
</data>
|
||||
<data name="StreamOutParameters_IENA_SourcePort" xml:space="preserve">
|
||||
<value>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>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="StreamOutParameters_TMATSIntervalMs" xml:space="preserve">
|
||||
<value>TMATS interval (ms)</value>
|
||||
</data>
|
||||
<data name="DallasId" xml:space="preserve">
|
||||
<value>Dallas ID</value>
|
||||
</data>
|
||||
<data name="IntervalOn" xml:space="preserve">
|
||||
<value>On</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_MaximumUsage" xml:space="preserve">
|
||||
<value>Maximum Usage</value>
|
||||
</data>
|
||||
<data name="AnalogParameters_UsageCount" xml:space="preserve">
|
||||
<value>Usage Count</value>
|
||||
</data>
|
||||
<data name="Parameters_CAN" xml:space="preserve">
|
||||
<value>CAN</value>
|
||||
</data>
|
||||
<data name="CanParameters_ArbBaseBitrate" xml:space="preserve">
|
||||
<value>Arb/Base Bitrate</value>
|
||||
</data>
|
||||
<data name="CanParameters_IsFD" xml:space="preserve">
|
||||
<value>CAN is FD</value>
|
||||
</data>
|
||||
<data name="CanParameters_ArbBaseSJW" xml:space="preserve">
|
||||
<value>Arb/Base SJW</value>
|
||||
</data>
|
||||
<data name="CanParameters_DataBitrate" xml:space="preserve">
|
||||
<value>Data Bitrate</value>
|
||||
</data>
|
||||
<data name="CanParameters_DataSJW" xml:space="preserve">
|
||||
<value>Data SJW</value>
|
||||
</data>
|
||||
<data name="CanParameters_FileType" xml:space="preserve">
|
||||
<value>FileType</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Windows.Markup;
|
||||
using GroupChannelList.Resources;
|
||||
|
||||
namespace GroupChannelList
|
||||
{
|
||||
[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,339 @@
|
||||
<base:BaseView x:Class="GroupChannelList.GroupChannelListView"
|
||||
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:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:strings="clr-namespace:GroupChannelList"
|
||||
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:converters="clr-namespace:GroupChannelList.Converters"
|
||||
xmlns:converters1="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:cc="clr-namespace:ChannelCodes.Model;assembly=ChannelCodes"
|
||||
xmlns:behaviors="clr-namespace:DTS.Common.Behaviors;assembly=DTS.Common"
|
||||
xmlns:my="clr-namespace:DTS.Common.Enums;assembly=DTS.Common"
|
||||
x:Name="ChannelListView">
|
||||
<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:SensorIdBackgroundConverter x:Key="BackgroundConverter" />
|
||||
<BooleanToVisibilityConverter x:Key="BoolToVisConverter"/>
|
||||
<converters1:InverseBooleanToVisibilityConverter x:Key="InverseBoolToVisConverter" />
|
||||
<converters:BooleanToWidthConverter x:Key="BooleanToWidthConverter" />
|
||||
<converters1:InverseBooleanConverter x:Key="BooleanInverseConverter" />
|
||||
<converters1:BooleanOrToVisibilityMultiConverter x:Key="BooleanOrToVisibilityMultiConverter"/>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid Background="{DynamicResource Brush_ApplicationContentBackground}" ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Auto">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<WrapPanel Grid.Row="0" Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding ChannelCount, FallbackValue='0'}" Margin="10,0,0,0" AutomationProperties.AutomationId="ChannelCountLabel"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Channels}" AutomationProperties.AutomationId="ChannelsLabel"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Test}" Visibility="{Binding UseTestSetupOrder, Converter={StaticResource BoolToVisConverter}}" AutomationProperties.AutomationId="TestLabel"/>
|
||||
<TextBlock Text="{strings:TranslateExtension GroupLower}" Visibility="{Binding UseTestSetupOrder, Converter={StaticResource InverseBoolToVisConverter}}" AutomationProperties.AutomationId="GroupLabel"/>
|
||||
<TextBlock Margin="5,0,5,0" Text="" />
|
||||
<TextBlock Text="{Binding AssignedPhysicalChannelCount}" />
|
||||
<TextBlock Text="{strings:TranslateExtension Of}" />
|
||||
<TextBlock Text="{Binding AvailableChannelCount}" />
|
||||
<TextBlock Text="{strings:TranslateExtension PhysicalChannelsAssigned}" />
|
||||
</WrapPanel>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="2">
|
||||
<Button Content="TOP" Width="30" IsEnabled="{Binding CanMoveSelectedUp}" Command="{Binding MoveSelectedChannelsToTopCommand}" AutomationProperties.AutomationId="SelectedTopButton" />
|
||||
<Button Content="5" FontFamily="Marlett" Width="20" IsEnabled="{Binding CanMoveSelectedUp}" Command="{Binding MoveSelectedChannelsUpCommand}" AutomationProperties.AutomationId="SelectedUpButton" />
|
||||
<Button Content="6" FontFamily="Marlett" Width="20" IsEnabled="{Binding CanMoveSelectedDown}" Command="{Binding MoveSelectedChannelsDownCommand}" AutomationProperties.AutomationId="SelectedDownButton"/>
|
||||
<Button Content="BOT" Width="30" IsEnabled="{Binding CanMoveSelectedDown}" Command="{Binding MoveSelectedChannelsToBottomCommand}" AutomationProperties.AutomationId="SelectedBottomButton" />
|
||||
<Button Content="{strings:TranslateExtension RemoveSensor}" IsEnabled="{Binding ElementName=ChannelListListView, Path=SelectedItems.Count}" Command="{Binding RemoveSelectedSensorsCommand}" AutomationProperties.AutomationId="ClearSelectedBtn" Width="120" />
|
||||
<Button Content="{strings:TranslateExtension Delete}" IsEnabled="{Binding SelectedDeleteShouldBeEnabled}" ToolTipService.ShowOnDisabled="True" Command="{Binding DeleteSelectedChannelsCommand}" AutomationProperties.AutomationId="DeleteSelectedBtn" Width="70" >
|
||||
<Button.ToolTip>
|
||||
<ToolTip Visibility="{Binding SelectedDeleteShouldDisplayTooltip, Converter={StaticResource BoolToVisConverter}}">
|
||||
<TextBlock Text="{strings:TranslateExtension ChannelDelete_Tooltip}"/>
|
||||
</ToolTip>
|
||||
</Button.ToolTip>
|
||||
</Button>
|
||||
<Button Margin="12,3,3,0" Content="Move after row" Width="100" IsEnabled="{Binding SelectedDeleteShouldBeEnabled}" Command="{Binding MoveSelectedChannelsToIndexCommand}" AutomationProperties.AutomationId="MoveToIndexButton" />
|
||||
<xctk:DoubleUpDown Value="{Binding Path=ExpectedIndex}" Margin="3,3,3,0" Width="60" Minimum="0" Maximum="{Binding ChannelCount}" />
|
||||
</StackPanel>
|
||||
<ListView Grid.Row="2" ItemsSource="{Binding Channels, UpdateSourceTrigger=PropertyChanged}"
|
||||
AutomationProperties.AutomationId="ChannelListView" AllowDrop="True" DragOver="ChannelList_DragOver"
|
||||
x:Name="ChannelListListView" Drop="ChannelList_Drop" SelectionMode="Extended"
|
||||
VirtualizingStackPanel.IsVirtualizing="True" KeyUp="ListView_KeyUp"
|
||||
>
|
||||
<i:Interaction.Behaviors>
|
||||
<behaviors:MultiSelectionBehavior SelectedItems="{Binding SelectedChannelItems}" />
|
||||
</i:Interaction.Behaviors>
|
||||
<ListView.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type ListViewItem}" BasedOn="{StaticResource TTS_ListViewItemStyle}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=ChannelStatus}" Value="{x:Static my:UIItemStatus.Success}">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_ApplicationStatus_Complete}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=ChannelStatus}" Value="{x:Static my:UIItemStatus.Error}">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_ApplicationStatus_Failed}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=ChannelStatus}" Value="{x:Static my:UIItemStatus.Warning}">
|
||||
<Setter Property="Background" Value="{StaticResource Brush_Amber}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Path=ChannelStatus}" 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>
|
||||
<DataTrigger Binding="{Binding ElementName=ChannelListView, Path=ReadOnlyChannelsMode}" Value="True">
|
||||
<Setter Property="IsEnabled" Value="False" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
<ListView.View>
|
||||
<controls:AutoSizedGridView AutomationProperties.AutomationId="CustomChannelsListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="GroupColumn" x:Name="GroupColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="GroupName" HeaderTitle="{strings:TranslateExtension Group}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" />
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox AutomationProperties.AutomationId="GroupNameTextBox" MinWidth="200" IsEnabled="{Binding GroupNameEditable}" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" behaviors:TextBoxPasteBehavior.PasteCommand="{Binding PasteCommand}" Tag="GroupName"
|
||||
Binding.SourceUpdated="TextBoxSourceUpdated">
|
||||
<TextBox.Text>
|
||||
<Binding NotifyOnSourceUpdated="True" Path="GroupName" UpdateSourceTrigger="PropertyChanged" />
|
||||
</TextBox.Text>
|
||||
</TextBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserCodeColumn" x:Name="UserCodeColumn"
|
||||
Width="{Binding ShowUserCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserCode" HeaderTitle="{strings:TranslateExtension UserCode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<controls:ChannelCodeBuilder Code="{Binding UserCode, Mode=TwoWay}" CodeType="User" ChannelCodeSelected="ChannelCodeBuilder_OnChannelCodeSelected"
|
||||
ChannelCodesFunc="{Binding DataContext.ChannelCodesFunc, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
ShowChannelCodeLookupHelper="{Binding DataContext.ShowChannelCodeLookupHelper, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
KeyDown="TextBox_KeyDown" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" MinWidth="200"
|
||||
AutomationProperties.AutomationId="UserCodeChannelCodeBuilder" Tag="UserCode">
|
||||
<controls:ChannelCodeBuilder.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}" ConverterParameter="FALSE|HIDE">
|
||||
<Binding Path="IsUart" />
|
||||
<Binding Path="IsStreamIn" />
|
||||
<Binding Path="IsStreamOut" />
|
||||
</MultiBinding>
|
||||
</controls:ChannelCodeBuilder.Visibility>
|
||||
</controls:ChannelCodeBuilder>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserChannelNameColumn" x:Name="UserChannelNameColumn"
|
||||
Width="{Binding ShowUserCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserChannelName" HeaderTitle="{strings:TranslateExtension UserChannelName}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<controls:ChannelNameBuilder ChannelName="{Binding UserChannelName, Mode=TwoWay}" CodeType="User"
|
||||
ChannelCodeSelected="ChannelNameBuilder_OnChannelCodeSelected"
|
||||
ChannelNamesFunc="{Binding DataContext.ChannelCodesFunc, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
ShowChannelCodeLookupHelper="{Binding DataContext.ShowChannelCodeLookupHelper, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
KeyDown="TextBox_KeyDown" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" MinWidth="200"
|
||||
AutomationProperties.AutomationId="UserChannelNameTextBox" Tag="UserChannelName">
|
||||
<controls:ChannelNameBuilder.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}" ConverterParameter="FALSE|HIDE">
|
||||
<Binding Path="IsUart" />
|
||||
<Binding Path="IsStreamIn" />
|
||||
<Binding Path="IsStreamOut" />
|
||||
</MultiBinding>
|
||||
</controls:ChannelNameBuilder.Visibility>
|
||||
</controls:ChannelNameBuilder>
|
||||
<!--<TextBox Text="{Binding UserChannelName}" AutomationProperties.AutomationId="UserChannelNameTextBox"
|
||||
MinWidth="200" KeyDown="TextBox_KeyDown" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" MaxLength="250" behaviors:TextBoxPasteBehavior.PasteCommand="{Binding PasteCommand}"
|
||||
Tag="UserChannelName"/>
|
||||
-->
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ChannelNameColumn" x:Name="ChannelNameColumn"
|
||||
Width="{Binding ChannelNamesOnly, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserChannelName" HeaderTitle="{strings:TranslateExtension ChannelName}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox Text="{Binding UserChannelName}" AutomationProperties.AutomationId="ChannelNameTextBox" MinWidth="200" KeyDown="TextBox_KeyDown" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" MaxLength="250" behaviors:TextBoxPasteBehavior.PasteCommand="{Binding PasteCommand}" Tag="ChannelName"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ISOCodeColumn" x:Name="ISOCodeColumn"
|
||||
Width="{Binding ShowISOCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ISOCode" HeaderTitle="{strings:TranslateExtension ISOCode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<!--<TextBox Text="{Binding IsoCode, Mode=TwoWay}" KeyDown="TextBox_KeyDown" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" MinWidth="200"/>AllChannelCodes="{x:Static cc:ChannelCode.ChannelCodes}"-->
|
||||
<controls:ChannelCodeBuilder Code="{Binding IsoCode, Mode=TwoWay}" CodeType="ISO" ChannelCodeSelected="ChannelCodeBuilder_OnChannelCodeSelected"
|
||||
ChannelCodesFunc="{Binding DataContext.ChannelCodesFunc, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
ShowChannelCodeLookupHelper="{Binding DataContext.ShowChannelCodeLookupHelper, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
ShowISOStringBuilder="{Binding DataContext.ShowISOStringBuilder, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
UniqueISOCodesRequired="{Binding DataContext.UniqueISOCodesRequired, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
KeyDown="TextBox_KeyDown" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" MinWidth="200"
|
||||
AutomationProperties.AutomationId="ISOCodeChannelCodeBuilder" Tag="ISOCode"
|
||||
LostFocus="ISOCode_LostFocus"
|
||||
UseISOCodeFilterMapping="{Binding DataContext.UseISOCodeFilterMapping, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
CoerceISOCode="{Binding CoerceISOCodeFunc}"
|
||||
>
|
||||
<controls:ChannelCodeBuilder.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}" ConverterParameter="FALSE|HIDE">
|
||||
<Binding Path="IsUart" />
|
||||
<Binding Path="IsStreamIn" />
|
||||
<Binding Path="IsStreamOut" />
|
||||
</MultiBinding>
|
||||
</controls:ChannelCodeBuilder.Visibility>
|
||||
</controls:ChannelCodeBuilder>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ISOChannelNameColumn" x:Name="ISOChannelNameColumn"
|
||||
Width="{Binding ShowISOCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ISOChannelName" HeaderTitle="{strings:TranslateExtension ISOChannelName}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<controls:ChannelNameBuilder ChannelName="{Binding IsoChannelName, Mode=TwoWay}" CodeType="ISO"
|
||||
ChannelCodeSelected="ChannelNameBuilder_OnChannelCodeSelected"
|
||||
ChannelNamesFunc="{Binding DataContext.ChannelCodesFunc, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
ShowChannelCodeLookupHelper="{Binding DataContext.ShowChannelCodeLookupHelper, RelativeSource={RelativeSource AncestorType={x:Type ListView}}}"
|
||||
KeyDown="TextBox_KeyDown" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" MinWidth="200"
|
||||
AutomationProperties.AutomationId="ISOChannelNameTextBox" Tag="ISOChannelName"
|
||||
LostFocus="ISOCode_LostFocus" >
|
||||
<controls:ChannelNameBuilder.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}" ConverterParameter="FALSE|HIDE">
|
||||
<Binding Path="IsUart" />
|
||||
<Binding Path="IsStreamIn" />
|
||||
<Binding Path="IsStreamOut" />
|
||||
</MultiBinding>
|
||||
</controls:ChannelNameBuilder.Visibility>
|
||||
</controls:ChannelNameBuilder>
|
||||
<!--<TextBox Text="{Binding IsoChannelName}" AutomationProperties.AutomationId="ISOChannelNameTextBox"
|
||||
MinWidth="200" KeyDown="TextBox_KeyDown" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop"
|
||||
MaxLength="250" behaviors:TextBoxPasteBehavior.PasteCommand="{Binding PasteCommand}" Tag="ISOChannelName"/>
|
||||
-->
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="IEPEColumn" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="IEPE" HeaderTitle="{strings:TranslateExtension ChannelType}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding IEPESupport}" AutomationProperties.AutomationId="IEPESupportBlock" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SensorColumn" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Sensor" HeaderTitle="{strings:TranslateExtension Sensor}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid>
|
||||
<Label Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}">
|
||||
<Hyperlink Click="Hyperlink_Click" IsEnabled="{Binding EmbeddedSensor, Converter={StaticResource BooleanInverseConverter}}">
|
||||
<TextBlock Text="{Binding Sensor}" AutomationProperties.AutomationId="SensorTextBlock" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" />
|
||||
</Hyperlink>
|
||||
</Label>
|
||||
<TextBlock Text="{Binding Sensor}" AutomationProperties.AutomationId="SensorTextBlock" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="DallasIdColumn" x:Name="DallasIdColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DallasId" HeaderTitle="{strings:TranslateExtension DallasId}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Path=SensorData.EID, FallbackValue='---'}" AutomationProperties.AutomationId="EIDTextBlock" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop"
|
||||
Visibility="Visible"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="HardwareColumn" x:Name="HardwareColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Hardware" HeaderTitle="{strings:TranslateExtension Hardware}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Border Background="{Binding Path=HasEID, Converter={StaticResource BackgroundConverter}}" HorizontalAlignment="Stretch" >
|
||||
<TextBlock Margin="2,0,2,0" Text="{Binding Hardware}" AutomationProperties.AutomationId="HardwareTextBlock" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" />
|
||||
</Border>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="GroupOrderColumn" x:Name="GroupOrderColumn">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ChannelListView, Path=DataContext.UseTestSetupOrder, Converter={StaticResource InverseBoolToVisConverter}}">
|
||||
<Button Content="TOP" Width="30" IsEnabled="{Binding CanMoveUp}" Click="MoveTop_Click" AutomationProperties.AutomationId="TopButton" />
|
||||
<Button Content="5" FontFamily="Marlett" Width="20" IsEnabled="{Binding CanMoveUp}" Click="MoveUp_Click" AutomationProperties.AutomationId="UpButton" />
|
||||
<TextBlock Text="{Binding GroupChannelOrder,FallbackValue='-1',StringFormat={}000}" VerticalAlignment="Center" AutomationProperties.AutomationId="ChannelOrderTextBlock" />
|
||||
<Button Content="6" FontFamily="Marlett" Width="20" IsEnabled="{Binding CanMoveDown}" Click="MoveDown_Click" AutomationProperties.AutomationId="DownButton"/>
|
||||
<Button Content="BOT" Width="30" IsEnabled="{Binding CanMoveDown}" Click="MoveBottom_Click" AutomationProperties.AutomationId="BottomButton" />
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="TestSetupOrderColumn" x:Name="TestSetupOrderColumn">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ChannelListView, Path=DataContext.UseTestSetupOrder, Converter={StaticResource BoolToVisConverter}}">
|
||||
<Button Content="TOP" Width="30" IsEnabled="{Binding CanMoveUp}" Click="MoveTop_Click" AutomationProperties.AutomationId="TopButton"/>
|
||||
<Button Content="5" FontFamily="Marlett" Width="20" IsEnabled="{Binding CanMoveUp}" Click="MoveUp_Click" AutomationProperties.AutomationId="UpButton"/>
|
||||
<TextBlock Text="{Binding TestSetupOrder,FallbackValue='-1',StringFormat={}000}" VerticalAlignment="Center" AutomationProperties.AutomationId="ChannelOrderTextBlock"/>
|
||||
<Button Content="6" FontFamily="Marlett" Width="20" IsEnabled="{Binding CanMoveDown}" Click="MoveDown_Click" AutomationProperties.AutomationId="DownButton"/>
|
||||
<Button Content="BOT" Width="30" IsEnabled="{Binding CanMoveDown}" Click="MoveBottom_Click" AutomationProperties.AutomationId="BottomButton"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ActionsColumn">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Button Content="{strings:TranslateExtension RemoveSensor}" Click="Clear_Click" AutomationProperties.AutomationId="ClearBtn" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" Width="120" Visibility="{Binding RemoveSensorVisibility}"/>
|
||||
<Button Content="{strings:TranslateExtension Delete}" Click="Delete_Click" AutomationProperties.AutomationId="DeleteBtn" AllowDrop="True" PreviewDragOver="TextBox_DragOver" Drop="TextBox_Drop" Width="70"
|
||||
IsEnabled="{Binding DeleteShouldBeEnabled}" ToolTipService.ShowOnDisabled="True">
|
||||
<Button.ToolTip>
|
||||
<ToolTip Visibility="{Binding DeleteShouldBeEnabled, Converter={StaticResource InverseBoolToVisConverter}}">
|
||||
<TextBlock Text="{strings:TranslateExtension ChannelDelete_Tooltip}"/>
|
||||
</ToolTip>
|
||||
</Button.ToolTip>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</controls:AutoSizedGridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,957 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using DTS.Common.Classes.Groups;
|
||||
using DTS.Common.Classes.Sensors.SensorsList;
|
||||
using DTS.Common.Controls;
|
||||
using DTS.Common.Enums;
|
||||
using DTS.Common.Enums.Channels;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Events.Groups.GroupChannelList;
|
||||
using DTS.Common.Interface.Channels;
|
||||
using DTS.Common.Interface.DataRecorders;
|
||||
using DTS.Common.Interface.Groups.GroupChannelList;
|
||||
using DTS.Common.Settings;
|
||||
using DTS.Common.Utils;
|
||||
|
||||
using Prism.Ioc;
|
||||
using Prism.Events;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace GroupChannelList
|
||||
{
|
||||
/// <inheritdoc cref="IGroupChannelListView" />
|
||||
/// <summary>
|
||||
/// Interaction logic for GroupChannelListView.xaml
|
||||
/// </summary>
|
||||
public partial class GroupChannelListView : IGroupChannelListView
|
||||
{
|
||||
/// <summary>
|
||||
/// returns whether the user input controls in the view should be read only
|
||||
/// 16284 Channels table in EditTestSetup is enabled when it shouldn't be
|
||||
/// </summary>
|
||||
public bool ReadOnlyChannelsMode
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == DataContext) { return false; }
|
||||
if (DataContext is IGroupChannelListViewModel model)
|
||||
{
|
||||
return model.ReadOnlyChannelsMode;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public GroupChannelListView()
|
||||
{
|
||||
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 GroupChannelListViewModel model))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (model.ListViewId != arg.Id) { return; }
|
||||
|
||||
ChannelListListView.Items.MoveCurrentToLast();
|
||||
ChannelListListView.ScrollIntoView(ChannelListListView.Items.CurrentItem);
|
||||
}
|
||||
|
||||
private void Clear_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel viewModel))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(sender is Control control))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(control.DataContext is IGroupChannel channel))
|
||||
{
|
||||
return;
|
||||
}
|
||||
viewModel.Clear(channel);
|
||||
viewModel.NotifyChannelsChanged();
|
||||
}
|
||||
|
||||
private void Delete_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel viewModel)) { return; }
|
||||
|
||||
if (!(sender is Control control)) { return; }
|
||||
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
|
||||
if (channel.IsBlank())
|
||||
{
|
||||
//14546
|
||||
// Cannot use delete action button in edit group/test
|
||||
// it's possible the channel is blank but still has an order assigned, we have to allow it to be
|
||||
// deleted still then ...
|
||||
if (viewModel.UseTestSetupOrder)
|
||||
{
|
||||
if (channel.TestSetupOrder <= 0) { return; }
|
||||
}
|
||||
else
|
||||
{
|
||||
if (channel.GroupChannelOrder <= 0) { return; }
|
||||
}
|
||||
}
|
||||
var eventAggregator = ContainerLocator.Container.Resolve<IEventAggregator>();
|
||||
eventAggregator.GetEvent<GroupChannelDeleteRequestEvent>().Publish(new GroupChannelDeleteRequestEventArgs(
|
||||
viewModel.Page,
|
||||
channel));
|
||||
}
|
||||
|
||||
private void GridViewColumnHeaderSearchable_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var viewModel = (IGroupChannelListViewModel)DataContext;
|
||||
viewModel.Filter(columnTag, searchTerm);
|
||||
}
|
||||
|
||||
private void TextBox_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel viewModel)) { return; }
|
||||
|
||||
if (!(sender is Control control)) { return; }
|
||||
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
|
||||
viewModel.MarkModified(channel);
|
||||
}
|
||||
|
||||
public void HandleColumns(IsoViewMode viewMode)
|
||||
{
|
||||
if (!(DataContext is IGroupChannelListViewModel vm))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var showGroups = SettingsDB.GetGlobalValueBool("ShowGroups", true);
|
||||
|
||||
if (!vm.UseTestSetupOrder || !showGroups)
|
||||
{
|
||||
RemoveGroupColumn();
|
||||
}
|
||||
else
|
||||
{
|
||||
AddGroupColumn();
|
||||
}
|
||||
|
||||
switch (viewMode)
|
||||
{
|
||||
case IsoViewMode.ISOOnly:
|
||||
RemoveUserCodeColumns();
|
||||
AddIsoCodeColumns(vm.UseTestSetupOrder);
|
||||
break;
|
||||
case IsoViewMode.ISOAndUserCode:
|
||||
AddUserAndIsoCodeColumns(vm.UseTestSetupOrder);
|
||||
break;
|
||||
case IsoViewMode.UserCodeOnly:
|
||||
RemoveIsoCodeColumns();
|
||||
AddUserCodeColumns(vm.UseTestSetupOrder, true);
|
||||
break;
|
||||
case IsoViewMode.ChannelNameOnly:
|
||||
RemoveIsoCodeColumns();
|
||||
AddUserCodeColumns(vm.UseTestSetupOrder, false);
|
||||
break;
|
||||
}
|
||||
|
||||
if (vm.UseTestSetupOrder)
|
||||
{
|
||||
ShowTestSetupOrder(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowTestSetupOrder(false);
|
||||
}
|
||||
|
||||
if (vm.ShowDallasIdColumn)
|
||||
{
|
||||
AddDallasIdColumn();
|
||||
}
|
||||
else { RemoveDallasIdColumn(); }
|
||||
}
|
||||
|
||||
private void ShowTestSetupOrder(bool test)
|
||||
{
|
||||
if (!(ChannelListListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (test)
|
||||
{
|
||||
if (view.Columns.Contains(GroupOrderColumn))
|
||||
{
|
||||
view.Columns.Remove(GroupOrderColumn);
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(TestSetupOrderColumn))
|
||||
{
|
||||
view.Columns.Insert(0, TestSetupOrderColumn);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (view.Columns.Contains(TestSetupOrderColumn))
|
||||
{
|
||||
view.Columns.Remove(TestSetupOrderColumn);
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(GroupOrderColumn))
|
||||
{
|
||||
view.Columns.Insert(0, GroupOrderColumn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveGroupColumn()
|
||||
{
|
||||
if (!(ChannelListListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (view.Columns.Contains(GroupColumn))
|
||||
{
|
||||
view.Columns.Remove(GroupColumn);
|
||||
}
|
||||
}
|
||||
private void AddDallasIdColumn()
|
||||
{
|
||||
if (!(ChannelListListView.View is AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(DallasIdColumn))
|
||||
{
|
||||
var index = view.Columns.IndexOf(HardwareColumn);
|
||||
view.Columns.Insert(index, DallasIdColumn);
|
||||
}
|
||||
}
|
||||
private void RemoveDallasIdColumn()
|
||||
{
|
||||
if (!(ChannelListListView.View is AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (view.Columns.Contains(DallasIdColumn))
|
||||
{
|
||||
view.Columns.Remove(DallasIdColumn);
|
||||
}
|
||||
}
|
||||
private void AddGroupColumn()
|
||||
{
|
||||
if (!(ChannelListListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(GroupColumn))
|
||||
{
|
||||
view.Columns.Insert(1, GroupColumn);
|
||||
}
|
||||
}
|
||||
private void AddUserAndIsoCodeColumns(bool usingTestSetup)
|
||||
{
|
||||
if (!(ChannelListListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(UserCodeColumn))
|
||||
{
|
||||
view.Columns.Insert(usingTestSetup ? 1 : 0, UserCodeColumn);
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(UserChannelNameColumn))
|
||||
{
|
||||
view.Columns.Insert(usingTestSetup ? 2 : 1, UserChannelNameColumn);
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(ISOCodeColumn))
|
||||
{
|
||||
view.Columns.Insert(usingTestSetup ? 3 : 2, ISOCodeColumn);
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(ISOChannelNameColumn))
|
||||
{
|
||||
view.Columns.Insert(usingTestSetup ? 4 : 3, ISOChannelNameColumn);
|
||||
}
|
||||
}
|
||||
private void AddIsoCodeColumns(bool usingTestSetup)
|
||||
{
|
||||
if (!(ChannelListListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(ISOCodeColumn))
|
||||
{
|
||||
view.Columns.Insert(usingTestSetup ? 1 : 0, ISOCodeColumn);
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(ISOChannelNameColumn))
|
||||
{
|
||||
view.Columns.Insert(usingTestSetup ? 2 : 1, ISOChannelNameColumn);
|
||||
}
|
||||
}
|
||||
private void RemoveIsoCodeColumns()
|
||||
{
|
||||
if (!(ChannelListListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (view.Columns.Contains(ISOCodeColumn))
|
||||
{
|
||||
view.Columns.Remove(ISOCodeColumn);
|
||||
}
|
||||
|
||||
if (view.Columns.Contains(ISOChannelNameColumn))
|
||||
{
|
||||
view.Columns.Remove(ISOChannelNameColumn);
|
||||
}
|
||||
}
|
||||
private void RemoveUserCodeColumns()
|
||||
{
|
||||
if (!(ChannelListListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (view.Columns.Contains(UserCodeColumn))
|
||||
{
|
||||
view.Columns.Remove(UserCodeColumn);
|
||||
}
|
||||
|
||||
if (view.Columns.Contains(UserChannelNameColumn))
|
||||
{
|
||||
view.Columns.Remove(UserChannelNameColumn);
|
||||
}
|
||||
}
|
||||
private void AddUserCodeColumns(bool usingTestSetup, bool addCodeColumn)
|
||||
{
|
||||
if (!(ChannelListListView.View is DTS.Common.Controls.AutoSizedGridView view))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var insertPoint = usingTestSetup ? 1 : 0;
|
||||
if (!view.Columns.Contains(UserCodeColumn) && addCodeColumn)
|
||||
{
|
||||
view.Columns.Insert(insertPoint, UserCodeColumn);
|
||||
}
|
||||
|
||||
if (addCodeColumn)
|
||||
{
|
||||
insertPoint++;
|
||||
}
|
||||
|
||||
if (!view.Columns.Contains(UserChannelNameColumn))
|
||||
{
|
||||
view.Columns.Insert(insertPoint, UserChannelNameColumn);
|
||||
}
|
||||
}
|
||||
private void ChannelList_DragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
if (!(DataContext is IGroupChannelListViewModel vm)) { return; }
|
||||
|
||||
var lv = ChannelListListView;
|
||||
|
||||
var index = GetIndex(lv);
|
||||
if (index < 0)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (lv.Items.Count <= index)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(lv.Items[index] is GroupChannel item))
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (null == e.Data)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
var formats = e.Data.GetFormats();
|
||||
|
||||
foreach (var format in formats)
|
||||
{
|
||||
switch (format)
|
||||
{
|
||||
case DragAndDropPayload.ALT_FORMAT:
|
||||
e.Effects = DragDropEffects.Copy;
|
||||
e.Handled = true;
|
||||
return;
|
||||
case DragAndDropPayload.CTRL_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
case DragAndDropPayload.FORMAT:
|
||||
e.Effects = DragDropEffects.Copy;
|
||||
e.Handled = true;
|
||||
return;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.FORMAT:
|
||||
e.Effects = DragDropEffects.Copy;
|
||||
e.Handled = true;
|
||||
return;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.CTRL_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.ALT_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
default:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
|
||||
private static int GetIndex(ListView lv)
|
||||
{
|
||||
for (var i = 0; i < lv.Items.Count; i++)
|
||||
{
|
||||
var item = GetListViewItem(lv, i);
|
||||
if (null == item) { continue; }
|
||||
if (IsMouseOverTarget(item))
|
||||
{
|
||||
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(Visual target)
|
||||
{
|
||||
if (null == target) { return false; }
|
||||
// We need to use MouseUtilities to figure out the cursor
|
||||
// coordinates because, during a drag-drop operation, the WPF
|
||||
// mechanisms for getting the coordinates behave strangely.
|
||||
|
||||
var bounds = VisualTreeHelper.GetDescendantBounds(target);
|
||||
var mousePos = MouseUtilities.GetMousePosition(target);
|
||||
var bContained = bounds.Contains(mousePos);
|
||||
return bContained;
|
||||
}
|
||||
|
||||
private void ChannelList_Drop(object sender, DragEventArgs e)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel vm)) { return; }
|
||||
|
||||
var lv = ChannelListListView;
|
||||
|
||||
var index = GetIndex(lv);
|
||||
if (index < 0)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (lv.Items.Count <= index)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
if (null == e.Data)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
var formats = e.Data.GetFormats();
|
||||
if (((int)e.KeyStates & (int)DragDropKeyStates.AltKey) == (int)DragDropKeyStates.AltKey)
|
||||
{
|
||||
for (var i = 0; i < formats.Length; i++)
|
||||
{
|
||||
formats[i] = $"ALT_{formats[i]}";
|
||||
}
|
||||
}
|
||||
else if (((int)e.KeyStates & (int)DragDropKeyStates.ControlKey) == (int)DragDropKeyStates.ControlKey)
|
||||
{
|
||||
for (var i = 0; i < formats.Length; i++)
|
||||
{
|
||||
formats[i] = $"CTRL_{formats[i]}";
|
||||
}
|
||||
}
|
||||
foreach (var format in formats)
|
||||
{
|
||||
switch (format)
|
||||
{
|
||||
case DragAndDropPayload.FORMAT: //insert sensors on the channels in question
|
||||
vm.DoSensorAssignment((IGroupChannel)ChannelListListView.Items[index], ((DragAndDropPayload)e.Data.GetData(format)).Items);
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.FORMAT: //insert hardware assignments at the channel in question
|
||||
vm.DoHardwareAssignment((IGroupChannel)ChannelListListView.Items[index], (IHardwareChannel[])e.Data.GetData(format));
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DragAndDropPayload.ALT_FORMAT:
|
||||
case DragAndDropPayload.CTRL_FORMAT:
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.CTRL_FORMAT:
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.ALT_FORMAT:
|
||||
default:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
CheckDragAndDropFilterWarning();
|
||||
}
|
||||
private void CheckDragAndDropFilterWarning()
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel viewModel)) { return; }
|
||||
viewModel.NotifyUserIfFiltering();
|
||||
}
|
||||
private void TextBox_DragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
if (null == e.Data)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
var formats = e.Data.GetFormats();
|
||||
if (((int)e.KeyStates & (int)DragDropKeyStates.AltKey) == (int)DragDropKeyStates.AltKey)
|
||||
{
|
||||
for (var i = 0; i < formats.Length; i++)
|
||||
{
|
||||
formats[i] = $"ALT_{formats[i]}";
|
||||
}
|
||||
}
|
||||
else if (((int)e.KeyStates & (int)DragDropKeyStates.ControlKey) == (int)DragDropKeyStates.ControlKey)
|
||||
{
|
||||
for (var i = 0; i < formats.Length; i++)
|
||||
{
|
||||
formats[i] = $"CTRL_{formats[i]}";
|
||||
}
|
||||
}
|
||||
foreach (var format in formats)
|
||||
{
|
||||
switch (format)
|
||||
{
|
||||
case DragAndDropPayload.ALT_FORMAT:
|
||||
e.Effects = DragDropEffects.Copy;
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DragAndDropPayload.CTRL_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DragAndDropPayload.FORMAT: //insert sensors on the channels in question
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.FORMAT: //insert hardware assignments at the channel in question
|
||||
//DoHardwareAssignment(index, e.Data.GetData(format) as IHardwareChannel[]);
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.CTRL_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.ALT_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
break;
|
||||
default:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void TextBox_Drop(object sender, DragEventArgs e)
|
||||
{
|
||||
if (null == e.Data)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
IGroupChannel groupChannel = null;
|
||||
if (sender is Control control)
|
||||
{
|
||||
groupChannel = (IGroupChannel)control.DataContext;
|
||||
}
|
||||
else if (sender is TextBlock textBlock)
|
||||
{
|
||||
groupChannel = (IGroupChannel)textBlock.DataContext;
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(DataContext is GroupChannelListViewModel vm))
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (null == groupChannel)
|
||||
{
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
var formats = e.Data.GetFormats();
|
||||
if (((int)e.KeyStates & (int)DragDropKeyStates.AltKey) == (int)DragDropKeyStates.AltKey)
|
||||
{
|
||||
for (var i = 0; i < formats.Length; i++)
|
||||
{
|
||||
formats[i] = $"ALT_{formats[i]}";
|
||||
}
|
||||
}
|
||||
else if (((int)e.KeyStates & (int)DragDropKeyStates.ControlKey) == (int)DragDropKeyStates.ControlKey)
|
||||
{
|
||||
for (var i = 0; i < formats.Length; i++)
|
||||
{
|
||||
formats[i] = $"CTRL_{formats[i]}";
|
||||
}
|
||||
}
|
||||
foreach (var format in formats)
|
||||
{
|
||||
switch (format)
|
||||
{
|
||||
case DragAndDropPayload.ALT_FORMAT:
|
||||
e.Effects = DragDropEffects.Copy;
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DragAndDropPayload.CTRL_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DragAndDropPayload.FORMAT: //insert sensors on the channels in question
|
||||
var payload = (DragAndDropPayload)e.Data.GetData(format);
|
||||
vm.DoSensorAssignment(groupChannel, payload.Items);
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.FORMAT: //insert hardware assignments at the channel in question
|
||||
vm.DoHardwareAssignment(groupChannel, e.Data.GetData(format) as IHardwareChannel[]);
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.CTRL_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
break;
|
||||
case DTS.Common.Classes.Hardware.DragAndDropPayload.ALT_FORMAT:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
break;
|
||||
default:
|
||||
e.Effects = DragDropEffects.None;
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
CheckDragAndDropFilterWarning();
|
||||
}
|
||||
|
||||
private void MoveBottom_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(sender is Control control)) { return; }
|
||||
if (!(DataContext is IGroupChannelListViewModel vm)) { return; }
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
|
||||
var items = ChannelListListView.SelectedItems;
|
||||
if (items.Count > 1 && items.Contains(channel))
|
||||
{
|
||||
IGroupChannel[] groupChannels = GetSelectedChannelsOrdered();
|
||||
vm.MoveBottom(groupChannels);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.MoveBottom(new[] { channel });
|
||||
}
|
||||
}
|
||||
|
||||
private void MoveDown_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(sender is Control control)) { return; }
|
||||
if (!(DataContext is IGroupChannelListViewModel vm)) { return; }
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
var items = ChannelListListView.SelectedItems;
|
||||
if (items.Count > 1 && items.Contains(channel))
|
||||
{
|
||||
IGroupChannel[] groupChannels = GetSelectedChannelsOrdered();
|
||||
vm.MoveDown(groupChannels);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.MoveDown(new[] { channel });
|
||||
}
|
||||
}
|
||||
|
||||
private void MoveUp_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(sender is Control control)) { return; }
|
||||
if (!(DataContext is IGroupChannelListViewModel vm)) { return; }
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
var items = ChannelListListView.SelectedItems;
|
||||
if (items.Count > 1 && items.Contains(channel))
|
||||
{
|
||||
IGroupChannel[] groupChannels = GetSelectedChannelsOrdered();
|
||||
vm.MoveUp(groupChannels);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.MoveUp(new[] { channel });
|
||||
}
|
||||
}
|
||||
|
||||
private IGroupChannel[] GetSelectedChannelsOrdered()
|
||||
{
|
||||
var list = new List<IGroupChannel>();
|
||||
foreach (var item in ChannelListListView.SelectedItems)
|
||||
{
|
||||
if (item is IGroupChannel channel)
|
||||
{
|
||||
list.Add(channel);
|
||||
}
|
||||
}
|
||||
|
||||
list.Sort((a, b) =>
|
||||
{
|
||||
return ChannelListListView.Items.IndexOf(a).CompareTo(ChannelListListView.Items.IndexOf(b));
|
||||
});
|
||||
return list.ToArray();
|
||||
}
|
||||
private void MoveTop_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(sender is Control control)) { return; }
|
||||
if (!(DataContext is IGroupChannelListViewModel vm)) { return; }
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
|
||||
var items = ChannelListListView.SelectedItems;
|
||||
if (items.Count > 1 && items.Contains(channel))
|
||||
{
|
||||
IGroupChannel[] groupChannels = GetSelectedChannelsOrdered();
|
||||
vm.MoveTop(groupChannels);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.MoveTop(new[] { channel });
|
||||
}
|
||||
}
|
||||
|
||||
private void ChannelCodeBuilder_OnChannelCodeSelected(object sender, string code, string name, ChannelEnumsAndConstants.ChannelCodeType codeType)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel viewModel)) { return; }
|
||||
|
||||
if (!(sender is Control control)) { return; }
|
||||
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
|
||||
if (codeType == ChannelEnumsAndConstants.ChannelCodeType.ISO)
|
||||
{
|
||||
channel.IsoCode = code;
|
||||
if (string.IsNullOrWhiteSpace(channel.IsoChannelName))
|
||||
{
|
||||
channel.IsoChannelName = name;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
channel.UserCode = code;
|
||||
if (string.IsNullOrWhiteSpace(channel.UserChannelName))
|
||||
{
|
||||
channel.UserChannelName = name;
|
||||
}
|
||||
}
|
||||
viewModel.MarkModified(channel);
|
||||
}
|
||||
/// <summary>
|
||||
/// Sets channel code/name when the user clicks on a selection from the popup window
|
||||
/// 17565 - Predictive text on "ISO channel name" column when in test set up / groups to make
|
||||
/// </summary
|
||||
private void ChannelNameBuilder_OnChannelCodeSelected(object sender, string code, string name, ChannelEnumsAndConstants.ChannelCodeType codeType)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel viewModel)) { return; }
|
||||
|
||||
if (!(sender is Control control)) { return; }
|
||||
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
|
||||
if (codeType == ChannelEnumsAndConstants.ChannelCodeType.ISO)
|
||||
{
|
||||
channel.IsoChannelName = name;
|
||||
channel.IsoCode = code;
|
||||
}
|
||||
else
|
||||
{
|
||||
channel.UserChannelName = name;
|
||||
channel.UserCode = code;
|
||||
}
|
||||
viewModel.MarkModified(channel);
|
||||
}
|
||||
private void TextBoxSourceUpdated(object sender, System.Windows.Data.DataTransferEventArgs e)
|
||||
{
|
||||
//this is slightly complicated, when the group name changes:
|
||||
//1) remove this channel from the channel list for the old group
|
||||
//2) remove the old group if it's now empty
|
||||
//3) add a new group if one doesn't exist
|
||||
//4) add the channel to the group
|
||||
if (!(DataContext is GroupChannelListViewModel vm))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(((Control)sender).DataContext is IGroupChannel groupChannel))
|
||||
{
|
||||
return;
|
||||
}
|
||||
vm.GroupNameChanged(groupChannel);
|
||||
vm.MarkModified(groupChannel);
|
||||
}
|
||||
|
||||
private void ChannelListListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void ListView_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (ChannelListListView.SelectedItems.Count <= 0) { return; }
|
||||
|
||||
if (Keyboard.IsKeyDown(Key.LeftAlt) || Keyboard.IsKeyDown(Key.RightAlt))
|
||||
{
|
||||
switch (e.Key)
|
||||
{
|
||||
case Key.System:
|
||||
if (e.SystemKey == Key.Up) { Move(true); }
|
||||
else if (e.SystemKey == Key.Down) { Move(false); }
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (Keyboard.IsKeyDown(Key.Up) && e.Key == Key.LeftAlt)
|
||||
{
|
||||
Move(true);
|
||||
}
|
||||
else if (Keyboard.IsKeyDown(Key.Up) && e.Key == Key.RightAlt)
|
||||
{
|
||||
Move(true);
|
||||
}
|
||||
else if (Keyboard.IsKeyDown(Key.Down) && e.Key == Key.LeftAlt)
|
||||
{
|
||||
Move(false);
|
||||
}
|
||||
else if (Keyboard.IsKeyDown(Key.Down) && e.Key == Key.RightAlt)
|
||||
{
|
||||
Move(false);
|
||||
}
|
||||
}
|
||||
private void Move(bool bUp)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel vm))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var list = new List<IGroupChannel>();
|
||||
foreach (var item in ChannelListListView.SelectedItems)
|
||||
{
|
||||
if (!(item is IGroupChannel groupChannel))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
list.Add(groupChannel);
|
||||
}
|
||||
if (bUp)
|
||||
{
|
||||
vm.MoveUp(list.ToArray());
|
||||
}
|
||||
else
|
||||
{
|
||||
vm.MoveDown(list.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
private void ISOCode_LostFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel viewModel)) { return; }
|
||||
|
||||
if (!(sender is Control control)) { return; }
|
||||
|
||||
if (!(control.DataContext is IGroupChannel channel)) { return; }
|
||||
if (viewModel.UseISOCodeFilterMapping)
|
||||
{
|
||||
//FB 15523 passes available filters
|
||||
var filters = DTS.SensorDB.SoftwareFilter.GetSoftwareFilters();
|
||||
//FB 15574 FB 13120
|
||||
channel.FilterClass = channel.GetFilterClassFromISOCode(filters, channel.IsoCode);
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// handles hyperlink clicks, specifically for a sensor
|
||||
/// 15125 Navigate to selected sensor from run test diagnostics
|
||||
/// </summary>
|
||||
private void Hyperlink_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!(DataContext is GroupChannelListViewModel vm)) { return; }
|
||||
if (!(sender is Hyperlink hl)) { return; }
|
||||
if (!(hl.DataContext is GroupChannel groupChannel)) { return; }
|
||||
var eventAggregator = ContainerLocator.Container.Resolve<IEventAggregator>();
|
||||
eventAggregator.GetEvent<PageNavigationRequestEvent>().Publish(new PageNavigationRequest(
|
||||
PageNavigationRequest.Destinations.Sensor,
|
||||
groupChannel,
|
||||
vm));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,913 @@
|
||||
<base:BaseView x:Class="GroupChannelList.GroupChannelSettingsListView"
|
||||
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:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:strings="clr-namespace:GroupChannelList"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="500"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:converters="clr-namespace:GroupChannelList.Converters"
|
||||
xmlns:converters1="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
||||
xmlns:cc="clr-namespace:ChannelCodes.Model;assembly=ChannelCodes"
|
||||
xmlns:behaviors="clr-namespace:DTS.Common.Behaviors;assembly=DTS.Common"
|
||||
xmlns:sensors="clr-namespace:DTS.Common.Enums.Sensors;assembly=DTS.Common"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:validators="clr-namespace:DTS.Common.Validators;assembly=DTS.Common"
|
||||
xmlns:constants="clr-namespace:DTS.Common.Constant;assembly=DTS.Common"
|
||||
x:Name="ChannelListView">
|
||||
<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>
|
||||
<Style TargetType="RadioButton" BasedOn="{StaticResource FlatRadioButtonStyle}" >
|
||||
<Setter Property="Height" Value="24" />
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</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}">
|
||||
<Setter Property="Height" Value="20"/>
|
||||
</Style>
|
||||
<Style TargetType="Button" BasedOn="{StaticResource TTS_ButtonStyle}"/>
|
||||
<Style TargetType="GridViewColumnHeader" BasedOn="{StaticResource Gray_GridViewColumnHeaderStyle}"/>
|
||||
<Style TargetType="{x:Type xctk:DoubleUpDown}" BasedOn="{StaticResource PageContentXCDoubleUpDown}" />
|
||||
<converters:SensorIdBackgroundConverter x:Key="BackgroundConverter" />
|
||||
<converters1:NumericStringFormatConverter x:Key="NumericStringFormatConverter" />
|
||||
<!--<BooleanToVisibilityConverter x:Key="BoolToVisConverter"/>-->
|
||||
<converters1:BooleanToVisibilityConverter x:Key="BoolToVisConverter" />
|
||||
<converters1:InverseBooleanToVisibilityConverter x:Key="InverseBoolToVisConverter" />
|
||||
<converters:BooleanToWidthConverter x:Key="BooleanToWidthConverter" />
|
||||
<converters1:EnumVisibilityConverter x:Key="EnumVisibilityConverter" />
|
||||
<converters1:InverseEnumVisibilityConverter x:Key="InverseEnumVisibilityConverter" />
|
||||
<converters1:BooleanToBorderBrushConverter x:Key="BooleanToBorderBrushConverter" />
|
||||
<converters1:InverseBooleanConverter x:Key="InverseBoolConverter" />
|
||||
<system:String x:Key="CapacityFormat">{0:N2}</system:String>
|
||||
<converters1:GreaterEqualThanToBoolConverter x:Key="GreaterThanConverter" />
|
||||
<system:UInt16 x:Key="IntervalOnBound">1</system:UInt16>
|
||||
<converters1:IntervalToVisibilityConverter x:Key="InterveralToVisConverter" />
|
||||
<converters1:BooleanOrMultiConverter x:Key="BooleanOrMultiConverter" />
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid Background="{DynamicResource Brush_ApplicationContentBackground}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<WrapPanel Grid.Row="0" Orientation="Horizontal">
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_Analog}" x:Name="rbParametersAnalog" Click="Analog_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_Squib}" x:Name="rbParametersSquib" Click="Squib_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_DigitalOut}" x:Name="rbParametersDigitalOut" Click="DigitalOut_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_DigitalIn}" x:Name="rbParametersDigitalIn" Click="DigitalIn_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_Uart}" x:Name="rbParametersUart" Click="Uart_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_StreamOut}" x:Name="rbParametersStreamOut" Click="StreamOut_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_StreamIn}" x:Name="rbParametersStreamIn" Click="StreamIn_Click" />
|
||||
<RadioButton Content="{strings:TranslateExtension Parameters_CAN}" x:Name="rbParametersCAN" Click="CAN_Click" />
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding ElementName=ChannelListView, Path=GCAC_Visibility, Converter={StaticResource BoolToVisConverter}}" Margin="15,0,0,0">
|
||||
<ToggleButton Content="{strings:TranslateExtension ModifyGlobalRangeCAC}" MinWidth="200"
|
||||
x:Name="btnModifyGlobalRangeCAC" IsEnabled="{Binding ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}}"/>
|
||||
<StackPanel Margin="15,0,0,0" Orientation="Horizontal" Visibility="{Binding IsChecked,ElementName=btnModifyGlobalRangeCAC, Converter={StaticResource BoolToVisConverter}}">
|
||||
<TextBlock Text="{strings:TranslateExtension GlobalRangeCAC}" />
|
||||
<ComboBox SelectedItem="{Binding ElementName=ChannelListView, Path=SelectedGlobalRangeCACOption}" Grid.Column="1" MinWidth="300" HorizontalAlignment="Left"
|
||||
HorizontalContentAlignment="Right" ItemsSource="{Binding ElementName=ChannelListView, Path=GlobalCACOptions}" x:Name="cbGlobalRangeCAC"
|
||||
IsEnabled="{Binding ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}}" AutomationProperties.AutomationId="cb_GlobalRangeCAC"
|
||||
/>
|
||||
<Button Content="{strings:TranslateExtension btnApplyGlobalRangeCAC}" x:Name="btnGlobalRangeApply" Click="btnGlobalRangeApply_Click"
|
||||
IsEnabled="{Binding ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
<!--<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">-->
|
||||
<ListView Grid.Row="1" ItemsSource="{Binding SettingChannels}" AutomationProperties.AutomationId="Parameters" VirtualizingStackPanel.IsVirtualizing="True"
|
||||
x:Name="ChannelSettingsListListView" GridViewColumnHeader.Click="GridViewColumnHeader_Click" Loaded="ChannelSettingsListListView_OnLoaded">
|
||||
<ListView.View><!-- -->
|
||||
<controls:AutoSizedGridView AutomationProperties.AutomationId="CustomChannelsListGridView">
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="GroupOrderColumn" x:Name="GroupOrderColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Order" HeaderTitle="{strings:TranslateExtension Order}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding GroupChannelOrder,FallbackValue='-1',StringFormat={}000}" VerticalAlignment="Center" AutomationProperties.AutomationId="ChannelOrderTextBlock"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="TestSetupOrderColumn" x:Name="TestSetupOrderColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Order" HeaderTitle="{strings:TranslateExtension Order}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding TestSetupOrder,FallbackValue='-1',StringFormat={}000}" VerticalAlignment="Center" AutomationProperties.AutomationId="ChannelOrderTextBlock"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="GroupColumn" x:Name="GroupColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="GroupName" HeaderTitle="{strings:TranslateExtension Group}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock AutomationProperties.AutomationId="GroupNameTextBlock" MinWidth="200" Tag="GroupName" Text="{Binding GroupName}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserCodeColumn" x:Name="UserCodeColumn" Width="{Binding ShowUserCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserCode" HeaderTitle="{strings:TranslateExtension UserCode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock MinWidth="200" AutomationProperties.AutomationId="UserCodeTextBlock" Tag="UserCode" Text="{Binding UserCode}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserChannelNameColumn" x:Name="UserChannelNameColumn"
|
||||
Width="{Binding ShowUserCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserChannelName" HeaderTitle="{strings:TranslateExtension UserChannelName}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UserChannelName}" AutomationProperties.AutomationId="UserChannelNameTextBlock" MinWidth="200" Tag="UserChannelName"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ChannelNameColumn" x:Name="ChannelNameColumn"
|
||||
Width="{Binding ChannelNamesOnly, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserChannelName" HeaderTitle="{strings:TranslateExtension ChannelName}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding UserChannelName}" AutomationProperties.AutomationId="ChannelNameTextBlock" MinWidth="200" Tag="UserChannelName"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ISOCodeColumn" x:Name="ISOCodeColumn"
|
||||
Width="{Binding ShowISOCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ISOCode" HeaderTitle="{strings:TranslateExtension ISOCode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding IsoCode}" MinWidth="200" AutomationProperties.AutomationId="ISOCodeTextBlock" Tag="ISOCode"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ISOChannelNameColumn" x:Name="ISOChannelNameColumn"
|
||||
Width="{Binding ShowISOCodes, Converter={StaticResource BooleanToWidthConverter}}">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ISOChannelName" HeaderTitle="{strings:TranslateExtension ISOChannelName}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding IsoChannelName}" AutomationProperties.AutomationId="ISOChannelNameTextBlock" MinWidth="200" Tag="ISOChannelName"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SensorColumn" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Sensor" HeaderTitle="{strings:TranslateExtension Sensor}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<Label Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}">
|
||||
<Hyperlink Click="Hyperlink_Click" IsEnabled="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolConverter}}">
|
||||
<TextBlock Text="{Binding Sensor}" AutomationProperties.AutomationId="SensorTextBlock" />
|
||||
</Hyperlink>
|
||||
</Label>
|
||||
<TextBlock Text="{Binding Sensor}" AutomationProperties.AutomationId="SensorTextBlock" Visibility="{Binding EmbeddedSensor, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="RangeColumn" x:Name="AnalogRangeColumn" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Range" HeaderTitle="{strings:TranslateExtension AnalogParameters_Range}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" VerticalAlignment="Center"
|
||||
Visibility="{Binding NonRangeModifiableSensor, Converter={StaticResource BoolToVisConverter}}" />
|
||||
<xctk:DoubleUpDown AutomationProperties.AutomationId="AnalogParameters_Range" Minimum=".1" FormatString="N2" Value="{Binding Range}"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsRangeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_RangeLowG" HorizontalAlignment="Left"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableRangesLowG}" SelectedItem="{Binding RangeLowG}"
|
||||
Visibility="{Binding RangeModifiableSensorLowG, Converter={StaticResource BoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsRangeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
LostFocus="RangeLowG_LostFocus"
|
||||
/>
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_RangeARS" HorizontalAlignment="Left"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableRangesARS}" SelectedItem="{Binding Range}"
|
||||
Visibility="{Binding RangeModifiableSensorARS, Converter={StaticResource BoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsRangeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
LostFocus="RangeARS_LostFocus"/>
|
||||
<xctk:DoubleUpDown AutomationProperties.AutomationId="AnalogParameters_RangeVoltageInsert" Minimum=".1" FormatString="N2" Value="{Binding Range}"
|
||||
Visibility="{Binding VoltageInsertionSensor, Converter={StaticResource BoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsRangeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="CapacityColumn" x:Name="AnalogCapacityColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Capacity" HeaderTitle="{strings:TranslateExtension AnalogParameters_Capacity}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBlock Text="{Binding EmbeddedCapacityDisplay}" VerticalAlignment="Center"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource BoolToVisConverter}}" />
|
||||
<TextBlock AutomationProperties.AutomationId="AnalogParameters_Capacity" Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}">
|
||||
<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>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SensitivityColumn" x:Name="AnalogSensitivityColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Sensitivity" HeaderTitle="{strings:TranslateExtension AnalogParameters_Sensitivity}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock AutomationProperties.AutomationId="AnalogParameters _Sensitivity" Text="{Binding Sensitivity}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UnitsColumn" x:Name="AnalogUnitsColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Units" HeaderTitle="{strings:TranslateExtension AnalogParameters_Units}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock AutomationProperties.AutomationId="AnalogParameters_Units" Text="{Binding Units}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="CFCColumn" x:Name="AnalogCFCColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="FilterClass" HeaderTitle="{strings:TranslateExtension AnalogParameters_CFC}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_CFC" DisplayMemberPath="FilterName" ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableCFC}"
|
||||
HorizontalAlignment="Left" SelectedItem="{Binding FilterClass}" MinWidth="125"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsFilterClassDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="PolarityColumn" x:Name="AnalogPolarityColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="Polarity" HeaderTitle="{strings:TranslateExtension AnalogParameters_Polarity}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_Polarity" HorizontalAlignment="Left"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailablePolarity}" SelectedItem="{Binding Polarity}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsPolarityDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
<!--BorderBrush="{Binding PolarityBorderBrushColor}" BorderThickness="2.0"/>-->
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ZeroMethodColumn" x:Name="AnalogZeroMethodColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ZeroMethod" HeaderTitle="{strings:TranslateExtension AnalogParameters_ZeroMethod}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<!--FB16269 Show user setting but lock it rather than hide it if NonLinear-->
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_ZeroMethod" HorizontalAlignment="Left" MinWidth="125"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableZeroMethodEmbeddedSensor}" SelectedItem="{Binding ZeroMethod}"
|
||||
IsEnabled="{Binding NonLinear, Converter={StaticResource InverseBoolConverter}}"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource BoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsZeroMethodDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_ZeroMethod" HorizontalAlignment="Left" MinWidth="125"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableZeroMethod}" SelectedItem="{Binding ZeroMethod}"
|
||||
IsEnabled="{Binding NonLinearAndNotPolynomial, Converter={StaticResource InverseBoolConverter}}"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsZeroMethodDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="ZeroMethodColumn" x:Name="AnalogZeroMethodStartColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ZeroMethodStart" HeaderTitle="{strings:TranslateExtension AnalogParameters_ZeroMethodStart}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBlock Text="{strings:TranslateExtension Not_Applicable}" VerticalAlignment="Center"
|
||||
Visibility="{Binding ZeroMethod, Converter={StaticResource InverseEnumVisibilityConverter}, ConverterParameter={x:Static sensors:ZeroMethodType.AverageOverTime}}" />
|
||||
<xctk:DoubleUpDown AutomationProperties.AutomationId="AnalogParameters_ZeroMethodStart"
|
||||
FormatString="F5" Value="{Binding ZeroMethodStart}" Visibility="{Binding ZeroMethod,
|
||||
Converter={StaticResource EnumVisibilityConverter}, ConverterParameter={x:Static sensors:ZeroMethodType.AverageOverTime}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsZeroMethodStartDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="ZeroMethodColumn" x:Name="AnalogZeroMethodEndColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ZeroMethodEnd" HeaderTitle="{strings:TranslateExtension AnalogParameters_ZeroMethodEnd}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBlock Text="{strings:TranslateExtension Not_Applicable}" VerticalAlignment="Center"
|
||||
Visibility="{Binding ZeroMethod, Converter={StaticResource InverseEnumVisibilityConverter}, ConverterParameter={x:Static sensors:ZeroMethodType.AverageOverTime}}" />
|
||||
<xctk:DoubleUpDown AutomationProperties.AutomationId="AnalogParameters_ZeroMethodEnd"
|
||||
FormatString="F5" Value="{Binding ZeroMethodEnd}" Visibility="{Binding ZeroMethod,
|
||||
Converter={StaticResource EnumVisibilityConverter}, ConverterParameter={x:Static sensors:ZeroMethodType.AverageOverTime}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsZeroMethodEndDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue1Column" x:Name="AnalogUserValue1Column" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue1" HeaderTitle="{strings:TranslateExtension AnalogParameters_UserValue1}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox AutomationProperties.AutomationId="AnalogParameters_UserValue1" Width="90" MaxWidth="90" MinWidth="90" Text="{Binding UserValue1}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue2Column" x:Name="AnalogUserValue2Column" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue2" HeaderTitle="{strings:TranslateExtension AnalogParameters_UserValue2}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox AutomationProperties.AutomationId="AnalogParameters_UserValue2" Width="90" MaxWidth="90" MinWidth="90" Text="{Binding UserValue2}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="UserValue3Column" x:Name="AnalogUserValue3Column" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UserValue3" HeaderTitle="{strings:TranslateExtension AnalogParameters_UserValue3}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox AutomationProperties.AutomationId="AnalogParameters_UserValue3" Width="90" MaxWidth="90" MinWidth="90" Text="{Binding UserValue3}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="InitialOffsetColumn" x:Name="AnalogInitialOffsetColumn" >
|
||||
<controls:GridViewColumnHeaderSearchable Tag="InitialOffset" HeaderTitle="{strings:TranslateExtension AnalogParameters_InitialOffset}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" VerticalAlignment="Center"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource BoolToVisConverter}}" />
|
||||
<ComboBox AutomationProperties.AutomationId="AnalogParameters_InitialOffset" Width="90" MaxWidth="90" MinWidth="90"
|
||||
ItemsSource="{Binding AvailableInitialOffsets}" SelectedItem="{Binding InitialOffset}"
|
||||
Visibility="{Binding EmbeddedSensor, Converter={StaticResource InverseBoolToVisConverter}}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsInitialOffsetDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<!-- http://manuscript.dts.local/f/cases/29760/Implement-ACCoupleEnable-for-TSR-AIR -->
|
||||
<GridViewColumn AutomationProperties.AutomationId="ACCouplingEnable" x:Name="AnalogACCouplingEnableColumn"
|
||||
Header="{strings:Translate AnalogParameter_ACCouplingEnable}">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox AutomationProperties.AutomationId="AnalogParameters_ACCouplingEnable"
|
||||
IsChecked="{Binding ACCouplingEnabled}" Click="ACCouplingEnable_Click"
|
||||
Visibility="{Binding IsTSRAIRLowG, Converter={StaticResource BoolToVisConverter}}" >
|
||||
<CheckBox.IsEnabled>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrMultiConverter}">
|
||||
<Binding Path="ViewDbVersion" ElementName="ChannelListView" Converter="{StaticResource GreaterThanConverter}" ConverterParameter="{StaticResource MIN_DB_VERSION_AC_COUPLING}" />
|
||||
<Binding Path="DataContext.ReadOnlyParametersMode" Converter="{StaticResource InverseBoolConverter}" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type ListView}}" />
|
||||
</MultiBinding>
|
||||
</CheckBox.IsEnabled>
|
||||
</CheckBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="InputModeColumn" x:Name="DigitalInInputModeColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="InputMode" HeaderTitle="{strings:TranslateExtension DigitalInParameters_InputMode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="DigitalInParameters_InputMode" HorizontalAlignment="Left" Width="180"
|
||||
ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableDigitalInputModes}" SelectedItem="{Binding DigitalInputMode}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDigitalInputModeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="DefaultValueColumn" x:Name="DigitalInDefaultValueColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="DefaultValue" HeaderTitle="{strings:TranslateExtension DigitalInParameters_DefaultValue}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox Text="{Binding DefaultValue, Mode=TwoWay}" AutomationProperties.AutomationId="DigitialInParameters_DefaultValue"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDefaultValueDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ActiveValueColumn" x:Name="DigitalInActiveValueColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="ActiveValue" HeaderTitle="{strings:TranslateExtension DigitalInParameters_ActiveValue}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox Text="{Binding ActiveValue, Mode=TwoWay}" AutomationProperties.AutomationId="DigitalInParameters_ActiveValue"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsActiveValueDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="OutputModeColumn" x:Name="DigitalOutOutputModeColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="OutputMode" HeaderTitle="{strings:TranslateExtension DigitalOutParameters_OutputMode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox HorizontalAlignment="Left" ItemsSource="{Binding ElementName=ChannelListView, Path=AvailableDigitalOutputModes}"
|
||||
SelectedItem="{Binding DigitalOutputMode}" Width="180" AutomationProperties.AutomationId="DigitalOutParameters_OutputMode"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDigitalOutputModeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="OutputDelayColumn" x:Name="DigitalOutDelayColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="OutputDelay" HeaderTitle="{strings:TranslateExtension DigitalOutParameters_Delay}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding DigitalOutDelay}" FormatString="N2" AutomationProperties.AutomationId="DigitalOutParameters_Delay"
|
||||
Minimum="{StaticResource DIGITALOUT_DELAY_MIN}" Increment=".1"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDigitalOutDelayDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="OutputLimitDurationColumn" x:Name="DigitalOutLimitDurationColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="OutputLimitDuration" HeaderTitle="{strings:TranslateExtension DigitalOutParameters_LimitDuration}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding DigitalOutLimitDuration}" AutomationProperties.AutomationId="DigitalOutParameters_LimitDuration"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDigitalOutLimitDurationDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="OutputDurationColumn" x:Name="DigitalOutDurationColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="OutputDuration" HeaderTitle="{strings:TranslateExtension DigitalOutParameters_Duration}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding DigitalOutDuration}" FormatString="N1" AutomationProperties.AutomationId="DigitalOutParameters_Duration"
|
||||
Visibility="{Binding DigitalOutLimitDuration, Converter={StaticResource BoolToVisConverter}}" Increment=".1" Maximum="{Binding DigitalOutDurationMax}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsDigitalOutDurationDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SquibFireModeColumn" x:Name="SquibFireModeColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SquibFireMode" HeaderTitle="{strings:TranslateExtension SquibParameters_FireMode}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="SquibParameters_FireMode" HorizontalAlignment="Left" Width="150"
|
||||
ItemsSource="{Binding ElementName=ChannelListView,Path=AvailableSquibFireModes}" SelectedItem="{Binding SquibFireMode}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsSquibFireModeDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SquibDelayColumn" x:Name="SquibDelayColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SquibDelay" HeaderTitle="{strings:TranslateExtension SquibParameters_Delay}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding SquibDelay}" FormatString="N2" AutomationProperties.AutomationId="SquibParameters_Delay" Width="100" Increment=".1"
|
||||
Minimum="{StaticResource SQUIB_DELAY_MIN}" Maximum="{StaticResource SQUIB_DELAY_MAX}" Watermark="{strings:TranslateExtension EnterValue}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsSquibDelayDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SquibLimitDurationColumn" x:Name="SquibLimitDurationColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SquibLimitDuration" HeaderTitle="{strings:TranslateExtension SquibParameters_LimitDuration}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding SquibLimitDuration}" AutomationProperties.AutomationId="SquibParameters_LimitDuration"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsSquibLimitDurationDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="SquibDurationColumn" x:Name="SquibDurationColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SquibDuration" HeaderTitle="{strings:TranslateExtension SquibParameters_Duration}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding SquibDuration}" FormatString="N1" AutomationProperties.AutomationId="SquibParameters_Duration"
|
||||
Minimum="{StaticResource SQUIB_DURATION_MIN}" Maximum="{StaticResource SQUIB_DURATION_MAX}"
|
||||
Visibility="{Binding SquibLimitDuration, Converter={StaticResource BoolToVisConverter}}" Increment=".1"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsSquibDurationDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="SquibCurrentColumn" x:Name="SquibCurrentColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="SquibCurrent" HeaderTitle="{strings:TranslateExtension SquibParameters_Current}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding SquibCurrent}" FormatString="N2" AutomationProperties.AutomationId="SquibParameters_Current"
|
||||
Minimum="{StaticResource SQUIB_CURRENT_LOW}" Maximum="{StaticResource SQUIB_CURRENT_HIGH}"
|
||||
Visibility="{Binding IsConstantCurrent, Converter={StaticResource BoolToVisConverter}}" Increment=".1"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsSquibCurrentDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartBaudRateColumn" x:Name="UartBaudRateColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UartBaudRate" HeaderTitle="{strings:TranslateExtension UartParameters_BaudRate}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox ItemsSource="{x:Static constants:EmbeddedSensors.BAUD_RATES}" BorderThickness="2.0" BorderBrush="{Binding IsUartBaudRateDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}"
|
||||
IsEditable="True">
|
||||
<ComboBox.Text>
|
||||
<Binding Path="UartBaudRate" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" ValidatesOnNotifyDataErrors="True" ValidatesOnExceptions="True">
|
||||
<Binding.ValidationRules>
|
||||
<validators:UARTBAUDRateValidator />
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</ComboBox.Text>
|
||||
</ComboBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartDataBitsColumn" x:Name="UartDataBitsColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UartDataBits" HeaderTitle="{strings:TranslateExtension UartParameters_DataBits}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<xctk:DoubleUpDown Value="{Binding UartDataBits}" FormatString="N0" AutomationProperties.AutomationId="UartParameters_DataBits"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="{StaticResource UART_DATA_BITS_MIN}" Maximum="{StaticResource UART_DATA_BITS_MAX}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsUartDataBitsDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartStopBitsColumn" x:Name="UartStopBitsColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UartStopBits" HeaderTitle="{strings:TranslateExtension UartParameters_StopBits}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="UartParameters_StopBits" HorizontalAlignment="Left" Width="150"
|
||||
ItemsSource="{Binding ElementName=ChannelListView,Path=AvailableUartStopBits}" SelectedItem="{Binding UartStopBits}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsUartStopBitsDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartParityColumn" x:Name="UartParityColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UartParity" HeaderTitle="{strings:TranslateExtension UartParameters_Parity}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="UartParameters_Parity" HorizontalAlignment="Left" Width="150"
|
||||
ItemsSource="{Binding ElementName=ChannelListView,Path=AvailableUartParities}" SelectedItem="{Binding UartParity}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsUartParityDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<!--FB 30486 Remove option from UI-->
|
||||
<GridViewColumn AutomationProperties.AutomationId="UartDataFormatColumn" x:Name="UartDataFormatColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="UartDataFormat" HeaderTitle="{strings:TranslateExtension UartParameters_DataFormat}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="UartParameters_DataFormat" HorizontalAlignment="Left" Width="150"
|
||||
ItemsSource="{Binding ElementName=ChannelListView,Path=AvailableUartDataFormats}" SelectedItem="{Binding UartDataFormat}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsUartDataFormatDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamInUDPAddressColumn" x:Name="StreamInUDPAddressColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamInUDPAddress" HeaderTitle="{strings:TranslateExtension StreamInParameters_UDPAddress}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBox Text="{Binding StreamInUDPAddress, Mode=TwoWay}" AutomationProperties.AutomationId="StreamInParameters_UDPAddress"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamInUDPAddressDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutUDPProfileColumn" x:Name="StreamOutUDPProfileColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutUDPProfile" HeaderTitle="{strings:TranslateExtension StreamOutParameters_StreamProfile}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox AutomationProperties.AutomationId="StreamOutParameters_StreamProfile" HorizontalAlignment="Left" MinWidth="180" Width="Auto"
|
||||
ItemsSource="{Binding ElementName=ChannelListView,Path=AvailableStreamOutUDPProfiles}" SelectedItem="{Binding StreamOutUDPProfile}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutUDPProfileDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutUDPAddressColumn" x:Name="StreamOutUDPAddressColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutUDPAddress" HeaderTitle="{strings:TranslateExtension StreamOutParameters_UDPAddress}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<TextBox Text="{Binding StreamOutUDPAddress, Mode=TwoWay}" AutomationProperties.AutomationId="StreamOutParameters_UDPAddress"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutUDPAddressDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
Visibility="{Binding IsUARTStream, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsUARTStream, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutUDPTimeChannelIdColumn" x:Name="StreamOutUDPTimeChannelIdColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutUDPTimeChannelId" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TimeChannelId}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding StreamOutUDPTimeChannelId}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TimeChannelId"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="{StaticResource STREAMOUT_TIMECHANNELID_MIN}" Maximum="{StaticResource STREAMOUT_TIMECHANNELID_MAX}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutUDPTimeChannelIdDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
Visibility="{Binding IsCH10, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsCH10, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutUDPDataChannelIdColumn" x:Name="StreamOutUDPDataChannelIdColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutUDPDataChannelId" HeaderTitle="{strings:TranslateExtension StreamOutParameters_DataChannelId}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding StreamOutUDPDataChannelId}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_DataChannelId"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="{StaticResource STREAMOUT_DATACHANNELID_MIN}" Maximum="{StaticResource STREAMOUT_DATACHANNELID_MAX}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutUDPDataChannelIdDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}">
|
||||
<xctk:DoubleUpDown.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}">
|
||||
<Binding Path="IsCH10" />
|
||||
<Binding Path="IsUARTStream" />
|
||||
</MultiBinding>
|
||||
</xctk:DoubleUpDown.Visibility>
|
||||
</xctk:DoubleUpDown>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}">
|
||||
<TextBlock.Visibility>
|
||||
<MultiBinding Converter="{StaticResource BooleanOrToVisibilityMultiConverter}" ConverterParameter="False">
|
||||
<Binding Path="IsCH10" />
|
||||
<Binding Path="IsUARTStream" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Visibility>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutIRIGTimeDataPacketIntervalMsColumn" x:Name="StreamOutIRIGTimeDataPacketIntervalMsColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutIRIGTimeDataPacketIntervalMs" HeaderTitle="{strings:TranslateExtension StreamOutParameters_IRIGTimeDataPacketIntervalMs}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding IsCH10, Converter={StaticResource BoolToVisConverter}}">
|
||||
<CheckBox Content="{strings:TranslateExtension IntervalOn}" IsChecked="{Binding StreamOutIRIGTimeDataPacketIntervalMs, Converter={StaticResource GreaterThanConverter}, ConverterParameter={StaticResource IntervalOnBound}, Mode=OneWay}"
|
||||
Click="TimePacketIntervalOn_Click"
|
||||
/>
|
||||
<xctk:DoubleUpDown Value="{Binding StreamOutIRIGTimeDataPacketIntervalMs}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_DataChannelId"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="{StaticResource STREAMOUT_IRIG_TDP_MIN}" Maximum="{StaticResource STREAMOUT_IRIG_TDP_MAX}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutIRIGTimeDataPacketIntervalMsDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
Visibility="{Binding StreamOutIRIGTimeDataPacketIntervalMs, Converter={StaticResource InterveralToVisConverter}, ConverterParameter={StaticResource IntervalOnBound}}"
|
||||
/>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsCH10, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutTMATSIntervalMsColumn" x:Name="StreamOutTMATSIntervalMsColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutTMATSIntervalMs" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMATSIntervalMs}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<StackPanel Orientation="Horizontal" Visibility="{Binding IsIENA, Converter={StaticResource InverseBoolToVisConverter}}"
|
||||
IsEnabled="{Binding ElementName=ChannelListView, Path=DbVersion, Converter={StaticResource GreaterThanConverter}, ConverterParameter={StaticResource TMATSIntervalDbVesion}}">
|
||||
<CheckBox Content="{strings:TranslateExtension IntervalOn}" IsChecked="{Binding StreamOutTMATSIntervalMs, Converter={StaticResource GreaterThanConverter},ConverterParameter={StaticResource IntervalOnBound},Mode=OneWay}"
|
||||
Click="TMATSIntervalON_Click"
|
||||
/>
|
||||
<xctk:DoubleUpDown Value="{Binding StreamOutTMATSIntervalMs}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TMATSIntervalMs"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="{StaticResource STREAMOUT_TMAT_INTERVAL_MIN}" Maximum="{StaticResource STREAMOUT_TMAT_INTERVAL_MAX}"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsStreamOutTMATSIntervalMsDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
Visibility="{Binding StreamOutTMATSIntervalMs, Converter={StaticResource InterveralToVisConverter}, ConverterParameter={StaticResource IntervalOnBound}}"
|
||||
/>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsIENA, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<!-- TMNS Columns -->
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutSubFrameIDColumn" x:Name="StreamOutSubFrameIDColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutSubFrameIdColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMNS_SubFrameId}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding TMNS_SubFrameId}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TMNS_SubFrameId"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsTMNS,Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutMessageIDColumn" x:Name="StreamOutMessageIDColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutMessageIdColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMNS_MessageId}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding TMNS_MsgId}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TMNS_MessageId"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsTMNS, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutMinorPerMajorColumn" x:Name="StreamOutMinorPerMajorColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutMinorPerMajorColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMNS_MinorPerMajor}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding TMNS_MinorPerMajor}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TMNS_MinorPerMajor"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsTMNS, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutTMATSPortColumn" x:Name="StreamOutTMATSPortColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutTMATSPortColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_TMNS_TMATSPort}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding TMNS_TMATSPort}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_TMNS_TMATSPort"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsTMNS, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsTMNS, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<!-- IENA columns -->
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutIENASourcePortColumn" x:Name="StreamOutIENASourcePortColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutIENASourcePortColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_IENA_SourcePort}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding IENA_SourcePort}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_IENA_SourcePort"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsIENA, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsIENA, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="StreamOutIENAKeyColumn" x:Name="StreamOutIENAKeyColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="StreamOutIENAKeyColumn" HeaderTitle="{strings:TranslateExtension StreamOutParameters_IENA_Key}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<StackPanel IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" >
|
||||
<xctk:DoubleUpDown Value="{Binding IENA_Key}" FormatString="N0" AutomationProperties.AutomationId="StreamOutParameters_IENA_Key"
|
||||
ClipValueToMinMax="True" Increment="1" Minimum="0" Maximum="65535"
|
||||
BorderThickness="2.0" Visibility="{Binding IsIENA, Converter={StaticResource BoolToVisConverter}}"/>
|
||||
<TextBlock Text="{strings:TranslateExtension Table_NA}" Visibility="{Binding IsIENA, Converter={StaticResource InverseBoolToVisConverter}}"/>
|
||||
</StackPanel>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CanIsFDColumn" x:Name="CanIsFDColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="CanIsFD" HeaderTitle="{strings:TranslateExtension CanParameters_IsFD}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<CheckBox IsChecked="{Binding CanIsFD}" AutomationProperties.AutomationId="CanIsFDColumn"
|
||||
BorderThickness="2.0" BorderBrush="{Binding IsCanIsCanFDDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}" />
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CanArbBaseBitrateColumn" x:Name="CanArbBaseBitrateColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="CanArbBaseBitrate" HeaderTitle="{strings:TranslateExtension CanParameters_ArbBaseBitrate}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox ItemsSource="{Binding ArbBaseBitrate_Values}" BorderThickness="2.0" BorderBrush="{Binding IsCanArbBaseBitrateDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}"
|
||||
IsEditable="True">
|
||||
<ComboBox.Text>
|
||||
<Binding Path="CanArbBaseBitrate" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" ValidatesOnNotifyDataErrors="True" ValidatesOnExceptions="True">
|
||||
<Binding.ValidationRules>
|
||||
<!--<validators:CANArbBaseBitrateValidator />-->
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</ComboBox.Text>
|
||||
</ComboBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CanArbBaseSJWColumn" x:Name="CanArbBaseSJWColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="CanArbBaseSJW" HeaderTitle="{strings:TranslateExtension CanParameters_ArbBaseSJW}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox ItemsSource="{Binding ArbBaseSJW_Values}" BorderThickness="2.0" BorderBrush="{Binding IsCanArbBaseSJWDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}"
|
||||
IsEditable="True">
|
||||
<ComboBox.Text>
|
||||
<Binding Path="CanArbBaseSJW" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" ValidatesOnNotifyDataErrors="True" ValidatesOnExceptions="True">
|
||||
<Binding.ValidationRules>
|
||||
<!--<validators:CANArbBaseBitrateValidator />-->
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</ComboBox.Text>
|
||||
</ComboBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CanDataBitrateColumn" x:Name="CanDataBitrateColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="CanDataBitrate" HeaderTitle="{strings:TranslateExtension CanParameters_DataBitrate}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox ItemsSource="{x:Static constants:EmbeddedSensors.DATABITRATE_VALUES}" BorderThickness="2.0" BorderBrush="{Binding IsCanArbBaseSJWDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}"
|
||||
IsEditable="True" Visibility="{Binding CanIsFD, Converter={StaticResource BoolToVisConverter}}">
|
||||
<ComboBox.Text>
|
||||
<Binding Path="CanDataBitrate" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" ValidatesOnNotifyDataErrors="True" ValidatesOnExceptions="True">
|
||||
<Binding.ValidationRules>
|
||||
<!--<validators:CANArbBaseBitrateValidator />-->
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</ComboBox.Text>
|
||||
</ComboBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CanDataSJWColumn" x:Name="CanDataSJWColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="CanDataSJW" HeaderTitle="{strings:TranslateExtension CanParameters_DataSJW}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox ItemsSource="{Binding DataSJW_Values}" BorderThickness="2.0" BorderBrush="{Binding IsCanArbBaseSJWDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}"
|
||||
IsEditable="True" Visibility="{Binding CanIsFD, Converter={StaticResource BoolToVisConverter}}">
|
||||
<ComboBox.Text>
|
||||
<Binding Path="CanDataSJW" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" ValidatesOnNotifyDataErrors="True" ValidatesOnExceptions="True">
|
||||
<Binding.ValidationRules>
|
||||
<!--<validators:CANArbBaseBitrateValidator />-->
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</ComboBox.Text>
|
||||
</ComboBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="CanFileTypeColumn" x:Name="CanFileTypeColumn">
|
||||
<controls:GridViewColumnHeaderSearchable Tag="CanFileType" HeaderTitle="{strings:TranslateExtension CanParameters_FileType}" Search="GridViewColumnHeaderSearchable_OnSearch" ListviewId="{Binding ListViewId}" ClickHandler="GridViewColumnHeader_Click"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<ComboBox ItemsSource="{x:Static constants:EmbeddedSensors.FILETYPE_VALUES}" BorderThickness="2.0" BorderBrush="{Binding IsCanArbBaseSJWDifferent, Converter={StaticResource BooleanToBorderBrushConverter}}"
|
||||
IsEnabled="{Binding DataContext.ReadOnlyParametersMode, Converter={StaticResource InverseBoolConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListView}}}"
|
||||
IsEditable="True">
|
||||
<ComboBox.Text>
|
||||
<Binding Path="CanFileType" UpdateSourceTrigger="PropertyChanged" ValidatesOnDataErrors="True" ValidatesOnNotifyDataErrors="True" ValidatesOnExceptions="True">
|
||||
<Binding.ValidationRules>
|
||||
<!--<validators:CANArbBaseBitrateValidator />-->
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</ComboBox.Text>
|
||||
</ComboBox>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
</controls:AutoSizedGridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
<!--</ScrollViewer>-->
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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/Groups/GroupImport/.svn/entries
Normal file
1
DataPRO/Modules/Groups/GroupImport/.svn/entries
Normal file
@@ -0,0 +1 @@
|
||||
12
|
||||
1
DataPRO/Modules/Groups/GroupImport/.svn/format
Normal file
1
DataPRO/Modules/Groups/GroupImport/.svn/format
Normal file
@@ -0,0 +1 @@
|
||||
12
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Interface.Groups;
|
||||
using GroupImport.Resources;
|
||||
|
||||
namespace GroupImport
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for GroupImportOptionsView.xaml
|
||||
/// </summary>
|
||||
public partial class GroupImportOptionsView : IGroupImportOptionsView
|
||||
{
|
||||
public GroupImportOptionsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// controls whether it is possible to continue to preview or not
|
||||
/// it is not possible to continue to preview if no files are selected
|
||||
/// and you automatically advance to preview if you select a file
|
||||
/// </summary>
|
||||
/// <param name="errors"></param>
|
||||
/// <param name="warnings"></param>
|
||||
/// <returns></returns>
|
||||
public bool Validate(out List<string> errors, out List<string> warnings)
|
||||
{
|
||||
errors = new List<string>();
|
||||
warnings = new List<string>();
|
||||
|
||||
var vm = (GroupImportViewModel)DataContext;
|
||||
if (null != vm.SourceFiles && vm.SourceFiles.Length >= 1) return true;
|
||||
errors.Add(StringResources.Preview_NoFilesSelected);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,16 @@
|
||||
using DTS.Common.Interface.Groups;
|
||||
|
||||
|
||||
namespace GroupImport
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for GroupImportImportView.xaml
|
||||
/// </summary>
|
||||
public partial class GroupImportImportView : IGroupImportImportView
|
||||
{
|
||||
public GroupImportImportView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<base:BaseView x:Class="GroupImport.GroupImportOptionsView"
|
||||
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:root="clr-namespace:DBImportExport.Resources"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<converters:FilePathsToShortStringConverter x:Key="filesToStringConverter" />
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource PageContentTextStyle}" >
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="Margin" Value="0,2,0,2" />
|
||||
</Style>
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" MinWidth="150" />
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- for now hide since there's only one import format currently...
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="{root:TranslateExtension Options_Format}" />
|
||||
<ComboBox Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
|
||||
-->
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="{root:TranslateExtension Options_Files}" />
|
||||
<TextBox IsEnabled="False" IsReadOnly="True" Grid.Row="1" Grid.Column="1" Text="{Binding SourceFiles, Converter={StaticResource ResourceKey=filesToStringConverter}}"/>
|
||||
<Button Grid.Row="1" Grid.Column="2" Content="{root:TranslateExtension Options_Browse}">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:InvokeCommandAction Command="{Binding ImportBrowseCommand}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,792 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Threading.Tasks;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Utils;
|
||||
using DTS.Common.Classes.Groups;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using DTS.Common.Enums.Groups;
|
||||
using DTS.Common.Interface.Groups;
|
||||
using GroupImport.Resources;
|
||||
using DTS.Common.Storage;
|
||||
using System.Windows.Media;
|
||||
using Prism.Regions;
|
||||
using DTS.Common.Interactivity;
|
||||
using Unity;
|
||||
using Prism.Events;
|
||||
using Prism.Commands;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace GroupImport
|
||||
{
|
||||
/// <summary>
|
||||
/// this class handles Group/TestObject import functionality
|
||||
/// </summary>
|
||||
[Export(typeof(IGroupImportOptionsView))]
|
||||
[Export(typeof(IGroupImportPreviewView))]
|
||||
[Export(typeof(IGroupImportImportView))]
|
||||
[PartCreationPolicy(CreationPolicy.Shared)]
|
||||
public class GroupImportViewModel : IGroupImportViewModel
|
||||
{
|
||||
#region views
|
||||
/// <summary>
|
||||
/// the import view
|
||||
/// </summary>
|
||||
public IGroupImportOptionsView ImportOptionsView { get; set; }
|
||||
/// <summary>
|
||||
/// the preview view
|
||||
/// </summary>
|
||||
public IGroupImportPreviewView ImportPreviewView { get; set; }
|
||||
/// <summary>
|
||||
/// the import view
|
||||
/// </summary>
|
||||
public IGroupImportImportView ImportView { get; set; }
|
||||
#endregion
|
||||
|
||||
private IEventAggregator _eventAggregator { get; set; }
|
||||
private IRegionManager _regionManager;
|
||||
private IUnityContainer UnityContainer { get; set; }
|
||||
|
||||
public InteractionRequest<Notification> NotificationRequest { get; private set; }
|
||||
public InteractionRequest<Confirmation> ConfirmationRequest { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the TechnologyDomainEditViewModel.
|
||||
/// </summary>
|
||||
/// <param name="previewView"></param>
|
||||
/// <param name="importView"></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>
|
||||
/// <param name="optionsView"></param>
|
||||
public GroupImportViewModel(IGroupImportOptionsView optionsView, IGroupImportPreviewView previewView,
|
||||
IGroupImportImportView importView, IRegionManager regionManager, IEventAggregator eventAggregator,
|
||||
IUnityContainer unityContainer)
|
||||
{
|
||||
ImportView = importView;
|
||||
ImportView.DataContext = this;
|
||||
|
||||
ImportOptionsView = optionsView;
|
||||
ImportOptionsView.DataContext = this;
|
||||
|
||||
ImportPreviewView = previewView;
|
||||
ImportPreviewView.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);
|
||||
}
|
||||
|
||||
#region Methods
|
||||
/// <summary>
|
||||
/// reads .grp files, parsing out groups and channels
|
||||
/// </summary>
|
||||
public void ParseSourceFiles(string userTags)
|
||||
{
|
||||
var groups = new List<GroupGRPImportGroup>();
|
||||
|
||||
foreach (var file in SourceFiles)
|
||||
{
|
||||
var group = new GroupGRPImportGroup { SourceFile = file };
|
||||
try
|
||||
{
|
||||
var lines = System.IO.File.ReadAllLines(file);
|
||||
var fi = new System.IO.FileInfo(file);
|
||||
var groupName = fi.Name.Replace(fi.Extension, "");
|
||||
if (groupName.EndsWith("."))
|
||||
{
|
||||
groupName = groupName.Substring(0, groupName.Length - 1);
|
||||
}
|
||||
group.GroupName = groupName;
|
||||
group.GroupTags = userTags;
|
||||
group.ImportingUserTags = userTags;
|
||||
if (lines.Any())
|
||||
{
|
||||
group.GroupErrors = new GroupGRPImportError[0];
|
||||
var channels = new List<GroupGRPImportChannel>();
|
||||
for (var i = 0; i < lines.Length; i++)
|
||||
{
|
||||
var line = lines[i];
|
||||
if (string.IsNullOrWhiteSpace(line)) { continue; }
|
||||
var fields = Parse(line);
|
||||
var sensorSerialNumber = fields[0];
|
||||
var channel = new GroupGRPImportChannel { SensorSerialNumber = sensorSerialNumber, ParentGroup = group };
|
||||
|
||||
if (null != CheckSensorExists && !CheckSensorExists.Invoke(sensorSerialNumber) &&
|
||||
//FB13753 .grp import should allow empty sensor
|
||||
!string.Empty.Equals(sensorSerialNumber))
|
||||
{
|
||||
channel.Error = new GroupGRPImportError
|
||||
{
|
||||
ErrorCode = GroupGRPImportError.Errors.SensorNotFound,
|
||||
ExtraInfo = StringResources.Preview_SensorNotFound,
|
||||
File = file,
|
||||
Line = i
|
||||
};
|
||||
}
|
||||
|
||||
if (5 == fields.Length)
|
||||
{
|
||||
channel.DisplayName = fields[1];
|
||||
channel.ISOCode = fields[2];
|
||||
switch (fields[3].ToLower())
|
||||
{
|
||||
case "no":
|
||||
channel.Invert = false;
|
||||
break;
|
||||
case "yes":
|
||||
channel.Invert = true;
|
||||
break;
|
||||
default:
|
||||
if (!bool.TryParse(fields[3], out var invert))
|
||||
{
|
||||
channel.Error = new GroupGRPImportError
|
||||
{
|
||||
ErrorCode = GroupGRPImportError.Errors.InvalidInvertInput,
|
||||
ExtraInfo = StringResources.Preview_InvalidInvert,
|
||||
File = file,
|
||||
Line = i
|
||||
};
|
||||
continue;
|
||||
}
|
||||
channel.Invert = invert;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
double capacity;
|
||||
if (!double.TryParse(fields[4], out capacity))
|
||||
{
|
||||
channel.Error = new GroupGRPImportError
|
||||
{
|
||||
ErrorCode = GroupGRPImportError.Errors.InvalidFullScaleInput,
|
||||
ExtraInfo = StringResources.Preview_InvalidFullScaleCapacity
|
||||
};
|
||||
continue;
|
||||
}
|
||||
channel.FullScale = capacity;
|
||||
}
|
||||
else
|
||||
{
|
||||
channel.Error = new GroupGRPImportError
|
||||
{
|
||||
ErrorCode = GroupGRPImportError.Errors.InvalidSensorInput,
|
||||
ExtraInfo = StringResources.Preview_InvalidNumberOfFields,
|
||||
File = file,
|
||||
Line = i
|
||||
};
|
||||
}
|
||||
channels.Add(channel);
|
||||
}
|
||||
group.Channels = channels.ToArray();
|
||||
if (!channels.Any())
|
||||
{
|
||||
group.GroupErrors = new[]
|
||||
{
|
||||
new GroupGRPImportError
|
||||
{
|
||||
ErrorCode = GroupGRPImportError.Errors.FileEmpty,
|
||||
ExtraInfo = StringResources.Preview_EmptyFile,
|
||||
File = file,
|
||||
Line = 0
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
group.GroupErrors = new[]
|
||||
{
|
||||
new GroupGRPImportError
|
||||
{
|
||||
File = file,
|
||||
ErrorCode = GroupGRPImportError.Errors.FileEmpty,
|
||||
Line = 0,
|
||||
ExtraInfo = StringResources.Preview_EmptyFile
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
group.GroupErrors = new[]
|
||||
{
|
||||
new GroupGRPImportError
|
||||
{
|
||||
File = file,
|
||||
Line = 0,
|
||||
ExtraInfo = ex.Message,
|
||||
ErrorCode = GroupGRPImportError.Errors.FileEmpty
|
||||
}
|
||||
};
|
||||
LogMessage(ex);
|
||||
}
|
||||
|
||||
groups.Add(group);
|
||||
}
|
||||
|
||||
Groups = groups.ToArray();
|
||||
ProcessChannels();
|
||||
}
|
||||
/// <summary>
|
||||
/// starts the process of creating and commiting groups and channels on a background thread
|
||||
/// </summary>
|
||||
public void Import()
|
||||
{
|
||||
System.Threading.ThreadPool.QueueUserWorkItem(ImportFunc);
|
||||
}
|
||||
/// <summary>
|
||||
/// the actual thread writing groups and channels
|
||||
/// </summary>
|
||||
/// <param name="o"></param>
|
||||
private void ImportFunc(object o)
|
||||
{
|
||||
var channelDefaults = DbOperations.GetChannelSettingDefaults();
|
||||
ImportProgressValue = 0;
|
||||
ImportProgressBarVisibility = Visibility.Visible;
|
||||
ImportProgressColor = DTS.Common.BrushesAndColors.Brush_ApplicationStatus_Busy.Color;
|
||||
DisableUI?.Invoke();
|
||||
var done = 0;
|
||||
var allChannels = Groups.Where(g => g.Included).SelectMany(g => g.Channels).Count();
|
||||
var groups = new List<string>();
|
||||
foreach (var g in Groups)
|
||||
{
|
||||
if (!g.Included) { continue; }
|
||||
CreateGroup(g.GroupName, g.GroupTags);
|
||||
|
||||
foreach (var ch in g.Channels)
|
||||
{
|
||||
done++;
|
||||
|
||||
//ImportProgressText = string.Format(StringResources.Import_Importing, g.GroupName, ch.DisplayName);
|
||||
//ImportProgressValue = Convert.ToInt32(100D * done / allChannels);
|
||||
|
||||
if (null != ch.Error)
|
||||
{
|
||||
switch (ch.Error.ErrorCode)
|
||||
{
|
||||
case GroupGRPImportError.Errors.FileEmpty:
|
||||
case GroupGRPImportError.Errors.InvalidSensorInput:
|
||||
case GroupGRPImportError.Errors.SensorNotFound:
|
||||
continue;//don't add
|
||||
}
|
||||
}
|
||||
double? capacity = null;
|
||||
if (null == ch.Error || ch.Error.ErrorCode != GroupGRPImportError.Errors.InvalidFullScaleInput)
|
||||
{
|
||||
capacity = ch.FullScale;
|
||||
}
|
||||
|
||||
bool? invert = null;
|
||||
if (null == ch.Error || ch.Error.ErrorCode != GroupGRPImportError.Errors.InvalidInvertInput)
|
||||
{
|
||||
invert = ch.Invert;
|
||||
}
|
||||
|
||||
AddChannel(g.GroupName, ch.DisplayName, ch.SensorSerialNumber, capacity, invert, ch.ISOCode, channelDefaults);
|
||||
}
|
||||
groups.Add(g.GroupName);
|
||||
//CommitGroup(g.GroupName);
|
||||
}
|
||||
CommitGroups(groups.ToArray());
|
||||
//ImportProgressColor = DTS.Common.BrushesAndColors.Brush_ApplicationStatus_Complete.Color;
|
||||
//ImportProgressBarVisibility = Visibility.Collapsed;
|
||||
//EnableUI?.Invoke();
|
||||
}
|
||||
public void SetStatus(string message, Color color)
|
||||
{
|
||||
ImportProgressColor = color;
|
||||
ImportProgressBarVisibility = Visibility.Collapsed;
|
||||
ImportProgressText = message;
|
||||
EnableUI?.Invoke();
|
||||
}
|
||||
/// <summary>
|
||||
/// re-initializes the group view model
|
||||
/// right now we don't create a new group view model, we appear to reuse the existing one, so it has to be reset
|
||||
/// </summary>
|
||||
public void Reset()
|
||||
{
|
||||
SourceFiles = new string[0];
|
||||
Channels = new GroupGRPImportChannel[0];
|
||||
Groups = new GroupGRPImportGroup[0];
|
||||
ImportProgressBarVisibility = Visibility.Collapsed;
|
||||
ImportProgressColor = DTS.Common.BrushesAndColors.Brush_ApplicationStatus_Idle.Color;
|
||||
ImportProgressText = string.Empty;
|
||||
ImportProgressValue = 0;
|
||||
}
|
||||
/// <summary>
|
||||
/// parses a single line in a GRP file
|
||||
/// this line may use () to escape values, like "this(,)is all one field" will only return one string
|
||||
/// </summary>
|
||||
/// <param name="line"></param>
|
||||
/// <returns></returns>
|
||||
private static string[] Parse(string line)
|
||||
{
|
||||
var strings = new List<string>();
|
||||
var currentString = new StringBuilder();
|
||||
|
||||
var currentCharacter = 0;
|
||||
var leftParenCount = 0;
|
||||
while (currentCharacter < line.Length)
|
||||
{
|
||||
var ch = line[currentCharacter];
|
||||
switch (ch)
|
||||
{
|
||||
case '(':
|
||||
currentString.Append("(");
|
||||
leftParenCount++;
|
||||
break;
|
||||
case ')':
|
||||
currentString.Append(")");
|
||||
leftParenCount--;
|
||||
break;
|
||||
case ',':
|
||||
if (leftParenCount > 0)
|
||||
{
|
||||
currentString.Append(",");
|
||||
}
|
||||
else
|
||||
{
|
||||
strings.Add(currentString.ToString());
|
||||
currentString.Clear();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
currentString.Append(ch);
|
||||
break;
|
||||
}
|
||||
currentCharacter++;
|
||||
}
|
||||
if (currentString.Length > 0)
|
||||
{
|
||||
strings.Add(currentString.ToString());
|
||||
}
|
||||
return strings.ToArray();
|
||||
}
|
||||
/// <summary>
|
||||
/// checks whether a group name is valid
|
||||
/// a group name is invalid if it exists more than once in the import or if it already exists in the
|
||||
/// application and overwrite is false
|
||||
/// </summary>
|
||||
public void CheckGroupName()
|
||||
{
|
||||
var groupNameLookup = new Dictionary<string, List<GroupGRPImportGroup>>();
|
||||
foreach (var g in Groups)
|
||||
{
|
||||
if (!groupNameLookup.ContainsKey(g.GroupName))
|
||||
{
|
||||
groupNameLookup.Add(g.GroupName, new List<GroupGRPImportGroup>());
|
||||
}
|
||||
groupNameLookup[g.GroupName].Add(g);
|
||||
}
|
||||
foreach (var g in Groups)
|
||||
{
|
||||
if (groupNameLookup[g.GroupName].Count > 1)
|
||||
{
|
||||
g.GroupNameHasError = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CheckGroupExists(g.GroupName) && !g.Overwrite)
|
||||
{
|
||||
g.GroupNameHasError = true;
|
||||
}
|
||||
else { g.GroupNameHasError = false; }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// log a message
|
||||
/// </summary>
|
||||
/// <param name="parms"></param>
|
||||
private void LogMessage(params object[] parms)
|
||||
{
|
||||
Logger?.Invoke(parms);
|
||||
}
|
||||
/// <summary>
|
||||
/// separates channels out of groups into valid and invalid channels
|
||||
/// popuplates IncompleteChannels and CompleteChannels
|
||||
/// </summary>
|
||||
private void ProcessChannels()
|
||||
{
|
||||
var channels = new List<GroupGRPImportChannel>();
|
||||
|
||||
foreach (var g in Groups)
|
||||
{
|
||||
channels.AddRange(g.Channels);
|
||||
}
|
||||
Channels = channels.ToArray();
|
||||
}
|
||||
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 { get; private set; }
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the HeaderInfo.
|
||||
/// </summary>
|
||||
public string HeaderInfo => "MainRegion";
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Commands
|
||||
|
||||
/// <summary>
|
||||
/// browse to a file to import, should be xml, maybe needs a few other criteria
|
||||
/// </summary>
|
||||
private DelegateCommand _importBrowseCommand;
|
||||
|
||||
public DelegateCommand ImportBrowseCommand => _importBrowseCommand ?? (_importBrowseCommand = new DelegateCommand(ImportBrowseMethod));
|
||||
|
||||
private void ImportBrowseMethod()
|
||||
{
|
||||
using (var dlg = new System.Windows.Forms.OpenFileDialog())
|
||||
{
|
||||
dlg.CheckFileExists = true;
|
||||
dlg.CheckPathExists = true;
|
||||
dlg.Multiselect = true;
|
||||
dlg.Filter = StringResources.ImportFileFilter;
|
||||
dlg.FilterIndex = 0;
|
||||
|
||||
if (dlg.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
|
||||
SourceFiles = dlg.FileNames;
|
||||
BrowseOk = true;
|
||||
SwitchNavSteps?.Invoke(GroupImportEnums.Steps.Preview);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region properties
|
||||
|
||||
private string _importProgressText;
|
||||
/// <summary>
|
||||
/// current status text for import progress bar
|
||||
/// </summary>
|
||||
public string ImportProgressText
|
||||
{
|
||||
get => _importProgressText;
|
||||
set
|
||||
{
|
||||
_importProgressText = value;
|
||||
OnPropertyChanged("ImportProgressText");
|
||||
}
|
||||
}
|
||||
|
||||
private System.Windows.Media.Color _importProgressColor;
|
||||
/// <summary>
|
||||
/// The current color of the import progress bar
|
||||
/// </summary>
|
||||
public System.Windows.Media.Color ImportProgressColor
|
||||
{
|
||||
get => _importProgressColor;
|
||||
set
|
||||
{
|
||||
_importProgressColor = value;
|
||||
OnPropertyChanged("ImportProgressColor");
|
||||
}
|
||||
}
|
||||
|
||||
public Visibility _importProgressBarVisibility;
|
||||
/// <summary>
|
||||
/// whether the progress bar is visible or not
|
||||
/// </summary>
|
||||
public Visibility ImportProgressBarVisibility
|
||||
{
|
||||
get => _importProgressBarVisibility;
|
||||
set
|
||||
{
|
||||
_importProgressBarVisibility = value;
|
||||
OnPropertyChanged("ImportProgressBarVisibility");
|
||||
}
|
||||
}
|
||||
|
||||
private double _importProgressValue;
|
||||
/// <summary>
|
||||
/// percentage complete of import process
|
||||
/// </summary>
|
||||
public double ImportProgressValue
|
||||
{
|
||||
get => _importProgressValue;
|
||||
set
|
||||
{
|
||||
_importProgressValue = value;
|
||||
OnPropertyChanged("ImportProgressValue");
|
||||
}
|
||||
}
|
||||
|
||||
private string[] _sourceFiles = new string[0];
|
||||
|
||||
/// <summary>
|
||||
/// .GRP files to parse
|
||||
/// </summary>
|
||||
public string[] SourceFiles
|
||||
{
|
||||
get => _sourceFiles;
|
||||
set
|
||||
{
|
||||
_sourceFiles = value;
|
||||
OnPropertyChanged("SourceFiles");
|
||||
}
|
||||
}
|
||||
|
||||
public bool BrowseOk { get; set; } = false;
|
||||
|
||||
private GroupGRPImportGroup[] _groups = new GroupGRPImportGroup[0];
|
||||
/// <summary>
|
||||
/// All groups that have been read in and parsed
|
||||
/// </summary>
|
||||
public GroupGRPImportGroup[] Groups
|
||||
{
|
||||
get => _groups;
|
||||
set
|
||||
{
|
||||
_groups = value;
|
||||
OnPropertyChanged("Groups");
|
||||
}
|
||||
}
|
||||
|
||||
private GroupGRPImportChannel[] _channels = new GroupGRPImportChannel[0];
|
||||
/// <summary>
|
||||
/// Channels which are invalid but are in groups included in import
|
||||
/// </summary>
|
||||
public GroupGRPImportChannel[] Channels
|
||||
{
|
||||
get => _channels;
|
||||
set
|
||||
{
|
||||
_channels = value;
|
||||
InvalidateChannels();
|
||||
}
|
||||
}
|
||||
|
||||
public void InvalidateChannels()
|
||||
{
|
||||
OnPropertyChanged("IncompleteChannels");
|
||||
OnPropertyChanged("CompleteChannels");
|
||||
}
|
||||
/// <summary>
|
||||
/// these are channels which will not be imported
|
||||
/// </summary>
|
||||
public GroupGRPImportChannel[] IncompleteChannels
|
||||
{
|
||||
get
|
||||
{
|
||||
var channels = new List<GroupGRPImportChannel>();
|
||||
foreach (var g in Groups)
|
||||
{
|
||||
if (!g.Included) { continue; }
|
||||
foreach (var ch in g.Channels)
|
||||
{
|
||||
if (null == ch.Error) { continue; }
|
||||
else
|
||||
{
|
||||
switch (ch.Error.ErrorCode)
|
||||
{
|
||||
case GroupGRPImportError.Errors.InvalidFullScaleInput:
|
||||
case GroupGRPImportError.Errors.InvalidInvertInput:
|
||||
continue;
|
||||
default:
|
||||
channels.Add(ch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return channels.ToArray();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// these are channels which will be imported
|
||||
/// </summary>
|
||||
public GroupGRPImportChannel[] CompleteChannels
|
||||
{
|
||||
get
|
||||
{
|
||||
var channels = new List<GroupGRPImportChannel>();
|
||||
foreach (var g in Groups)
|
||||
{
|
||||
if (!g.Included) { continue; }
|
||||
foreach (var ch in g.Channels)
|
||||
{
|
||||
if (null == ch.Error)
|
||||
{
|
||||
channels.Add(ch);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (ch.Error.ErrorCode)
|
||||
{
|
||||
case GroupGRPImportError.Errors.InvalidFullScaleInput:
|
||||
case GroupGRPImportError.Errors.InvalidInvertInput:
|
||||
channels.Add(ch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return channels.ToArray();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// the logging facility to use
|
||||
/// if null no logging is performed
|
||||
/// </summary>
|
||||
public FileUtils.LogDelegate Logger { get; set; } = null;
|
||||
/// <summary>
|
||||
/// the command for switching current nav step
|
||||
/// </summary>
|
||||
public SwitchNavStepsDelegate SwitchNavSteps { get; set; } = null;
|
||||
/// <summary>
|
||||
/// the command for checking if a group already exists in the application
|
||||
/// </summary>
|
||||
public CheckGroupExistsDelegate CheckGroupExists { get; set; } = null;
|
||||
/// <summary>
|
||||
/// the command for checking if a sensor exists in the application
|
||||
/// </summary>
|
||||
public CheckSensorExistsDelegate CheckSensorExists { get; set; } = null;
|
||||
/// <summary>
|
||||
/// the command for creating a group
|
||||
/// </summary>
|
||||
public CreateGroupDelegate CreateGroup { get; set; } = null;
|
||||
/// <summary>
|
||||
/// the command for adding a channel to a group
|
||||
/// </summary>
|
||||
public AddChannelToGroupDelegate AddChannel { get; set; } = null;
|
||||
/// <summary>
|
||||
/// the command for commiting a group to the db
|
||||
/// </summary>
|
||||
public CommitGroupsDelegate CommitGroups { get; set; } = null;
|
||||
/// <summary>
|
||||
/// the command for disabling the UI
|
||||
/// </summary>
|
||||
public Disable_UIDelegate DisableUI { get; set; }
|
||||
/// <summary>
|
||||
/// the command for enabling the UI
|
||||
/// </summary>
|
||||
public Enable_UIDelegate EnableUI { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
///<summary>
|
||||
///Occurs when a property value changes.
|
||||
///</summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
public void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<base:BaseView x:Class="GroupImport.GroupImportImportView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:CommonCtrl="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource PageContentTextStyle}" >
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<CommonCtrl:CommonStatusRibbon x:Name="CtrlStatusRibbon" Grid.Row="0" AggregateStatusText="{Binding ImportProgressText}" AggregateStatusColor="{Binding ImportProgressColor}" ProgressBarVisibility="{Binding ImportProgressBarVisibility}" ProgressBarValue="{Binding ImportProgressValue}"/>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Windows.Markup;
|
||||
using GroupImport.Resources;
|
||||
|
||||
namespace DBImportExport.Resources
|
||||
{
|
||||
[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,231 @@
|
||||
<?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="ImportFileFilter" xml:space="preserve">
|
||||
<value>TDAS group file (*.grp)|*.grp|All Files (*.*)|*.*</value>
|
||||
</data>
|
||||
<data name="Options_Browse" xml:space="preserve">
|
||||
<value>Browse</value>
|
||||
</data>
|
||||
<data name="Options_Files" xml:space="preserve">
|
||||
<value>File(s)</value>
|
||||
</data>
|
||||
<data name="Options_Format" xml:space="preserve">
|
||||
<value>Format</value>
|
||||
</data>
|
||||
<data name="PreviewGroupsTable_File" xml:space="preserve">
|
||||
<value>File</value>
|
||||
</data>
|
||||
<data name="PreviewGroupsTable_GroupName" xml:space="preserve">
|
||||
<value>Group name</value>
|
||||
</data>
|
||||
<data name="PreviewGroupsTable_Included" xml:space="preserve">
|
||||
<value>Included</value>
|
||||
</data>
|
||||
<data name="PreviewGroupsTable_Overwrite" xml:space="preserve">
|
||||
<value>Overwrite</value>
|
||||
</data>
|
||||
<data name="PreviewGroups_DisplayName" xml:space="preserve">
|
||||
<value>Display name</value>
|
||||
</data>
|
||||
<data name="PreviewGroups_FullScale" xml:space="preserve">
|
||||
<value>Full scale</value>
|
||||
</data>
|
||||
<data name="PreviewGroups_Invert" xml:space="preserve">
|
||||
<value>Invert</value>
|
||||
</data>
|
||||
<data name="PreviewGroups_ISOCode" xml:space="preserve">
|
||||
<value>ISOCode</value>
|
||||
</data>
|
||||
<data name="PreviewGroups_Issue" xml:space="preserve">
|
||||
<value>Issue</value>
|
||||
</data>
|
||||
<data name="PreviewGroups_SensorSerialNumber" xml:space="preserve">
|
||||
<value>Sensor serial number</value>
|
||||
</data>
|
||||
<data name="Preview_CompleteGroupChannels" xml:space="preserve">
|
||||
<value>Channels that will be imported</value>
|
||||
</data>
|
||||
<data name="Preview_Groups" xml:space="preserve">
|
||||
<value>Groups</value>
|
||||
</data>
|
||||
<data name="Preview_IncompleteGroupChannels" xml:space="preserve">
|
||||
<value>Channels that will not be imported</value>
|
||||
</data>
|
||||
<data name="Importing_Done" xml:space="preserve">
|
||||
<value>Done</value>
|
||||
</data>
|
||||
<data name="Import_Importing" xml:space="preserve">
|
||||
<value>Importing {0}:{1}</value>
|
||||
</data>
|
||||
<data name="Preview_EmptyFile" xml:space="preserve">
|
||||
<value>Empty file</value>
|
||||
</data>
|
||||
<data name="Preview_InvalidFullScaleCapacity" xml:space="preserve">
|
||||
<value>Invalid full scale capacity</value>
|
||||
</data>
|
||||
<data name="Preview_InvalidFullScaleInput" xml:space="preserve">
|
||||
<value>Invalid desired range for {0}::{1}, the sensor capacity will be used instead</value>
|
||||
</data>
|
||||
<data name="Preview_InvalidInvert" xml:space="preserve">
|
||||
<value>Invalid Invert</value>
|
||||
</data>
|
||||
<data name="Preview_InvalidName" xml:space="preserve">
|
||||
<value>Group name '{0}' is duplicate or invalid</value>
|
||||
</data>
|
||||
<data name="Preview_InvalidNumberOfFields" xml:space="preserve">
|
||||
<value>Invalid number of fields</value>
|
||||
</data>
|
||||
<data name="Preview_InvalidRow" xml:space="preserve">
|
||||
<value>Group {0} contains some lines which are invalid. The invalid lines won't be imported.</value>
|
||||
</data>
|
||||
<data name="Preview_InvalidSensor" xml:space="preserve">
|
||||
<value>Sensor not found for {0}::{1}, this channel will not be imported.</value>
|
||||
</data>
|
||||
<data name="Preview_InvalidSensorInput" xml:space="preserve">
|
||||
<value>Invalid sensor invert for {0}::{1}, the sensor invert setting will be used instead</value>
|
||||
</data>
|
||||
<data name="Preview_NoFilesSelected" xml:space="preserve">
|
||||
<value>No files selected for import</value>
|
||||
</data>
|
||||
<data name="Preview_NoGroupsToImport" xml:space="preserve">
|
||||
<value>Nothing to import</value>
|
||||
</data>
|
||||
<data name="Preview_SensorNotFound" xml:space="preserve">
|
||||
<value>Sensor not found</value>
|
||||
</data>
|
||||
<data name="PreviewGroups_Warnings" xml:space="preserve">
|
||||
<value>Warnings</value>
|
||||
</data>
|
||||
<data name="PreviewGroupsTable_GroupTags" xml:space="preserve">
|
||||
<value>Tags</value>
|
||||
</data>
|
||||
<data name="GroupTags" xml:space="preserve">
|
||||
<value>Group Tag(s): </value>
|
||||
</data>
|
||||
<data name="None" xml:space="preserve">
|
||||
<value>(None)</value>
|
||||
</data>
|
||||
<data name="PreviewGroups_WontSaveWithIncompatibleTags" xml:space="preserve">
|
||||
<value>This Group is not compatible with your Tags (see below) and will not be saved.</value>
|
||||
</data>
|
||||
<data name="UserTags" xml:space="preserve">
|
||||
<value>User Tag(s): </value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,200 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Controls;
|
||||
using DTS.Common.Classes.Groups;
|
||||
using DTS.Common.Interface.Groups;
|
||||
using DTS.Common.Strings;
|
||||
using GroupImport.Resources;
|
||||
|
||||
namespace GroupImport
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for GroupImportOptionsView.xaml
|
||||
/// </summary>
|
||||
public partial class GroupImportPreviewView : IGroupImportPreviewView
|
||||
{
|
||||
public GroupImportPreviewView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// handles when tb group name changes
|
||||
/// in this case the UI needs to be notified and the validity of the group name may change
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void GroupName_Changed(object sender, System.Windows.Controls.TextChangedEventArgs e)
|
||||
{
|
||||
var tb = (TextBox)sender;
|
||||
|
||||
var group = (GroupGRPImportGroup)tb.DataContext;
|
||||
|
||||
group.GroupName = tb.Text;
|
||||
|
||||
foreach (var ch in group.Channels)
|
||||
{
|
||||
ch.GroupNameInvalidate();
|
||||
}
|
||||
|
||||
var vm = (GroupImportViewModel)DataContext;
|
||||
vm.CheckGroupName();
|
||||
}
|
||||
/// <summary>
|
||||
/// handles when tb group tag changes
|
||||
/// in this case the UI needs to be notified and the validity of the group tag may change
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void GroupTags_Changed(object sender, System.Windows.Controls.TextChangedEventArgs e)
|
||||
{
|
||||
var tb = (TextBox)sender;
|
||||
|
||||
var group = (GroupGRPImportGroup)tb.DataContext;
|
||||
|
||||
group.GroupTags = tb.Text;
|
||||
}
|
||||
/// <summary>
|
||||
/// handles included checkbox being checked for a group
|
||||
/// in this case the channels for the group should be added to the UI
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void IncludedChecked(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
var vm = (GroupImportViewModel)DataContext;
|
||||
vm.InvalidateChannels();
|
||||
}
|
||||
/// <summary>
|
||||
/// handles the included checkbox being unchecked for a group
|
||||
/// in this case the channels for the group should be removed from the UI
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void IncludedUnchecked(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
var vm = (GroupImportViewModel)DataContext;
|
||||
vm.InvalidateChannels();
|
||||
}
|
||||
/// <summary>
|
||||
/// checks whether it is okay to proceed to import,
|
||||
/// checks the validity of the selected channels and groups
|
||||
/// </summary>
|
||||
/// <param name="userIsAdmin">whether or not the user has Administrator privileges</param>
|
||||
/// <param name="errors">any fatal errors that would prevent importing</param>
|
||||
/// <param name="warnings">any non fatal errors that the user needs to be warned about (but that don't prevent importing)</param>
|
||||
/// <returns>true if it is okay to proceed to import</returns>
|
||||
public bool Validate(bool userIsAdmin, out List<string> errors, out List<string> warnings)
|
||||
{
|
||||
errors = new List<string>();
|
||||
warnings = new List<string>();
|
||||
var bValid = true;
|
||||
|
||||
var vm = (GroupImportViewModel)DataContext;
|
||||
var bAnyValidChannels = false;
|
||||
if (vm.Groups.Any())
|
||||
{
|
||||
foreach (var g in vm.Groups)
|
||||
{
|
||||
if (!g.Included) { continue; }
|
||||
if (!string.IsNullOrWhiteSpace(g.GroupTags) && !userIsAdmin)
|
||||
{
|
||||
foreach (var userTag in g.ImportingUserTags.Split())
|
||||
{
|
||||
if (g.GroupTags.Split().Contains(userTag)) continue;
|
||||
|
||||
var sb = new StringBuilder();
|
||||
sb.Append(string.Format(StringResources.PreviewGroups_WontSaveWithIncompatibleTags, userTag, g.GroupTags));
|
||||
sb.Append($"\r\n{StringResources.UserTags}");
|
||||
sb.Append(g.ImportingUserTags.Length == 0 ? StringResources.None : g.ImportingUserTags);
|
||||
//The static group in question will always have at least 1 Tag, otherwise there would be no problem
|
||||
sb.Append($"\r\n{StringResources.GroupTags}");
|
||||
sb.Append(g.GroupTags);
|
||||
|
||||
errors.Add(sb.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (g.GroupNameHasError)
|
||||
{
|
||||
var msg = string.Format(StringResources.Preview_InvalidName, g.GroupName);
|
||||
if (!errors.Contains(msg))
|
||||
{
|
||||
errors.Add(msg);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (null != g.GroupErrors && g.GroupErrors.Any())
|
||||
{
|
||||
foreach (var error in g.GroupErrors)
|
||||
{
|
||||
if (!errors.Contains(error.ExtraInfo))
|
||||
{
|
||||
errors.Add(error.ExtraInfo);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (vm.CheckGroupExists(g.GroupName) && !g.Overwrite)
|
||||
{
|
||||
var msg = string.Format(StringResources.Preview_InvalidName, g.GroupName);
|
||||
if (!errors.Contains(msg)) { errors.Add(msg); }
|
||||
return false;
|
||||
}
|
||||
bValid = false;
|
||||
foreach (var ch in g.Channels)
|
||||
{
|
||||
if (null != ch.Error)
|
||||
{
|
||||
switch (ch.Error.ErrorCode)
|
||||
{
|
||||
case GroupGRPImportError.Errors.FileEmpty:
|
||||
case GroupGRPImportError.Errors.InvalidISOCodeInput:
|
||||
bAnyValidChannels = true;
|
||||
break;
|
||||
case GroupGRPImportError.Errors.InvalidFullScaleInput:
|
||||
warnings.Add(string.Format(StringResources.Preview_InvalidFullScaleInput,
|
||||
g.GroupName, ch.DisplayName));
|
||||
bAnyValidChannels = true;
|
||||
break;
|
||||
case GroupGRPImportError.Errors.InvalidInvertInput:
|
||||
warnings.Add(string.Format(StringResources.Preview_InvalidSensorInput,
|
||||
g.GroupName,
|
||||
ch.DisplayName));
|
||||
bAnyValidChannels = true;
|
||||
break;
|
||||
case GroupGRPImportError.Errors.InvalidSensorInput:
|
||||
var msg = string.Format(StringResources.Preview_InvalidRow, g.GroupName);
|
||||
if (!warnings.Contains(msg))
|
||||
{
|
||||
warnings.Add(msg);
|
||||
}
|
||||
break;
|
||||
case GroupGRPImportError.Errors.SensorNotFound:
|
||||
warnings.Add(string.Format(StringResources.Preview_InvalidSensor, g.GroupName,
|
||||
ch.DisplayName));
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = true;
|
||||
bAnyValidChannels = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!bAnyValidChannels)
|
||||
{
|
||||
errors.Add(StringResources.Preview_NoGroupsToImport);
|
||||
}
|
||||
return bValid;
|
||||
}
|
||||
errors.Add(StringResources.Preview_NoGroupsToImport);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
<base:BaseView x:Class="GroupImport.GroupImportPreviewView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:root="clr-namespace:DBImportExport.Resources"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common" >
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource PageContentTextStyle}" >
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Vertical" Grid.Row="0">
|
||||
<TextBlock Text="{root:TranslateExtension Preview_Groups}" />
|
||||
<ListView HorizontalAlignment="Left" ItemsSource="{Binding Groups}"
|
||||
AlternationCount="2" Margin="3,0,3,0">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroupsTable_Included}">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox Style="{x:Null}" IsChecked="{Binding Included}" Checked="IncludedChecked" Unchecked="IncludedUnchecked" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroupsTable_Overwrite}">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox Style="{x:Null}" IsChecked="{Binding Overwrite}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroupsTable_GroupName}" Width="220">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBox Style="{x:Null}" Text="{Binding GroupName}" MinWidth="200" TextChanged="GroupName_Changed">
|
||||
<TextBox.Resources>
|
||||
<Style TargetType="TextBox">
|
||||
<Style.Triggers>
|
||||
<MultiDataTrigger></MultiDataTrigger>
|
||||
<DataTrigger Binding="{Binding GroupNameHasError}" Value="True">
|
||||
<Setter Property="BorderBrush" Value="Red" />
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding GroupNameHasError}" Value="false">
|
||||
<Setter Property="BorderBrush" Value="Purple" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBox.Resources>
|
||||
</TextBox>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroupsTable_GroupTags}" Width="220">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBox Style="{x:Null}" Text="{Binding GroupTags}" MinWidth="200" TextChanged="GroupTags_Changed">
|
||||
<TextBox.Resources>
|
||||
<Style TargetType="TextBox">
|
||||
<Style.Triggers>
|
||||
<MultiDataTrigger></MultiDataTrigger>
|
||||
<DataTrigger Binding="{Binding GroupTagsHasError}" Value="True">
|
||||
<Setter Property="BorderBrush" Value="Red" />
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding GroupTagsHasError}" Value="false">
|
||||
<Setter Property="BorderBrush" Value="Purple" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBox.Resources>
|
||||
</TextBox>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroupsTable_File}" Width="625">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Style="{x:Null}" Text="{Binding SourceFile}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Vertical" Grid.Row="1">
|
||||
<TextBlock Text="{root:TranslateExtension Preview_CompleteGroupChannels}" />
|
||||
<ListView HorizontalAlignment="Left" ItemsSource="{Binding CompleteChannels}"
|
||||
AlternationCount="2" Margin="3,0,3,0">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroupsTable_GroupName}" Width="250">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding GroupName}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_DisplayName}" Width="250">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DisplayName}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_SensorSerialNumber}" Width="150">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding SensorSerialNumber}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<!--<GridViewColumn Header="{root:TranslateExtension PreviewGroups_ISOCode}" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding ISOCode}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>-->
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_FullScale}" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding FullScale}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_Invert}" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsEnabled="False" IsChecked="{Binding Invert}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_Warnings}" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Error}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Vertical" Grid.Row="2">
|
||||
<TextBlock Text="{root:TranslateExtension Preview_IncompleteGroupChannels}" />
|
||||
<ListView HorizontalAlignment="Left" ItemsSource="{Binding IncompleteChannels}"
|
||||
AlternationCount="2" Margin="3,0,3,0">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroupsTable_GroupName}" Width="200">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding GroupName}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_DisplayName}" Width="200">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DisplayName}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_SensorSerialNumber}" Width="150">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding SensorSerialNumber}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<!--<GridViewColumn Header="{root:TranslateExtension PreviewGroups_ISOCode}" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding ISOCode}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>-->
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_FullScale}" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding FullScale}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_Invert}" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsEnabled="False" IsChecked="{Binding Invert}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_Issue}" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Error}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DTS.Common;
|
||||
using DTS.Common.Interface;
|
||||
using DTS.Common.Interface.Groups;
|
||||
using Prism.Ioc;
|
||||
using Prism.Modularity;
|
||||
using Unity;
|
||||
|
||||
namespace GroupImport
|
||||
{
|
||||
[Export(typeof(IModule))]
|
||||
[Module(ModuleName = "GroupImportModule")]
|
||||
public class GroupImportModule : IModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Injected unity container
|
||||
/// </summary>
|
||||
private readonly IUnityContainer _unityContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GroupImportModule"/> class.
|
||||
/// </summary>
|
||||
/// <param name="unityContainer">Obtained reference of the unity container by using dependency injection.</param>
|
||||
public GroupImportModule(IUnityContainer unityContainer)
|
||||
{
|
||||
_unityContainer = unityContainer;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// Register View & View-Model with Unity dependency injection container as a singleton.
|
||||
_unityContainer.RegisterType<IGroupImportImportView, GroupImportImportView>();
|
||||
_unityContainer.RegisterType<IGroupImportOptionsView, GroupImportOptionsView>();
|
||||
_unityContainer.RegisterType<IGroupImportPreviewView, GroupImportPreviewView>();
|
||||
_unityContainer.RegisterType<IGroupImportViewModel, GroupImportViewModel>();
|
||||
}
|
||||
|
||||
public void OnInitialized(IContainerProvider containerProvider)
|
||||
{
|
||||
}
|
||||
|
||||
public void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Attribute class contains assembly image and name - used on the Main screen to display available components
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
|
||||
public class GroupImageAttribute : ImageAttribute
|
||||
{
|
||||
private BitmapImage _img;
|
||||
|
||||
public GroupImageAttribute() : this(null) { }
|
||||
public override eAssemblyRegion AssemblyRegion => throw new NotImplementedException();
|
||||
|
||||
public override BitmapImage AssemblyImage
|
||||
{
|
||||
get { _img = AssemblyInfo.GetImage(AssemblyNames.GroupImport.ToString()); return _img; }
|
||||
}
|
||||
public GroupImageAttribute(string s)
|
||||
{
|
||||
_img = AssemblyInfo.GetImage(AssemblyNames.GroupImport.ToString());
|
||||
}
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(ImageAttribute);
|
||||
}
|
||||
public override BitmapImage GetAssemblyImage()
|
||||
{
|
||||
return AssemblyImage;
|
||||
}
|
||||
private string _name;
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { _name = AssemblyNames.GroupImport.ToString(); return _name; }
|
||||
}
|
||||
|
||||
public override string GetAssemblyName()
|
||||
{
|
||||
return AssemblyName;
|
||||
}
|
||||
public override eAssemblyRegion GetAssemblyRegion()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
private string _group;
|
||||
public override string AssemblyGroup
|
||||
{
|
||||
get { _group = eAssemblyGroups.Prepare.ToString(); return _group; }
|
||||
}
|
||||
|
||||
public override string GetAssemblyGroup()
|
||||
{
|
||||
return AssemblyGroup;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,396 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GroupImport.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("GroupImport.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 Group Tag(s): .
|
||||
/// </summary>
|
||||
internal static string GroupTags {
|
||||
get {
|
||||
return ResourceManager.GetString("GroupTags", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Importing {0}:{1}.
|
||||
/// </summary>
|
||||
internal static string Import_Importing {
|
||||
get {
|
||||
return ResourceManager.GetString("Import_Importing", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to TDAS group file (*.grp)|*.grp|All Files (*.*)|*.*.
|
||||
/// </summary>
|
||||
internal static string ImportFileFilter {
|
||||
get {
|
||||
return ResourceManager.GetString("ImportFileFilter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Done.
|
||||
/// </summary>
|
||||
internal static string Importing_Done {
|
||||
get {
|
||||
return ResourceManager.GetString("Importing_Done", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to (None).
|
||||
/// </summary>
|
||||
internal static string None {
|
||||
get {
|
||||
return ResourceManager.GetString("None", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Browse.
|
||||
/// </summary>
|
||||
internal static string Options_Browse {
|
||||
get {
|
||||
return ResourceManager.GetString("Options_Browse", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to File(s).
|
||||
/// </summary>
|
||||
internal static string Options_Files {
|
||||
get {
|
||||
return ResourceManager.GetString("Options_Files", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Format.
|
||||
/// </summary>
|
||||
internal static string Options_Format {
|
||||
get {
|
||||
return ResourceManager.GetString("Options_Format", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Channels that will be imported.
|
||||
/// </summary>
|
||||
internal static string Preview_CompleteGroupChannels {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_CompleteGroupChannels", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Empty file.
|
||||
/// </summary>
|
||||
internal static string Preview_EmptyFile {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_EmptyFile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Groups.
|
||||
/// </summary>
|
||||
internal static string Preview_Groups {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_Groups", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Channels that will not be imported.
|
||||
/// </summary>
|
||||
internal static string Preview_IncompleteGroupChannels {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_IncompleteGroupChannels", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid full scale capacity.
|
||||
/// </summary>
|
||||
internal static string Preview_InvalidFullScaleCapacity {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_InvalidFullScaleCapacity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid desired range for {0}::{1}, the sensor capacity will be used instead.
|
||||
/// </summary>
|
||||
internal static string Preview_InvalidFullScaleInput {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_InvalidFullScaleInput", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid Invert.
|
||||
/// </summary>
|
||||
internal static string Preview_InvalidInvert {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_InvalidInvert", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Group name '{0}' is duplicate or invalid.
|
||||
/// </summary>
|
||||
internal static string Preview_InvalidName {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_InvalidName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid number of fields.
|
||||
/// </summary>
|
||||
internal static string Preview_InvalidNumberOfFields {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_InvalidNumberOfFields", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Group {0} contains some lines which are invalid. The invalid lines won't be imported..
|
||||
/// </summary>
|
||||
internal static string Preview_InvalidRow {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_InvalidRow", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor not found for {0}::{1}, this channel will not be imported..
|
||||
/// </summary>
|
||||
internal static string Preview_InvalidSensor {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_InvalidSensor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid sensor invert for {0}::{1}, the sensor invert setting will be used instead.
|
||||
/// </summary>
|
||||
internal static string Preview_InvalidSensorInput {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_InvalidSensorInput", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No files selected for import.
|
||||
/// </summary>
|
||||
internal static string Preview_NoFilesSelected {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_NoFilesSelected", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Nothing to import.
|
||||
/// </summary>
|
||||
internal static string Preview_NoGroupsToImport {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_NoGroupsToImport", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor not found.
|
||||
/// </summary>
|
||||
internal static string Preview_SensorNotFound {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_SensorNotFound", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Display name.
|
||||
/// </summary>
|
||||
internal static string PreviewGroups_DisplayName {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroups_DisplayName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Full scale.
|
||||
/// </summary>
|
||||
internal static string PreviewGroups_FullScale {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroups_FullScale", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invert.
|
||||
/// </summary>
|
||||
internal static string PreviewGroups_Invert {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroups_Invert", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ISOCode.
|
||||
/// </summary>
|
||||
internal static string PreviewGroups_ISOCode {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroups_ISOCode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Issue.
|
||||
/// </summary>
|
||||
internal static string PreviewGroups_Issue {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroups_Issue", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor serial number.
|
||||
/// </summary>
|
||||
internal static string PreviewGroups_SensorSerialNumber {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroups_SensorSerialNumber", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Warnings.
|
||||
/// </summary>
|
||||
internal static string PreviewGroups_Warnings {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroups_Warnings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This Group is not compatible with your Tags (see below) and will not be saved..
|
||||
/// </summary>
|
||||
internal static string PreviewGroups_WontSaveWithIncompatibleTags {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroups_WontSaveWithIncompatibleTags", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to File.
|
||||
/// </summary>
|
||||
internal static string PreviewGroupsTable_File {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroupsTable_File", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Group name.
|
||||
/// </summary>
|
||||
internal static string PreviewGroupsTable_GroupName {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroupsTable_GroupName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Tags.
|
||||
/// </summary>
|
||||
internal static string PreviewGroupsTable_GroupTags {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroupsTable_GroupTags", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Included.
|
||||
/// </summary>
|
||||
internal static string PreviewGroupsTable_Included {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroupsTable_Included", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Overwrite.
|
||||
/// </summary>
|
||||
internal static string PreviewGroupsTable_Overwrite {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroupsTable_Overwrite", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User Tag(s): .
|
||||
/// </summary>
|
||||
internal static string UserTags {
|
||||
get {
|
||||
return ResourceManager.GetString("UserTags", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>{F3E176EF-8EAF-4277-95F2-C8546C254248}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>GroupImport</RootNamespace>
|
||||
<AssemblyName>GroupImport</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>DEBUG;TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<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>DEBUG;TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<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.Practices.ServiceLocation">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Microsoft.Practices.ServiceLocation.dll</HintPath>
|
||||
</Reference>
|
||||
<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.Drawing" />
|
||||
<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.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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="GroupImportModule.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\GroupImportViewModel.cs" />
|
||||
<Compile Include="View\GroupImportImportView.xaml.cs">
|
||||
<DependentUpon>GroupImportImportView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\GroupImportPreviewView.xaml.cs">
|
||||
<DependentUpon>GroupImportPreviewView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\GroupImportOptionsView.xaml.cs">
|
||||
<DependentUpon>GroupImportOptionsView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\GroupImportImportView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\GroupImportPreviewView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\GroupImportOptionsView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\StringResources.de.resx" />
|
||||
<EmbeddedResource Include="Resources\StringResources.es.resx" />
|
||||
<EmbeddedResource Include="Resources\StringResources.fr.resx" />
|
||||
<EmbeddedResource Include="Resources\StringResources.ja.resx" />
|
||||
<EmbeddedResource Include="Resources\StringResources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>StringResources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\StringResources.ru.resx" />
|
||||
</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.Storage\DTS.Common.Storage.csproj">
|
||||
<Project>{E3BE457C-0AC7-4A9C-BC81-EAFEB3217878}</Project>
|
||||
<Name>DTS.Common.Storage</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common\DTS.Common.csproj">
|
||||
<Project>{114edc77-f3b5-4576-a91b-40818d503b55}</Project>
|
||||
<Name>DTS.Common</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -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("GroupImportModule")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("GroupImportModule")]
|
||||
[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("f3e176ef-8eaf-4277-95f2-c8546c254248")]
|
||||
|
||||
// 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")]
|
||||
BIN
DataPRO/Modules/Groups/GroupImport/.svn/wc.db
Normal file
BIN
DataPRO/Modules/Groups/GroupImport/.svn/wc.db
Normal file
Binary file not shown.
163
DataPRO/Modules/Groups/GroupImport/GroupImport.csproj
Normal file
163
DataPRO/Modules/Groups/GroupImport/GroupImport.csproj
Normal file
@@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>{F3E176EF-8EAF-4277-95F2-C8546C254248}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>GroupImport</RootNamespace>
|
||||
<AssemblyName>GroupImport</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>DEBUG;TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<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>DEBUG;TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<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.Practices.ServiceLocation">
|
||||
<HintPath>..\..\..\..\Common\DTS.Common\lib\PrismLibrary\Microsoft.Practices.ServiceLocation.dll</HintPath>
|
||||
</Reference>
|
||||
<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.Drawing" />
|
||||
<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.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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="GroupImportModule.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\GroupImportViewModel.cs" />
|
||||
<Compile Include="View\GroupImportImportView.xaml.cs">
|
||||
<DependentUpon>GroupImportImportView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\GroupImportPreviewView.xaml.cs">
|
||||
<DependentUpon>GroupImportPreviewView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\GroupImportOptionsView.xaml.cs">
|
||||
<DependentUpon>GroupImportOptionsView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\GroupImportImportView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\GroupImportPreviewView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\GroupImportOptionsView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\StringResources.de.resx" />
|
||||
<EmbeddedResource Include="Resources\StringResources.es.resx" />
|
||||
<EmbeddedResource Include="Resources\StringResources.fr.resx" />
|
||||
<EmbeddedResource Include="Resources\StringResources.ja.resx" />
|
||||
<EmbeddedResource Include="Resources\StringResources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>StringResources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\StringResources.ru.resx" />
|
||||
</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.Storage\DTS.Common.Storage.csproj">
|
||||
<Project>{E3BE457C-0AC7-4A9C-BC81-EAFEB3217878}</Project>
|
||||
<Name>DTS.Common.Storage</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\..\Common\DTS.Common\DTS.Common.csproj">
|
||||
<Project>{114edc77-f3b5-4576-a91b-40818d503b55}</Project>
|
||||
<Name>DTS.Common</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
103
DataPRO/Modules/Groups/GroupImport/GroupImportModule.cs
Normal file
103
DataPRO/Modules/Groups/GroupImport/GroupImportModule.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DTS.Common;
|
||||
using DTS.Common.Interface;
|
||||
using DTS.Common.Interface.Groups;
|
||||
using Prism.Ioc;
|
||||
using Prism.Modularity;
|
||||
using Unity;
|
||||
|
||||
namespace GroupImport
|
||||
{
|
||||
[Export(typeof(IModule))]
|
||||
[Module(ModuleName = "GroupImportModule")]
|
||||
public class GroupImportModule : IModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Injected unity container
|
||||
/// </summary>
|
||||
private readonly IUnityContainer _unityContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GroupImportModule"/> class.
|
||||
/// </summary>
|
||||
/// <param name="unityContainer">Obtained reference of the unity container by using dependency injection.</param>
|
||||
public GroupImportModule(IUnityContainer unityContainer)
|
||||
{
|
||||
_unityContainer = unityContainer;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// Register View & View-Model with Unity dependency injection container as a singleton.
|
||||
_unityContainer.RegisterType<IGroupImportImportView, GroupImportImportView>();
|
||||
_unityContainer.RegisterType<IGroupImportOptionsView, GroupImportOptionsView>();
|
||||
_unityContainer.RegisterType<IGroupImportPreviewView, GroupImportPreviewView>();
|
||||
_unityContainer.RegisterType<IGroupImportViewModel, GroupImportViewModel>();
|
||||
}
|
||||
|
||||
public void OnInitialized(IContainerProvider containerProvider)
|
||||
{
|
||||
}
|
||||
|
||||
public void RegisterTypes(IContainerRegistry containerRegistry)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Attribute class contains assembly image and name - used on the Main screen to display available components
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
|
||||
public class GroupImageAttribute : ImageAttribute
|
||||
{
|
||||
private BitmapImage _img;
|
||||
|
||||
public GroupImageAttribute() : this(null) { }
|
||||
public override eAssemblyRegion AssemblyRegion => throw new NotImplementedException();
|
||||
|
||||
public override BitmapImage AssemblyImage
|
||||
{
|
||||
get { _img = AssemblyInfo.GetImage(AssemblyNames.GroupImport.ToString()); return _img; }
|
||||
}
|
||||
public GroupImageAttribute(string s)
|
||||
{
|
||||
_img = AssemblyInfo.GetImage(AssemblyNames.GroupImport.ToString());
|
||||
}
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(ImageAttribute);
|
||||
}
|
||||
public override BitmapImage GetAssemblyImage()
|
||||
{
|
||||
return AssemblyImage;
|
||||
}
|
||||
private string _name;
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { _name = AssemblyNames.GroupImport.ToString(); return _name; }
|
||||
}
|
||||
|
||||
public override string GetAssemblyName()
|
||||
{
|
||||
return AssemblyName;
|
||||
}
|
||||
public override eAssemblyRegion GetAssemblyRegion()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
private string _group;
|
||||
public override string AssemblyGroup
|
||||
{
|
||||
get { _group = eAssemblyGroups.Prepare.ToString(); return _group; }
|
||||
}
|
||||
|
||||
public override string GetAssemblyGroup()
|
||||
{
|
||||
return AssemblyGroup;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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("GroupImportModule")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("GroupImportModule")]
|
||||
[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("f3e176ef-8eaf-4277-95f2-c8546c254248")]
|
||||
|
||||
// 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")]
|
||||
396
DataPRO/Modules/Groups/GroupImport/Resources/StringResources.Designer.cs
generated
Normal file
396
DataPRO/Modules/Groups/GroupImport/Resources/StringResources.Designer.cs
generated
Normal file
@@ -0,0 +1,396 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GroupImport.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("GroupImport.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 Group Tag(s): .
|
||||
/// </summary>
|
||||
internal static string GroupTags {
|
||||
get {
|
||||
return ResourceManager.GetString("GroupTags", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Importing {0}:{1}.
|
||||
/// </summary>
|
||||
internal static string Import_Importing {
|
||||
get {
|
||||
return ResourceManager.GetString("Import_Importing", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to TDAS group file (*.grp)|*.grp|All Files (*.*)|*.*.
|
||||
/// </summary>
|
||||
internal static string ImportFileFilter {
|
||||
get {
|
||||
return ResourceManager.GetString("ImportFileFilter", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Done.
|
||||
/// </summary>
|
||||
internal static string Importing_Done {
|
||||
get {
|
||||
return ResourceManager.GetString("Importing_Done", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to (None).
|
||||
/// </summary>
|
||||
internal static string None {
|
||||
get {
|
||||
return ResourceManager.GetString("None", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Browse.
|
||||
/// </summary>
|
||||
internal static string Options_Browse {
|
||||
get {
|
||||
return ResourceManager.GetString("Options_Browse", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to File(s).
|
||||
/// </summary>
|
||||
internal static string Options_Files {
|
||||
get {
|
||||
return ResourceManager.GetString("Options_Files", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Format.
|
||||
/// </summary>
|
||||
internal static string Options_Format {
|
||||
get {
|
||||
return ResourceManager.GetString("Options_Format", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Channels that will be imported.
|
||||
/// </summary>
|
||||
internal static string Preview_CompleteGroupChannels {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_CompleteGroupChannels", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Empty file.
|
||||
/// </summary>
|
||||
internal static string Preview_EmptyFile {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_EmptyFile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Groups.
|
||||
/// </summary>
|
||||
internal static string Preview_Groups {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_Groups", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Channels that will not be imported.
|
||||
/// </summary>
|
||||
internal static string Preview_IncompleteGroupChannels {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_IncompleteGroupChannels", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid full scale capacity.
|
||||
/// </summary>
|
||||
internal static string Preview_InvalidFullScaleCapacity {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_InvalidFullScaleCapacity", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid desired range for {0}::{1}, the sensor capacity will be used instead.
|
||||
/// </summary>
|
||||
internal static string Preview_InvalidFullScaleInput {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_InvalidFullScaleInput", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid Invert.
|
||||
/// </summary>
|
||||
internal static string Preview_InvalidInvert {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_InvalidInvert", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Group name '{0}' is duplicate or invalid.
|
||||
/// </summary>
|
||||
internal static string Preview_InvalidName {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_InvalidName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid number of fields.
|
||||
/// </summary>
|
||||
internal static string Preview_InvalidNumberOfFields {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_InvalidNumberOfFields", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Group {0} contains some lines which are invalid. The invalid lines won't be imported..
|
||||
/// </summary>
|
||||
internal static string Preview_InvalidRow {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_InvalidRow", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor not found for {0}::{1}, this channel will not be imported..
|
||||
/// </summary>
|
||||
internal static string Preview_InvalidSensor {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_InvalidSensor", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid sensor invert for {0}::{1}, the sensor invert setting will be used instead.
|
||||
/// </summary>
|
||||
internal static string Preview_InvalidSensorInput {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_InvalidSensorInput", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No files selected for import.
|
||||
/// </summary>
|
||||
internal static string Preview_NoFilesSelected {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_NoFilesSelected", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Nothing to import.
|
||||
/// </summary>
|
||||
internal static string Preview_NoGroupsToImport {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_NoGroupsToImport", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor not found.
|
||||
/// </summary>
|
||||
internal static string Preview_SensorNotFound {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview_SensorNotFound", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Display name.
|
||||
/// </summary>
|
||||
internal static string PreviewGroups_DisplayName {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroups_DisplayName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Full scale.
|
||||
/// </summary>
|
||||
internal static string PreviewGroups_FullScale {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroups_FullScale", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invert.
|
||||
/// </summary>
|
||||
internal static string PreviewGroups_Invert {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroups_Invert", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ISOCode.
|
||||
/// </summary>
|
||||
internal static string PreviewGroups_ISOCode {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroups_ISOCode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Issue.
|
||||
/// </summary>
|
||||
internal static string PreviewGroups_Issue {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroups_Issue", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sensor serial number.
|
||||
/// </summary>
|
||||
internal static string PreviewGroups_SensorSerialNumber {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroups_SensorSerialNumber", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Warnings.
|
||||
/// </summary>
|
||||
internal static string PreviewGroups_Warnings {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroups_Warnings", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This Group is not compatible with your Tags (see below) and will not be saved..
|
||||
/// </summary>
|
||||
internal static string PreviewGroups_WontSaveWithIncompatibleTags {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroups_WontSaveWithIncompatibleTags", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to File.
|
||||
/// </summary>
|
||||
internal static string PreviewGroupsTable_File {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroupsTable_File", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Group name.
|
||||
/// </summary>
|
||||
internal static string PreviewGroupsTable_GroupName {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroupsTable_GroupName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Tags.
|
||||
/// </summary>
|
||||
internal static string PreviewGroupsTable_GroupTags {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroupsTable_GroupTags", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Included.
|
||||
/// </summary>
|
||||
internal static string PreviewGroupsTable_Included {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroupsTable_Included", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Overwrite.
|
||||
/// </summary>
|
||||
internal static string PreviewGroupsTable_Overwrite {
|
||||
get {
|
||||
return ResourceManager.GetString("PreviewGroupsTable_Overwrite", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User Tag(s): .
|
||||
/// </summary>
|
||||
internal static string UserTags {
|
||||
get {
|
||||
return ResourceManager.GetString("UserTags", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,231 @@
|
||||
<?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="ImportFileFilter" xml:space="preserve">
|
||||
<value>TDAS group file (*.grp)|*.grp|All Files (*.*)|*.*</value>
|
||||
</data>
|
||||
<data name="Options_Browse" xml:space="preserve">
|
||||
<value>Browse</value>
|
||||
</data>
|
||||
<data name="Options_Files" xml:space="preserve">
|
||||
<value>File(s)</value>
|
||||
</data>
|
||||
<data name="Options_Format" xml:space="preserve">
|
||||
<value>Format</value>
|
||||
</data>
|
||||
<data name="PreviewGroupsTable_File" xml:space="preserve">
|
||||
<value>File</value>
|
||||
</data>
|
||||
<data name="PreviewGroupsTable_GroupName" xml:space="preserve">
|
||||
<value>Group name</value>
|
||||
</data>
|
||||
<data name="PreviewGroupsTable_Included" xml:space="preserve">
|
||||
<value>Included</value>
|
||||
</data>
|
||||
<data name="PreviewGroupsTable_Overwrite" xml:space="preserve">
|
||||
<value>Overwrite</value>
|
||||
</data>
|
||||
<data name="PreviewGroups_DisplayName" xml:space="preserve">
|
||||
<value>Display name</value>
|
||||
</data>
|
||||
<data name="PreviewGroups_FullScale" xml:space="preserve">
|
||||
<value>Full scale</value>
|
||||
</data>
|
||||
<data name="PreviewGroups_Invert" xml:space="preserve">
|
||||
<value>Invert</value>
|
||||
</data>
|
||||
<data name="PreviewGroups_ISOCode" xml:space="preserve">
|
||||
<value>ISOCode</value>
|
||||
</data>
|
||||
<data name="PreviewGroups_Issue" xml:space="preserve">
|
||||
<value>Issue</value>
|
||||
</data>
|
||||
<data name="PreviewGroups_SensorSerialNumber" xml:space="preserve">
|
||||
<value>Sensor serial number</value>
|
||||
</data>
|
||||
<data name="Preview_CompleteGroupChannels" xml:space="preserve">
|
||||
<value>Channels that will be imported</value>
|
||||
</data>
|
||||
<data name="Preview_Groups" xml:space="preserve">
|
||||
<value>Groups</value>
|
||||
</data>
|
||||
<data name="Preview_IncompleteGroupChannels" xml:space="preserve">
|
||||
<value>Channels that will not be imported</value>
|
||||
</data>
|
||||
<data name="Importing_Done" xml:space="preserve">
|
||||
<value>Done</value>
|
||||
</data>
|
||||
<data name="Import_Importing" xml:space="preserve">
|
||||
<value>Importing {0}:{1}</value>
|
||||
</data>
|
||||
<data name="Preview_EmptyFile" xml:space="preserve">
|
||||
<value>Empty file</value>
|
||||
</data>
|
||||
<data name="Preview_InvalidFullScaleCapacity" xml:space="preserve">
|
||||
<value>Invalid full scale capacity</value>
|
||||
</data>
|
||||
<data name="Preview_InvalidFullScaleInput" xml:space="preserve">
|
||||
<value>Invalid desired range for {0}::{1}, the sensor capacity will be used instead</value>
|
||||
</data>
|
||||
<data name="Preview_InvalidInvert" xml:space="preserve">
|
||||
<value>Invalid Invert</value>
|
||||
</data>
|
||||
<data name="Preview_InvalidName" xml:space="preserve">
|
||||
<value>Group name '{0}' is duplicate or invalid</value>
|
||||
</data>
|
||||
<data name="Preview_InvalidNumberOfFields" xml:space="preserve">
|
||||
<value>Invalid number of fields</value>
|
||||
</data>
|
||||
<data name="Preview_InvalidRow" xml:space="preserve">
|
||||
<value>Group {0} contains some lines which are invalid. The invalid lines won't be imported.</value>
|
||||
</data>
|
||||
<data name="Preview_InvalidSensor" xml:space="preserve">
|
||||
<value>Sensor not found for {0}::{1}, this channel will not be imported.</value>
|
||||
</data>
|
||||
<data name="Preview_InvalidSensorInput" xml:space="preserve">
|
||||
<value>Invalid sensor invert for {0}::{1}, the sensor invert setting will be used instead</value>
|
||||
</data>
|
||||
<data name="Preview_NoFilesSelected" xml:space="preserve">
|
||||
<value>No files selected for import</value>
|
||||
</data>
|
||||
<data name="Preview_NoGroupsToImport" xml:space="preserve">
|
||||
<value>Nothing to import</value>
|
||||
</data>
|
||||
<data name="Preview_SensorNotFound" xml:space="preserve">
|
||||
<value>Sensor not found</value>
|
||||
</data>
|
||||
<data name="PreviewGroups_Warnings" xml:space="preserve">
|
||||
<value>Warnings</value>
|
||||
</data>
|
||||
<data name="PreviewGroupsTable_GroupTags" xml:space="preserve">
|
||||
<value>Tags</value>
|
||||
</data>
|
||||
<data name="GroupTags" xml:space="preserve">
|
||||
<value>Group Tag(s): </value>
|
||||
</data>
|
||||
<data name="None" xml:space="preserve">
|
||||
<value>(None)</value>
|
||||
</data>
|
||||
<data name="PreviewGroups_WontSaveWithIncompatibleTags" xml:space="preserve">
|
||||
<value>This Group is not compatible with your Tags (see below) and will not be saved.</value>
|
||||
</data>
|
||||
<data name="UserTags" xml:space="preserve">
|
||||
<value>User Tag(s): </value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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.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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Windows.Markup;
|
||||
using GroupImport.Resources;
|
||||
|
||||
namespace DBImportExport.Resources
|
||||
{
|
||||
[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,31 @@
|
||||
<base:BaseView x:Class="GroupImport.GroupImportImportView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:CommonCtrl="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource PageContentTextStyle}" >
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<CommonCtrl:CommonStatusRibbon x:Name="CtrlStatusRibbon" Grid.Row="0" AggregateStatusText="{Binding ImportProgressText}" AggregateStatusColor="{Binding ImportProgressColor}" ProgressBarVisibility="{Binding ImportProgressBarVisibility}" ProgressBarValue="{Binding ImportProgressValue}"/>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,16 @@
|
||||
using DTS.Common.Interface.Groups;
|
||||
|
||||
|
||||
namespace GroupImport
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for GroupImportImportView.xaml
|
||||
/// </summary>
|
||||
public partial class GroupImportImportView : IGroupImportImportView
|
||||
{
|
||||
public GroupImportImportView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<base:BaseView x:Class="GroupImport.GroupImportOptionsView"
|
||||
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:root="clr-namespace:DBImportExport.Resources"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common">
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<converters:FilePathsToShortStringConverter x:Key="filesToStringConverter" />
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource PageContentTextStyle}" >
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="Margin" Value="0,2,0,2" />
|
||||
</Style>
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" MinWidth="150" />
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- for now hide since there's only one import format currently...
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="{root:TranslateExtension Options_Format}" />
|
||||
<ComboBox Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"/>
|
||||
-->
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="{root:TranslateExtension Options_Files}" />
|
||||
<TextBox IsEnabled="False" IsReadOnly="True" Grid.Row="1" Grid.Column="1" Text="{Binding SourceFiles, Converter={StaticResource ResourceKey=filesToStringConverter}}"/>
|
||||
<Button Grid.Row="1" Grid.Column="2" Content="{root:TranslateExtension Options_Browse}">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:InvokeCommandAction Command="{Binding ImportBrowseCommand}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Collections.Generic;
|
||||
using DTS.Common.Interface.Groups;
|
||||
using GroupImport.Resources;
|
||||
|
||||
namespace GroupImport
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for GroupImportOptionsView.xaml
|
||||
/// </summary>
|
||||
public partial class GroupImportOptionsView : IGroupImportOptionsView
|
||||
{
|
||||
public GroupImportOptionsView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// controls whether it is possible to continue to preview or not
|
||||
/// it is not possible to continue to preview if no files are selected
|
||||
/// and you automatically advance to preview if you select a file
|
||||
/// </summary>
|
||||
/// <param name="errors"></param>
|
||||
/// <param name="warnings"></param>
|
||||
/// <returns></returns>
|
||||
public bool Validate(out List<string> errors, out List<string> warnings)
|
||||
{
|
||||
errors = new List<string>();
|
||||
warnings = new List<string>();
|
||||
|
||||
var vm = (GroupImportViewModel)DataContext;
|
||||
if (null != vm.SourceFiles && vm.SourceFiles.Length >= 1) return true;
|
||||
errors.Add(StringResources.Preview_NoFilesSelected);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
<base:BaseView x:Class="GroupImport.GroupImportPreviewView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:root="clr-namespace:DBImportExport.Resources"
|
||||
xmlns:base="clr-namespace:DTS.Common.Base;assembly=DTS.Common" >
|
||||
<base:BaseView.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/DTS.Common;component/Themes/CommonStyles.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource PageContentTextStyle}" >
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Vertical" Grid.Row="0">
|
||||
<TextBlock Text="{root:TranslateExtension Preview_Groups}" />
|
||||
<ListView HorizontalAlignment="Left" ItemsSource="{Binding Groups}"
|
||||
AlternationCount="2" Margin="3,0,3,0">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroupsTable_Included}">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox Style="{x:Null}" IsChecked="{Binding Included}" Checked="IncludedChecked" Unchecked="IncludedUnchecked" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroupsTable_Overwrite}">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox Style="{x:Null}" IsChecked="{Binding Overwrite}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroupsTable_GroupName}" Width="220">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBox Style="{x:Null}" Text="{Binding GroupName}" MinWidth="200" TextChanged="GroupName_Changed">
|
||||
<TextBox.Resources>
|
||||
<Style TargetType="TextBox">
|
||||
<Style.Triggers>
|
||||
<MultiDataTrigger></MultiDataTrigger>
|
||||
<DataTrigger Binding="{Binding GroupNameHasError}" Value="True">
|
||||
<Setter Property="BorderBrush" Value="Red" />
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding GroupNameHasError}" Value="false">
|
||||
<Setter Property="BorderBrush" Value="Purple" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBox.Resources>
|
||||
</TextBox>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroupsTable_GroupTags}" Width="220">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBox Style="{x:Null}" Text="{Binding GroupTags}" MinWidth="200" TextChanged="GroupTags_Changed">
|
||||
<TextBox.Resources>
|
||||
<Style TargetType="TextBox">
|
||||
<Style.Triggers>
|
||||
<MultiDataTrigger></MultiDataTrigger>
|
||||
<DataTrigger Binding="{Binding GroupTagsHasError}" Value="True">
|
||||
<Setter Property="BorderBrush" Value="Red" />
|
||||
<Setter Property="BorderThickness" Value="2" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding GroupTagsHasError}" Value="false">
|
||||
<Setter Property="BorderBrush" Value="Purple" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBox.Resources>
|
||||
</TextBox>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroupsTable_File}" Width="625">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Style="{x:Null}" Text="{Binding SourceFile}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Vertical" Grid.Row="1">
|
||||
<TextBlock Text="{root:TranslateExtension Preview_CompleteGroupChannels}" />
|
||||
<ListView HorizontalAlignment="Left" ItemsSource="{Binding CompleteChannels}"
|
||||
AlternationCount="2" Margin="3,0,3,0">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroupsTable_GroupName}" Width="250">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding GroupName}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_DisplayName}" Width="250">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DisplayName}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_SensorSerialNumber}" Width="150">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding SensorSerialNumber}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<!--<GridViewColumn Header="{root:TranslateExtension PreviewGroups_ISOCode}" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding ISOCode}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>-->
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_FullScale}" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding FullScale}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_Invert}" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsEnabled="False" IsChecked="{Binding Invert}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_Warnings}" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Error}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Vertical" Grid.Row="2">
|
||||
<TextBlock Text="{root:TranslateExtension Preview_IncompleteGroupChannels}" />
|
||||
<ListView HorizontalAlignment="Left" ItemsSource="{Binding IncompleteChannels}"
|
||||
AlternationCount="2" Margin="3,0,3,0">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroupsTable_GroupName}" Width="200">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding GroupName}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_DisplayName}" Width="200">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding DisplayName}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_SensorSerialNumber}" Width="150">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding SensorSerialNumber}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<!--<GridViewColumn Header="{root:TranslateExtension PreviewGroups_ISOCode}" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding ISOCode}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>-->
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_FullScale}" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding FullScale}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_Invert}" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox IsEnabled="False" IsChecked="{Binding Invert}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn Header="{root:TranslateExtension PreviewGroups_Issue}" Width="100">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Error}"/>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</base:BaseView>
|
||||
@@ -0,0 +1,200 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Controls;
|
||||
using DTS.Common.Classes.Groups;
|
||||
using DTS.Common.Interface.Groups;
|
||||
using DTS.Common.Strings;
|
||||
using GroupImport.Resources;
|
||||
|
||||
namespace GroupImport
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for GroupImportOptionsView.xaml
|
||||
/// </summary>
|
||||
public partial class GroupImportPreviewView : IGroupImportPreviewView
|
||||
{
|
||||
public GroupImportPreviewView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// handles when tb group name changes
|
||||
/// in this case the UI needs to be notified and the validity of the group name may change
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void GroupName_Changed(object sender, System.Windows.Controls.TextChangedEventArgs e)
|
||||
{
|
||||
var tb = (TextBox)sender;
|
||||
|
||||
var group = (GroupGRPImportGroup)tb.DataContext;
|
||||
|
||||
group.GroupName = tb.Text;
|
||||
|
||||
foreach (var ch in group.Channels)
|
||||
{
|
||||
ch.GroupNameInvalidate();
|
||||
}
|
||||
|
||||
var vm = (GroupImportViewModel)DataContext;
|
||||
vm.CheckGroupName();
|
||||
}
|
||||
/// <summary>
|
||||
/// handles when tb group tag changes
|
||||
/// in this case the UI needs to be notified and the validity of the group tag may change
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void GroupTags_Changed(object sender, System.Windows.Controls.TextChangedEventArgs e)
|
||||
{
|
||||
var tb = (TextBox)sender;
|
||||
|
||||
var group = (GroupGRPImportGroup)tb.DataContext;
|
||||
|
||||
group.GroupTags = tb.Text;
|
||||
}
|
||||
/// <summary>
|
||||
/// handles included checkbox being checked for a group
|
||||
/// in this case the channels for the group should be added to the UI
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void IncludedChecked(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
var vm = (GroupImportViewModel)DataContext;
|
||||
vm.InvalidateChannels();
|
||||
}
|
||||
/// <summary>
|
||||
/// handles the included checkbox being unchecked for a group
|
||||
/// in this case the channels for the group should be removed from the UI
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void IncludedUnchecked(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
var vm = (GroupImportViewModel)DataContext;
|
||||
vm.InvalidateChannels();
|
||||
}
|
||||
/// <summary>
|
||||
/// checks whether it is okay to proceed to import,
|
||||
/// checks the validity of the selected channels and groups
|
||||
/// </summary>
|
||||
/// <param name="userIsAdmin">whether or not the user has Administrator privileges</param>
|
||||
/// <param name="errors">any fatal errors that would prevent importing</param>
|
||||
/// <param name="warnings">any non fatal errors that the user needs to be warned about (but that don't prevent importing)</param>
|
||||
/// <returns>true if it is okay to proceed to import</returns>
|
||||
public bool Validate(bool userIsAdmin, out List<string> errors, out List<string> warnings)
|
||||
{
|
||||
errors = new List<string>();
|
||||
warnings = new List<string>();
|
||||
var bValid = true;
|
||||
|
||||
var vm = (GroupImportViewModel)DataContext;
|
||||
var bAnyValidChannels = false;
|
||||
if (vm.Groups.Any())
|
||||
{
|
||||
foreach (var g in vm.Groups)
|
||||
{
|
||||
if (!g.Included) { continue; }
|
||||
if (!string.IsNullOrWhiteSpace(g.GroupTags) && !userIsAdmin)
|
||||
{
|
||||
foreach (var userTag in g.ImportingUserTags.Split())
|
||||
{
|
||||
if (g.GroupTags.Split().Contains(userTag)) continue;
|
||||
|
||||
var sb = new StringBuilder();
|
||||
sb.Append(string.Format(StringResources.PreviewGroups_WontSaveWithIncompatibleTags, userTag, g.GroupTags));
|
||||
sb.Append($"\r\n{StringResources.UserTags}");
|
||||
sb.Append(g.ImportingUserTags.Length == 0 ? StringResources.None : g.ImportingUserTags);
|
||||
//The static group in question will always have at least 1 Tag, otherwise there would be no problem
|
||||
sb.Append($"\r\n{StringResources.GroupTags}");
|
||||
sb.Append(g.GroupTags);
|
||||
|
||||
errors.Add(sb.ToString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (g.GroupNameHasError)
|
||||
{
|
||||
var msg = string.Format(StringResources.Preview_InvalidName, g.GroupName);
|
||||
if (!errors.Contains(msg))
|
||||
{
|
||||
errors.Add(msg);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (null != g.GroupErrors && g.GroupErrors.Any())
|
||||
{
|
||||
foreach (var error in g.GroupErrors)
|
||||
{
|
||||
if (!errors.Contains(error.ExtraInfo))
|
||||
{
|
||||
errors.Add(error.ExtraInfo);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (vm.CheckGroupExists(g.GroupName) && !g.Overwrite)
|
||||
{
|
||||
var msg = string.Format(StringResources.Preview_InvalidName, g.GroupName);
|
||||
if (!errors.Contains(msg)) { errors.Add(msg); }
|
||||
return false;
|
||||
}
|
||||
bValid = false;
|
||||
foreach (var ch in g.Channels)
|
||||
{
|
||||
if (null != ch.Error)
|
||||
{
|
||||
switch (ch.Error.ErrorCode)
|
||||
{
|
||||
case GroupGRPImportError.Errors.FileEmpty:
|
||||
case GroupGRPImportError.Errors.InvalidISOCodeInput:
|
||||
bAnyValidChannels = true;
|
||||
break;
|
||||
case GroupGRPImportError.Errors.InvalidFullScaleInput:
|
||||
warnings.Add(string.Format(StringResources.Preview_InvalidFullScaleInput,
|
||||
g.GroupName, ch.DisplayName));
|
||||
bAnyValidChannels = true;
|
||||
break;
|
||||
case GroupGRPImportError.Errors.InvalidInvertInput:
|
||||
warnings.Add(string.Format(StringResources.Preview_InvalidSensorInput,
|
||||
g.GroupName,
|
||||
ch.DisplayName));
|
||||
bAnyValidChannels = true;
|
||||
break;
|
||||
case GroupGRPImportError.Errors.InvalidSensorInput:
|
||||
var msg = string.Format(StringResources.Preview_InvalidRow, g.GroupName);
|
||||
if (!warnings.Contains(msg))
|
||||
{
|
||||
warnings.Add(msg);
|
||||
}
|
||||
break;
|
||||
case GroupGRPImportError.Errors.SensorNotFound:
|
||||
warnings.Add(string.Format(StringResources.Preview_InvalidSensor, g.GroupName,
|
||||
ch.DisplayName));
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bValid = true;
|
||||
bAnyValidChannels = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!bAnyValidChannels)
|
||||
{
|
||||
errors.Add(StringResources.Preview_NoGroupsToImport);
|
||||
}
|
||||
return bValid;
|
||||
}
|
||||
errors.Add(StringResources.Preview_NoGroupsToImport);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,792 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Threading.Tasks;
|
||||
using DTS.Common.Events;
|
||||
using DTS.Common.Utils;
|
||||
using DTS.Common.Classes.Groups;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using DTS.Common.Enums.Groups;
|
||||
using DTS.Common.Interface.Groups;
|
||||
using GroupImport.Resources;
|
||||
using DTS.Common.Storage;
|
||||
using System.Windows.Media;
|
||||
using Prism.Regions;
|
||||
using DTS.Common.Interactivity;
|
||||
using Unity;
|
||||
using Prism.Events;
|
||||
using Prism.Commands;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace GroupImport
|
||||
{
|
||||
/// <summary>
|
||||
/// this class handles Group/TestObject import functionality
|
||||
/// </summary>
|
||||
[Export(typeof(IGroupImportOptionsView))]
|
||||
[Export(typeof(IGroupImportPreviewView))]
|
||||
[Export(typeof(IGroupImportImportView))]
|
||||
[PartCreationPolicy(CreationPolicy.Shared)]
|
||||
public class GroupImportViewModel : IGroupImportViewModel
|
||||
{
|
||||
#region views
|
||||
/// <summary>
|
||||
/// the import view
|
||||
/// </summary>
|
||||
public IGroupImportOptionsView ImportOptionsView { get; set; }
|
||||
/// <summary>
|
||||
/// the preview view
|
||||
/// </summary>
|
||||
public IGroupImportPreviewView ImportPreviewView { get; set; }
|
||||
/// <summary>
|
||||
/// the import view
|
||||
/// </summary>
|
||||
public IGroupImportImportView ImportView { get; set; }
|
||||
#endregion
|
||||
|
||||
private IEventAggregator _eventAggregator { get; set; }
|
||||
private IRegionManager _regionManager;
|
||||
private IUnityContainer UnityContainer { get; set; }
|
||||
|
||||
public InteractionRequest<Notification> NotificationRequest { get; private set; }
|
||||
public InteractionRequest<Confirmation> ConfirmationRequest { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the TechnologyDomainEditViewModel.
|
||||
/// </summary>
|
||||
/// <param name="previewView"></param>
|
||||
/// <param name="importView"></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>
|
||||
/// <param name="optionsView"></param>
|
||||
public GroupImportViewModel(IGroupImportOptionsView optionsView, IGroupImportPreviewView previewView,
|
||||
IGroupImportImportView importView, IRegionManager regionManager, IEventAggregator eventAggregator,
|
||||
IUnityContainer unityContainer)
|
||||
{
|
||||
ImportView = importView;
|
||||
ImportView.DataContext = this;
|
||||
|
||||
ImportOptionsView = optionsView;
|
||||
ImportOptionsView.DataContext = this;
|
||||
|
||||
ImportPreviewView = previewView;
|
||||
ImportPreviewView.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);
|
||||
}
|
||||
|
||||
#region Methods
|
||||
/// <summary>
|
||||
/// reads .grp files, parsing out groups and channels
|
||||
/// </summary>
|
||||
public void ParseSourceFiles(string userTags)
|
||||
{
|
||||
var groups = new List<GroupGRPImportGroup>();
|
||||
|
||||
foreach (var file in SourceFiles)
|
||||
{
|
||||
var group = new GroupGRPImportGroup { SourceFile = file };
|
||||
try
|
||||
{
|
||||
var lines = System.IO.File.ReadAllLines(file);
|
||||
var fi = new System.IO.FileInfo(file);
|
||||
var groupName = fi.Name.Replace(fi.Extension, "");
|
||||
if (groupName.EndsWith("."))
|
||||
{
|
||||
groupName = groupName.Substring(0, groupName.Length - 1);
|
||||
}
|
||||
group.GroupName = groupName;
|
||||
group.GroupTags = userTags;
|
||||
group.ImportingUserTags = userTags;
|
||||
if (lines.Any())
|
||||
{
|
||||
group.GroupErrors = new GroupGRPImportError[0];
|
||||
var channels = new List<GroupGRPImportChannel>();
|
||||
for (var i = 0; i < lines.Length; i++)
|
||||
{
|
||||
var line = lines[i];
|
||||
if (string.IsNullOrWhiteSpace(line)) { continue; }
|
||||
var fields = Parse(line);
|
||||
var sensorSerialNumber = fields[0];
|
||||
var channel = new GroupGRPImportChannel { SensorSerialNumber = sensorSerialNumber, ParentGroup = group };
|
||||
|
||||
if (null != CheckSensorExists && !CheckSensorExists.Invoke(sensorSerialNumber) &&
|
||||
//FB13753 .grp import should allow empty sensor
|
||||
!string.Empty.Equals(sensorSerialNumber))
|
||||
{
|
||||
channel.Error = new GroupGRPImportError
|
||||
{
|
||||
ErrorCode = GroupGRPImportError.Errors.SensorNotFound,
|
||||
ExtraInfo = StringResources.Preview_SensorNotFound,
|
||||
File = file,
|
||||
Line = i
|
||||
};
|
||||
}
|
||||
|
||||
if (5 == fields.Length)
|
||||
{
|
||||
channel.DisplayName = fields[1];
|
||||
channel.ISOCode = fields[2];
|
||||
switch (fields[3].ToLower())
|
||||
{
|
||||
case "no":
|
||||
channel.Invert = false;
|
||||
break;
|
||||
case "yes":
|
||||
channel.Invert = true;
|
||||
break;
|
||||
default:
|
||||
if (!bool.TryParse(fields[3], out var invert))
|
||||
{
|
||||
channel.Error = new GroupGRPImportError
|
||||
{
|
||||
ErrorCode = GroupGRPImportError.Errors.InvalidInvertInput,
|
||||
ExtraInfo = StringResources.Preview_InvalidInvert,
|
||||
File = file,
|
||||
Line = i
|
||||
};
|
||||
continue;
|
||||
}
|
||||
channel.Invert = invert;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
double capacity;
|
||||
if (!double.TryParse(fields[4], out capacity))
|
||||
{
|
||||
channel.Error = new GroupGRPImportError
|
||||
{
|
||||
ErrorCode = GroupGRPImportError.Errors.InvalidFullScaleInput,
|
||||
ExtraInfo = StringResources.Preview_InvalidFullScaleCapacity
|
||||
};
|
||||
continue;
|
||||
}
|
||||
channel.FullScale = capacity;
|
||||
}
|
||||
else
|
||||
{
|
||||
channel.Error = new GroupGRPImportError
|
||||
{
|
||||
ErrorCode = GroupGRPImportError.Errors.InvalidSensorInput,
|
||||
ExtraInfo = StringResources.Preview_InvalidNumberOfFields,
|
||||
File = file,
|
||||
Line = i
|
||||
};
|
||||
}
|
||||
channels.Add(channel);
|
||||
}
|
||||
group.Channels = channels.ToArray();
|
||||
if (!channels.Any())
|
||||
{
|
||||
group.GroupErrors = new[]
|
||||
{
|
||||
new GroupGRPImportError
|
||||
{
|
||||
ErrorCode = GroupGRPImportError.Errors.FileEmpty,
|
||||
ExtraInfo = StringResources.Preview_EmptyFile,
|
||||
File = file,
|
||||
Line = 0
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
group.GroupErrors = new[]
|
||||
{
|
||||
new GroupGRPImportError
|
||||
{
|
||||
File = file,
|
||||
ErrorCode = GroupGRPImportError.Errors.FileEmpty,
|
||||
Line = 0,
|
||||
ExtraInfo = StringResources.Preview_EmptyFile
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
group.GroupErrors = new[]
|
||||
{
|
||||
new GroupGRPImportError
|
||||
{
|
||||
File = file,
|
||||
Line = 0,
|
||||
ExtraInfo = ex.Message,
|
||||
ErrorCode = GroupGRPImportError.Errors.FileEmpty
|
||||
}
|
||||
};
|
||||
LogMessage(ex);
|
||||
}
|
||||
|
||||
groups.Add(group);
|
||||
}
|
||||
|
||||
Groups = groups.ToArray();
|
||||
ProcessChannels();
|
||||
}
|
||||
/// <summary>
|
||||
/// starts the process of creating and commiting groups and channels on a background thread
|
||||
/// </summary>
|
||||
public void Import()
|
||||
{
|
||||
System.Threading.ThreadPool.QueueUserWorkItem(ImportFunc);
|
||||
}
|
||||
/// <summary>
|
||||
/// the actual thread writing groups and channels
|
||||
/// </summary>
|
||||
/// <param name="o"></param>
|
||||
private void ImportFunc(object o)
|
||||
{
|
||||
var channelDefaults = DbOperations.GetChannelSettingDefaults();
|
||||
ImportProgressValue = 0;
|
||||
ImportProgressBarVisibility = Visibility.Visible;
|
||||
ImportProgressColor = DTS.Common.BrushesAndColors.Brush_ApplicationStatus_Busy.Color;
|
||||
DisableUI?.Invoke();
|
||||
var done = 0;
|
||||
var allChannels = Groups.Where(g => g.Included).SelectMany(g => g.Channels).Count();
|
||||
var groups = new List<string>();
|
||||
foreach (var g in Groups)
|
||||
{
|
||||
if (!g.Included) { continue; }
|
||||
CreateGroup(g.GroupName, g.GroupTags);
|
||||
|
||||
foreach (var ch in g.Channels)
|
||||
{
|
||||
done++;
|
||||
|
||||
//ImportProgressText = string.Format(StringResources.Import_Importing, g.GroupName, ch.DisplayName);
|
||||
//ImportProgressValue = Convert.ToInt32(100D * done / allChannels);
|
||||
|
||||
if (null != ch.Error)
|
||||
{
|
||||
switch (ch.Error.ErrorCode)
|
||||
{
|
||||
case GroupGRPImportError.Errors.FileEmpty:
|
||||
case GroupGRPImportError.Errors.InvalidSensorInput:
|
||||
case GroupGRPImportError.Errors.SensorNotFound:
|
||||
continue;//don't add
|
||||
}
|
||||
}
|
||||
double? capacity = null;
|
||||
if (null == ch.Error || ch.Error.ErrorCode != GroupGRPImportError.Errors.InvalidFullScaleInput)
|
||||
{
|
||||
capacity = ch.FullScale;
|
||||
}
|
||||
|
||||
bool? invert = null;
|
||||
if (null == ch.Error || ch.Error.ErrorCode != GroupGRPImportError.Errors.InvalidInvertInput)
|
||||
{
|
||||
invert = ch.Invert;
|
||||
}
|
||||
|
||||
AddChannel(g.GroupName, ch.DisplayName, ch.SensorSerialNumber, capacity, invert, ch.ISOCode, channelDefaults);
|
||||
}
|
||||
groups.Add(g.GroupName);
|
||||
//CommitGroup(g.GroupName);
|
||||
}
|
||||
CommitGroups(groups.ToArray());
|
||||
//ImportProgressColor = DTS.Common.BrushesAndColors.Brush_ApplicationStatus_Complete.Color;
|
||||
//ImportProgressBarVisibility = Visibility.Collapsed;
|
||||
//EnableUI?.Invoke();
|
||||
}
|
||||
public void SetStatus(string message, Color color)
|
||||
{
|
||||
ImportProgressColor = color;
|
||||
ImportProgressBarVisibility = Visibility.Collapsed;
|
||||
ImportProgressText = message;
|
||||
EnableUI?.Invoke();
|
||||
}
|
||||
/// <summary>
|
||||
/// re-initializes the group view model
|
||||
/// right now we don't create a new group view model, we appear to reuse the existing one, so it has to be reset
|
||||
/// </summary>
|
||||
public void Reset()
|
||||
{
|
||||
SourceFiles = new string[0];
|
||||
Channels = new GroupGRPImportChannel[0];
|
||||
Groups = new GroupGRPImportGroup[0];
|
||||
ImportProgressBarVisibility = Visibility.Collapsed;
|
||||
ImportProgressColor = DTS.Common.BrushesAndColors.Brush_ApplicationStatus_Idle.Color;
|
||||
ImportProgressText = string.Empty;
|
||||
ImportProgressValue = 0;
|
||||
}
|
||||
/// <summary>
|
||||
/// parses a single line in a GRP file
|
||||
/// this line may use () to escape values, like "this(,)is all one field" will only return one string
|
||||
/// </summary>
|
||||
/// <param name="line"></param>
|
||||
/// <returns></returns>
|
||||
private static string[] Parse(string line)
|
||||
{
|
||||
var strings = new List<string>();
|
||||
var currentString = new StringBuilder();
|
||||
|
||||
var currentCharacter = 0;
|
||||
var leftParenCount = 0;
|
||||
while (currentCharacter < line.Length)
|
||||
{
|
||||
var ch = line[currentCharacter];
|
||||
switch (ch)
|
||||
{
|
||||
case '(':
|
||||
currentString.Append("(");
|
||||
leftParenCount++;
|
||||
break;
|
||||
case ')':
|
||||
currentString.Append(")");
|
||||
leftParenCount--;
|
||||
break;
|
||||
case ',':
|
||||
if (leftParenCount > 0)
|
||||
{
|
||||
currentString.Append(",");
|
||||
}
|
||||
else
|
||||
{
|
||||
strings.Add(currentString.ToString());
|
||||
currentString.Clear();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
currentString.Append(ch);
|
||||
break;
|
||||
}
|
||||
currentCharacter++;
|
||||
}
|
||||
if (currentString.Length > 0)
|
||||
{
|
||||
strings.Add(currentString.ToString());
|
||||
}
|
||||
return strings.ToArray();
|
||||
}
|
||||
/// <summary>
|
||||
/// checks whether a group name is valid
|
||||
/// a group name is invalid if it exists more than once in the import or if it already exists in the
|
||||
/// application and overwrite is false
|
||||
/// </summary>
|
||||
public void CheckGroupName()
|
||||
{
|
||||
var groupNameLookup = new Dictionary<string, List<GroupGRPImportGroup>>();
|
||||
foreach (var g in Groups)
|
||||
{
|
||||
if (!groupNameLookup.ContainsKey(g.GroupName))
|
||||
{
|
||||
groupNameLookup.Add(g.GroupName, new List<GroupGRPImportGroup>());
|
||||
}
|
||||
groupNameLookup[g.GroupName].Add(g);
|
||||
}
|
||||
foreach (var g in Groups)
|
||||
{
|
||||
if (groupNameLookup[g.GroupName].Count > 1)
|
||||
{
|
||||
g.GroupNameHasError = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CheckGroupExists(g.GroupName) && !g.Overwrite)
|
||||
{
|
||||
g.GroupNameHasError = true;
|
||||
}
|
||||
else { g.GroupNameHasError = false; }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// log a message
|
||||
/// </summary>
|
||||
/// <param name="parms"></param>
|
||||
private void LogMessage(params object[] parms)
|
||||
{
|
||||
Logger?.Invoke(parms);
|
||||
}
|
||||
/// <summary>
|
||||
/// separates channels out of groups into valid and invalid channels
|
||||
/// popuplates IncompleteChannels and CompleteChannels
|
||||
/// </summary>
|
||||
private void ProcessChannels()
|
||||
{
|
||||
var channels = new List<GroupGRPImportChannel>();
|
||||
|
||||
foreach (var g in Groups)
|
||||
{
|
||||
channels.AddRange(g.Channels);
|
||||
}
|
||||
Channels = channels.ToArray();
|
||||
}
|
||||
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 { get; private set; }
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the HeaderInfo.
|
||||
/// </summary>
|
||||
public string HeaderInfo => "MainRegion";
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Commands
|
||||
|
||||
/// <summary>
|
||||
/// browse to a file to import, should be xml, maybe needs a few other criteria
|
||||
/// </summary>
|
||||
private DelegateCommand _importBrowseCommand;
|
||||
|
||||
public DelegateCommand ImportBrowseCommand => _importBrowseCommand ?? (_importBrowseCommand = new DelegateCommand(ImportBrowseMethod));
|
||||
|
||||
private void ImportBrowseMethod()
|
||||
{
|
||||
using (var dlg = new System.Windows.Forms.OpenFileDialog())
|
||||
{
|
||||
dlg.CheckFileExists = true;
|
||||
dlg.CheckPathExists = true;
|
||||
dlg.Multiselect = true;
|
||||
dlg.Filter = StringResources.ImportFileFilter;
|
||||
dlg.FilterIndex = 0;
|
||||
|
||||
if (dlg.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;
|
||||
SourceFiles = dlg.FileNames;
|
||||
BrowseOk = true;
|
||||
SwitchNavSteps?.Invoke(GroupImportEnums.Steps.Preview);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region properties
|
||||
|
||||
private string _importProgressText;
|
||||
/// <summary>
|
||||
/// current status text for import progress bar
|
||||
/// </summary>
|
||||
public string ImportProgressText
|
||||
{
|
||||
get => _importProgressText;
|
||||
set
|
||||
{
|
||||
_importProgressText = value;
|
||||
OnPropertyChanged("ImportProgressText");
|
||||
}
|
||||
}
|
||||
|
||||
private System.Windows.Media.Color _importProgressColor;
|
||||
/// <summary>
|
||||
/// The current color of the import progress bar
|
||||
/// </summary>
|
||||
public System.Windows.Media.Color ImportProgressColor
|
||||
{
|
||||
get => _importProgressColor;
|
||||
set
|
||||
{
|
||||
_importProgressColor = value;
|
||||
OnPropertyChanged("ImportProgressColor");
|
||||
}
|
||||
}
|
||||
|
||||
public Visibility _importProgressBarVisibility;
|
||||
/// <summary>
|
||||
/// whether the progress bar is visible or not
|
||||
/// </summary>
|
||||
public Visibility ImportProgressBarVisibility
|
||||
{
|
||||
get => _importProgressBarVisibility;
|
||||
set
|
||||
{
|
||||
_importProgressBarVisibility = value;
|
||||
OnPropertyChanged("ImportProgressBarVisibility");
|
||||
}
|
||||
}
|
||||
|
||||
private double _importProgressValue;
|
||||
/// <summary>
|
||||
/// percentage complete of import process
|
||||
/// </summary>
|
||||
public double ImportProgressValue
|
||||
{
|
||||
get => _importProgressValue;
|
||||
set
|
||||
{
|
||||
_importProgressValue = value;
|
||||
OnPropertyChanged("ImportProgressValue");
|
||||
}
|
||||
}
|
||||
|
||||
private string[] _sourceFiles = new string[0];
|
||||
|
||||
/// <summary>
|
||||
/// .GRP files to parse
|
||||
/// </summary>
|
||||
public string[] SourceFiles
|
||||
{
|
||||
get => _sourceFiles;
|
||||
set
|
||||
{
|
||||
_sourceFiles = value;
|
||||
OnPropertyChanged("SourceFiles");
|
||||
}
|
||||
}
|
||||
|
||||
public bool BrowseOk { get; set; } = false;
|
||||
|
||||
private GroupGRPImportGroup[] _groups = new GroupGRPImportGroup[0];
|
||||
/// <summary>
|
||||
/// All groups that have been read in and parsed
|
||||
/// </summary>
|
||||
public GroupGRPImportGroup[] Groups
|
||||
{
|
||||
get => _groups;
|
||||
set
|
||||
{
|
||||
_groups = value;
|
||||
OnPropertyChanged("Groups");
|
||||
}
|
||||
}
|
||||
|
||||
private GroupGRPImportChannel[] _channels = new GroupGRPImportChannel[0];
|
||||
/// <summary>
|
||||
/// Channels which are invalid but are in groups included in import
|
||||
/// </summary>
|
||||
public GroupGRPImportChannel[] Channels
|
||||
{
|
||||
get => _channels;
|
||||
set
|
||||
{
|
||||
_channels = value;
|
||||
InvalidateChannels();
|
||||
}
|
||||
}
|
||||
|
||||
public void InvalidateChannels()
|
||||
{
|
||||
OnPropertyChanged("IncompleteChannels");
|
||||
OnPropertyChanged("CompleteChannels");
|
||||
}
|
||||
/// <summary>
|
||||
/// these are channels which will not be imported
|
||||
/// </summary>
|
||||
public GroupGRPImportChannel[] IncompleteChannels
|
||||
{
|
||||
get
|
||||
{
|
||||
var channels = new List<GroupGRPImportChannel>();
|
||||
foreach (var g in Groups)
|
||||
{
|
||||
if (!g.Included) { continue; }
|
||||
foreach (var ch in g.Channels)
|
||||
{
|
||||
if (null == ch.Error) { continue; }
|
||||
else
|
||||
{
|
||||
switch (ch.Error.ErrorCode)
|
||||
{
|
||||
case GroupGRPImportError.Errors.InvalidFullScaleInput:
|
||||
case GroupGRPImportError.Errors.InvalidInvertInput:
|
||||
continue;
|
||||
default:
|
||||
channels.Add(ch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return channels.ToArray();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// these are channels which will be imported
|
||||
/// </summary>
|
||||
public GroupGRPImportChannel[] CompleteChannels
|
||||
{
|
||||
get
|
||||
{
|
||||
var channels = new List<GroupGRPImportChannel>();
|
||||
foreach (var g in Groups)
|
||||
{
|
||||
if (!g.Included) { continue; }
|
||||
foreach (var ch in g.Channels)
|
||||
{
|
||||
if (null == ch.Error)
|
||||
{
|
||||
channels.Add(ch);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (ch.Error.ErrorCode)
|
||||
{
|
||||
case GroupGRPImportError.Errors.InvalidFullScaleInput:
|
||||
case GroupGRPImportError.Errors.InvalidInvertInput:
|
||||
channels.Add(ch);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return channels.ToArray();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// the logging facility to use
|
||||
/// if null no logging is performed
|
||||
/// </summary>
|
||||
public FileUtils.LogDelegate Logger { get; set; } = null;
|
||||
/// <summary>
|
||||
/// the command for switching current nav step
|
||||
/// </summary>
|
||||
public SwitchNavStepsDelegate SwitchNavSteps { get; set; } = null;
|
||||
/// <summary>
|
||||
/// the command for checking if a group already exists in the application
|
||||
/// </summary>
|
||||
public CheckGroupExistsDelegate CheckGroupExists { get; set; } = null;
|
||||
/// <summary>
|
||||
/// the command for checking if a sensor exists in the application
|
||||
/// </summary>
|
||||
public CheckSensorExistsDelegate CheckSensorExists { get; set; } = null;
|
||||
/// <summary>
|
||||
/// the command for creating a group
|
||||
/// </summary>
|
||||
public CreateGroupDelegate CreateGroup { get; set; } = null;
|
||||
/// <summary>
|
||||
/// the command for adding a channel to a group
|
||||
/// </summary>
|
||||
public AddChannelToGroupDelegate AddChannel { get; set; } = null;
|
||||
/// <summary>
|
||||
/// the command for commiting a group to the db
|
||||
/// </summary>
|
||||
public CommitGroupsDelegate CommitGroups { get; set; } = null;
|
||||
/// <summary>
|
||||
/// the command for disabling the UI
|
||||
/// </summary>
|
||||
public Disable_UIDelegate DisableUI { get; set; }
|
||||
/// <summary>
|
||||
/// the command for enabling the UI
|
||||
/// </summary>
|
||||
public Enable_UIDelegate EnableUI { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
///<summary>
|
||||
///Occurs when a property value changes.
|
||||
///</summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
public void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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/Groups/GroupList/.svn/entries
Normal file
1
DataPRO/Modules/Groups/GroupList/.svn/entries
Normal file
@@ -0,0 +1 @@
|
||||
12
|
||||
1
DataPRO/Modules/Groups/GroupList/.svn/format
Normal file
1
DataPRO/Modules/Groups/GroupList/.svn/format
Normal file
@@ -0,0 +1 @@
|
||||
12
|
||||
@@ -0,0 +1,141 @@
|
||||
<?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="AssociatedTestSetups" xml:space="preserve">
|
||||
<value>Associated Test Setups</value>
|
||||
</data>
|
||||
<data name="Channels" xml:space="preserve">
|
||||
<value>Channels</value>
|
||||
</data>
|
||||
<data name="Description" xml:space="preserve">
|
||||
<value>Description</value>
|
||||
</data>
|
||||
<data name="LastModified" xml:space="preserve">
|
||||
<value>Last modified</value>
|
||||
</data>
|
||||
<data name="LastModifiedBy" xml:space="preserve">
|
||||
<value>Last modified by</value>
|
||||
</data>
|
||||
<data name="Name" xml:space="preserve">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
<data name="TemplateName" xml:space="preserve">
|
||||
<value>Template name</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,85 @@
|
||||
using DTS.Common.Interface.Groups.GroupTemplateList;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using DTS.Common.Controls;
|
||||
using DTS.Common.Interface.Groups.GroupList;
|
||||
using DTS.Common.Utils;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
|
||||
namespace GroupList
|
||||
{
|
||||
/// <inheritdoc cref="IGroupListView" />
|
||||
/// <summary>
|
||||
/// Interaction logic for GroupListView.xaml
|
||||
/// </summary>
|
||||
public partial class GroupListView : IGroupListView
|
||||
{
|
||||
public GroupListView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ListViewHeader_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var colHeader = (GridViewColumnHeader)e.OriginalSource;
|
||||
var viewModel = (IGroupListViewModel)colHeader.DataContext;
|
||||
viewModel.Sort(colHeader.Tag, true);
|
||||
}
|
||||
private void GridViewColumnHeaderSearchable_OnSearch(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var searchTerm = (string)e.OriginalSource;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag;
|
||||
var vm = (IGroupListViewModel)DataContext;
|
||||
vm.Filter(columnTag, searchTerm);
|
||||
}
|
||||
private void GridViewColumnHeader_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var vm = (IGroupListViewModel)DataContext;
|
||||
var columnTag = (sender as GridViewColumnHeaderSearchable)?.Tag ?? Utils.FindChild<GridViewColumnHeaderSearchable>((DependencyObject)e.OriginalSource, null)?.Tag;
|
||||
vm?.Sort(columnTag, true);
|
||||
}
|
||||
private void MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
if (!(sender is ListView lv))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var index = GetCurrentIndex(e.GetPosition, lv);
|
||||
if (index >= 0 && index < lv.Items.Count)
|
||||
{
|
||||
var vm = (IGroupListViewModel)lv.DataContext;
|
||||
vm.MouseDoubleClick(index);
|
||||
}
|
||||
}
|
||||
|
||||
private delegate Point GetPositionDelegate(IInputElement element);
|
||||
private static int GetCurrentIndex(GetPositionDelegate getPosition, ListView lv)
|
||||
{
|
||||
var index = -1;
|
||||
for (var i = 0; i < lv.Items.Count; i++)
|
||||
{
|
||||
var item = GetListViewItem(i, lv);
|
||||
if (item == null)
|
||||
continue;
|
||||
if (IsMouseOverTarget(item, getPosition))
|
||||
{
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return index;
|
||||
}
|
||||
private static ListViewItem GetListViewItem(int index, ListView lv)
|
||||
{
|
||||
return lv.ItemContainerGenerator.ContainerFromIndex(index) as ListViewItem;
|
||||
}
|
||||
private static bool IsMouseOverTarget(Visual target, GetPositionDelegate getPosition)
|
||||
{
|
||||
var bounds = VisualTreeHelper.GetDescendantBounds(target);
|
||||
var mousePos = getPosition((IInputElement)target);
|
||||
return bounds.Contains(mousePos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
<?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>{C2271F25-9ED4-405A-9756-D4AC54D46977}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>GroupList</RootNamespace>
|
||||
<AssemblyName>GroupList</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="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.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.Web.Extensions" />
|
||||
<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\ChannelSetting.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GroupListModule.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\GroupListViewModel.cs" />
|
||||
<Compile Include="View\GroupListView.xaml.cs">
|
||||
<DependentUpon>GroupListView.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="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\GroupListView.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,6 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="GroupTemplateList.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -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.Groups.GroupList;
|
||||
using DTS.Common.Interface.Groups.GroupTemplateList;
|
||||
using GroupList;
|
||||
using Prism.Ioc;
|
||||
using Prism.Modularity;
|
||||
using Unity;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable RedundantAttributeUsageProperty
|
||||
// ReSharper disable UnusedParameter.Local
|
||||
|
||||
[assembly: GroupListModuleName]
|
||||
[assembly: GroupListModuleImageAttribute]
|
||||
namespace GroupList
|
||||
{
|
||||
[Export(typeof(IModule))]
|
||||
[Module(ModuleName = "GroupListModule")]
|
||||
public class GroupListModule : IModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Injected unity container
|
||||
/// </summary>
|
||||
private readonly IUnityContainer _unityContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GroupListModule"/> class.
|
||||
/// </summary>
|
||||
/// <param name="unityContainer">Obtained reference of the unity container by using dependency injection.</param>
|
||||
public GroupListModule(IUnityContainer unityContainer)
|
||||
{
|
||||
_unityContainer = unityContainer;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
// Register View & View-Model with Unity dependency injection container as a singleton.
|
||||
_unityContainer.RegisterType<IGroupListView, GroupListView>();
|
||||
_unityContainer.RegisterType<IGroupListViewModel, GroupListViewModel>();
|
||||
}
|
||||
|
||||
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 GroupListModuleNameAttribute : TextAttribute
|
||||
{
|
||||
public GroupListModuleNameAttribute() : this(null) { }
|
||||
|
||||
public GroupListModuleNameAttribute(string s)
|
||||
{
|
||||
AssemblyName = AssemblyNames.GroupList.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 GroupListModuleImageAttribute : ImageAttribute
|
||||
{
|
||||
private BitmapImage _img;
|
||||
|
||||
public GroupListModuleImageAttribute() : this(null) { }
|
||||
public override BitmapImage AssemblyImage
|
||||
{
|
||||
get { _img = AssemblyInfo.GetImage(AssemblyNames.GroupList.ToString()); return _img; }
|
||||
}
|
||||
public GroupListModuleImageAttribute(string s)
|
||||
{
|
||||
_img = AssemblyInfo.GetImage(AssemblyNames.GroupList.ToString());
|
||||
}
|
||||
|
||||
public override Type GetAttributeType()
|
||||
{
|
||||
return typeof(ImageAttribute);
|
||||
}
|
||||
public override BitmapImage GetAssemblyImage()
|
||||
{
|
||||
return AssemblyImage;
|
||||
}
|
||||
private string _name;
|
||||
public override string AssemblyName
|
||||
{
|
||||
get { _name = AssemblyNames.GroupList.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.GroupListRegion; return _region; }
|
||||
}
|
||||
public override eAssemblyRegion GetAssemblyRegion()
|
||||
{
|
||||
return AssemblyRegion;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Windows.Markup;
|
||||
using GroupList.Resources;
|
||||
|
||||
namespace GroupList
|
||||
{
|
||||
[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,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 GroupList.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,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="GroupList.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<userSettings>
|
||||
<GroupList.Properties.Settings>
|
||||
</GroupList.Properties.Settings>
|
||||
</userSettings>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||
@@ -0,0 +1,529 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Threading.Tasks;
|
||||
using DTS.Common.Events;
|
||||
using GroupList.Model;
|
||||
using DTS.Common.Interface.Groups.GroupTemplateList;
|
||||
using DTS.Common.Enums.Groups.GroupList;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using DTS.Common.Events.Groups.GroupList;
|
||||
using DTS.Common.Interface.Groups.GroupList;
|
||||
using System.Windows;
|
||||
using DTS.Common.Storage;
|
||||
using DTS.Common.Interface.Groups;
|
||||
using Prism.Events;
|
||||
using Prism.Regions;
|
||||
using Unity;
|
||||
using DTS.Common.Interactivity;
|
||||
|
||||
// ReSharper disable CheckNamespace
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable InconsistentNaming
|
||||
|
||||
namespace GroupList
|
||||
{
|
||||
/// <summary>
|
||||
/// this class handles GroupList functionality
|
||||
/// </summary>
|
||||
[PartCreationPolicy(CreationPolicy.Shared)]
|
||||
public class GroupListViewModel : IGroupListViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The GroupList view
|
||||
/// </summary>
|
||||
public IGroupListView View { 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 GroupListViewModel
|
||||
/// </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 GroupListViewModel(IGroupListView 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);
|
||||
SelectedGroupItems = new ObservableCollection<IGroup>();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
public void ClearAllFilters()
|
||||
{
|
||||
_filterByField.Clear();
|
||||
}
|
||||
public void MouseDoubleClick(int index)
|
||||
{
|
||||
if (index >= 0 && index < Groups.Length && SelectedGroupItems.Count == 1)
|
||||
{
|
||||
_eventAggregator.GetEvent<GroupListEditGroupEvent>().Publish(Groups[index].Id);
|
||||
}
|
||||
}
|
||||
|
||||
public void Filter(string term)
|
||||
{
|
||||
CurrentSearchTerm = term;
|
||||
Sort(_sortField.ToString(), false);
|
||||
}
|
||||
|
||||
public IGroup GetGroup(int? id, bool updateTags = true)
|
||||
{
|
||||
if (id >= 0)
|
||||
{
|
||||
if (updateTags)
|
||||
{
|
||||
//Update the Tags in case they were modified by a different user
|
||||
DTS.Common.Classes.Tags.TagsInstance.GetTagsInstance(DbOperations.TagsGet).UpdateList(DbOperations.TagsGet);
|
||||
}
|
||||
var groups = Group.GetAllGroups(id);
|
||||
if (groups.Any())
|
||||
{
|
||||
return groups[0];
|
||||
}
|
||||
}
|
||||
return new Group();
|
||||
}
|
||||
|
||||
public IGroup GetGroup(string displayName)
|
||||
{
|
||||
//Get all of the groups with this DisplayName. This consists of both embedded and non-embedded
|
||||
//if it was a pre-2.0 static Group or just the embedded, if it was a pre-2.0 Added Group.
|
||||
//If the Group was first created in 2.0, it may have both embedded and non-embedded or just embedded.
|
||||
var groups = Group.GetAllGroups(displayName);
|
||||
foreach (var group in groups)
|
||||
{
|
||||
if (!group.Embedded)
|
||||
{
|
||||
//Return the corresponding non-embedded Group
|
||||
return group;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public IGroup[] GetGroups(int[] ids)
|
||||
{
|
||||
var allGroups = Group.GetAllGroups().ToList();
|
||||
for (var i = allGroups.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if (ids.Contains(allGroups[i].Id)) { continue; }
|
||||
allGroups.RemoveAt(i);
|
||||
}
|
||||
return allGroups.ToArray();
|
||||
}
|
||||
public IGroup[] GetAllGroups()
|
||||
{
|
||||
var allGroups = Group.GetAllGroups();
|
||||
return allGroups;
|
||||
}
|
||||
public void DeleteGroups(int[] ids)
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (var id in ids)
|
||||
{
|
||||
//Set any embedded Groups' that have the to-be-deleted
|
||||
//Group's Id as their StaticGroupId to null.
|
||||
var relatedEmbeddedGroups = Group.GetAllRelatedEmbeddedGroups(id);
|
||||
foreach (var embeddedGroup in relatedEmbeddedGroups)
|
||||
{
|
||||
Group.SetNullStaticGroupId(embeddedGroup);
|
||||
}
|
||||
|
||||
Group.Delete(id);
|
||||
}
|
||||
|
||||
var list = AllGroups.ToList();
|
||||
for (var i = AllGroups.Length - 1; i >= 0; i--)
|
||||
{
|
||||
if (ids.Contains(AllGroups[i].Id))
|
||||
{
|
||||
list.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
AllGroups = list.ToArray();
|
||||
Filter(CurrentSearchTerm);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_eventAggregator.GetEvent<PageErrorEvent>().Publish(new PageErrorArg(new[] { ex.Message }, Page));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public IGroup CreateGroup()
|
||||
{
|
||||
return new Group(true);
|
||||
}
|
||||
public IGroup CreateGroup(System.Data.SqlClient.SqlDataReader reader, List<string> includedHardwareStringList, List<int> dasIdList)
|
||||
{
|
||||
return new Group(reader, includedHardwareStringList, dasIdList);
|
||||
}
|
||||
|
||||
public IGroup CreateGroup(IGroupDbRecord groupRecord, List<string> includedHardwareStringList, List<int> dasIdList)
|
||||
{
|
||||
return new Group(groupRecord, includedHardwareStringList, dasIdList);
|
||||
}
|
||||
|
||||
public IGroup CreateGroup(List<string> includedHardwareStringList)
|
||||
{
|
||||
return new Group(includedHardwareStringList);
|
||||
}
|
||||
|
||||
public void Filter(object tag, string term)
|
||||
{
|
||||
if (!Enum.TryParse((string)tag, out GroupFields field)) return;
|
||||
_filterByField[field] = term;
|
||||
_sortField = field;
|
||||
Filter(term);
|
||||
}
|
||||
|
||||
public void OnSetActive(object page, bool groupTile, object o)
|
||||
{
|
||||
try
|
||||
{
|
||||
var currentUser = (DTS.Slice.Users.User)o;
|
||||
Page = page;
|
||||
var groups = Group.GetAllGroups().Where(@group => currentUser.Role == DTS.Slice.Users.User.DefaultRoles.Administrator || currentUser.TagCompatible(@group.TagIDs)).ToList();
|
||||
if (groupTile)
|
||||
{
|
||||
AllGroups = groups.ToArray();
|
||||
Task.Run(() => GetTestSetupListsAsync());
|
||||
}
|
||||
else
|
||||
{
|
||||
AllGroups = groups.ToArray();
|
||||
Sort(_sortField.ToString(), false);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_eventAggregator.GetEvent<PageErrorEvent>().Publish(new PageErrorArg(new[] { ex.Message }, Page));
|
||||
}
|
||||
}
|
||||
|
||||
private void GetTestSetupListsAsync()
|
||||
{
|
||||
_eventAggregator.GetEvent<AppStatusEvent>().Publish(AppStatusArg.Busy);
|
||||
var groups = AllGroups.ToArray();
|
||||
|
||||
|
||||
_eventAggregator.GetEvent<ProgressBarEvent>().Publish(new ProgressBarEventArg()
|
||||
{ ProgressBarText = $"Getting groups", SetText = true });
|
||||
|
||||
groups.AsParallel().ForAll(g =>
|
||||
{
|
||||
_eventAggregator.GetEvent<ProgressBarEvent>().Publish(new ProgressBarEventArg()
|
||||
{ ProgressBarText = $"Getting group {g.DisplayName}", SetText = true });
|
||||
g.SetTestSetupLists();
|
||||
});
|
||||
|
||||
Application.Current.Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
Sort(_sortField.ToString(), false);
|
||||
}));
|
||||
|
||||
_eventAggregator.GetEvent<ProgressBarEvent>().Publish(new ProgressBarEventArg()
|
||||
{ ProgressBarText = $"Waiting for user input", SetText = true });
|
||||
_eventAggregator.GetEvent<AppStatusEvent>().Publish(AppStatusArg.Available);
|
||||
}
|
||||
public void Unset()
|
||||
{
|
||||
AllGroups = new IGroup[0];
|
||||
Groups = new IGroup[0];
|
||||
ClearAllFilters();
|
||||
_eventAggregator.GetEvent<ListViewStatusEvent>()
|
||||
.Publish(new ListViewStatusArg(ListViewStatusArg.ListViewStatus.Unloaded, ListViewId));
|
||||
}
|
||||
public void Sort(object o, bool bColumnClick)
|
||||
{
|
||||
if (!(o is string s)) { return; }
|
||||
if (!Enum.TryParse(s, out GroupFields tag)) { return; }
|
||||
|
||||
if (bColumnClick)
|
||||
{
|
||||
if (tag != _sortField)
|
||||
{
|
||||
_sortField = tag;
|
||||
_sortAscending = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
_sortAscending = !_sortAscending;
|
||||
}
|
||||
}
|
||||
|
||||
_comparer.SortAscending = _sortAscending;
|
||||
_comparer.SortField = _sortField;
|
||||
var list = new List<IGroup>();
|
||||
foreach (var group in AllGroups)
|
||||
{
|
||||
if (group.Filter(CurrentSearchTerm))
|
||||
{
|
||||
if (GroupFilter(group))
|
||||
{
|
||||
list.Add(group);
|
||||
}
|
||||
}
|
||||
}
|
||||
var originalList = list.ToList();
|
||||
list.Sort(_comparer);
|
||||
//this doesn't seem right, should just use the _sortField and sort ascending
|
||||
//logic already present
|
||||
//if (originalList.SequenceEqual(list) && originalList.Count > 1 &&
|
||||
// !(_comparer.SortAscending && _comparer.SortField == GroupFields.LastModified))//AllGroups already ordered by lastmodified, ascending
|
||||
//{
|
||||
// //list was already in order. flip it for the user
|
||||
// _sortAscending = !_sortAscending;
|
||||
// _comparer.SortAscending = _sortAscending;
|
||||
// list.Sort(_comparer);
|
||||
//}
|
||||
Groups = list.ToArray();
|
||||
OnPropertyChanged("Groups");
|
||||
}
|
||||
|
||||
private bool GroupFilter(IGroup group)
|
||||
{
|
||||
var fields = Enum.GetValues(typeof(GroupFields)).Cast<GroupFields>().ToArray();
|
||||
foreach (var field in fields)
|
||||
{
|
||||
if (!_filterByField.ContainsKey(field)) { continue; }
|
||||
var term = _filterByField[field];
|
||||
if (string.IsNullOrWhiteSpace(term)) { continue; }
|
||||
switch (field)
|
||||
{
|
||||
case GroupFields.DisplayName:
|
||||
if (!(System.Globalization.CultureInfo.CurrentCulture.CompareInfo.IndexOf(group.DisplayName, term,
|
||||
System.Globalization.CompareOptions.OrdinalIgnoreCase) >= 0))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GroupFields.Description:
|
||||
if (!(System.Globalization.CultureInfo.CurrentCulture.CompareInfo.IndexOf(group.Description, term,
|
||||
System.Globalization.CompareOptions.OrdinalIgnoreCase) >= 0))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GroupFields.ChannelCount:
|
||||
if (!(System.Globalization.CultureInfo.CurrentCulture.CompareInfo.IndexOf(group.ChannelCount.ToString(), term,
|
||||
System.Globalization.CompareOptions.OrdinalIgnoreCase) >= 0))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GroupFields.LastModified:
|
||||
if (!(System.Globalization.CultureInfo.CurrentCulture.CompareInfo.IndexOf(group.LastModified.ToString(), term,
|
||||
System.Globalization.CompareOptions.OrdinalIgnoreCase) >= 0))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GroupFields.LastModifiedBy:
|
||||
if (!(System.Globalization.CultureInfo.CurrentCulture.CompareInfo.IndexOf(group.LastModifiedBy, term,
|
||||
System.Globalization.CompareOptions.OrdinalIgnoreCase) >= 0))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case GroupFields.AssociatedTestSetups:
|
||||
{
|
||||
var testSetups = new List<string>();
|
||||
foreach (var assoc in group.AssociatedTestSetups) { testSetups.Add(assoc.Name); }
|
||||
var s = string.Join(", ", testSetups.ToArray());
|
||||
if (!(System.Globalization.CultureInfo.CurrentCulture.CompareInfo.IndexOf(s, term,
|
||||
System.Globalization.CompareOptions.OrdinalIgnoreCase) >= 0))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
private void FireSelectionChanged()
|
||||
{
|
||||
_eventAggregator.GetEvent<GroupListGroupSelectedEvent>().Publish(_selectedGroupItems.Select(grp => grp.Id).ToArray());
|
||||
}
|
||||
/// <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
|
||||
|
||||
private readonly Dictionary<GroupFields, string> _filterByField = new Dictionary<GroupFields, string>();
|
||||
private string CurrentSearchTerm = "";
|
||||
public int SelectedGroupIndex { get; set; } = -1;
|
||||
|
||||
public ObservableCollection<IGroup> _selectedGroupItems;
|
||||
public ObservableCollection<IGroup> SelectedGroupItems
|
||||
{
|
||||
get => _selectedGroupItems;
|
||||
set
|
||||
{
|
||||
if (_selectedGroupItems != null)
|
||||
{
|
||||
_selectedGroupItems.CollectionChanged -= SelectedGroupItemsOnCollectionChanged;
|
||||
}
|
||||
_selectedGroupItems = value;
|
||||
if (_selectedGroupItems != null)
|
||||
{
|
||||
_selectedGroupItems.CollectionChanged += SelectedGroupItemsOnCollectionChanged;
|
||||
}
|
||||
FireSelectionChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private void SelectedGroupItemsOnCollectionChanged(object sender, NotifyCollectionChangedEventArgs notifyCollectionChangedEventArgs)
|
||||
{
|
||||
if (DTS.Common.Enums.SelectedItemsStatus.GetUpdating(SelectedGroupItems)) { return; }
|
||||
FireSelectionChanged();
|
||||
}
|
||||
private IGroup[] AllGroups { get; set; }
|
||||
//sort by last modified descending by default
|
||||
private bool _sortAscending = false;
|
||||
private GroupFields _sortField = GroupFields.LastModified;
|
||||
private readonly GroupComparer _comparer = new GroupComparer();
|
||||
public IGroup[] Groups { get; set; }
|
||||
public bool IsDirty { get; private set; }
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
public string ListViewId => "GroupListView";
|
||||
private object Page { get; set; }
|
||||
#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("GroupTemplateList")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("DTS")]
|
||||
[assembly: AssemblyProduct("GroupTemplateList")]
|
||||
[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("95d3c318-8333-4d0b-b508-21d654404443")]
|
||||
|
||||
// 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,109 @@
|
||||
<base:BaseView x:Class="GroupList.GroupListView"
|
||||
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:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:strings="clr-namespace:GroupList"
|
||||
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:controls2="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
|
||||
xmlns:converters="clr-namespace:DTS.Common.Converters;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="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:ListToStringConverter x:Key="ListToString"/>
|
||||
<converters:StringListToVisibilityConverter x:Key="StringListToVisibility"/>
|
||||
</ResourceDictionary>
|
||||
</base:BaseView.Resources>
|
||||
<Grid Background="{DynamicResource Brush_ApplicationContentBackground}">
|
||||
<ListView ItemsSource="{Binding Groups, UpdateSourceTrigger=PropertyChanged}" AutomationProperties.AutomationId="GroupListView" SelectedIndex="{Binding SelectedGroupIndex}" MouseDoubleClick="MouseDoubleClick" GridViewColumnHeader.Click="GridViewColumnHeader_OnClick">
|
||||
<i:Interaction.Behaviors>
|
||||
<behaviors:MultiSelectionBehavior SelectedItems="{Binding SelectedGroupItems}" />
|
||||
</i:Interaction.Behaviors>
|
||||
<ListView.View>
|
||||
<controls:AutoSizedGridView AutomationProperties.AutomationId="GroupListGridView">
|
||||
<GridViewColumn AutomationProperties.AutomationId="DisplayName">
|
||||
<controls2:GridViewColumnHeaderSearchable Tag="DisplayName" HeaderTitle="{strings:TranslateExtension Name}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding DisplayName,FallbackValue='DisplayName'}" AutomationProperties.AutomationId="DisplayName"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="Description">
|
||||
<controls2:GridViewColumnHeaderSearchable Tag="Description" HeaderTitle="{strings:TranslateExtension Description}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding Description,FallbackValue='Description'}" AutomationProperties.AutomationId="Description"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="ChannelCount">
|
||||
<controls2:GridViewColumnHeaderSearchable Tag="ChannelCount" HeaderTitle="{strings:TranslateExtension Channels}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding ChannelCount,FallbackValue='ChannelCount'}" AutomationProperties.AutomationId="ChannelCount"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn AutomationProperties.AutomationId="LastModifiedBy">
|
||||
<controls2:GridViewColumnHeaderSearchable Tag="LastModifiedBy" HeaderTitle="{strings:TranslateExtension LastModifiedBy}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<TextBlock Text="{Binding LastModifiedBy,FallbackValue='LastModifiedBy'}" AutomationProperties.AutomationId="LastModifiedBy"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="LastModified">
|
||||
<controls2: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="LastModified"/>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
<GridViewColumn AutomationProperties.AutomationId="AssociatedTestSetups">
|
||||
<controls2:GridViewColumnHeaderSearchable Tag="AssociatedTestSetups" HeaderTitle="{strings:TranslateExtension AssociatedTestSetups}" Search="GridViewColumnHeaderSearchable_OnSearch" ClickHandler="GridViewColumnHeader_OnClick" ListviewId="{Binding ListViewId}"/>
|
||||
<GridViewColumn.CellTemplate>
|
||||
<ItemContainerTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{Binding ModifiedTestSetupStringList,Converter={StaticResource ListToString},FallbackValue='ModifiedTestSetups '}" AutomationProperties.AutomationId="tblkModifiedTestSetups" FontStyle="Italic"/>
|
||||
<Grid Grid.Column="1" Visibility="{Binding UnmodifiedTestSetupStringList,Converter={StaticResource StringListToVisibility}}">
|
||||
<TextBlock Text=", " Visibility="{Binding ModifiedTestSetupStringList,Converter={StaticResource StringListToVisibility}}"/>
|
||||
</Grid>
|
||||
<TextBlock Grid.Column="2" Text="{Binding UnmodifiedTestSetupStringList,Converter={StaticResource ListToString},FallbackValue='AssociatedTestSetups'}" AutomationProperties.AutomationId="AssociatedTestSetups"/>
|
||||
</Grid>
|
||||
</ItemContainerTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</controls:AutoSizedGridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</Grid>
|
||||
</base:BaseView>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user