diff --git a/Files UWP/App.xaml.cs b/Files UWP/App.xaml.cs index ce2c04feacf9..3356ac3edfa3 100644 --- a/Files UWP/App.xaml.cs +++ b/Files UWP/App.xaml.cs @@ -52,6 +52,7 @@ public App() else { localSettings.Values["theme"] = "Default"; + ProHome.RibbonTeachingTip.IsOpen = false; } this.RequestedTheme = SettingsPages.Personalization.TV.ThemeValue; @@ -63,6 +64,7 @@ public App() public static Interacts.Home.HomeItemsState HomeItems { get; set; } = new Interacts.Home.HomeItemsState(); public static Interacts.Share.ShareItemsState ShareItems { get; set; } = new Interacts.Share.ShareItemsState(); public static Interacts.Layout.LayoutItemsState LayoutItems { get; set; } = new Interacts.Layout.LayoutItemsState(); + public static Interacts.AlwaysPresentCommandsState AlwaysPresentCommands { get; set; } = new Interacts.AlwaysPresentCommandsState(); public static DisplayedPathText PathText { get; set; } = new DisplayedPathText(); /// diff --git a/Files UWP/FilesUWP.csproj b/Files UWP/FilesUWP.csproj index 8aec81fe1ecc..bc964813ba9e 100644 --- a/Files UWP/FilesUWP.csproj +++ b/Files UWP/FilesUWP.csproj @@ -12,7 +12,7 @@ en-US UAP 10.0.17763.0 - 10.0.17763.0 + 10.0.17134.0 14 512 {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} diff --git a/Files UWP/Filesystem/ItemViewModel.cs b/Files UWP/Filesystem/ItemViewModel.cs index 87c114d7321b..49e09d15ec4e 100644 --- a/Files UWP/Filesystem/ItemViewModel.cs +++ b/Files UWP/Filesystem/ItemViewModel.cs @@ -228,7 +228,7 @@ public async void AddItemsToCollectionAsync(string path, Page currentPage) TextState.isVisible = Visibility.Visible; } stopwatch.Stop(); - Debug.WriteLine("Loading of items in " + Universal.path + " completed in " + stopwatch.Elapsed.Seconds + " seconds.\n"); + Debug.WriteLine("Loading of items in " + Universal.path + " completed in " + stopwatch.Elapsed.Milliseconds + " milliseconds.\n"); } catch (UnauthorizedAccessException e) @@ -297,7 +297,9 @@ private async Task AddFolder(StorageFolder folder, string pageName, Cancellation FileIconVis = Visibility.Collapsed, FilePath = folder.Path, EmptyImgVis = Visibility.Collapsed, - FileSize = null + FileSize = null, + RowIndex = _filesAndFolders.Count + }); } else @@ -397,7 +399,8 @@ private async Task AddFile(StorageFile file, string pageName, CancellationToken FileDateReal = itemDate, FileType = itemType, FilePath = itemPath, - FileSize = itemSize + FileSize = itemSize, + RowIndex = _filesAndFolders.Count }); } else @@ -483,14 +486,5 @@ await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPrio _filesRefreshing = false; Debug.WriteLine("Filesystem refresh complete"); } - - //private async void FolderContentsChanged(IStorageQueryResultBase sender, object args) - //{ - // if (_foldersRefreshing) { return; } - - // _foldersRefreshing = true; - - // _foldersRefreshing = false; - //} } } diff --git a/Files UWP/Filesystem/ListedItem.cs b/Files UWP/Filesystem/ListedItem.cs index cc2785d8c9f3..2cdb18f54a67 100644 --- a/Files UWP/Filesystem/ListedItem.cs +++ b/Files UWP/Filesystem/ListedItem.cs @@ -7,7 +7,6 @@ namespace Files.Filesystem public class ListedItem { public string FolderRelativeId { get; } - public Visibility FolderImg { get; set; } public Visibility FileIconVis { get; set; } public Visibility EmptyImgVis { get; set; } @@ -18,6 +17,7 @@ public class ListedItem public string DotFileExtension { get; set; } public string FilePath { get; set; } public string FileSize { get; set; } + public int RowIndex { get; set; } public DateTimeOffset FileDateReal { diff --git a/Files UWP/GenericFileBrowser.xaml b/Files UWP/GenericFileBrowser.xaml index 09599023064b..15c46b803c8e 100644 --- a/Files UWP/GenericFileBrowser.xaml +++ b/Files UWP/GenericFileBrowser.xaml @@ -12,7 +12,7 @@ xmlns:local2="using:Files.Filesystem" xmlns:local3="using:Files.Interacts" Name="GenericItemView" - mc:Ignorable="d" NavigationCacheMode="Required" Background="{StaticResource ApplicationPageBackgroundThemeBrush}" IsRightTapEnabled="True" RightTapped="GenericItemView_RightTapped" PointerReleased="GenericItemView_PointerReleased"> + mc:Ignorable="d" NavigationCacheMode="Required" PointerReleased="GenericItemView_PointerReleased" Background="{StaticResource ApplicationPageBackgroundThemeBrush}"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/Files UWP/PhotoAlbum.xaml.cs b/Files UWP/PhotoAlbum.xaml.cs index 58535a305557..50dac4e08897 100644 --- a/Files UWP/PhotoAlbum.xaml.cs +++ b/Files UWP/PhotoAlbum.xaml.cs @@ -10,6 +10,9 @@ using Windows.Storage; using Windows.System; using Microsoft.Toolkit.Uwp.UI.Controls; +using Windows.ApplicationModel.DataTransfer; +using Files.Navigation; +using System.Diagnostics; namespace Files { @@ -33,7 +36,7 @@ public PhotoAlbum() gv = FileList; context = RightClickContextMenu; gridContext = GridRightClickContextMenu; - + Clipboard.ContentChanged += Clipboard_ContentChanged; ShareItem.Click += Interaction.ShareItem_Click; RenameItem.Click += Interaction.RenameItem_Click; } @@ -45,17 +48,18 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs) base.OnNavigatedTo(eventArgs); ProHome.BackButton.IsEnabled = ProHome.accessibleContentFrame.CanGoBack; ProHome.ForwardButton.IsEnabled = ProHome.accessibleContentFrame.CanGoForward; + ProHome.RS.isEnabled = true; + App.AlwaysPresentCommands.isEnabled = true; var parameters = eventArgs.Parameter.ToString(); App.ViewModel.AddItemsToCollectionAsync(parameters, PhotoAlbumViewer); Interaction.page = this; FileList.DoubleTapped += Interaction.List_ItemClick; - //ProHome.BackButton.Click += Navigation.PhotoAlbumNavActions.Back_Click; - //ProHome.ForwardButton.Click += Navigation.PhotoAlbumNavActions.Forward_Click; - //ProHome.RefreshButton.Click += Navigation.PhotoAlbumNavActions.Refresh_Click; + FileList.RightTapped += Interaction.FileList_RightTapped; OpenItem.Click += Interaction.OpenItem_Click; CopyItem.Click += Interaction.CopyItem_ClickAsync; - //RefreshGrid.Click += Navigation.PhotoAlbumNavActions.Refresh_Click; + RefreshGrid.Click += NavigationActions.Refresh_Click; + DeleteItem.Click += Interaction.DeleteItem_Click; @@ -95,6 +99,27 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs) } + private void Clipboard_ContentChanged(object sender, object e) + { + try + { + DataPackageView packageView = Clipboard.GetContent(); + if (packageView.Contains(StandardDataFormats.StorageItems)) + { + Interacts.Interaction.PS.isEnabled = true; + } + else + { + Interacts.Interaction.PS.isEnabled = false; + } + } + catch (Exception) + { + Interacts.Interaction.PS.isEnabled = false; + } + + } + private void Grid_RightTapped(object sender, Windows.UI.Xaml.Input.RightTappedRoutedEventArgs e) { var ObjectPressed = (sender as Grid).DataContext as ListedItem; @@ -119,6 +144,7 @@ private void PhotoAlbumViewer_PointerReleased(object sender, Windows.UI.Xaml.Inp private void PhotoAlbumViewer_RightTapped(object sender, Windows.UI.Xaml.Input.RightTappedRoutedEventArgs e) { gridContext.ShowAt(sender as Grid, e.GetPosition(sender as Grid)); + Debug.WriteLine("---context displayed---"); } private void NameDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) diff --git a/Files UWP/ProHome.xaml b/Files UWP/ProHome.xaml index 36da7c0c05e5..5fd967a47fbf 100644 --- a/Files UWP/ProHome.xaml +++ b/Files UWP/ProHome.xaml @@ -11,7 +11,8 @@ mc:Ignorable="d" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters" - xmlns:ex="using:Microsoft.Toolkit.Uwp.UI.Extensions"> + xmlns:ex="using:Microsoft.Toolkit.Uwp.UI.Extensions" + xmlns:Windows10version1809="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract, 7)"> - + @@ -326,7 +327,6 @@ - @@ -440,219 +440,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Visible - - - - - - - - - - - - -