Procházet zdrojové kódy

zhao:增加首页

master
耀 před 3 roky
rodič
revize
c3ffa44dd9

binární
XHPZ.Desktop/Images/Toobar5.png Zobrazit soubor


binární
XHPZ.Desktop/Images/microLessonSystem_19.png Zobrazit soubor


+ 20
- 2
XHPZ.Desktop/MainWindow.xaml Zobrazit soubor

@@ -5,12 +5,30 @@
5 5
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6 6
         xmlns:local="clr-namespace:XHPZ.Desktop"
7 7
         mc:Ignorable="d"
8
-        Title="MainWindow" Height="300" Width="300">
8
+        Title="MainWindow" 
9
+    WindowStyle="None" AllowsTransparency="True"    WindowState="Normal"
10
+    ShowInTaskbar="False"  Topmost="True" ResizeMode="NoResize" 
11
+        d:DesignHeight="250" Width="500" Height="250"  MouseMove="Window_MouseMove"  BorderThickness="7">
12
+    <Window.Effect>
13
+        <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
14
+    </Window.Effect>
9 15
     <Grid>
10
-        <TextBlock Text="欢迎使用批注!" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="28"/>
16
+        <TextBlock Text="欢迎使用星火批注!" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" Margin="0,0,0,35"/>
17
+        <TextBlock Text="使用点阵笔时自动批注,右键退出批注。" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" Margin="0,35,0,0"/>
11 18
         <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right"  Margin="10">
12 19
             <TextBlock Text="设备状态:" FontSize="18"/>
13 20
             <TextBlock x:Name="txbType" Text="未连接" FontSize="18"/>
14 21
         </StackPanel>
22
+        <Grid Grid.Row="0" Margin="0,0,0,190" Background="#FF00BAF4">
23
+            <Image Source="/Images/144.png" RenderTransformOrigin="0.1,0.61" HorizontalAlignment="Left" Margin="5,5,0,5" />
24
+            <Label x:Name="lblTitle" Content="星火批注" HorizontalAlignment="Left" Margin="45,7,0,0" VerticalAlignment="Top" Foreground="#FFFFFFFF" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" FontSize="20" FontWeight="Bold"/>
25
+            <Button Cursor="Hand" x:Name="BtnClose" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="30" HorizontalAlignment="Right" Margin="0,0,10,0" Click="BtnClose_Click"  >
26
+                <Image Source="./Images/Toobar5.png"/>
27
+            </Button>
28
+            <Button Cursor="Hand" x:Name="BtnMin" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="30" HorizontalAlignment="Right" Margin="0,0,50,0" Height="30" Click="BtnMin_Click"  >
29
+                <Image Source="./Images/microLessonSystem_19.png"/>
30
+            </Button>
31
+
32
+        </Grid>
15 33
     </Grid>
16 34
 </Window>

+ 30
- 0
XHPZ.Desktop/MainWindow.xaml.cs Zobrazit soubor

@@ -50,6 +50,36 @@ namespace XHPZ.Desktop
50 50
             APP.W_PracticeWindow.Initialize();
51 51
             APP.W_PracticeWindow.Show();
52 52
         }
53
+
54
+        private void Window_MouseMove(object sender, MouseEventArgs e)
55
+        {
56
+            if (e.LeftButton == MouseButtonState.Pressed)
57
+            {
58
+                //this.DragMove();              
59
+                DragMove();
60
+            }
61
+        }
62
+
63
+        private void BtnClose_Click(object sender, RoutedEventArgs e)
64
+        {
65
+            MessageBoxResult br = MessageWindow.Show("确定退出系统?", "退出", MessageBoxButton.OKCancel);
66
+            if (br == MessageBoxResult.OK)
67
+            {
68
+                System.Environment.Exit(0);
69
+            }
70
+        }
71
+
72
+        private void BtnMin_Click(object sender, RoutedEventArgs e)
73
+        {
74
+            if (WindowState == WindowState.Minimized)
75
+            {
76
+                WindowState = WindowState.Normal;
77
+            }
78
+            else
79
+            {
80
+                WindowState = WindowState.Minimized;
81
+            }
82
+        }
53 83
     }
54 84
 
55 85
 

+ 6
- 0
XHPZ.Desktop/XHPZ.Desktop.csproj Zobrazit soubor

@@ -149,5 +149,11 @@
149 149
   <ItemGroup>
150 150
     <Resource Include="xhpz.ico" />
151 151
   </ItemGroup>
152
+  <ItemGroup>
153
+    <Resource Include="Images\microLessonSystem_19.png" />
154
+  </ItemGroup>
155
+  <ItemGroup>
156
+    <Resource Include="Images\Toobar5.png" />
157
+  </ItemGroup>
152 158
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
153 159
 </Project>

Načítá se…
Zrušit
Uložit