340 lines
32 KiB
Plaintext
340 lines
32 KiB
Plaintext
|
|
<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>
|