1
- using Files . Filesystem ;
1
+ using Files . Controls ;
2
+ using Files . Filesystem ;
2
3
using Files . Interacts ;
3
4
using System ;
4
5
using System . Collections . Generic ;
@@ -34,13 +35,13 @@ public List<ListedItem> SelectedItems
34
35
{
35
36
get
36
37
{
37
- if ( App . OccupiedInstance . ItemDisplayFrame . CurrentSourcePageType == typeof ( GenericFileBrowser ) )
38
+ if ( App . CurrentInstance . CurrentPageType == typeof ( GenericFileBrowser ) )
38
39
{
39
- return ( App . OccupiedInstance . ItemDisplayFrame . Content as GenericFileBrowser ) . AllView . SelectedItems . Cast < ListedItem > ( ) . ToList ( ) ;
40
+ return ( App . CurrentInstance . ContentPage as GenericFileBrowser ) . AllView . SelectedItems . Cast < ListedItem > ( ) . ToList ( ) ;
40
41
}
41
- else if ( App . OccupiedInstance . ItemDisplayFrame . CurrentSourcePageType == typeof ( PhotoAlbum ) )
42
+ else if ( App . CurrentInstance . CurrentPageType == typeof ( PhotoAlbum ) )
42
43
{
43
- return ( App . OccupiedInstance . ItemDisplayFrame . Content as PhotoAlbum ) . FileList . SelectedItems . Cast < ListedItem > ( ) . ToList ( ) ;
44
+ return ( App . CurrentInstance . ContentPage as PhotoAlbum ) . FileList . SelectedItems . Cast < ListedItem > ( ) . ToList ( ) ;
44
45
}
45
46
else
46
47
{
@@ -52,13 +53,13 @@ public ListedItem SelectedItem
52
53
{
53
54
get
54
55
{
55
- if ( App . OccupiedInstance . ItemDisplayFrame . CurrentSourcePageType == typeof ( GenericFileBrowser ) )
56
+ if ( App . CurrentInstance . CurrentPageType == typeof ( GenericFileBrowser ) )
56
57
{
57
- return ( App . OccupiedInstance . ItemDisplayFrame . Content as GenericFileBrowser ) . AllView . SelectedItem as ListedItem ;
58
+ return ( App . CurrentInstance . ContentPage as GenericFileBrowser ) . AllView . SelectedItem as ListedItem ;
58
59
}
59
- else if ( App . OccupiedInstance . ItemDisplayFrame . CurrentSourcePageType == typeof ( PhotoAlbum ) )
60
+ else if ( App . CurrentInstance . CurrentPageType == typeof ( PhotoAlbum ) )
60
61
{
61
- return ( App . OccupiedInstance . ItemDisplayFrame . Content as PhotoAlbum ) . FileList . SelectedItem as ListedItem ;
62
+ return ( App . CurrentInstance . ContentPage as PhotoAlbum ) . FileList . SelectedItem as ListedItem ;
62
63
}
63
64
else
64
65
{
@@ -94,60 +95,60 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
94
95
InstanceTabsView instanceTabsView = rootFrame . Content as InstanceTabsView ;
95
96
instanceTabsView . TabStrip_SelectionChanged ( null , null ) ;
96
97
}
97
- App . OccupiedInstance . RibbonArea . Refresh . IsEnabled = true ;
98
- App . OccupiedInstance . AlwaysPresentCommands . isEnabled = true ;
98
+ App . CurrentInstance . CanRefresh = true ;
99
+ ( App . CurrentInstance . OperationsControl as RibbonArea ) . RibbonViewModel . AlwaysPresentCommands . isEnabled = true ;
99
100
AssociatedViewModel . EmptyTextState . isVisible = Visibility . Collapsed ;
100
- App . OccupiedInstance . instanceViewModel . Universal . path = parameters ;
101
+ App . CurrentInstance . ViewModel . Universal . path = parameters ;
101
102
102
- if ( App . OccupiedInstance . instanceViewModel . Universal . path == Path . GetPathRoot ( App . OccupiedInstance . instanceViewModel . Universal . path ) )
103
+ if ( App . CurrentInstance . ViewModel . Universal . path == Path . GetPathRoot ( App . CurrentInstance . ViewModel . Universal . path ) )
103
104
{
104
- App . OccupiedInstance . RibbonArea . Up . IsEnabled = false ;
105
+ ( App . CurrentInstance . OperationsControl as RibbonArea ) . Up . IsEnabled = false ;
105
106
}
106
107
else
107
108
{
108
- App . OccupiedInstance . RibbonArea . Up . IsEnabled = true ;
109
+ ( App . CurrentInstance . OperationsControl as RibbonArea ) . Up . IsEnabled = true ;
109
110
}
110
111
111
- App . OccupiedInstance . instanceViewModel . AddItemsToCollectionAsync ( App . OccupiedInstance . instanceViewModel . Universal . path ) ;
112
+ App . CurrentInstance . ViewModel . AddItemsToCollectionAsync ( App . CurrentInstance . ViewModel . Universal . path ) ;
112
113
App . Clipboard_ContentChanged ( null , null ) ;
113
114
114
115
if ( parameters . Equals ( App . AppSettings . DesktopPath ) )
115
116
{
116
- App . OccupiedInstance . PathText . Text = "Desktop" ;
117
+ App . CurrentInstance . PathControlDisplayText = "Desktop" ;
117
118
}
118
119
else if ( parameters . Equals ( App . AppSettings . DocumentsPath ) )
119
120
{
120
- App . OccupiedInstance . PathText . Text = "Documents" ;
121
+ App . CurrentInstance . PathControlDisplayText = "Documents" ;
121
122
}
122
123
else if ( parameters . Equals ( App . AppSettings . DownloadsPath ) )
123
124
{
124
- App . OccupiedInstance . PathText . Text = "Downloads" ;
125
+ App . CurrentInstance . PathControlDisplayText = "Downloads" ;
125
126
}
126
127
else if ( parameters . Equals ( App . AppSettings . PicturesPath ) )
127
128
{
128
- App . OccupiedInstance . PathText . Text = "Pictures" ;
129
+ App . CurrentInstance . PathControlDisplayText = "Pictures" ;
129
130
}
130
131
else if ( parameters . Equals ( App . AppSettings . MusicPath ) )
131
132
{
132
- App . OccupiedInstance . PathText . Text = "Music" ;
133
+ App . CurrentInstance . PathControlDisplayText = "Music" ;
133
134
}
134
135
else if ( parameters . Equals ( App . AppSettings . OneDrivePath ) )
135
136
{
136
- App . OccupiedInstance . PathText . Text = "OneDrive" ;
137
+ App . CurrentInstance . PathControlDisplayText = "OneDrive" ;
137
138
}
138
139
else if ( parameters . Equals ( App . AppSettings . VideosPath ) )
139
140
{
140
- App . OccupiedInstance . PathText . Text = "Videos" ;
141
+ App . CurrentInstance . PathControlDisplayText = "Videos" ;
141
142
}
142
143
else
143
144
{
144
145
if ( parameters . Equals ( @"C:\" ) || parameters . Equals ( @"c:\" ) )
145
146
{
146
- App . OccupiedInstance . PathText . Text = @"Local Disk (C:\)" ;
147
+ App . CurrentInstance . PathControlDisplayText = @"Local Disk (C:\)" ;
147
148
}
148
149
else
149
150
{
150
- App . OccupiedInstance . PathText . Text = parameters ;
151
+ App . CurrentInstance . PathControlDisplayText = parameters ;
151
152
}
152
153
}
153
154
}
@@ -157,9 +158,9 @@ protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
157
158
base . OnNavigatingFrom ( e ) ;
158
159
// Remove item jumping handler
159
160
Window . Current . CoreWindow . CharacterReceived -= Page_CharacterReceived ;
160
- if ( App . OccupiedInstance . instanceViewModel . _fileQueryResult != null )
161
+ if ( App . CurrentInstance . ViewModel . _fileQueryResult != null )
161
162
{
162
- App . OccupiedInstance . instanceViewModel . _fileQueryResult . ContentsChanged -= App . OccupiedInstance . instanceViewModel . FileContentsChanged ;
163
+ App . CurrentInstance . ViewModel . _fileQueryResult . ContentsChanged -= App . CurrentInstance . ViewModel . FileContentsChanged ;
163
164
}
164
165
}
165
166
@@ -170,7 +171,7 @@ private void UnloadMenuFlyoutItemByName(string nameToUnload)
170
171
171
172
public void RightClickContextMenu_Opening ( object sender , object e )
172
173
{
173
- var selectedFileSystemItems = ( App . OccupiedInstance . ItemDisplayFrame . Content as BaseLayout ) . SelectedItems ;
174
+ var selectedFileSystemItems = ( App . CurrentInstance . ContentPage as BaseLayout ) . SelectedItems ;
174
175
175
176
// Find selected items that are not folders
176
177
if ( selectedFileSystemItems . Cast < ListedItem > ( ) . Any ( x => x . FileType != "Folder" ) )
@@ -226,18 +227,18 @@ private void Page_Loaded(object sender, RoutedEventArgs e)
226
227
{
227
228
if ( AssociatedViewModel == null && AssociatedInteractions == null )
228
229
{
229
- AssociatedViewModel = App . OccupiedInstance . instanceViewModel ;
230
- AssociatedInteractions = App . OccupiedInstance . instanceInteraction ;
231
- if ( App . OccupiedInstance == null )
230
+ AssociatedViewModel = App . CurrentInstance . ViewModel ;
231
+ AssociatedInteractions = App . CurrentInstance . InteractionOperations ;
232
+ if ( App . CurrentInstance == null )
232
233
{
233
- App . OccupiedInstance = ItemViewModel . GetCurrentSelectedTabInstance < ProHome > ( ) ;
234
+ App . CurrentInstance = ItemViewModel . GetCurrentSelectedTabInstance < ProHome > ( ) ;
234
235
}
235
236
236
- if ( App . OccupiedInstance . instanceViewModel == null && App . OccupiedInstance . instanceInteraction == null )
237
+ if ( App . CurrentInstance . ViewModel == null && App . CurrentInstance . InteractionOperations == null )
237
238
{
238
- App . OccupiedInstance . instanceViewModel = new ItemViewModel ( ) ;
239
- App . OccupiedInstance . instanceInteraction = new Interaction ( ) ;
240
- Page_Loaded ( null , null ) ;
239
+ // App.CurrentInstance.ViewModel = new ItemViewModel();
240
+ // App.CurrentInstance.InteractionOperations = new Interaction();
241
+ // Page_Loaded(null, null);
241
242
}
242
243
}
243
244
}
@@ -249,7 +250,7 @@ protected virtual void Page_CharacterReceived(CoreWindow sender, CharacterReceiv
249
250
return ;
250
251
251
252
char letterPressed = Convert . ToChar ( args . KeyCode ) ;
252
- App . OccupiedInstance . instanceInteraction . PushJumpChar ( letterPressed ) ;
253
+ App . CurrentInstance . InteractionOperations . PushJumpChar ( letterPressed ) ;
253
254
}
254
255
}
255
256
}
0 commit comments