File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ public static class CommonPaths
26
26
27
27
public static readonly string HomePath = Environment . GetFolderPath ( Environment . SpecialFolder . UserProfile ) ;
28
28
29
+ public static readonly string SystemRootPath = Environment . GetFolderPath ( Environment . SpecialFolder . Windows ) ;
30
+
29
31
public static Dictionary < string , string > ShellPlaces = new Dictionary < string , string > ( ) {
30
32
{ "::{645FF040-5081-101B-9F08-00AA002F954E}" , RecycleBinPath } ,
31
33
{ "::{5E5F29CE-E0A8-49D3-AF32-7A7BDC173478}" , "Home" . GetLocalized ( ) /*MyComputerPath*/ } ,
Original file line number Diff line number Diff line change 2
2
using Newtonsoft . Json ;
3
3
using System ;
4
4
using System . Collections . Generic ;
5
+ using System . IO ;
5
6
using System . Linq ;
6
7
using System . Threading . Tasks ;
7
8
using Windows . ApplicationModel . AppService ;
@@ -94,7 +95,7 @@ public static async Task<BitmapImage> GetIconResource(int index)
94
95
95
96
private static async Task < IEnumerable < IconFileInfo > > LoadSidebarIconResources ( )
96
97
{
97
- const string imageres = @"C:\Windows\ System32\ imageres.dll";
98
+ string imageres = Path . Combine ( CommonPaths . SystemRootPath , " System32" , " imageres.dll") ;
98
99
var imageResList = await UIHelpers . LoadSelectedIconsAsync ( imageres , new List < int > ( ) {
99
100
Constants . ImageRes . RecycleBin ,
100
101
Constants . ImageRes . NetworkDrives ,
Original file line number Diff line number Diff line change 1
1
using Files . Uwp . Filesystem ;
2
+ using Files . Uwp . Helpers ;
2
3
using Files . Uwp . ViewModels . Properties ;
4
+ using System ;
5
+ using System . IO ;
3
6
using System . Threading . Tasks ;
4
7
using Windows . UI . Xaml ;
5
8
using Windows . UI . Xaml . Controls ;
@@ -16,7 +19,7 @@ public PropertiesCustomization()
16
19
17
20
private void CustomIconsSelectorFrame_Loaded ( object sender , RoutedEventArgs e )
18
21
{
19
- string initialPath = @"C:\Windows\ System32\ SHELL32.dll";
22
+ string initialPath = Path . Combine ( CommonPaths . SystemRootPath , " System32" , " SHELL32.dll") ;
20
23
var item = ( BaseProperties as FileProperties ) ? . Item ?? ( BaseProperties as FolderProperties ) ? . Item ;
21
24
( sender as Frame ) . Navigate ( typeof ( CustomFolderIcons ) , new IconSelectorInfo
22
25
{
You can’t perform that action at this time.
0 commit comments