@@ -315,7 +315,7 @@ private void Item_PropertyChanged(object sender, PropertyChangedEventArgs e)
315
315
/// </summary>
316
316
public ICommand GithubCommand => new RelayCommand ( obj =>
317
317
{
318
- Process . Start ( "https://github.com/yanjinhuagood /Nimble" ) ;
318
+ Process . Start ( "https://github.com/WPFDevelopersOrg /Nimble" ) ;
319
319
} ) ;
320
320
321
321
/// <summary>
@@ -419,12 +419,14 @@ private void ScreenCapturer_SnapCompleted(CroppedBitmap bitmap)
419
419
{
420
420
if ( ! wallpaper . IsSelected )
421
421
{
422
+ ConfigHelper . SaveOpenWallpaper ( false ) ;
422
423
StopFFplayProcess ( ) ;
423
424
wallpaper . ItemName = "壁纸已关闭" ;
424
425
wallpaper . IsSelected = false ;
425
426
}
426
427
else
427
428
{
429
+ ConfigHelper . SaveOpenWallpaper ( true ) ;
428
430
WallpaersFilePlay ( ) ;
429
431
wallpaper . ItemName = "壁纸已开启" ;
430
432
wallpaper . IsSelected = true ;
@@ -449,18 +451,31 @@ private void ScreenCapturer_SnapCompleted(CroppedBitmap bitmap)
449
451
450
452
void ShowWallpaper ( string wallpaperPath )
451
453
{
452
- if ( string . IsNullOrWhiteSpace ( wallpaperPath ) || ! File . Exists ( wallpaperPath ) ) return ;
454
+ if ( string . IsNullOrWhiteSpace ( wallpaperPath ) )
455
+ {
456
+ if ( WallpaperArray . Count >= 3 && ConfigHelper . OpenWallpaper )
457
+ {
458
+ WallpaperArray . First ( ) . IsSelected = true ;
459
+ wallpaperPath = WallpaperArray [ 0 ] . VideoPath ;
460
+ }
461
+
462
+ }
463
+ if ( ! File . Exists ( wallpaperPath ) || ! ConfigHelper . OpenWallpaper ) return ;
453
464
StopFFplayProcess ( ) ;
454
465
WallpaperArray . Where ( x => x . VideoPath != wallpaperPath && x . VideoPath != _exitWallpaper ) . ToList ( ) . ForEach ( x =>
455
466
{
456
467
x . IsSelected = false ;
457
468
} ) ;
458
- var wallpaper = WallpaperArray . FirstOrDefault ( x => x . VideoPath == _exitWallpaper ) ;
459
- if ( wallpaper != null )
469
+ if ( ConfigHelper . OpenWallpaper )
460
470
{
461
- wallpaper . ItemName = "壁纸已开启" ;
462
- wallpaper . IsSelected = true ;
471
+ var wallpaper = WallpaperArray . FirstOrDefault ( x => x . VideoPath == _exitWallpaper ) ;
472
+ if ( wallpaper != null )
473
+ {
474
+ wallpaper . ItemName = "壁纸已开启" ;
475
+ wallpaper . IsSelected = true ;
476
+ }
463
477
}
478
+
464
479
StartFFplayProcess ( wallpaperPath ) ;
465
480
if ( ffplayWindowHandle != IntPtr . Zero )
466
481
{
@@ -556,7 +571,7 @@ void StartFFplayProcess(string videoFilePath)
556
571
var ffplayPath = Path . Combine ( AppDomain . CurrentDomain . BaseDirectory , "DLL" , "ffplay.exe" ) ;
557
572
var startInfo = new ProcessStartInfo ( ) ;
558
573
startInfo . FileName = ffplayPath ;
559
- // startInfo.WindowStyle = ProcessWindowStyle.Maximized;
574
+ startInfo . WindowStyle = ProcessWindowStyle . Maximized ;
560
575
startInfo . Arguments = $ "-loop 0 -fs \" { videoFilePath } \" ";
561
576
startInfo . UseShellExecute = false ;
562
577
startInfo . CreateNoWindow = true ;
@@ -620,6 +635,7 @@ void WallpaersFilePlay()
620
635
WallpaperArray = names ;
621
636
if ( WallpaperArray . Count > 0 )
622
637
ShowWallpaper ( ConfigHelper . WallpaperPath ) ;
638
+
623
639
}
624
640
#endregion
625
641
}
0 commit comments