Browse Source

Merge remote-tracking branch 'origin/zhangxueyang' into zyy

tags/录制修改前
耀 4 years ago
parent
commit
c5f6171209
2 changed files with 29 additions and 2 deletions
  1. 17
    1
      XHWK.WKTool/LoginWindow.xaml
  2. 12
    1
      XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs

+ 17
- 1
XHWK.WKTool/LoginWindow.xaml View File

55
                 </Setter.Value>
55
                 </Setter.Value>
56
             </Setter>
56
             </Setter>
57
         </Style>
57
         </Style>
58
+        <Style x:Key="NoMouseOverButtonStyle" TargetType="{x:Type Button}">
59
+            <Setter Property="BorderThickness" Value="1"/>
60
+            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
61
+            <Setter Property="HorizontalContentAlignment" Value="Center"/>
62
+            <Setter Property="VerticalContentAlignment" Value="Center"/>
63
+            <Setter Property="Padding" Value="1"/>
64
+            <Setter Property="Template">
65
+                <Setter.Value>
66
+                    <ControlTemplate TargetType="{x:Type Button}">
67
+                        <Border x:Name="Chrome" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
68
+                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
69
+                        </Border>
70
+                    </ControlTemplate>
71
+                </Setter.Value>
72
+            </Setter>
73
+        </Style>
58
     </Window.Resources>
74
     </Window.Resources>
59
     <Grid Background="#FFFFFF">
75
     <Grid Background="#FFFFFF">
60
         <!--分5行-->
76
         <!--分5行-->
69
         <Border Grid.Row="0" Background="#2D8CF0">
85
         <Border Grid.Row="0" Background="#2D8CF0">
70
             <Grid>
86
             <Grid>
71
                 <TextBlock Text="登录星火微课系统" Foreground="#FFFFFF" FontSize="16" Padding="10,13,0,0"/>
87
                 <TextBlock Text="登录星火微课系统" Foreground="#FFFFFF" FontSize="16" Padding="10,13,0,0"/>
72
-                <Button  Cursor="Hand" Grid.Row="0" x:Name="btnDown" Content="×" Foreground="#FFFFFF" FontSize="25" Padding="10,0,10,0" HorizontalAlignment="Right" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnDown_Click"/>
88
+                <Button  Cursor="Hand"  Grid.Row="0" x:Name="btnDown" Content="×" Background="Transparent" Foreground="#FFFFFF" FontSize="25" Padding="10,0,10,0" HorizontalAlignment="Right" Style="{StaticResource NoMouseOverButtonStyle}" Click="BtnDown_Click"/>
73
             </Grid>
89
             </Grid>
74
         </Border>
90
         </Border>
75
         <!--第二行 登陆 账号-->
91
         <!--第二行 登陆 账号-->

+ 12
- 1
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs View File

3459
         /// <param name="e"></param>
3459
         /// <param name="e"></param>
3460
         private void BtnLoginType_Click(object sender, RoutedEventArgs e)
3460
         private void BtnLoginType_Click(object sender, RoutedEventArgs e)
3461
         {
3461
         {
3462
-            Login();
3462
+            if ("未登录".Equals(txbLoginType.Text))
3463
+            {
3464
+                Login();
3465
+            }
3466
+            else
3467
+            {
3468
+                MessageBoxResult dr = MessageWindow.Show("确定退出登陆?", "提示", MessageBoxButton.OKCancel);
3469
+                if (dr == MessageBoxResult.OK)
3470
+                {
3471
+                    Login();
3472
+                }
3473
+            }
3463
         }
3474
         }
3464
         /// <summary>
3475
         /// <summary>
3465
         /// 登陆
3476
         /// 登陆

Loading…
Cancel
Save