Explorar el Código

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

tags/录制修改前
zhangxueyang hace 4 años
padre
commit
9412d466a0

+ 4
- 0
XHWK.WKTool/CreateAMicroLessonWindow.xaml.cs Ver fichero

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

+ 33
- 1
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs Ver fichero

@@ -1,4 +1,5 @@
1
-using Common.system;
1
+using Aspose.Pdf.Text;
2
+using Common.system;
2 3
 
3 4
 using System;
4 5
 using System.Configuration;
@@ -62,6 +63,7 @@ namespace XHWK.WKTool
62 63
         /// 🖊状态 0红色 1蓝色 10红色批注内 11蓝色批注内
63 64
         /// </summary>
64 65
        public int flg = 0;
66
+        System.Timers.Timer timer = new System.Timers.Timer();
65 67
         #endregion
66 68
 
67 69
         #region 初始化
@@ -77,6 +79,11 @@ namespace XHWK.WKTool
77 79
         /// </summary>
78 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 87
             k_hook = new KeyboardHookCommon();
81 88
             k_hook.KeyDownEvent += K_hook_KeyDownEvent;
82 89
 
@@ -115,7 +122,32 @@ namespace XHWK.WKTool
115 122
             //ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar25.png"));
116 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 151
         private void K_hook_KeyDownEvent(object sender, System.Windows.Forms.KeyEventArgs e)
120 152
         {
121 153
             if (e.KeyValue == (int)System.Windows.Forms.Keys.F5 && (int)Control.ModifierKeys == (int)Keys.Control)

+ 10
- 6
XHWK.WKTool/XHMicroLessonSystemWindow.xaml Ver fichero

@@ -8,8 +8,8 @@
8 8
         xmlns:gifLib="http://wpfanimatedgif.codeplex.com"
9 9
         xmlns:local="clr-namespace:XHWK.WKTool"
10 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 13
     <Window.Effect>
14 14
         <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
15 15
     </Window.Effect>
@@ -139,14 +139,17 @@
139 139
         </RadialGradientBrush>
140 140
     </Window.BorderBrush>
141 141
 
142
-    <Viewbox>
142
+    <Viewbox> 
143
+        <Canvas Height="1036" Width="1276">
144
+            
145
+     
143 146
         <Grid x:Name="GridContent" Height="1036" Width="1276">
144 147
 
145 148
             <!--分3行-->
146 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 153
             </Grid.RowDefinitions>
151 154
             <Grid Grid.Row="0" Background="#2D8CF0" MouseLeftButtonDown="Window_MouseLeftButtonDown" Margin="0,0,0,0">
152 155
                 <Grid.RowDefinitions>
@@ -576,5 +579,6 @@
576 579
                 </StackPanel>
577 580
             </Grid>
578 581
         </Grid>
582
+        </Canvas>
579 583
     </Viewbox>
580 584
 </Window>

+ 1137
- 1087
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 2
- 2
XHWK.WKTool/ZConfig.cs Ver fichero

@@ -13,9 +13,9 @@ namespace XHWK.WKTool.Config
13 13
         /// <summary>
14 14
         /// 当前版本号
15 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 21
         public static string apiUrl = isDebug ? "http://schoolapitest.xhkjedu.com" : "http://schoolapi.xhkjedu.com";

Loading…
Cancelar
Guardar