<Window
    x:Class="HBLConsole.DialogWindow.View.SimOrderConfitView"
    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:local="clr-namespace:HBLConsole.DialogWindow.View"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vm="clr-namespace:HBLConsole.DialogWindow.ViewModel"
    Title="SimOrderConfitView"
    Width="400"
    Height="275"
    AllowsTransparency="True"
    Background="{x:Null}"
    Opacity="0.8"
    Topmost="True"
    WindowStartupLocation="CenterScreen"
    WindowStyle="None"
    mc:Ignorable="d">

    <Window.DataContext>
        <vm:SimOrderConfitViewModel />
    </Window.DataContext>

    <Window.Resources>
        <ResourceDictionary Source="../../Resources/ResourceDictionarys/BasicStyle.xaml">
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary>
                    <Style x:Key="buttonStyle" TargetType="Button">
                        <Setter Property="FontFamily" Value="楷体" />
                        <Setter Property="Width" Value="100" />
                        <Setter Property="FontSize" Value="18" />
                        <Setter Property="Foreground" Value="Aqua" />
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="Button">
                                    <Grid x:Name="gr">
                                        <ContentControl
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Content="{TemplateBinding Content}"
                                            Foreground="{TemplateBinding Foreground}" />
                                        <Polygon
                                            x:Name="poly"
                                            Points="0 0,80 0,100 30,20 30"
                                            Stroke="#FF34F7F7"
                                            StrokeThickness="2" />
                                    </Grid>
                                    <ControlTemplate.Triggers>
                                        <Trigger Property="IsMouseOver" Value="True">
                                            <Setter TargetName="poly" Property="Fill" Value="#2234F7F7" />
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <Grid Background="#103153">
        <Grid.RowDefinitions>
            <RowDefinition Height="35" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <!--#region 标题栏设置-->
        <Border
            x:Name="MoveBorder"
            Height="35"
            VerticalAlignment="Top"
            Background="#0C2349"
            BorderBrush="#55ffffff"
            BorderThickness="0,0,0,1">
            <StackPanel Orientation="Horizontal">
                <Image Margin="15,5,0,5" Source="../../Resources/Images/hbl.png" />
                <TextBlock
                    Name="tbTitle"
                    Margin="10,0"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    FontSize="18"
                    Foreground="White"
                    Text="模拟设备参数配置" />
            </StackPanel>
        </Border>

        <UniformGrid
            Width="150"
            Height="30"
            HorizontalAlignment="Right"
            Columns="3">
            <Button
                Name="ButMin"
                Content="&#xe664;"
                Style="{StaticResource TitleBarStyle}"
                Visibility="Hidden" />
            <Button
                Name="ButMax"
                Content="&#xe65d;"
                Style="{StaticResource TitleBarStyle}"
                Visibility="Hidden" />
            <Button
                Name="ButClose"
                Content="&#xe639;"
                FontSize="30"
                Style="{StaticResource TitleBarStyle}" />
        </UniformGrid>
        <!--#endregion-->

        <!--#region 内容显示区-->
        <Grid Grid.Row="1" Margin="10">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>

            <TextBlock
                HorizontalAlignment="Right"
                VerticalAlignment="Center"
                FontFamily="楷体"
                FontSize="18"
                Foreground="#FF34F7F7"
                Text="请输入模拟数据名称：" />
            <TextBox
                Grid.Column="1"
                Margin="0,10"
                VerticalAlignment="Center"
                Background="Transparent"
                BorderBrush="#FF23CACA"
                CaretBrush="Aqua"
                FontFamily="楷体"
                FontSize="21"
                Foreground="#ff34f7f7"
                Text="{Binding Name}" />

            <TextBlock
                Grid.Row="1"
                HorizontalAlignment="Right"
                VerticalAlignment="Center"
                FontFamily="楷体"
                FontSize="20"
                Foreground="#FF34F7F7"
                Text="模拟位置最小值：" />
            <TextBox
                Grid.Row="1"
                Grid.Column="1"
                Margin="0,10"
                VerticalAlignment="Center"
                Background="Transparent"
                BorderBrush="#FF23CACA"
                CaretBrush="Aqua"
                FontFamily="楷体"
                FontSize="21"
                Foreground="#ff34f7f7"
                Text="{Binding Min}" />

            <TextBlock
                Grid.Row="2"
                HorizontalAlignment="Right"
                VerticalAlignment="Center"
                FontFamily="楷体"
                FontSize="20"
                Foreground="#FF34F7F7"
                Text="模拟位置最大值：" />
            <TextBox
                Grid.Row="2"
                Grid.Column="1"
                Margin="0,10"
                VerticalAlignment="Center"
                Background="Transparent"
                BorderBrush="#FF23CACA"
                CaretBrush="Aqua"
                FontFamily="楷体"
                FontSize="21"
                Foreground="#ff34f7f7"
                Text="{Binding Max}" />


            <Button
                Grid.Row="3"
                Margin="20,10"
                Command="{Binding CancelCommand}"
                Content="取消"
                Style="{StaticResource buttonStyle}" />
            <Button
                Grid.Row="3"
                Grid.Column="1"
                Margin="20,10"
                Command="{Binding ConfirmCommand}"
                Content="确认"
                Style="{StaticResource buttonStyle}" />

        </Grid>
        <!--#endregion-->

    </Grid>
</Window>
