|
@@ -107,8 +107,8 @@ namespace XHWK.WKTool
|
107
|
107
|
btnBlackPenOne.IsEnabled = false;//蓝笔不可点击
|
108
|
108
|
imgBlackPenTwo.Source = new BitmapImage(new Uri("pack://application:,,,/Images/31.png"));
|
109
|
109
|
btnBlackPenTwo.IsEnabled = false;//红笔不可点击
|
110
|
|
- imgReturn.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar29.png"));
|
111
|
|
- btnReturn.IsEnabled = true;//返回主界面可点击
|
|
110
|
+ //imgReturn.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar29.png"));
|
|
111
|
+ //btnReturn.IsEnabled = true;//返回主界面可点击
|
112
|
112
|
txbTime.Visibility = Visibility.Hidden;//时间不显示
|
113
|
113
|
if (t == null)
|
114
|
114
|
{
|
|
@@ -232,7 +232,7 @@ namespace XHWK.WKTool
|
232
|
232
|
{
|
233
|
233
|
//FileToolsCommon.DeleteDirectory(APP.WKData.WkPath + "temp/");
|
234
|
234
|
FileToolsCommon.CreateDirectory(APP.WKData.WkPath);
|
235
|
|
- FileToolsCommon.DeleteDirectory(APP.WKData.WkPath + "tempsr/");
|
|
235
|
+ FileToolsCommon.DeleteDirectory(APP.WKData.WkPath + "temprs/");
|
236
|
236
|
VideoSavePathName = APP.WKData.WkPath + APP.WKData.WkName + "_录屏." + ((Enum_VideoType)int.Parse(FileToolsCommon.GetConfigValue("VideoType"))).ToString();
|
237
|
237
|
int num = 1;
|
238
|
238
|
while (FileToolsCommon.IsExistFile(VideoSavePathName))
|
|
@@ -267,7 +267,7 @@ namespace XHWK.WKTool
|
267
|
267
|
//扬声器
|
268
|
268
|
if (APP.FFmpeg.StartRecordSpeakerAudio(audioSpeakerPath))
|
269
|
269
|
{
|
270
|
|
- APP.FFmpeg.StopRecordAudio();
|
|
270
|
+ APP.FFmpeg.StopRecordAudio(2);
|
271
|
271
|
//Thread.Sleep(500);
|
272
|
272
|
//麦克风
|
273
|
273
|
if (APP.FFmpeg.StartRecordAudio(audioMicrophonePath))
|
|
@@ -282,7 +282,7 @@ namespace XHWK.WKTool
|
282
|
282
|
return;
|
283
|
283
|
}
|
284
|
284
|
}
|
285
|
|
- APP.FFmpeg.StopRecordAudio();
|
|
285
|
+ APP.FFmpeg.StopRecordAudio(1);
|
286
|
286
|
}
|
287
|
287
|
else
|
288
|
288
|
{
|
|
@@ -341,8 +341,8 @@ namespace XHWK.WKTool
|
341
|
341
|
btnBlackPenOne.IsEnabled = true;//蓝笔可点击
|
342
|
342
|
imgBlackPenTwo.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar28.png"));
|
343
|
343
|
btnBlackPenTwo.IsEnabled = true;//红笔可点击
|
344
|
|
- imgReturn.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar30.png"));
|
345
|
|
- btnReturn.IsEnabled = false;//返回主界面不可点击
|
|
344
|
+ //imgReturn.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar30.png"));
|
|
345
|
+ //btnReturn.IsEnabled = false;//返回主界面不可点击
|
346
|
346
|
txbTime.Visibility = Visibility.Visible;//时间显示
|
347
|
347
|
try
|
348
|
348
|
{
|
|
@@ -352,6 +352,10 @@ namespace XHWK.WKTool
|
352
|
352
|
{
|
353
|
353
|
Thread.Sleep(1500);
|
354
|
354
|
}
|
|
355
|
+ if(APP.FFmpeg.myProcess!=null)
|
|
356
|
+ {
|
|
357
|
+ Thread.Sleep(100);
|
|
358
|
+ }
|
355
|
359
|
APP.FFmpeg.StartRecordingVideo(VideoSavePathName);
|
356
|
360
|
|
357
|
361
|
Thread.Sleep(1000);
|
|
@@ -876,11 +880,60 @@ namespace XHWK.WKTool
|
876
|
880
|
/// <param name="e"></param>
|
877
|
881
|
private void BtnReturn_Click(object sender, RoutedEventArgs e)
|
878
|
882
|
{
|
|
883
|
+ MessageBoxResult br=MessageWindow.Show("退出将不保存当前录屏!", "提示", MessageBoxButton.OKCancel);
|
|
884
|
+ if(br==MessageBoxResult.Cancel)
|
|
885
|
+ {
|
|
886
|
+ return;
|
|
887
|
+ }
|
|
888
|
+ k_hook.Stop();
|
|
889
|
+ IsSuspend = true;
|
|
890
|
+ txbTime.Text = "00:00";
|
|
891
|
+
|
|
892
|
+ txbTime.Visibility = Visibility.Hidden;
|
|
893
|
+ End();
|
|
894
|
+ if (APP.W_PracticeWindow != null)
|
|
895
|
+ {
|
|
896
|
+ if (APP.W_PracticeWindow.Visibility == Visibility.Visible)
|
|
897
|
+ {
|
|
898
|
+ APP.W_PracticeWindow.Hide();
|
|
899
|
+ }
|
|
900
|
+ }
|
|
901
|
+ if (gridToolbar.Visibility == Visibility.Visible)
|
|
902
|
+ {
|
|
903
|
+ gridToolbar.Visibility = Visibility.Hidden;
|
|
904
|
+ gridColour.Visibility = Visibility.Hidden;
|
|
905
|
+ gridThickness.Visibility = Visibility.Hidden;
|
|
906
|
+ }
|
879
|
907
|
if (APP.W_XHMicroLessonSystemWindow == null)
|
880
|
908
|
{
|
881
|
909
|
APP.W_XHMicroLessonSystemWindow = new XHMicroLessonSystemWindow();
|
882
|
910
|
}
|
883
|
911
|
APP.W_XHMicroLessonSystemWindow.Show();
|
|
912
|
+ if (!IsFirstRS)
|
|
913
|
+ {
|
|
914
|
+ try
|
|
915
|
+ {
|
|
916
|
+ try
|
|
917
|
+ {
|
|
918
|
+ APP.FFmpeg.SuspendFFmpeg();
|
|
919
|
+ }
|
|
920
|
+ catch (Exception ex)
|
|
921
|
+ {
|
|
922
|
+ LogHelper.WriteErrLog("【录屏返回】(BtnStopRecordingScreen_Click)" + ex.Message, ex);
|
|
923
|
+ }
|
|
924
|
+ IsFirstRS = true;
|
|
925
|
+ new Thread(new ThreadStart(new Action(() =>
|
|
926
|
+ {
|
|
927
|
+ VideoInfo = null;
|
|
928
|
+ FileToolsCommon.DeleteDirectory(APP.WKData.WkPath + "temprs/");
|
|
929
|
+
|
|
930
|
+ }))).Start();
|
|
931
|
+ }
|
|
932
|
+ catch (Exception ex)
|
|
933
|
+ {
|
|
934
|
+ LogHelper.WriteErrLog("【录屏返回】(BtnStopRecordingScreen_Click)" + ex.Message, ex);
|
|
935
|
+ }
|
|
936
|
+ }
|
884
|
937
|
Hide();
|
885
|
938
|
}
|
886
|
939
|
}
|