Explorar el Código

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

tags/录制修改前
耀 hace 4 años
padre
commit
fbf9789e1b

+ 1
- 1
XHWK.WKTool/CountdownWindow.xaml.cs Ver fichero

@@ -41,7 +41,7 @@ namespace XHWK.WKTool
41 41
             win.Topmost = true;
42 42
             win.Show();
43 43
             //显示在右下角
44
-            double xpos = this.Left + this.Width - win.Width + 180;
44
+            double xpos = this.Left + this.Width - win.Width-10;
45 45
             double ypos = this.Top + this.Height - win.Height - 60;
46 46
 
47 47
 

+ 49
- 38
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml Ver fichero

@@ -5,7 +5,7 @@
5 5
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6 6
         xmlns:local="clr-namespace:XHWK.WKTool"
7 7
         mc:Ignorable="d"
8
-        Title="ScreenRecordingToolbarWindow" Height="450" Width="800" AllowsTransparency="True" 
8
+        Title="ScreenRecordingToolbarWindow" Height="450" Width="300" AllowsTransparency="True" 
9 9
     ShowInTaskbar="False"
10 10
     WindowStartupLocation="CenterOwner"
11 11
     WindowStyle="None">
@@ -18,47 +18,58 @@
18 18
                 <RowDefinition Height="auto"/>
19 19
                 <RowDefinition Height="auto"/>
20 20
             </Grid.RowDefinitions>
21
-            <Image Grid.Row="0"  Source="./Images/Toobar22.png" HorizontalAlignment="Right"/>
22
-            <StackPanel Grid.Row="0" Orientation="Vertical" HorizontalAlignment="Right" Margin="0,5,10,0">
23
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
24
-                    <Image Source="./Images/Toobar5.png"/>
25
-                </Button>
26
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
27
-                    <Image Source="./Images/Toobar12.png"/>
28
-                </Button>
29
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
30
-                    <Image Source="./Images/Toobar9.png"/>
31
-                </Button>
32
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
33
-                    <Image Source="./Images/Toobar16.png"/>
34
-                </Button>
35
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
36
-                    <Image Source="./Images/Toobar3.png"/>
37
-                </Button>
38
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
39
-                    <Image Source="./Images/Toobar23.png"/>
40
-                </Button>
41
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
42
-                    <Image Source="./Images/Toobar1.png"/>
43
-                </Button>
44
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
45
-                    <Image Source="./Images/Toobar18.png"/>
46
-                </Button>
47
-            </StackPanel>
48
-            <!--字体粗细-->
49
-            <Image Grid.Row="0"  Source="./Images/Toobar20.png" HorizontalAlignment="Right" Margin="0,200,62,0" Visibility="Visible"/>
50
-            <StackPanel Grid.Row="0" Orientation="Vertical" HorizontalAlignment="Right" Margin="0,200,62,0" Visibility="Visible">
51
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="3" Width="20" Margin="0,0,0,0"/>
52
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="5" Width="20" Margin="0,10,0,0"/>
53
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="10" Width="20" Margin="0,10,0,0"/>
54
-            </StackPanel>
21
+            <!--画笔工具栏-->
22
+            <Grid Grid.Row="0" x:Name="gridToolbar" Visibility="Visible">
23
+                <Image Grid.Row="0"  Source="./Images/Toobar22.png" HorizontalAlignment="Right"/>
24
+                <StackPanel Grid.Row="0" Orientation="Vertical" HorizontalAlignment="Right" Margin="0,5,10,0">
25
+                    <Button x:Name="btnToolbarDown" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0" Click="BtnToolbarDown_Click">
26
+                        <Image Source="./Images/Toobar5.png"/>
27
+                    </Button>
28
+                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
29
+                        <Image Source="./Images/Toobar12.png"/>
30
+                    </Button>
31
+                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
32
+                        <Image Source="./Images/Toobar9.png"/>
33
+                    </Button>
34
+                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
35
+                        <Image Source="./Images/Toobar16.png"/>
36
+                    </Button>
37
+                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
38
+                        <Image Source="./Images/Toobar3.png"/>
39
+                    </Button>
40
+                    <Button x:Name="btnColour" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0" Click="BtnColour_Click">
41
+                        <Image Source="./Images/Toobar23.png"/>
42
+                    </Button>
43
+                    <Button x:Name="btnThickness" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0" Click="BtnThickness_Click">
44
+                        <Image Source="./Images/Toobar1.png"/>
45
+                    </Button>
46
+                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,5,0,0">
47
+                        <Image Source="./Images/Toobar18.png"/>
48
+                    </Button>
49
+                </StackPanel>
50
+            </Grid>
51
+            <!--字体颜色-->
52
+            <Grid Grid.Row="0" x:Name="gridColour" Visibility="Collapsed">
53
+                <Image Source="./Images/Toobar20.png" HorizontalAlignment="Right" Margin="0,200,62,0"/>
54
+                <StackPanel Orientation="Vertical" HorizontalAlignment="Right" Margin="0,215,68,0">
55
+                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="15" Width="15" Margin="0,0,0,0"/>
56
+                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FF0000" Height="15" Width="15" Margin="0,8,0,0"/>
57
+                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#A7A9AC" Height="15" Width="15" Margin="0,8,0,0"/>
58
+                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#63D600" Height="15" Width="15" Margin="0,8,0,0"/>
59
+                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFBC00" Height="15" Width="15" Margin="0,8,0,0"/>
60
+                    <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#00B4FC" Height="15" Width="15" Margin="0,8,0,0"/>
61
+                </StackPanel>
62
+            </Grid>
55 63
             <!--字体粗细-->
