|
@@ -364,56 +364,56 @@ namespace XHWK.WKTool
|
364
|
364
|
|
365
|
365
|
private void Window_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
366
|
366
|
{
|
367
|
|
- if (IsModify)
|
368
|
|
- {
|
369
|
|
- if (MouseNumber > 1 && pageData.menuList.Count > Subscript)
|
370
|
|
- {
|
371
|
|
- pageData.menuList[Subscript].IsEnabled = false;
|
372
|
|
- try
|
373
|
|
- {
|
374
|
|
- if (!pageData.menuList[Subscript].Name.Equals(pageData.menuList[Subscript].VideoName))
|
375
|
|
- {
|
376
|
|
-
|
377
|
|
- string tempPath = pageData.menuList[Subscript].FilePath + pageData.menuList[Subscript].VideoName+"."+ pageData.menuList[Subscript].VideoType;
|
378
|
|
- if(FileToolsCommon.IsExistFile(tempPath))
|
379
|
|
- {
|
380
|
|
- MessageBox.Show("文件名已存在!");
|
381
|
|
- return;
|
382
|
|
- }
|
383
|
|
- foreach (Model_WKData wKData in APP.WKDataList)
|
384
|
|
- {
|
385
|
|
- if (wKData.VideoList == null)
|
386
|
|
- continue;
|
387
|
|
- if (wKData.VideoList.Exists(x => x.FileGuid == pageData.menuList[Subscript].FileGuid))
|
388
|
|
- {
|
389
|
|
- try
|
390
|
|
- {
|
391
|
|
- FileToolsCommon.DeleteFile(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[Subscript].FileGuid).VideoPath);
|
392
|
|
- FileToolsCommon.DeleteFile(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[Subscript].FileGuid).ThumbnailPath);
|
393
|
|
- wKData.VideoList.Remove(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[Subscript].FileGuid));
|
394
|
|
- Initialize();
|
395
|
|
- return;
|
396
|
|
- }
|
397
|
|
- catch (Exception ex)
|
398
|
|
- {
|
399
|
|
- MessageBox.Show("无法删除视频!" + ex.Message);
|
400
|
|
- return;
|
401
|
|
- }
|
402
|
|
- }
|
403
|
|
- }
|
|
367
|
+ //if (IsModify)
|
|
368
|
+ //{
|
|
369
|
+ // if (MouseNumber > 2 && pageData.menuList.Count > Subscript)
|
|
370
|
+ // {
|
|
371
|
+ // pageData.menuList[Subscript].IsEnabled = false;
|
|
372
|
+ // try
|
|
373
|
+ // {
|
|
374
|
+ // if (!pageData.menuList[Subscript].Name.Equals(pageData.menuList[Subscript].VideoName))
|
|
375
|
+ // {
|
|
376
|
+ // MouseNumber = 0;
|
|
377
|
+ // string tempPath = pageData.menuList[Subscript].FilePath + pageData.menuList[Subscript].VideoName+"."+ pageData.menuList[Subscript].VideoType;
|
|
378
|
+ // if(FileToolsCommon.IsExistFile(tempPath))
|
|
379
|
+ // {
|
|
380
|
+ // MessageBox.Show("文件名已存在!");
|
|
381
|
+ // return;
|
|
382
|
+ // }
|
|
383
|
+ // foreach (Model_WKData wKData in APP.WKDataList)
|
|
384
|
+ // {
|
|
385
|
+ // if (wKData.VideoList == null)
|
|
386
|
+ // continue;
|
|
387
|
+ // if (wKData.VideoList.Exists(x => x.FileGuid == pageData.menuList[Subscript].FileGuid))
|
|
388
|
+ // {
|
|
389
|
+ // try
|
|
390
|
+ // {
|
|
391
|
+ // //FileToolsCommon.DeleteFile(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[Subscript].FileGuid).VideoPath);
|
|
392
|
+ // //FileToolsCommon.DeleteFile(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[Subscript].FileGuid).ThumbnailPath);
|
|
393
|
+ // //wKData.VideoList.Remove(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[Subscript].FileGuid));
|
|
394
|
+ // //Initialize();
|
|
395
|
+ // //return;
|
|
396
|
+ // }
|
|
397
|
+ // catch (Exception ex)
|
|
398
|
+ // {
|
|
399
|
+ // MessageBox.Show("无法删除视频!" + ex.Message);
|
|
400
|
+ // return;
|
|
401
|
+ // }
|
|
402
|
+ // }
|
|
403
|
+ // }
|
404
|
404
|
|
405
|
405
|
|
406
|
|
- FileToolsCommon.Copy(pageData.menuList[Subscript].Path, tempPath);
|
407
|
|
- }
|
408
|
|
- }
|
409
|
|
- catch (Exception ex)
|
410
|
|
- {
|
411
|
|
- MessageBox.Show("无法修改视频名称!" + ex.Message);
|
412
|
|
- return;
|
413
|
|
- }
|
414
|
|
- }
|
415
|
|
- MouseNumber++;
|
416
|
|
- }
|
|
406
|
+ // FileToolsCommon.Copy(pageData.menuList[Subscript].Path, tempPath);
|
|
407
|
+ // }
|
|
408
|
+ // }
|
|
409
|
+ // catch (Exception ex)
|
|
410
|
+ // {
|
|
411
|
+ // MessageBox.Show("无法修改视频名称!" + ex.Message);
|
|
412
|
+ // return;
|
|
413
|
+ // }
|
|
414
|
+ // }
|
|
415
|
+ // MouseNumber++;
|
|
416
|
+ //}
|
417
|
417
|
}
|
418
|
418
|
}
|
419
|
419
|
public class FileDirectoryData : NotifyModel
|