11using System . Diagnostics ;
2+ using System . IO ;
3+ using System . IO . Pipes ;
4+ using System . Security . Principal ;
25using Windows . Storage ;
36
47namespace ProcessLauncher
@@ -7,7 +10,8 @@ class Program
710 {
811 static void Main ( string [ ] args )
912 {
10- var arguments = ( string ) ApplicationData . Current . LocalSettings . Values [ "Arguments" ] ;
13+ var localSettings = ApplicationData . Current . LocalSettings ;
14+ var arguments = ( string ) localSettings . Values [ "Arguments" ] ;
1115 if ( ! string . IsNullOrWhiteSpace ( arguments ) )
1216 {
1317 if ( arguments . Equals ( "DetectUserPaths" ) )
@@ -20,6 +24,15 @@ static void Main(string[] args)
2024 ApplicationData . Current . LocalSettings . Values [ "DetectedVideosLocation" ] = Microsoft . Win32 . Registry . GetValue ( @"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" , "My Video" , null ) ;
2125 ApplicationData . Current . LocalSettings . Values [ "DetectedOneDriveLocation" ] = Microsoft . Win32 . Registry . GetValue ( @"HKEY_CURRENT_USER\Software\Microsoft\OneDrive" , "UserFolder" , null ) ;
2226 }
27+ else if ( arguments . Equals ( "CheckQuickLookAvailability" ) )
28+ {
29+ QuickLook . CheckQuickLookAvailability ( localSettings ) ;
30+ }
31+ else if ( arguments . Equals ( "ToggleQuickLook" ) )
32+ {
33+ var path = ( string ) localSettings . Values [ "path" ] ;
34+ QuickLook . ToggleQuickLook ( path ) ;
35+ }
2336 else
2437 {
2538 var executable = ( string ) ApplicationData . Current . LocalSettings . Values [ "Application" ] ;
@@ -55,7 +68,6 @@ static void Main(string[] args)
5568
5669
5770 }
58-
5971 }
6072 }
6173}
0 commit comments