56
-            <Image Grid.Row="0"  Source="./Images/Toobar21.png" HorizontalAlignment="Right" Margin="0,200,62,0" Visibility="Collapsed"/>
57
-            <StackPanel Grid.Row="0" Orientation="Vertical" HorizontalAlignment="Right" Margin="0,260,62,0" Visibility="Collapsed">
64
+            <Grid Grid.Row="0" x:Name="gridThickness" Visibility="Collapsed">
65
+                <Image Grid.Row="0"  Source="./Images/Toobar21.png" HorizontalAlignment="Right" Margin="0,200,62,0"/>
66
+            <StackPanel Grid.Row="0" Orientation="Vertical" HorizontalAlignment="Right" Margin="0,260,62,0">
58 67
                 <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="3" Width="20" Margin="0,0,0,0"/>
59 68
                 <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="5" Width="20" Margin="0,10,0,0"/>
60 69
                 <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="#FFFFFF" Height="10" Width="20" Margin="0,10,0,0"/>
61 70
             </StackPanel>
71
+            </Grid>
72
+            
62 73
                 <Image Grid.Row="1"  Source="./Images/Toobar0.png"/>
63 74
             <TextBlock Grid.Row="1" Text="01:35" FontSize="23" Foreground="#FFFFFF" Margin="30,50,0,0"/>
64 75
             <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,15,0">
@@ -68,7 +79,7 @@
68 79
                 <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,15,0">
69 80
                     <Image Source="./Images/Toobar14.png"/>
70 81
                 </Button>
71
-                <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,10,0">
82
+                <Button x:Name="btnBrush" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,10,0" Click="BtnBrush_Click">
72 83
                     <Image Source="./Images/Toobar8.png"/>
73 84
                 </Button>
74 85
             </StackPanel>

+ 38
- 0
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs Ver fichero

@@ -23,5 +23,43 @@ namespace XHWK.WKTool
23 23
         {
24 24
             InitializeComponent();
25 25
         }
26
+        /// <summary>
27
+        /// 画笔工具栏关闭事件
28
+        /// </summary>
29
+        /// <param name="sender"></param>
30
+        /// <param name="e"></param>
31
+        private void BtnToolbarDown_Click(object sender, RoutedEventArgs e)
32
+        {
33
+            gridToolbar.Visibility = Visibility.Hidden;
34
+        }
35
+        /// <summary>
36
+        /// 画笔点击事件
37
+        /// </summary>
38
+        /// <param name="sender"></param>
39
+        /// <param name="e"></param>
40
+        private void BtnBrush_Click(object sender, RoutedEventArgs e)
41
+        {
42
+            gridToolbar.Visibility = Visibility.Visible;
43
+        }
44
+        /// <summary>
45
+        /// 画笔粗细事件
46
+        /// </summary>
47
+        /// <param name="sender"></param>
48
+        /// <param name="e"></param>
49
+        private void BtnThickness_Click(object sender, RoutedEventArgs e)
50
+        {
51
+            gridThickness.Visibility = Visibility.Visible;
52
+            gridColour.Visibility = Visibility.Collapsed;
53
+        }
54
+        /// <summary>
55
+        /// 画笔颜色事件
56
+        /// </summary>
57
+        /// <param name="sender"></param>
58
+        /// <param name="e"></param>
59
+        private void BtnColour_Click(object sender, RoutedEventArgs e)
60
+        {
61
+            gridColour.Visibility = Visibility.Visible;
62
+            gridThickness.Visibility = Visibility.Collapsed;
63
+        }
26 64
     }
27 65
 }

Loading…
Cancelar
Guardar