You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
5.2 KiB

<Border x:Class="SparkClient.Views.Configuration.SettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SparkClient.Views"
xmlns:hc="https://handyorg.github.io/handycontrol"
mc:Ignorable="d">
<Grid Background="#FDFEFD" Opacity="0.8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="20*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="30"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="120"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="30"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="30"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Button Grid.Row="0" Grid.Column="1" Background="#A7896F" Content="{DynamicResource SaveAs}" Foreground="White" HorizontalAlignment="Right" Margin="0 0 10 0" Command="{Binding SaveUpdateCommand}"/>
<GridSplitter Grid.Row="1" Grid.ColumnSpan="2" Height="1" HorizontalAlignment="Stretch" Background="#BBBBBB" ></GridSplitter>
<Label Grid.Row="2" Content="{DynamicResource Language settings}" VerticalAlignment="Center" HorizontalAlignment="Center" Width="150" />
<ComboBox Grid.Row="2" Grid.Column="1" Background="White" Width="150" HorizontalAlignment="Left"
ItemsSource="{Binding Languages}" Margin="10 0" DisplayMemberPath="Key" SelectedValuePath="Value"
SelectedValue="{Binding LanguageId, Mode=TwoWay}" >
</ComboBox>
<GridSplitter Grid.Row="3" Grid.ColumnSpan="2" Height="1" HorizontalAlignment="Stretch" Background="#BBBBBB"></GridSplitter>
<Label Content="{DynamicResource UpdateFile}" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="5" Grid.Row="4" Grid.Column="0" Width="150"/>
<Grid Grid.Row="4" Grid.Column="1" Width="88" HorizontalAlignment="Left">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<CheckBox Grid.Row="0" Content="{DynamicResource TxtFile}" IsChecked="{Binding TxtFileChecked}"/>
<CheckBox Grid.Row="1" Content="{DynamicResource StlFile}" IsChecked="{Binding StlFileChecked}"/>
<CheckBox Grid.Row="2" Content="{DynamicResource ExcelFile}" IsChecked="{Binding ExcelFileChecked}"/>
<CheckBox Grid.Row="3" Content="{DynamicResource DatFile}" IsChecked="{Binding DatFileChecked}"/>
</Grid>
<GridSplitter Grid.Row="5" Grid.ColumnSpan="2" Height="1" HorizontalAlignment="Stretch" Background="#BBBBBB"></GridSplitter>
<Label Grid.Row="6" Content="{DynamicResource SavePath}" VerticalAlignment="Center" HorizontalAlignment="Center" Width="150"/>
<Grid Grid.Row="6" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBox TextWrapping="Wrap" Name ="filePath" Grid.Column="0" Text="{Binding FilePath}" Background="White" Width="300" HorizontalAlignment="Left"/>
<TextBlock Text="{DynamicResource Please enter}" Grid.Column="0" Foreground="#BBBBBB" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Visibility" Value="Collapsed"/>
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Text, ElementName=filePath}" Value="">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<Button Grid.Column="1" Background="#A7896F" Content="{DynamicResource Select}" Foreground="White" HorizontalAlignment="Left" Width="80" Command="{Binding SelectFileCommand}"/>
</Grid>
<GridSplitter Grid.Row="7" Grid.ColumnSpan="2" Height="1" HorizontalAlignment="Stretch" Background="#BBBBBB"></GridSplitter>
<Label Grid.Row="8" Grid.Column="0" Content="{DynamicResource GradeStandard}" VerticalAlignment="Center" HorizontalAlignment="Center" Width="150"/>
<ComboBox Grid.Row="8" Grid.Column="1" Background="White" Width="150" HorizontalAlignment="Left" ItemsSource="{Binding Rules}"
DisplayMemberPath="Key" SelectedValuePath="Value" SelectedValue="{Binding RuleId, Mode=TwoWay}"/>
<GridSplitter Grid.Row="9" Grid.ColumnSpan="2" Height="1" HorizontalAlignment="Stretch" Background="#BBBBBB"></GridSplitter>
</Grid>
</Border>