Browse Source

去掉主窗口灰边,优化窗口 功能页面切换。

tags/录制修改前
zhangxueyang 4 years ago
parent
commit
9412d466a0

+ 4
- 0
XHWK.WKTool/CreateAMicroLessonWindow.xaml.cs View File

132
             if (APP.W_XHMicroLessonSystemWindow == null)
132
             if (APP.W_XHMicroLessonSystemWindow == null)
133
             {
133
             {
134
                 APP.W_XHMicroLessonSystemWindow = new XHMicroLessonSystemWindow();
134
                 APP.W_XHMicroLessonSystemWindow = new XHMicroLessonSystemWindow();
135
+
135
                 //APP.W_XHMicroLessonSystemWindow .Topmost = true;
136
                 //APP.W_XHMicroLessonSystemWindow .Topmost = true;
136
             }
137
             }
137
             APP.W_XHMicroLessonSystemWindow.Show();
138
             APP.W_XHMicroLessonSystemWindow.Show();
138
             this.Hide();
139
             this.Hide();
139
         }
140
         }
141
+        double screeHeight = SystemParameters.FullPrimaryScreenHeight;
142
+
143
+        double screeWidth = SystemParameters.FullPrimaryScreenWidth;
140
         /// <summary>
144
         /// <summary>
141
         /// 窗体移动
145
         /// 窗体移动
142
         /// </summary>
146
         /// </summary>

+ 33
- 1
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs View File

1
-using Common.system;
1
+using Aspose.Pdf.Text;
2
+using Common.system;
2
 
3
 
3
 using System;
4
 using System;
4
 using System.Configuration;
5
 using System.Configuration;
62
         /// 🖊状态 0红色 1蓝色 10红色批注内 11蓝色批注内
63
         /// 🖊状态 0红色 1蓝色 10红色批注内 11蓝色批注内
63
         /// </summary>
64
         /// </summary>
64
        public int flg = 0;
65
        public int flg = 0;
66
+        System.Timers.Timer timer = new System.Timers.Timer();
65
         #endregion
67
         #endregion
66
 
68
 
67
         #region 初始化
69
         #region 初始化
77
         /// </summary>
79
         /// </summary>
78
         public void Initialize()
80
         public void Initialize()
79
         {
81
         {
82
+            //timer = new System.Timers.Timer(200);
83
+            //timer.Interval = 300;
84
+            //timer.Elapsed += new System.Timers.ElapsedEventHandler(TimerDealy);
85
+            //timer.Enabled = true; //启动计时器
86
+
80
             k_hook = new KeyboardHookCommon();
87
             k_hook = new KeyboardHookCommon();
81
             k_hook.KeyDownEvent += K_hook_KeyDownEvent;
88
             k_hook.KeyDownEvent += K_hook_KeyDownEvent;
82
 
89
 
115
             //ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar25.png"));
122
             //ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar25.png"));
116
             //BtnRecordingScreen_Click(null, null);
123
             //BtnRecordingScreen_Click(null, null);
117
         }
124
         }
125
+        void TimerDealy(object o, EventArgs e)
126
+        {
127
+            Dispatcher.Invoke(() =>
128
+            {
129
+                if (this.Left > 1630)
130
+                {
131
+                    return;
132
+                }
133
+                //获取鼠标在屏幕上的位置
134
+                double mouse_x = Form.MousePosition.X;   //需要添加引用System.Drawing
135
+                double mouse_y = Form.MousePosition.Y;
136
+
137
+                bool is_in_collasped_range = (mouse_y > this.Left + this.Height) || (mouse_x < this.Left || mouse_x > this.Left + this.Width);//缩起的条件
138
+                bool is_in_visiable_range = (mouse_y < 1 && mouse_x >= this.Left && mouse_x <= this.Left + this.Width); //展开的条件         
118
 
139
 
140
+                if (this.Left < 1630 && this.Left >= 0 && is_in_collasped_range)
141
+                {
142
+                    System.Threading.Thread.Sleep(300);
143
+                    this.Left +=20 /*-this.ActualWidth - 3*/;
144
+                }
145
+                else if (this.Left < 0 && is_in_visiable_range)
146
+                {
147
+                    this.Left = 1;
148
+                }
149
+            });
150
+        }
119
         private void K_hook_KeyDownEvent(object sender, System.Windows.Forms.KeyEventArgs e)
