MainWindow.xaml 4.5 KB
<hc:Window
    x:Class="HHECS.LicenseTools.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:hc="https://handyorg.github.io/handycontrol"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    Title="授权码生成器"
    Width="800"
    Height="450"
    FontSize="16"
    ResizeMode="CanMinimize"
    ShowTitle="True"
    WindowStartupLocation="CenterScreen"
    mc:Ignorable="d">

    <Window.Resources>
        <Style TargetType="StackPanel">
            <Setter Property="Orientation" Value="Horizontal" />
        </Style>
        <Style BasedOn="{StaticResource ButtonBaseStyle}" TargetType="Button">
            <Setter Property="Background" Value="#FF6CB36C" />
            <Setter Property="BorderBrush" Value="#FF00A0A0" />
            <Setter Property="BorderThickness" Value="2" />
            <Setter Property="Foreground" Value="Black" />
            <Setter Property="Width" Value="150" />
        </Style>
    </Window.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="200" />
            </Grid.ColumnDefinitions>
            <StackPanel>
                <TextBlock
                    Width="75"
                    Margin="50,25,0,10"
                    Text="机器码:" />
                <TextBox
                    Name="txt_MachineCode"
                    Width="450"
                    Margin="10,20,10,10" />
            </StackPanel>
            <Button
                x:Name="btn_ClearData"
                Grid.Column="1"
                Width="80"
                Margin="30,20,70,10"
                Click="btn_ClearData_Click"
                Content="清空" />
        </Grid>
        <StackPanel Grid.Row="1">
            <TextBlock
                Width="75"
                Margin="50,15,0,10"
                Text="客户:" />
            <TextBox
                x:Name="txt_Custom"
                Width="240"
                Margin="10,10,10,10" />
        </StackPanel>
        <StackPanel Grid.Row="2">
            <TextBlock
                Width="75"
                Margin="50,15,0,10"
                Text="权限角色:" />
            <hc:ComboBox
                x:Name="cbx_Role"
                Width="240"
                Margin="10,10,10,10" />
            <TextBlock
                Width="75"
                Margin="20,15,0,10"
                Text="过期时间:" />
            <hc:DateTimePicker
                x:Name="dt_ExpireTime"
                Width="240"
                Margin="10,10,10,10" />
        </StackPanel>
        <Grid Grid.Row="3">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="200" />
            </Grid.ColumnDefinitions>
            <Border
                Margin="30"
                BorderBrush="#FF4B85ED"
                BorderThickness="1">
                <ScrollViewer>
                    <hc:TextBox
                        Name="txt_License"
                        Height="200"
                        TextWrapping="Wrap" />
                </ScrollViewer>
            </Border>
            <StackPanel Grid.Column="1" Orientation="Vertical">
                <Button
                    Name="BtnCreate"
                    Margin="10,40,20,10"
                    Background="#FFEEBB00"
                    Click="BtnCreate_Click"
                    Content="生成License" />
                <Button
                    Name="btn_Get"
                    Margin="10,10,20,10"
                    Click="btn_Get_Click"
                    Content="复制License" />
                <Button
                    Name="btn_Check"
                    Margin="10,10,20,10"
                    Click="btn_Check_Click"
                    Content="验证License" />
                <Button
                    Name="btn_ClearLicense"
                    Margin="10,10,20,10"
                    Click="btn_ClearLicense_Click"
                    Content="清空License" />
            </StackPanel>
        </Grid>
    </Grid>
</hc:Window>