Files
DP44/DTS Viewer/DTS.Viewer.Modules/DTS.Viewer.AddCalculatedChannel/View/AddCalculatedChannelView.xaml
2026-04-17 14:55:32 -04:00

176 lines
10 KiB
XML

<base:BaseView x:Class="DTS.Viewer.AddCalculatedChannel.AddCalculatedChannelView"
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:root="clr-namespace:DTS.Viewer.AddCalculatedChannel"
xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
xmlns:controls="clr-namespace:DTS.Common.Controls;assembly=DTS.Common"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
<base:BaseView.Resources>
<Style TargetType="TextBox" BasedOn="{StaticResource PageContentTextBoxStyle}" />
<Style TargetType="TextBlock" BasedOn="{StaticResource PageContentTextStyle}" />
<Style TargetType="CheckBox" BasedOn="{StaticResource PageContentCheckBoxStyle}" />
<Style TargetType="PasswordBox" BasedOn="{StaticResource PageContentPasswordBoxStyle}" />
<Style TargetType="Button" BasedOn="{StaticResource FlatButton}"/>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<Style TargetType="toolkit:DoubleUpDown" BasedOn="{StaticResource PageContentXCDoubleUpDown}">
<Setter Property="Width" Value="150"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="FormatString" Value="N0"/>
<Setter Property="Increment" Value="1"/>
</Style>
<sys:Double x:Key="HIC_LENGTH_MIN">1</sys:Double>
<sys:Double x:Key="HIC_LENGTH_MAX">100</sys:Double>
</base:BaseView.Resources>
<Grid Background="{StaticResource Brush_ApplicationContentBackground}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- Page Title -->
<TextBlock Style="{StaticResource BaselineTextStyle4}" Text="{root:TranslateExtension AddCalculatedChannel}" Grid.Row="0"/>
<!-- Content-->
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" MinWidth="480"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Channel Name-->
<TextBlock Grid.Column="0" Grid.Row="0" Text="{root:TranslateExtension ChannelName}"/>
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding ChannelName, Mode=TwoWay, FallbackValue=Integration}" x:Name="tbChannelName" MaxLength="100" />
<!-- Channel Description-->
<TextBlock Grid.Column="0" Grid.Row="1" Text="{root:TranslateExtension Description}" Visibility="Collapsed"/>
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding ChannelDescription, Mode=TwoWay}" IsEnabled="False" x:Name="tbChannelDescription" Visibility="Collapsed"/>
<!-- ISO Code-->
<TextBlock Grid.Column="0" Grid.Row="2" Text="{root:TranslateExtension ISOCode}"/>
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding IsoCode, Mode=TwoWay, FallbackValue=????????????????}" MaxLength="25"/>
<!-- Calculation Type -->
<TextBlock Grid.Column="0" Grid.Row="3" Text="{root:TranslateExtension Calculation}"/>
<ComboBox Grid.Column="1" Grid.Row="3" ItemsSource="{Binding CalculationList}" SelectedItem="{Binding SelectedCalculation}" /><!--SelectionChanged="cbCalculationList_SelectionChanged" x:Name="cbCalculationList"/>-->
<!--multiple channel selector-->
<TextBlock Grid.Column="0" Grid.Row="4" Visibility="{Binding MultipleChannelSelectorVisibility, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Visible}" Text="{root:TranslateExtension InputChannels}" VerticalAlignment="Top"/>
<!-- Single Channel Selector -->
<TextBlock Grid.Column="0" Grid.Row="4" Text="{root:TranslateExtension CalculationInputChannel}" Visibility="{Binding SingleChannelSelectorVisibility, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}"/>
<ComboBox Grid.Column="1" Grid.Row="4" ItemsSource="{Binding ChannelList}" SelectedItem="{Binding SourceChannel}" Visibility="{Binding SingleChannelSelectorVisibility, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}" />
<!--multiple channel selector-->
<ListView ItemsSource="{Binding ChannelListObjects}" Grid.Row="4" Grid.Column="1" Visibility="{Binding MultipleChannelSelectorVisibility, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Visible}"
ScrollViewer.VerticalScrollBarVisibility="Auto">
<ListView.View>
<GridView>
<GridViewColumn Header=" " Width="100">
<GridViewColumn.CellTemplate>
<DataTemplate>
<CheckBox IsThreeState="False" IsChecked="{Binding Path=IsIncluded}"/>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="{root:TranslateExtension Channel}" DisplayMemberBinding="{Binding Path=DisplayName}" />
</GridView>
</ListView.View>
</ListView>
<!--ThreeDIRTRACC-->
<Grid Grid.Row="4" Grid.Column="0" Visibility="{Binding ThreeDIRTRACCVisibility, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Visibility.Collapsed}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Grid.Row="0" Grid.RowSpan="3" Text="{root:TranslateExtension InputChannels}" />
</Grid>
<Grid Grid.Row="4" Grid.Column="1" Visibility="{Binding ThreeDIRTRACCVisibility, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Grid.Row="0" Text="{root:TranslateExtension ThreeD_IRTracc}" HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="0" Grid.Row="1" Text="{root:TranslateExtension ThreeD_RotPot1}" HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Grid.Column="0" Grid.Row="2" Text="{root:TranslateExtension ThreeD_RotPot2}" HorizontalAlignment="Right" VerticalAlignment="Center"/>
<ComboBox Grid.Row="0" ItemsSource="{Binding IRTraccChannelList}" SelectedItem="{Binding IRTraccChannel}" Grid.Column="1" DisplayMemberPath="DisplayName"/>
<ComboBox Grid.Row="1" ItemsSource="{Binding Pot1ChannelList}" SelectedItem="{Binding Pot1Channel}" Grid.Column="1" DisplayMemberPath="DisplayName" />
<ComboBox Grid.Row="2" ItemsSource="{Binding Pot2ChannelList}" SelectedItem="{Binding Pot2Channel}" Grid.Column="1" DisplayMemberPath="DisplayName" />
</Grid>
<!--HIC-->
<StackPanel Grid.Row="4" Grid.Column="0" Orientation="Vertical" Visibility="{Binding HICChannelSelectorVisibility, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Visibility.Collapsed}">
<TextBlock Grid.Row="0" Text="{root:TranslateExtension ClipLengthMS}" />
<TextBlock Grid.Row="1" Text="{root:TranslateExtension HICAccelerationX}" />
<TextBlock Grid.Row="2" Text="{root:TranslateExtension HICAccelerationY}" />
<TextBlock Grid.Row="3" Text="{root:TranslateExtension HICAccelerationZ}" />
</StackPanel>
<StackPanel Grid.Row="4" Grid.Column="1" Visibility="{Binding HICChannelSelectorVisibility, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Collapsed}">
<toolkit:DoubleUpDown Grid.Column="0" Grid.Row="0"
Minimum="{StaticResource HIC_LENGTH_MIN}" Maximum="{StaticResource HIC_LENGTH_MAX}"
Value="{Binding HICLength}" />
<ComboBox Grid.Column="0" Grid.Row="1" ItemsSource="{Binding AvailableHICChannels}" DisplayMemberPath="DisplayName"
AutomationProperties.AutomationId="HICAccelerationXComboBox"
SelectedItem="{Binding HICAccelerationX}" />
<ComboBox Grid.Column="0" Grid.Row="2" ItemsSource="{Binding AvailableHICChannels}" DisplayMemberPath="DisplayName" AutomationProperties.AutomationId="HICAccelerationYComboBox"
SelectedItem="{Binding HICAccelerationY}" />
<ComboBox Grid.Column="0" Grid.Row="3" ItemsSource="{Binding AvailableHICChannels}" DisplayMemberPath="DisplayName" AutomationProperties.AutomationId="HICAccelerationZComboBox"
SelectedItem="{Binding HICAccelerationZ}" />
</StackPanel>
</Grid>
</Grid>
</base:BaseView>