File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed
GrabWindows10LockScreenPictures Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1+ user
2+ others
Original file line number Diff line number Diff line change 1313 <None Remove =" Data\lion.png" />
1414 <None Remove =" Data\lionicon.ico" />
1515 <None Remove =" Data\lion_icon.ico" />
16+ <None Remove =" Data\locations.txt" />
1617 </ItemGroup >
1718
1819 <ItemGroup >
3637 <Resource Include =" Data\lionicon.ico" >
3738 <CopyToOutputDirectory >Never</CopyToOutputDirectory >
3839 </Resource >
40+ <Content Include =" Data\locations.txt" >
41+ <CopyToOutputDirectory >Always</CopyToOutputDirectory >
42+ </Content >
3943 </ItemGroup >
4044
4145</Project >
Original file line number Diff line number Diff line change 77namespace GrabWindows10LockScreenPictures {
88 class Program {
99 static void Main ( string [ ] args ) {
10- string assetsAryeh = @"C:\Users\user\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets" ;
11- string assetsOthers = @"C:\Users\others\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets" ;
12- string saved = @"C:\Users\user\Pictures\Spotlight Images" ;
10+ string [ ] users = File . ReadAllLines ( Path . GetFullPath ( "Data/locations.txt" ) ) ;
11+ string saved = @$ "C:\Users\{ users . FirstOrDefault ( ) } \Pictures\Spotlight Images";
1312
1413 try {
15- GetPics ( assetsAryeh , saved ) ;
16- GetPics ( assetsOthers , saved ) ;
14+ foreach ( string name in users ) {
15+ GetPics ( @$ "C:\Users\{ name } \AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets", saved ) ;
16+ }
1717
1818 PopTheToast . PopIt ( "All images were successfully saved." ) ;
1919 } catch ( Exception ex ) {
You can’t perform that action at this time.
0 commit comments