97 lines
10 KiB
Plaintext
97 lines
10 KiB
Plaintext
<base:BaseView x:Class="DTS.Viewer.TestModification.TestModificationView"
|
|
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:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
|
|
xmlns:converters="clr-namespace:DTS.Common.Converters;assembly=DTS.Common"
|
|
xmlns:strings="clr-namespace:DTS.Viewer.TestModification" x:Name="testViewModification">
|
|
<base:BaseView.Resources>
|
|
<ResourceDictionary>
|
|
<!-- ReSharper disable once Xaml.RedundantResource -->
|
|
<converters:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter" />
|
|
<!-- ReSharper disable once Xaml.RedundantResource -->
|
|
<converters:EnumBooleanConverter x:Key="EnumBooleanConverter" />
|
|
<converters:InverseBooleanToOpacityConverter x:Key="InverseBooleanToOpacityConverter" />
|
|
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
|
<converters:InverseBooleanConverter x:Key="InverseBooleanConverter"/>
|
|
<converters:BooleanToColorConverter x:Key="InvertedBooleanToAttentionBackgroundColorConverter" Background="True" Inverted="True" AttentionBrush="True" />
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="../Resources/TestModificationResources.xaml"/>
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</base:BaseView.Resources>
|
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Top">
|
|
<Label Content="{strings:TranslateExtension PleaseLockHeader}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
|
|
Visibility="{Binding Path=TestModificationVisability, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=false}" />
|
|
<Grid Visibility="{Binding Path=TestModificationVisability, Converter={StaticResource BooleanToVisibilityConverter}}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<!-- DESCRIPTION -->
|
|
<Label Grid.Row="0" Grid.Column="0" Content="{strings:TranslateExtension Description}" AutomationProperties.AutomationId="LabelDescription" />
|
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Path=Model.Description}" x:Name="tbDescription" AutomationProperties.AutomationId="TextBoxDescription" IsEnabled="{Binding Path=Model.EnableDescriptionControl}" Background="{Binding Path=Model.IsModifiedDescription, Converter={StaticResource InvertedBooleanToAttentionBackgroundColorConverter}}"/>
|
|
<!-- FILTER -->
|
|
<Label Grid.Row="1" Grid.Column="0" Content="{strings:TranslateExtension Filter}" AutomationProperties.AutomationId="LabelFilter" Background="{Binding Path=Model.IsModifiedFilter, Converter={StaticResource InvertedBooleanToAttentionBackgroundColorConverter}}" />
|
|
<ComboBox Grid.Row="1" Grid.Column="1" DisplayMemberPath="FilterName" ItemsSource="{Binding ElementName=testViewModification, Path=AvailableCFC}" SelectedItem="{Binding Path=Model.SelectedFilter}" AutomationProperties.AutomationId="ComboBoxFilter" IsEnabled="{Binding Path=Model.EnableFilterControl}" MinWidth="200" Grid.ColumnSpan="2"/>
|
|
<!-- DATAFLAG -->
|
|
<Label Grid.Row="2" Grid.Column="0" Content="{strings:TranslateExtension DataFlag}" AutomationProperties.AutomationId="LabelDataFlag" Background="{Binding Path=Model.IsModifiedDataFlag, Converter={StaticResource InvertedBooleanToAttentionBackgroundColorConverter}}"/>
|
|
<ComboBox Grid.Row="2" Grid.Column="1" ItemsSource="{Binding Source={StaticResource DataFlagProvider}}" SelectedItem="{Binding Path=Model.SelectedDataFlag}" AutomationProperties.AutomationId="ComboBoxDataFlag" IsEnabled="{Binding Path=Model.IsDataFlagEnabled}"/>
|
|
<!-- T0 -->
|
|
<Label Grid.Row="3" Grid.Column="0" Content="{strings:TranslateExtension ShiftT0ms}" AutomationProperties.AutomationId="TextBlockT0" />
|
|
<toolkit:DoubleUpDown Grid.Row="3" Grid.Column="1" FormatString="N3" Value="{Binding Path=Model.T0}" Background="{Binding Path=Model.IsModifiedT0, Converter={StaticResource InvertedBooleanToAttentionBackgroundColorConverter}}" AutomationProperties.AutomationId="DoubleUpDownT0" IsEnabled="{Binding Path=Model.IsT0Enabled}"/>
|
|
<ComboBox Grid.Row="3" Grid.Column="2" ItemsSource="{Binding Source={StaticResource T0ModeProvider}}" SelectedItem="{Binding Path=Model.T0Mode}" Width="80" IsEnabled="{Binding Path=Model.IsT0ModeTestOnly, Converter={StaticResource InverseBooleanConverter}}" AutomationProperties.AutomationId="ComboBoxT0Mode" />
|
|
<!-- EU MULTIPLIER -->
|
|
<Label Grid.Row="4" Grid.Column="0" Content="{strings:TranslateExtension EUMultiplier}" AutomationProperties.AutomationId="LabelEuMultiplier" />
|
|
<toolkit:DoubleUpDown Grid.Row="4" Grid.Column="1" FormatString="N8" Width="{Binding ActualWidth, ElementName=tbDescription}" Value="{Binding Path=Model.EuMultiplier}" Background="{Binding Path=Model.IsModifiedEuMultiplier, Converter={StaticResource InvertedBooleanToAttentionBackgroundColorConverter}}" AutomationProperties.AutomationId="DoubleUpDownEuMultiplier" IsEnabled="{Binding Path=Model.EnableEUMultiplierControl}"/>
|
|
<!-- EU OFFSET -->
|
|
<Label Grid.Row="5" Grid.Column="0" Content="{strings:TranslateExtension EUOffset}" AutomationProperties.AutomationId="LabelEuOffset" />
|
|
<toolkit:DoubleUpDown Grid.Row="5" Grid.Column="1" FormatString="N8" HorizontalAlignment="Stretch" Value="{Binding Path=Model.EuOffset}" AutomationProperties.AutomationId="DoubleUpDownEuOffset" IsEnabled="{Binding Path=Model.EnableEUOffsetControl}" Background="{Binding Path=Model.IsModifiedEuOffset, Converter={StaticResource InvertedBooleanToAttentionBackgroundColorConverter}}" />
|
|
<!-- SENSITIVITY -->
|
|
<Label Grid.Row="6" Grid.Column="0" Content="{strings:TranslateExtension Sensitivity}" AutomationProperties.AutomationId="LabelSensitivity" />
|
|
<toolkit:DoubleUpDown Grid.Row="6" Grid.Column="1" FormatString="N12" Value="{Binding Path=Model.Sensitivity}" AutomationProperties.AutomationId="DoubleUpDownSensitivity" IsEnabled="{Binding Path=Model.EnableSensitivityControl}" Background="{Binding Path=Model.IsModifiedSensitivity, Converter={StaticResource InvertedBooleanToAttentionBackgroundColorConverter}}" />
|
|
<!-- LINEFIT -->
|
|
<Label Grid.Row="7" Grid.Column="0" Content="{strings:TranslateExtension LineFit}" AutomationProperties.AutomationId="TextBlockLineFit" />
|
|
<Label Grid.Row="8" Grid.Column="0" Content="{strings:TranslateExtension T1ms}" AutomationProperties.AutomationId="TextBlockT1" />
|
|
<toolkit:DoubleUpDown Grid.Row="8" Grid.Column="1" FormatString="N3" Value="{Binding Path=Model.T1}" AutomationProperties.AutomationId="DoubleUpDownT1" IsEnabled="{Binding Path=Model.EnableLineFitControl}" Background="{Binding Path=Model.IsModifiedLineFit, Converter={StaticResource InvertedBooleanToAttentionBackgroundColorConverter}}"/>
|
|
|
|
<Label Grid.Row="9" Grid.Column="0" Content="{strings:TranslateExtension T2ms}" AutomationProperties.AutomationId="TextBlockT2" />
|
|
<toolkit:DoubleUpDown Grid.Row="9" Grid.Column="1" FormatString="N3" Value="{Binding Path=Model.T2}" AutomationProperties.AutomationId="DoubleUpDownT2" IsEnabled="{Binding Path=Model.EnableLineFitControl}" Background="{Binding Path=Model.IsModifiedLineFit, Converter={StaticResource InvertedBooleanToAttentionBackgroundColorConverter}}"/>
|
|
|
|
<Grid Grid.Row="10" Grid.Column="0" Grid.ColumnSpan="3">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Rectangle Grid.Row="0" Grid.ColumnSpan="2" Fill="Black" Height="1" Margin="5"/>
|
|
|
|
<Button Grid.Row="1" Grid.Column="0" Content="{strings:TranslateExtension Undo}" Command="{Binding Path=UndoCommand}" IsEnabled="{Binding Path=Model.IsModified}" AutomationProperties.AutomationId="ButtonUndoWrite"/>
|
|
<Button Grid.Row="1" Grid.Column="1" Content="{strings:TranslateExtension WriteFiles}" Command="{Binding Path=WriteCommand}" IsEnabled="{Binding Path=Model.IsModified}" AutomationProperties.AutomationId="ButtonWrite" />
|
|
|
|
<Button Grid.Row="2" Grid.Column="0" Content="{strings:TranslateExtension Preview}" Command="{Binding Path=PreviewCommand}" IsEnabled="{Binding Path=Model.IsModifiedLineFit}" AutomationProperties.AutomationId="ButtonPreview" Visibility="Collapsed"/>
|
|
<Button Grid.Row="2" Grid.Column="1" Content="{strings:TranslateExtension UndoAll}" Command="{Binding Path=UndoAllCommand}" IsEnabled="{Binding Path=IsBackedUp}" AutomationProperties.AutomationId="ButtonUndoAll"/>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
</Grid>
|
|
</base:BaseView> |