151
         private void K_hook_KeyDownEvent(object sender, System.Windows.Forms.KeyEventArgs e)
120
         {
152
         {
121
             if (e.KeyValue == (int)System.Windows.Forms.Keys.F5 && (int)Control.ModifierKeys == (int)Keys.Control)
153
             if (e.KeyValue == (int)System.Windows.Forms.Keys.F5 && (int)Control.ModifierKeys == (int)Keys.Control)

+ 10
- 6
XHWK.WKTool/XHMicroLessonSystemWindow.xaml View File

8
         xmlns:gifLib="http://wpfanimatedgif.codeplex.com"
8
         xmlns:gifLib="http://wpfanimatedgif.codeplex.com"
9
         xmlns:local="clr-namespace:XHWK.WKTool"
9
         xmlns:local="clr-namespace:XHWK.WKTool"
10
         mc:Ignorable="d"
10
         mc:Ignorable="d"
11
-        Title="星火微课系统" Height="1036" Width="1276" WindowStartupLocation="CenterScreen"
12
-    WindowStyle="None"    AllowsTransparency="True"  Background="#EFF1F8" ShowInTaskbar="True" ResizeMode="CanMinimize" BorderThickness="7">
11
+        Title="星火微课系统" Height="1036" Width="1276" 
12
+    WindowStyle="None"    AllowsTransparency="True"  Background="Transparent"    ShowInTaskbar="True" ResizeMode="CanMinimize" BorderThickness="7">
13
     <Window.Effect>
13
     <Window.Effect>
14
         <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
14
         <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
15
     </Window.Effect>
15
     </Window.Effect>
139
         </RadialGradientBrush>
139
         </RadialGradientBrush>
140
     </Window.BorderBrush>
140
     </Window.BorderBrush>
141
 
141
 
142
-    <Viewbox>
142
+    <Viewbox> 
143
+        <Canvas Height="1036" Width="1276">
144
+            
145
+     
143
         <Grid x:Name="GridContent" Height="1036" Width="1276">
146
         <Grid x:Name="GridContent" Height="1036" Width="1276">
144
 
147
 
145
             <!--分3行-->
148
             <!--分3行-->
146
             <Grid.RowDefinitions>
149
             <Grid.RowDefinitions>
147
-                <RowDefinition Height="106"/>
148
-                <RowDefinition Height="*"/>
149
-                <RowDefinition Height="40"/>
150
+                <RowDefinition Height="10*"/>
151
+                <RowDefinition Height="86*"/>
152
+                <RowDefinition Height="3.5*"/>
150
             </Grid.RowDefinitions>
153
             </Grid.RowDefinitions>
151
             <Grid Grid.Row="0" Background="#2D8CF0" MouseLeftButtonDown="Window_MouseLeftButtonDown" Margin="0,0,0,0">
154
             <Grid Grid.Row="0" Background="#2D8CF0" MouseLeftButtonDown="Window_MouseLeftButtonDown" Margin="0,0,0,0">
152
                 <Grid.RowDefinitions>
155
                 <Grid.RowDefinitions>
576
                 </StackPanel>
579
                 </StackPanel>
577
             </Grid>
580
             </Grid>
578
         </Grid>
581
         </Grid>
582
+        </Canvas>
579
     </Viewbox>
583
     </Viewbox>
580
 </Window>
584
 </Window>

+ 1137
- 1087
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs
File diff suppressed because it is too large
View File


+ 2
- 2
XHWK.WKTool/ZConfig.cs View File

13
         /// <summary>
13
         /// <summary>
14
         /// 当前版本号
14
         /// 当前版本号
15
         /// </summary>
15
         /// </summary>
16
-        public static int versionCode = 5;
16
+        public static int versionCode = 6;
17
 
17
 
18
-        public static string versionName = "1.0.4";
18
+        public static string versionName = "1.0.5";
19
 
19
 
20
         //接口地址
20
         //接口地址
21
         public static string apiUrl = isDebug ? "http://schoolapitest.xhkjedu.com" : "http://schoolapi.xhkjedu.com";
21
         public static string apiUrl = isDebug ? "http://schoolapitest.xhkjedu.com" : "http://schoolapi.xhkjedu.com";

Loading…
Cancel
Save