@@ -61,11 +61,10 @@ public GenericFileBrowser()
61
61
CopyItem . Click += Interaction . CopyItem_ClickAsync ;
62
62
AllView . RightTapped += Interaction . AllView_RightTapped ;
63
63
AllView . DoubleTapped += Interaction . List_ItemClick ;
64
- // Clipboard.ContentChanged += Clipboard_ContentChanged;
64
+ Clipboard . ContentChanged += Clipboard_ContentChanged ;
65
65
//AddItemBox = AddDialog;
66
66
//NameBox = NameDialog;
67
67
//inputFromRename = RenameInput;
68
- emptySpaceContext = EmptySpaceFlyout ;
69
68
RefreshEmptySpace . Click += NavigationActions . Refresh_Click ;
70
69
PasteEmptySpace . Click += Interaction . PasteItem_ClickAsync ;
71
70
//CopiedFlyout = CopiedPathFlyout;
@@ -107,126 +106,52 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
107
106
base . OnNavigatedTo ( eventArgs ) ;
108
107
ProHome . BackButton . IsEnabled = ProHome . accessibleContentFrame . CanGoBack ;
109
108
ProHome . ForwardButton . IsEnabled = ProHome . accessibleContentFrame . CanGoForward ;
109
+ ProHome . RS . isEnabled = true ;
110
+ App . AlwaysPresentCommands . isEnabled = true ;
110
111
var parameters = ( string ) eventArgs . Parameter ;
111
112
App . ViewModel . CancelLoadAndClearFiles ( ) ;
112
113
App . ViewModel . Universal . path = parameters ;
113
- //ProHome.BackButton.Click += NavigationActions.Back_Click;
114
- //ProHome.ForwardButton.Click += NavigationActions.Forward_Click;
115
114
ProHome . RefreshButton . Click += NavigationActions . Refresh_Click ;
116
115
ProHome . AddItemButton . Click += AddItem_Click ;
117
116
App . ViewModel . AddItemsToCollectionAsync ( App . ViewModel . Universal . path , GenericItemView ) ;
117
+ Interaction . page = this ;
118
118
if ( parameters . Equals ( Environment . GetFolderPath ( Environment . SpecialFolder . DesktopDirectory ) ) )
119
119
{
120
120
App . PathText . Text = "Desktop" ;
121
- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
122
- //{
123
- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "DesktopIC")
124
- // {
125
- // MainPage.Select.itemSelected = NavItemChoice;
126
- // break;
127
- // }
128
- //}
129
121
}
130
122
else if ( parameters . Equals ( Environment . GetFolderPath ( Environment . SpecialFolder . MyDocuments ) ) )
131
123
{
132
124
App . PathText . Text = "Documents" ;
133
- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
134
- //{
135
- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "DocumentsIC")
136
- // {
137
- // MainPage.Select.itemSelected = NavItemChoice;
138
- // break;
139
- // }
140
- //}
141
125
}
142
126
else if ( parameters . Equals ( Environment . GetFolderPath ( Environment . SpecialFolder . UserProfile ) + @"\Downloads" ) )
143
127
{
144
128
App . PathText . Text = "Downloads" ;
145
- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
146
- //{
147
- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "DownloadsIC")
148
- // {
149
- // MainPage.Select.itemSelected = NavItemChoice;
150
- // break;
151
- // }
152
- //}
153
129
}
154
130
else if ( parameters . Equals ( Environment . GetFolderPath ( Environment . SpecialFolder . MyPictures ) ) )
155
131
{
156
132
App . PathText . Text = "Pictures" ;
157
- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
158
- //{
159
- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "PicturesIC")
160
- // {
161
- // MainPage.Select.itemSelected = NavItemChoice;
162
- // break;
163
- // }
164
- //}
165
133
}
166
134
else if ( parameters . Equals ( Environment . GetFolderPath ( Environment . SpecialFolder . MyMusic ) ) )
167
135
{
168
136
App . PathText . Text = "Music" ;
169
- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
170
- //{
171
- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "MusicIC")
172
- // {
173
- // MainPage.Select.itemSelected = NavItemChoice;
174
- // break;
175
- // }
176
- //}
177
137
}
178
138
else if ( parameters . Equals ( Environment . GetFolderPath ( Environment . SpecialFolder . UserProfile ) + @"\OneDrive" ) )
179
139
{
180
140
App . PathText . Text = "OneDrive" ;
181
- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
182
- //{
183
- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "OneD_IC")
184
- // {
185
- // MainPage.Select.itemSelected = NavItemChoice;
186
- // break;
187
- // }
188
- //}
189
141
}
190
142
else if ( parameters . Equals ( Environment . GetFolderPath ( Environment . SpecialFolder . MyVideos ) ) )
191
143
{
192
144
App . PathText . Text = "Videos" ;
193
- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
194
- //{
195
- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Name.ToString() == "VideosIC")
196
- // {
197
- // MainPage.Select.itemSelected = NavItemChoice;
198
- // break;
199
- // }
200
- //}
201
145
}
202
146
else
203
147
{
204
- //App.ViewModel.Universal.path = parameters;
205
148
App . PathText . Text = parameters ;
206
- if ( parameters . Contains ( "C:\\ " ) || parameters . Contains ( "c:\\ " ) )
207
- {
208
- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
209
- //{
210
- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Tag.ToString() == "LDPage")
211
- // {
212
- // MainPage.Select.itemSelected = NavItemChoice;
213
- // break;
214
- // }
215
- //}
216
- }
217
- else
218
- {
219
- //foreach (Microsoft.UI.Xaml.Controls.NavigationViewItemBase NavItemChoice in MainPage.nv.MenuItems)
220
- //{
221
- // if (NavItemChoice is Microsoft.UI.Xaml.Controls.NavigationViewItem && NavItemChoice.Tag.ToString().Contains(parameters.Split("\\")[0]))
222
- // {
223
- // MainPage.Select.itemSelected = NavItemChoice;
224
- // break;
225
- // }
226
- //}
227
- }
228
149
}
229
150
151
+ if ( Interaction . dataGridRows != null )
152
+ {
153
+
154
+ }
230
155
}
231
156
232
157
@@ -301,12 +226,12 @@ private void ContentDialog_Loaded(object sender, RoutedEventArgs e)
301
226
302
227
private void GenericItemView_PointerReleased ( object sender , Windows . UI . Xaml . Input . PointerRoutedEventArgs e )
303
228
{
304
- data . SelectedItems . Clear ( ) ;
229
+ data . SelectedItem = null ;
305
230
}
306
231
307
232
private void AllView_SelectionChanged ( object sender , SelectionChangedEventArgs e )
308
233
{
309
-
234
+
310
235
AllView . CommitEdit ( ) ;
311
236
if ( e . AddedItems . Count > 0 )
312
237
{
@@ -331,22 +256,6 @@ private void NameDialog_SecondaryButtonClick(ContentDialog sender, ContentDialog
331
256
332
257
}
333
258
334
- private async void VisiblePath_TextChanged ( object sender , KeyRoutedEventArgs e )
335
- {
336
-
337
-
338
- }
339
-
340
- private void GenericItemView_RightTapped ( object sender , RightTappedRoutedEventArgs e )
341
- {
342
- GFBPageName . ContextFlyout . ShowAt ( GFBPageName ) ;
343
- }
344
-
345
- private void AllView_ContextRequested ( UIElement sender , ContextRequestedEventArgs args )
346
- {
347
-
348
- }
349
-
350
259
private void AllView_DragStarting ( UIElement sender , DragStartingEventArgs args )
351
260
{
352
261
args . DragUI . SetContentFromDataPackage ( ) ;
0 commit comments