Skip to content

Commit bbe0e34

Browse files
committed
Add project files.
1 parent cf12380 commit bbe0e34

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.31229.75
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GrabWindows10LockScreenPictures", "GrabWindows10LockScreenPictures\GrabWindows10LockScreenPictures.csproj", "{A47F1E2F-20F0-4C33-8DA3-ECFD1C3B0CE3}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{A47F1E2F-20F0-4C33-8DA3-ECFD1C3B0CE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{A47F1E2F-20F0-4C33-8DA3-ECFD1C3B0CE3}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{A47F1E2F-20F0-4C33-8DA3-ECFD1C3B0CE3}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{A47F1E2F-20F0-4C33-8DA3-ECFD1C3B0CE3}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {5DB76696-149C-4F3B-AA77-584333FF2AA9}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>WinExe</OutputType>
5+
<TargetFramework>net5.0-windows</TargetFramework>
6+
<UseWPF>true</UseWPF>
7+
<AssemblyName>Grab Windows 10 Lock Screen Pictures</AssemblyName>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
12+
</ItemGroup>
13+
14+
</Project>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System.Drawing;
2+
using System.IO;
3+
using System.Linq;
4+
5+
namespace GrabWindows10LockScreenPictures {
6+
class Program {
7+
static void Main(string[] args) {
8+
string assetsAryeh = @"C:\Users\user\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets";
9+
string assetsOthers = @"C:\Users\others\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets";
10+
string saved = @"C:\Users\user\Pictures\Spotlight Images";
11+
12+
GetPics(assetsAryeh, saved);
13+
GetPics(assetsOthers, saved);
14+
}
15+
16+
static void GetPics(string assets, string saved) {
17+
foreach (string file in Directory.GetFiles(assets).Where(f => new FileInfo(f).Length > 200 * 1024)) {
18+
Image img = Image.FromFile(file);
19+
if (img.Width > img.Height) {
20+
string newFile = saved + file.Replace(assets, "") + ".jpg";
21+
File.Copy(file, newFile, true);
22+
}
23+
}
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)