123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- <Window
- x:Class="AILicenseGenerator.MainWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:extensions="clr-namespace:AILicenseGenerator.Extensions"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- Title="AILicenseGenerator"
- Width="800"
- Height="450"
- mc:Ignorable="d">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*" />
- <RowDefinition Height="50" />
- </Grid.RowDefinitions>
- <DataGrid
- x:Name="FunctionDataGrid"
- Grid.Row="0"
- Margin="10"
- AutoGenerateColumns="False">
- <DataGrid.Columns>
- <DataGridTemplateColumn Width="Auto" Header="功能名称">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock
- Margin="10,0,10,0"
- Text="{Binding FunctionName, Converter={extensions:TranslaterConverter}}"
- TextWrapping="Wrap" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Width="Auto" Header="版本">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock
- Margin="10,0,10,0"
- Text="{Binding Version}"
- TextWrapping="Wrap" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Width="Auto" Header="是否启用">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <CheckBox Margin="10,0,10,0" IsChecked="{Binding IsEnabled, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Width="Auto" Header="有效期">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock
- Margin="10,0,10,0"
- Text="{Binding ExpiredTime}"
- TextWrapping="Wrap" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Width="Auto" Header="引擎">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <DataGrid
- Margin="10"
- AutoGenerateColumns="False"
- ItemsSource="{Binding Engines}">
- <DataGrid.Columns>
- <DataGridTemplateColumn Width="Auto" Header="引擎名称">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock
- Margin="10,0,10,0"
- Text="{Binding EngineName, Converter={extensions:TranslaterConverter}}"
- TextWrapping="Wrap" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Width="Auto" Header="版本">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock
- Margin="10,0,10,0"
- Text="{Binding Version}"
- TextWrapping="Wrap" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Width="Auto" Header="提供方">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock
- Margin="10,0,10,0"
- Text="{Binding Vendor}"
- TextWrapping="Wrap" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Width="Auto" Header="是否启用">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <CheckBox Margin="10,0,10,0" IsChecked="{Binding IsEnabled, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
- <WrapPanel
- Grid.Row="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center">
- <CheckBox
- x:Name="AllFunctionEnableCheckBox"
- Margin="20,5"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Click="AllFunctionEnable_Click"
- Content="启用全部引擎版本"
- IsChecked="True" />
- <Button
- x:Name="FunctionSettingButton"
- Width="100"
- Height="30"
- Margin="20,5"
- Click="FunctionSettingButton_Click"
- Content="生成配置文件" />
- <Button
- x:Name="LicenseButton"
- Width="100"
- Height="30"
- Margin="20,5"
- Click="LicenseButton_Click"
- Content="生成License" />
- <Button
- x:Name="GenerateButton"
- Width="100"
- Height="30"
- Margin="20,5"
- Click="GenerateButton_Click"
- Content="全部生成" />
- <Button
- x:Name="LicenseDecryptButton"
- Width="100"
- Height="30"
- Margin="20,5"
- Click="LicenseDecryptButton_Click"
- Content="License解密" />
- </WrapPanel>
- </Grid>
- </Window>
|