@@ -83,36 +83,6 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
83
83
public bool recentsListVis { get ; set ; } = true ;
84
84
public bool drivesListVis { get ; set ; } = false ;
85
85
86
- private void CardPressed ( object sender , ItemClickEventArgs e )
87
- {
88
- string BelowCardText = ( ( Locations . FavoriteLocationItem ) e . ClickedItem ) . Tag ;
89
- if ( BelowCardText == "Downloads" )
90
- {
91
- App . CurrentInstance . ContentFrame . Navigate ( typeof ( GenericFileBrowser ) , App . AppSettings . DownloadsPath ) ;
92
- //(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.LayoutItems.isEnabled = true;
93
- }
94
- else if ( BelowCardText == "Documents" )
95
- {
96
- App . CurrentInstance . ContentFrame . Navigate ( typeof ( GenericFileBrowser ) , App . AppSettings . DocumentsPath ) ;
97
- //(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.LayoutItems.isEnabled = true;
98
- }
99
- else if ( BelowCardText == "Pictures" )
100
- {
101
- App . CurrentInstance . ContentFrame . Navigate ( typeof ( PhotoAlbum ) , App . AppSettings . PicturesPath ) ;
102
- //(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.LayoutItems.isEnabled = true;
103
- }
104
- else if ( BelowCardText == "Music" )
105
- {
106
- App . CurrentInstance . ContentFrame . Navigate ( typeof ( GenericFileBrowser ) , App . AppSettings . MusicPath ) ;
107
- //(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.LayoutItems.isEnabled = true;
108
- }
109
- else if ( BelowCardText == "Videos" )
110
- {
111
- App . CurrentInstance . ContentFrame . Navigate ( typeof ( GenericFileBrowser ) , App . AppSettings . VideosPath ) ;
112
- //(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.LayoutItems.isEnabled = true;
113
- }
114
- }
115
-
116
86
private void DropShadowPanel_PointerEntered ( object sender , Windows . UI . Xaml . Input . PointerRoutedEventArgs e )
117
87
{
118
88
( sender as DropShadowPanel ) . ShadowOpacity = 0.25 ;
@@ -125,31 +95,41 @@ private void DropShadowPanel_PointerExited(object sender, Windows.UI.Xaml.Input.
125
95
126
96
private void Button_Tapped ( object sender , Windows . UI . Xaml . Input . TappedRoutedEventArgs e )
127
97
{
128
- var clickedButton = sender as Button ;
129
- if ( clickedButton . Tag . ToString ( ) == "\xE896 " ) // Downloads
130
- {
131
- App . CurrentInstance . ContentFrame . Navigate ( typeof ( GenericFileBrowser ) , App . AppSettings . DownloadsPath ) ;
132
- //(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.LayoutItems.isEnabled = true;
133
- }
134
- else if ( clickedButton . Tag . ToString ( ) == "\xE8A5 " ) // Documents
135
- {
136
- App . CurrentInstance . ContentFrame . Navigate ( typeof ( GenericFileBrowser ) , App . AppSettings . DocumentsPath ) ;
137
- //(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.LayoutItems.isEnabled = true;
138
- }
139
- else if ( clickedButton . Tag . ToString ( ) == "\xEB9F " ) // Pictures
140
- {
141
- App . CurrentInstance . ContentFrame . Navigate ( typeof ( PhotoAlbum ) , App . AppSettings . PicturesPath ) ;
142
- //(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.LayoutItems.isEnabled = true;
143
- }
144
- else if ( clickedButton . Tag . ToString ( ) == "\xEC4F " ) // Music
98
+ string NaviagtionPath = "" ; // path to navigate
99
+ string ClickedCard = ( sender as Button ) . Tag . ToString ( ) ;
100
+
101
+ switch ( ClickedCard )
145
102
{
146
- App . CurrentInstance . ContentFrame . Navigate ( typeof ( GenericFileBrowser ) , App . AppSettings . MusicPath ) ;
147
- //(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.LayoutItems.isEnabled = true;
103
+ case "Downloads" :
104
+ NaviagtionPath = App . AppSettings . DownloadsPath ;
105
+ break ;
106
+
107
+ case "Documents" :
108
+ NaviagtionPath = App . AppSettings . DocumentsPath ;
109
+ break ;
110
+
111
+ case "Pictures" :
112
+ NaviagtionPath = App . AppSettings . PicturesPath ;
113
+ break ;
114
+
115
+ case "Music" :
116
+ NaviagtionPath = App . AppSettings . MusicPath ;
117
+ break ;
118
+
119
+ case ( "Videos" ) :
120
+ NaviagtionPath = App . AppSettings . VideosPath ;
121
+ break ;
148
122
}
149
- else if ( clickedButton . Tag . ToString ( ) == "\xE8B2 " ) // Videos
123
+
124
+
125
+ switch ( App . AppSettings . LayoutMode )
150
126
{
151
- App . CurrentInstance . ContentFrame . Navigate ( typeof ( GenericFileBrowser ) , App . AppSettings . VideosPath ) ;
152
- //(App.CurrentInstance.OperationsControl as RibbonArea).RibbonViewModel.LayoutItems.isEnabled = true;
127
+ case 0 :
128
+ App . CurrentInstance . ContentFrame . Navigate ( typeof ( GenericFileBrowser ) , NaviagtionPath ) ; // List View
129
+ break ;
130
+ case 1 :
131
+ App . CurrentInstance . ContentFrame . Navigate ( typeof ( PhotoAlbum ) , NaviagtionPath ) ; // Grid View
132
+ break ;
153
133
}
154
134
}
155
135
public static StorageFile RecentsFile ;
0 commit comments