|
6 | 6 | xmlns:local="clr-namespace:Mouser" |
7 | 7 | mc:Ignorable="d" |
8 | 8 | Topmost="True" |
9 | | - Title="Mouser" Height="120" Width="400"> |
| 9 | + ResizeMode="NoResize" |
| 10 | + Title="Mouser" |
| 11 | + Height="220" |
| 12 | + Width="450"> |
10 | 13 | <Grid x:Name="LayoutRoot"> |
11 | | - <Grid.ColumnDefinitions> |
12 | | - <ColumnDefinition Width="1*"/> |
13 | | - <ColumnDefinition Width="1*"/> |
14 | | - <ColumnDefinition Width="1*"/> |
15 | | - <ColumnDefinition Width="1*"/> |
16 | | - <ColumnDefinition Width="1*"/> |
17 | | - </Grid.ColumnDefinitions> |
18 | 14 | <Grid.RowDefinitions> |
19 | | - <RowDefinition/> |
20 | | - <RowDefinition/> |
| 15 | + <RowDefinition Height="Auto"/> |
| 16 | + <RowDefinition Height="Auto"/> |
| 17 | + <RowDefinition Height="Auto"/> |
| 18 | + <RowDefinition Height="Auto"/> |
21 | 19 | <RowDefinition/> |
22 | 20 | </Grid.RowDefinitions> |
| 21 | + <Grid.Resources> |
| 22 | + <Style TargetType="Button"> |
| 23 | + <Setter Property="Margin" Value="2"/> |
| 24 | + <Setter Property="FontSize" Value="16"/> |
| 25 | + <Setter Property="BorderThickness" Value="0.5"/> |
| 26 | + <!--<Setter Property="BorderBrush" Value="CornflowerBlue"/>--> |
| 27 | + <!--<Setter Property="Background" Value="#FFF5F5FF"/>--> |
| 28 | + <Style.Triggers> |
| 29 | + <Trigger Property="IsMouseOver" Value="True"> |
| 30 | + <Setter Property="Foreground" Value="CornflowerBlue"/> |
| 31 | + <Setter Property="BorderBrush" Value="CornflowerBlue"/> |
| 32 | + <Setter Property="Background" Value="Transparent"/> |
| 33 | + </Trigger> |
| 34 | + </Style.Triggers> |
| 35 | + </Style> |
| 36 | + </Grid.Resources> |
23 | 37 |
|
24 | | - <ProgressBar x:Name="ProgressBar" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="5" BorderThickness="0"/> |
| 38 | + <ProgressBar x:Name="ProgressBar" Grid.Row="0" Grid.Column="0" BorderThickness="0" Height="5" Background="Transparent"/> |
25 | 39 |
|
26 | | - <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="5" VerticalAlignment="Center" |
27 | | - FontSize="20" |
28 | | - Text="Alt+F12结束播放"/> |
| 40 | + <Grid Grid.Row="1"> |
| 41 | + <Grid.ColumnDefinitions> |
| 42 | + <ColumnDefinition Width="Auto"/> |
| 43 | + <ColumnDefinition Width="Auto"/> |
| 44 | + <ColumnDefinition/> |
| 45 | + </Grid.ColumnDefinitions> |
| 46 | + |
| 47 | + <Button Grid.Column="0" |
| 48 | + BorderThickness="0" |
| 49 | + Margin="10" |
| 50 | + Padding="10" |
| 51 | + Cursor="Hand" |
| 52 | + Click="BtnToolSpeed_OnClick" |
| 53 | + Background="Transparent" |
| 54 | + HorizontalAlignment="Left"> |
| 55 | + <Image Source="Resources/toolspeed.png" Stretch="Uniform" Width="32" Height="32"/> |
| 56 | + </Button> |
| 57 | + <Button Grid.Column="1" |
| 58 | + BorderThickness="0" |
| 59 | + Margin="10" |
| 60 | + Padding="10" |
| 61 | + Cursor="Hand" |
| 62 | + Click="BtnGithub_OnClick" |
| 63 | + Background="Transparent" |
| 64 | + HorizontalAlignment="Left"> |
| 65 | + <Image Source="Resources/github.png" Height="32" Width="32"/> |
| 66 | + </Button> |
| 67 | + <TextBlock Grid.Column="2" |
| 68 | + VerticalAlignment="Center" |
| 69 | + FontSize="20" |
| 70 | + Margin="10" |
| 71 | + Text="Alt + F12 结束播放"/> |
| 72 | + </Grid> |
29 | 73 |
|
30 | | - <Button x:Name="BtnStart" BorderThickness="0" Grid.Column="0" Grid.Row="1" Content="Start" Click="BtnStart_OnClick"/> |
31 | | - <Button x:Name="BtnEnd" BorderThickness="0" Grid.Column="1" Grid.Row="1" Content="End" Click="BtnEnd_OnClick"/> |
32 | | - <Button x:Name="BtnPlay" BorderThickness="0" Grid.Column="2" Grid.Row="1" Content="Play" Click="BtnPlay_OnClick"/> |
33 | | - <Button x:Name="BtnSave" BorderThickness="0" Grid.Column="3" Grid.Row="1" Content="Save" Click="BtnSave_OnClick"/> |
34 | | - <Button x:Name="BtnLoad" BorderThickness="0" Grid.Column="4" Grid.Row="1" Content="Load" Click="BtnLoad_OnClick"/> |
| 74 | + <TextBlock x:Name="TbkInfo" Grid.Row="3" Grid.Column="0" Margin="10,0"/> |
35 | 75 |
|
36 | | - <TextBlock x:Name="TbkInfo" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4"/> |
| 76 | + <Grid Grid.Row="4" Grid.Column="0" Margin="2,10,2,2"> |
| 77 | + <Grid.ColumnDefinitions> |
| 78 | + <ColumnDefinition Width="3*"/> |
| 79 | + <ColumnDefinition Width="3*"/> |
| 80 | + <ColumnDefinition Width="2*"/> |
| 81 | + <ColumnDefinition Width="2*"/> |
| 82 | + <ColumnDefinition Width="2*"/> |
| 83 | + </Grid.ColumnDefinitions> |
| 84 | + <Button x:Name="BtnStart" Grid.Column="0" Content="录制 
 Alt + F9" Click="BtnStart_OnClick" TextBlock.TextAlignment="Center"/> |
| 85 | + <Button x:Name="BtnEnd" Grid.Column="1" Content="停止 
 Alt + F10" Click="BtnEnd_OnClick" TextBlock.TextAlignment="Center"/> |
| 86 | + <Button x:Name="BtnPlay" Grid.Column="2" Content="播放" Click="BtnPlay_OnClick"/> |
| 87 | + <Button x:Name="BtnSave" Grid.Column="3" Content="保存" Click="BtnSave_OnClick"/> |
| 88 | + <Button x:Name="BtnLoad" Grid.Column="4" Content="加载" Click="BtnLoad_OnClick"/> |
| 89 | + </Grid> |
37 | 90 | </Grid> |
38 | 91 | </Window> |
0 commit comments