<Window
    x:Class="XHWK.WKTool.LoginWindow"
    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:XHWK.WKTool"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    Title="LoginWindow"
    Width="312"
    Height="497"
    AllowsTransparency="True"
    BorderBrush="#eeeeee"
    BorderThickness="1"
    ShowInTaskbar="False"
    WindowStartupLocation="CenterOwner"
    WindowStyle="None"
    mc:Ignorable="d">

    <Window.Resources>
        <Style x:Key="CheckBoxStyle1" TargetType="{x:Type CheckBox}">
            <Setter Property="OverridesDefaultStyle" Value="True" />
            <Setter Property="SnapsToDevicePixels" Value="True" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type CheckBox}">
                        <BulletDecorator VerticalAlignment="Center" FlowDirection="LeftToRight">
                            <BulletDecorator.Bullet>
                                <Border
                                    x:Name="bd"
                                    MinWidth="13"
                                    MinHeight="13"
                                    VerticalAlignment="Center"
                                    Background="White"
                                    BorderBrush="#B2B2B2"
                                    BorderThickness="1">
                                    <Path
                                        x:Name="cp"
                                        Width="12"
                                        Height="12"
                                        Stroke="#3F6FFF"
                                        StrokeThickness="2" />
                                </Border>

                            </BulletDecorator.Bullet>
                            <TextBlock
                                x:Name="textBlock"
                                Margin="2,0"
                                FontFamily="Microsoft YaHei UI"
                                FontSize="13.333"
                                Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" />
                        </BulletDecorator>
                        <!--
                            控件触发器
                        -->
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsChecked" Value="True">
                                <!--  画上一个勾  -->
                                <Setter TargetName="cp" Property="Data" Value="M 2,6 L 5,9 11,2" />
                                <Setter TargetName="textBlock" Property="Foreground" Value="#FFE60E0E" />

                            </Trigger>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="bd" Property="BorderBrush" Value="#1583DD" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Grid>
        <Border
            Background="White"
            CornerRadius="15"
            MouseLeftButtonDown="Border_MouseLeftButtonDown">
            <Grid>
                <Image
                    Width="80"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    Source="/SkinImages/ImgCarousel/CM_RightDown.png" />
                <!--  创建内页 375  -->
                <Grid
                    x:Name="GridLoginPage"
                    Margin="20,0"
                    Visibility="Visible">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="100*" />
                        <RowDefinition Height="70*" />
                        <RowDefinition Height="70*" />
                        <RowDefinition Height="15*" />
                        <RowDefinition Height="120*" />
                    </Grid.RowDefinitions>
                    <Grid Grid.Row="0">
                        <StackPanel Margin="0,30,0,0">
                            <Label
                                HorizontalAlignment="Left"
                                VerticalAlignment="Top"
                                Content="登录"
                                FontSize="28"
                                Foreground="#FF4B62EA" />
                            <Label
                                HorizontalAlignment="Left"
                                VerticalAlignment="Top"
                                Content="星火微课系统"
                                FontSize="14"
                                Foreground="#FF000000" />
                        </StackPanel>
                    </Grid>
                    <!--  账号  -->
                    <Grid Grid.Row="1">
                        <StackPanel VerticalAlignment="Center">
                            <Label
                                Content="账号:"
                                FontSize="12"
                                Foreground="#FF666666" />
                            <TextBox
                                x:Name="TxbAccountNumber"
                                Margin="5,5"
                                BorderBrush="{x:Null}"
                                BorderThickness="0"
                                FontSize="14"
                                Foreground="#FF999999"
                                InputMethod.IsInputMethodEnabled="False"
                                PreviewTextInput="txbAccountNumber_PreviewTextInput"
                                Text="" />
                            <Label Height="1.5" Background="#3F6FFF" />
                        </StackPanel>
                    </Grid>
                    <!--  密码  -->
                    <Grid Grid.Row="2">
                        <StackPanel VerticalAlignment="Center">
                            <Label
                                Content="密码:"
                                FontSize="12"
                                Foreground="#FF666666" />
                            <PasswordBox
                                x:Name="pobPassword"
                                Margin="5,5"
                                BorderBrush="{x:Null}"
                                BorderThickness="0"
                                FontSize="14"
                                Foreground="#FF999999"
                                PasswordChar="*" />
                            <Label Height="1.5" Background="#3F6FFF" />
                        </StackPanel>
                        <!--<StackPanel Grid.Row="2" Orientation="Horizontal" Margin="30,0,30,1" Grid.ColumnSpan="2">
                                <Label Content="*" FontSize="18" Padding="0,27,0,0" Foreground="#FF0000"/>
                                <TextBlock Text="存放路径" FontSize="18" Padding="2,23,10,0"/>
                        -->
                        <!--  输入框  -->
                        <!--
                                <Border Background="#CDD6E0" Width="200" Height="43" CornerRadius="3">
                                    <TextBox x:Name="txbStoragePath" Text="D:\" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="198" Height="41" BorderBrush="{x:Null}" BorderThickness="0"/>
                                </Border>
                        -->
                        <!--  浏览按钮  -->
                        <!--
                                <Button Cursor="Hand" x:Name="btnBrowse" FontSize="18" Width="80" Height="43" BorderBrush="#cccccc" BorderThickness="1" Click="BtnBrowse_Click" Content="浏览" Style="{StaticResource Button_Menu}"
                                Background="#F7F7F7" Margin="11,0,0,0"/>
                            </StackPanel>-->
                    </Grid>
                    <!--  记住密码 切换网络  -->
                    <Grid Grid.Row="3">
                        <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
                            <Viewbox Margin="0,0,5,0" VerticalAlignment="Center">
                                <CheckBox
                                    x:Name="CkSaveName"
                                    Click="CkSaveName_Click"
                                    Cursor="Hand"
                                    Style="{DynamicResource CheckBoxStyle1}" />
                            </Viewbox>
                            <TextBlock
                                VerticalAlignment="Center"
                                FontSize="10"
                                Foreground="#FFB2B2B2"
                                Text="记住账号" />
                        </StackPanel>

                        <Label
                            x:Name="LblCreate"
                            Margin="0"
                            HorizontalAlignment="Right"
                            Content="创建微课中..."
                            FontSize="12"
                            Foreground="#FF999999"
                            Visibility="Hidden" />
                    </Grid>
                    <!--  按钮  -->
                    <Grid Grid.Row="4">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="35*" />
                            <RowDefinition Height="35*" />
                            <RowDefinition Height="5*" />
                            <RowDefinition Height="35*" />
                            <RowDefinition Height="15*" />
                            <RowDefinition Height="25*" />
                            <RowDefinition Height="5*" />
                        </Grid.RowDefinitions>
                        <Button
                            x:Name="BtnStart"
                            Grid.Row="1"
                            Grid.ColumnSpan="2"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            HorizontalContentAlignment="Center"
                            VerticalContentAlignment="Center"
                            Click="BtnStart_Click"
                            Content="登录"
                            Cursor="Hand"
                            FontSize="18"
                            Foreground="#FFFFFF"
                            IsDefault="True">
                            <Button.Template>
                                <ControlTemplate TargetType="{x:Type Button}">
                                    <Border
                                        BorderBrush="{TemplateBinding Control.BorderBrush}"
                                        BorderThickness="1"
                                        CornerRadius="20">
                                        <Border.Background>#3F6FFF</Border.Background>
                                        <ContentPresenter
                                            Margin="0,5"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Content="{TemplateBinding ContentControl.Content}" />
                                    </Border>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>
                        <Button
                            x:Name="BtnStop"
                            Grid.Row="3"
                            Grid.ColumnSpan="2"
                            Margin="0"
                            Padding="2"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            HorizontalContentAlignment="Center"
                            VerticalContentAlignment="Center"
                            Click="BtnDown_Click"
                            Content="关闭"
                            Cursor="Hand"
                            FontSize="18"
                            Foreground="#FFFFFF"
                            IsDefault="True">
                            <Button.Template>
                                <ControlTemplate TargetType="{x:Type Button}">
                                    <Border
                                        BorderBrush="{TemplateBinding Control.BorderBrush}"
                                        BorderThickness="1"
                                        CornerRadius="20">
                                        <Border.Background>#FFC3C3C3</Border.Background>
                                        <ContentPresenter
                                            Margin="0,5"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Content="{TemplateBinding ContentControl.Content}" />
                                    </Border>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>

                        <Button
                            x:Name="BtnServiceAddress"
                            Grid.Row="5"
                            Margin="0"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Stretch"
                            Click="BtnServiceAddress_Click"
                            Cursor="Hand"
                            FontSize="{Binding WordSize12}">
                            <Button.Template>
                                <ControlTemplate TargetType="{x:Type Button}">
                                    <Grid>
                                        <Label
                                            x:Name="Word"
                                            Grid.Column="1"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Content="服务地址设置"
                                            FontSize="{TemplateBinding FontSize}"
                                            Foreground="#FFC3C3C3" />
                                    </Grid>
                                    <ControlTemplate.Triggers>
                                        <Trigger Property="IsMouseOver" Value="True">
                                            <Setter TargetName="Word" Property="Foreground" Value="#FF3F6FFF" />
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>
                    </Grid>
                </Grid>
                <Grid
                    x:Name="GridServiceAddress"
                    Margin="20,0"
                    Visibility="Collapsed">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="100*" />
                        <RowDefinition Height="80*" />
                        <RowDefinition Height="70*" />
                        <RowDefinition Height="15*" />
                        <RowDefinition Height="120*" />
                    </Grid.RowDefinitions>
                    <Grid Grid.Row="0">
                        <StackPanel Margin="0,30,0,0">
                            <Label
                                HorizontalAlignment="Left"
                                VerticalAlignment="Top"
                                Content="服务地址"
                                FontSize="28"
                                Foreground="#FF4B62EA" />
                            <Label
                                HorizontalAlignment="Left"
                                VerticalAlignment="Top"
                                Content="设置"
                                FontSize="14"
                                Foreground="#FF000000" />
                        </StackPanel>
                    </Grid>

                    <!--  服务地址  -->
                    <Grid Grid.Row="1">
                        <StackPanel VerticalAlignment="Center">
                            <Label
                                Content="服务地址:"
                                FontSize="12"
                                Foreground="#FF666666" />
                            <TextBox
                                x:Name="TbxServiceAddress"
                                Margin="5,5"
                                BorderBrush="{x:Null}"
                                BorderThickness="0"
                                FontSize="14"
                                Foreground="#FF999999"
                                InputMethod.IsInputMethodEnabled="False"
                                Text="" />
                            <Label Height="1.5" Background="#3F6FFF" />
                        </StackPanel>
                    </Grid>

                    <!--  切换网络  -->
                    <Grid Grid.Row="2">
                        <StackPanel VerticalAlignment="Center">
                            <Label
                                Content="切换网络:"
                                FontSize="12"
                                Foreground="#FF666666" />
                            <StackPanel
                                Grid.Row="6"
                                Margin="0,10,0,0"
                                HorizontalAlignment="Left"
                                Orientation="Horizontal">
                                <RadioButton
                                    x:Name="RbnIsOutsideSchool"
                                    Margin="20,0,0,0"
                                    HorizontalAlignment="Left"
                                    VerticalContentAlignment="Center"
                                    Checked="RbnIsOutsideSchool_Checked"
                                    Content="校外"
                                    FontSize="14"
                                    Foreground="#FF333333"
                                    IsChecked="True" />
                                <RadioButton
                                    x:Name="RbnSchool"
                                    Margin="20,0,0,0"
                                    HorizontalAlignment="Left"
                                    VerticalContentAlignment="Center"
                                    Checked="RbnSchool_Checked"
                                    Content="校内"
                                    FontSize="14"
                                    Foreground="#FF333333" />
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                    <!--  按钮  -->
                    <Grid Grid.Row="4">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="35*" />
                            <RowDefinition Height="35*" />
                            <RowDefinition Height="5*" />
                            <RowDefinition Height="35*" />
                            <RowDefinition Height="15*" />
                            <RowDefinition Height="25*" />
                            <RowDefinition Height="5*" />
                        </Grid.RowDefinitions>
                        <Button
                            x:Name="BtnSetServiceAddress"
                            Grid.Row="1"
                            Grid.ColumnSpan="2"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            HorizontalContentAlignment="Center"
                            VerticalContentAlignment="Center"
                            Click="BtnSetServiceAddress_Click"
                            Content="设置"
                            Cursor="Hand"
                            FontSize="18"
                            FontWeight="Bold"
                            Foreground="#FFFFFF"
                            IsDefault="True">
                            <Button.Template>
                                <ControlTemplate TargetType="{x:Type Button}">
                                    <Border
                                        BorderBrush="{TemplateBinding Control.BorderBrush}"
                                        BorderThickness="1"
                                        CornerRadius="20">
                                        <Border.Background>#3F6FFF</Border.Background>
                                        <ContentPresenter
                                            Margin="0,5"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Content="{TemplateBinding ContentControl.Content}" />
                                    </Border>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>
                        <Button
                            x:Name="BtnCancel"
                            Grid.Row="3"
                            Grid.ColumnSpan="2"
                            Margin="0"
                            Padding="2"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            HorizontalContentAlignment="Center"
                            VerticalContentAlignment="Center"
                            Click="BtnCancel_Click"
                            Content="取消"
                            Cursor="Hand"
                            FontSize="18"
                            FontWeight="Bold"
                            Foreground="#FFFFFF"
                            IsDefault="True">
                            <Button.Template>
                                <ControlTemplate TargetType="{x:Type Button}">
                                    <Border
                                        BorderBrush="{TemplateBinding Control.BorderBrush}"
                                        BorderThickness="1"
                                        CornerRadius="20">
                                        <Border.Background>#FFC3C3C3</Border.Background>
                                        <ContentPresenter
                                            Margin="0,5"
                                            HorizontalAlignment="Center"
                                            VerticalAlignment="Center"
                                            Content="{TemplateBinding ContentControl.Content}" />
                                    </Border>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>

                    </Grid>
                </Grid>
            </Grid>
        </Border>
    </Grid>
</Window>
