Skip to content

Commit 87a4682

Browse files
authored
Merge pull request #407 from duke7553/develop
Updated assets
2 parents 0e93b99 + 80519d0 commit 87a4682

File tree

15 files changed

+535
-32
lines changed

15 files changed

+535
-32
lines changed

Files/Assets/FilesDrive.png

1.85 MB
Loading

Files/Assets/FilesHome.png

2.04 MB
Loading

Files/Assets/terminal/terminal.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515
"path": "pwsh.exe",
1616
"arguments": "-WorkingDirectory \"{0}\"",
1717
"icon": ""
18+
},
19+
{
20+
"id": 3,
21+
"name": "Windows Terminal",
22+
"path": "wt.exe",
23+
"arguments": "-d \"{0}\"",
24+
"icon": ""
1825
}
1926
*/
2027
]

Files/Files.csproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
<DependentUpon>Properties.xaml</DependentUpon>
222222
</Compile>
223223
<Compile Include="Properties\AssemblyInfo.cs" />
224-
<Compile Include="Search.xaml.cs">
224+
<Compile Include="Views\Pages\Search.xaml.cs">
225225
<DependentUpon>Search.xaml</DependentUpon>
226226
</Compile>
227227
<Compile Include="Settings.cs" />
@@ -253,7 +253,7 @@
253253
<Compile Include="View Models\SettingsViewModel.cs" />
254254
<Compile Include="Helpers\WindowDisplayInfo.cs" />
255255
<Compile Include="Helpers\WindowDisplayMode.cs" />
256-
<Compile Include="YourHome.xaml.cs">
256+
<Compile Include="UserControls\YourHome.xaml.cs">
257257
<DependentUpon>YourHome.xaml</DependentUpon>
258258
</Compile>
259259
</ItemGroup>
@@ -283,6 +283,7 @@
283283
<Content Include="Assets\WSL\ubuntu.svg" />
284284
<Content Include="Assets\WSL\ubuntupng.png" />
285285
<Content Include="Properties\Default.rd.xml" />
286+
<PRIResource Include="Strings\nl-NL\Resources.resw" />
286287
<PRIResource Include="Strings\zh-Hans\Resources.resw" />
287288
<PRIResource Include="Strings\de-DE\Resources.resw" />
288289
<PRIResource Include="Strings\es-ES\Resources.resw" />
@@ -358,7 +359,7 @@
358359
<SubType>Designer</SubType>
359360
<Generator>MSBuild:Compile</Generator>
360361
</Page>
361-
<Page Include="Search.xaml">
362+
<Page Include="Views\Pages\Search.xaml">
362363
<SubType>Designer</SubType>
363364
<Generator>MSBuild:Compile</Generator>
364365
</Page>
@@ -398,7 +399,7 @@
398399
<SubType>Designer</SubType>
399400
<Generator>MSBuild:Compile</Generator>
400401
</Page>
401-
<Page Include="YourHome.xaml">
402+
<Page Include="UserControls\YourHome.xaml">
402403
<SubType>Designer</SubType>
403404
<Generator>MSBuild:Compile</Generator>
404405
</Page>
@@ -458,6 +459,7 @@
458459
<XliffResource Include="MultilingualResources\Files.de-DE.xlf" />
459460
<XliffResource Include="MultilingualResources\Files.es-ES.xlf" />
460461
<XliffResource Include="MultilingualResources\Files.fr-FR.xlf" />
462+
<XliffResource Include="MultilingualResources\Files.nl-NL.xlf" />
461463
<XliffResource Include="MultilingualResources\Files.zh-Hans.xlf" />
462464
</ItemGroup>
463465
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">

Files/Filesystem/ItemViewModel.cs

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -545,29 +545,57 @@ public async void LoadExtendedItemProperties(ListedItem item)
545545
{
546546
BitmapImage icon = new BitmapImage();
547547
var matchingItem = _filesAndFolders.FirstOrDefault(x => x == item);
548-
var matchingStorageItem = await StorageFile.GetFileFromPathAsync(item.FilePath);
549-
if (matchingItem != null && matchingStorageItem != null)
548+
try
550549
{
551-
matchingItem.FileType = matchingStorageItem.DisplayType;
552-
matchingItem.FolderRelativeId = matchingStorageItem.FolderRelativeId;
553-
var Thumbnail = await matchingStorageItem.GetThumbnailAsync(ThumbnailMode.ListView, 20, ThumbnailOptions.UseCurrentScale);
554-
if (Thumbnail != null)
550+
var matchingStorageItem = await StorageFile.GetFileFromPathAsync(item.FilePath);
551+
if (matchingItem != null && matchingStorageItem != null)
555552
{
556-
matchingItem.FileImg = icon;
557-
await icon.SetSourceAsync(Thumbnail);
558-
matchingItem.EmptyImgVis = Visibility.Collapsed;
559-
matchingItem.FileIconVis = Visibility.Visible;
553+
matchingItem.FileType = matchingStorageItem.DisplayType;
554+
matchingItem.FolderRelativeId = matchingStorageItem.FolderRelativeId;
555+
var Thumbnail = await matchingStorageItem.GetThumbnailAsync(ThumbnailMode.ListView, 20, ThumbnailOptions.UseCurrentScale);
556+
if (Thumbnail != null)
557+
{
558+
matchingItem.FileImg = icon;
559+
await icon.SetSourceAsync(Thumbnail);
560+
matchingItem.EmptyImgVis = Visibility.Collapsed;
561+
matchingItem.FileIconVis = Visibility.Visible;
562+
}
560563
}
561564
}
565+
catch (UnauthorizedAccessException)
566+
{
567+
await App.consentDialog.ShowAsync();
568+
return;
569+
}
570+
catch (FileNotFoundException)
571+
{
572+
item.ItemPropertiesInitialized = true;
573+
return;
574+
}
575+
562576
}
563577
else
564578
{
565579
var matchingItem = _filesAndFolders.FirstOrDefault(x => x == item);
566-
var matchingStorageItem = await StorageFolder.GetFolderFromPathAsync(item.FilePath);
567-
if (matchingItem != null && matchingStorageItem != null)
580+
try
568581
{
569-
matchingItem.FolderRelativeId = matchingStorageItem.FolderRelativeId;
582+
var matchingStorageItem = await StorageFolder.GetFolderFromPathAsync(item.FilePath);
583+
if (matchingItem != null && matchingStorageItem != null)
584+
{
585+
matchingItem.FolderRelativeId = matchingStorageItem.FolderRelativeId;
586+
}
570587
}
588+
catch (UnauthorizedAccessException)
589+
{
590+
await App.consentDialog.ShowAsync();
591+
return;
592+
}
593+
catch (FileNotFoundException)
594+
{
595+
item.ItemPropertiesInitialized = true;
596+
return;
597+
}
598+
571599
}
572600

573601
item.ItemPropertiesInitialized = true;
@@ -630,6 +658,7 @@ public async void RapidAddItemsToCollectionAsync(string path)
630658
catch (UnauthorizedAccessException)
631659
{
632660
await App.consentDialog.ShowAsync();
661+
return;
633662
}
634663
catch (COMException e)
635664
{

0 commit comments

Comments
 (0)