From b2f51f9e8fbf358f826a01b9ee7b32a6ee4a775f Mon Sep 17 00:00:00 2001 From: Emiliano Magliocca Date: Wed, 8 Jul 2020 18:45:42 +0300 Subject: [PATCH 1/5] Fix teaching tip in release mode --- Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs | 13 +++++++------ Yugen.Mosaic.Uwp/Views/MainPage.xaml | 6 ++++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs b/Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs index 60985ba..bc303fc 100644 --- a/Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs +++ b/Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs @@ -1,4 +1,5 @@ using Microsoft.Toolkit.Uwp.Helpers; +using Microsoft.UI.Xaml.Controls; using SixLabors.ImageSharp; using SixLabors.ImageSharp.PixelFormats; using System; @@ -60,8 +61,8 @@ public class MainViewModel : ViewModelBase private ICommand _helpCommand; private ICommand _settingsCommand; private ICommand _teachingTipActionButtonCommand; - private ICommand _teachingTipClosingCommand; - private ICommand _teachingTipClosedCommand; + //private ICommand _teachingTipClosingCommand; + //private ICommand _teachingTipClosedCommand; public MainViewModel() { @@ -196,8 +197,8 @@ public int Progress public ICommand HelpCommand => _helpCommand ?? (_helpCommand = new RelayCommand(HelpCommandBehavior)); public ICommand SettingsCommand => _settingsCommand ?? (_settingsCommand = new AsyncRelayCommand(SettingsCommandBehavior)); public ICommand TeachingTipActionButtonCommand => _teachingTipActionButtonCommand ?? (_teachingTipActionButtonCommand = new RelayCommand(TeachingTipActionButtonCommandBehavior)); - public ICommand TeachingTipClosingCommand => _teachingTipClosingCommand ?? (_teachingTipClosingCommand = new RelayCommand(TeachingTipClosingCommandBehavior)); - public ICommand TeachingTipClosedCommand => _teachingTipClosedCommand ?? (_teachingTipClosedCommand = new RelayCommand(TeachingTipClosedCommandBehavior)); + //public ICommand TeachingTipClosingCommand => _teachingTipClosingCommand ?? (_teachingTipClosingCommand = new RelayCommand(TeachingTipClosingCommandBehavior)); + //public ICommand TeachingTipClosedCommand => _teachingTipClosedCommand ?? (_teachingTipClosedCommand = new RelayCommand(TeachingTipClosedCommandBehavior)); private Size OutputSize => new Size(_outputWidth, _outputHeight); private Size TileSize => new Size(_tileWidth, _tileHeight); @@ -233,7 +234,7 @@ public void TeachingTipActionButtonCommandBehavior() IsTeachingTipOpen = false; } - public void TeachingTipClosingCommandBehavior() + public void TeachingTip_Closing(TeachingTip sender, TeachingTipClosingEventArgs args) { TeachingTipTitle = ""; TeachingTipSubTitle = ""; @@ -241,7 +242,7 @@ public void TeachingTipClosingCommandBehavior() IsTeachingTipOpen = false; } - public void TeachingTipClosedCommandBehavior() => ShowTeachingTip(); + public void TeachingTip_Closed(TeachingTip sender, TeachingTipClosedEventArgs args) => ShowTeachingTip(); private async Task AddMasterImmageCommandBehavior() { diff --git a/Yugen.Mosaic.Uwp/Views/MainPage.xaml b/Yugen.Mosaic.Uwp/Views/MainPage.xaml index 77b4d77..45955fd 100644 --- a/Yugen.Mosaic.Uwp/Views/MainPage.xaml +++ b/Yugen.Mosaic.Uwp/Views/MainPage.xaml @@ -420,19 +420,21 @@ - + From ebb216ca0a17523b5961bc54da73cfc350994509 Mon Sep 17 00:00:00 2001 From: Emiliano Magliocca Date: Sat, 18 Jul 2020 10:13:18 +0300 Subject: [PATCH 2/5] Fix add tiles from folder --- Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs | 10 +++++++--- Yugen.Mosaic.Uwp/Yugen.Mosaic.Uwp.csproj | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs b/Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs index bc303fc..b6330b8 100644 --- a/Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs +++ b/Yugen.Mosaic.Uwp/ViewModels/MainViewModel.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; +using System.Linq; using System.Threading.Tasks; using System.Windows.Input; using Windows.Storage; @@ -308,7 +309,7 @@ private async Task AddTilesFolderCommandBehavior() SuggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.PicturesLibrary }; folderPicker.FileTypeFilter.Add(FileFormat.Jpg.GetStringRepresentation()); - folderPicker.FileTypeFilter.Add(FileFormat.Jpg.GetStringRepresentation()); + folderPicker.FileTypeFilter.Add(FileFormat.Jpeg.GetStringRepresentation()); folderPicker.FileTypeFilter.Add(FileFormat.Png.GetStringRepresentation()); StorageFolder folder = await folderPicker.PickSingleFolderAsync(); @@ -319,11 +320,14 @@ private async Task AddTilesFolderCommandBehavior() Windows.Storage.AccessCache.StorageApplicationPermissions.FutureAccessList.AddOrReplace("PickedFolderToken", folder); var files = await folder.GetFilesAsync(); - await AddTiles(files); + var filteredFiles = files.Where(file => file.FileType.Contains(FileFormat.Jpg.GetStringRepresentation(), StringComparison.InvariantCultureIgnoreCase) + || file.FileType.Contains(FileFormat.Jpeg.GetStringRepresentation(), StringComparison.InvariantCultureIgnoreCase) + || file.FileType.Contains(FileFormat.Png.GetStringRepresentation(), StringComparison.InvariantCultureIgnoreCase)); + await AddTiles(filteredFiles); } } - private async Task AddTiles(IReadOnlyList files) + private async Task AddTiles(IEnumerable files) { IsButtonEnabled = false; IsIndeterminateLoading = true; diff --git a/Yugen.Mosaic.Uwp/Yugen.Mosaic.Uwp.csproj b/Yugen.Mosaic.Uwp/Yugen.Mosaic.Uwp.csproj index a1ba929..40fd417 100644 --- a/Yugen.Mosaic.Uwp/Yugen.Mosaic.Uwp.csproj +++ b/Yugen.Mosaic.Uwp/Yugen.Mosaic.Uwp.csproj @@ -253,7 +253,7 @@ 2.4.2 - 1.0.0-rc0001 + 1.0.0-rc0003 1.6.7 From 24bd09dd78c830e65c5646946a2ae79759615cbf Mon Sep 17 00:00:00 2001 From: emiliano84 Date: Sat, 18 Jul 2020 22:15:54 +0300 Subject: [PATCH 3/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c3319d..505adef 100644 --- a/README.md +++ b/README.md @@ -28,4 +28,4 @@ The licence for this repository is a [GNU Affero General Public Licence version ## Special Thanks - Icon: [Yoshi](https://github.com/yoshiask) - UI: [Leisvan](https://twitter.com/leisvanCT) -- Code Help: [Sergio](https://github.com/Sergio0694) \ No newline at end of file +- Resharper Help: [Sergio](https://github.com/Sergio0694) From 112ee39adff7e8b26578a5fdb64310c5c6572854 Mon Sep 17 00:00:00 2001 From: emiliano84 Date: Sun, 19 Jul 2020 10:03:20 +0300 Subject: [PATCH 4/5] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 505adef..174296a 100644 --- a/README.md +++ b/README.md @@ -29,3 +29,4 @@ The licence for this repository is a [GNU Affero General Public Licence version - Icon: [Yoshi](https://github.com/yoshiask) - UI: [Leisvan](https://twitter.com/leisvanCT) - Resharper Help: [Sergio](https://github.com/Sergio0694) + From 9f25b737972170e73853ebf96e8d178a1fc132b2 Mon Sep 17 00:00:00 2001 From: emiliano84 Date: Sun, 19 Jul 2020 10:03:28 +0300 Subject: [PATCH 5/5] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 174296a..505adef 100644 --- a/README.md +++ b/README.md @@ -29,4 +29,3 @@ The licence for this repository is a [GNU Affero General Public Licence version - Icon: [Yoshi](https://github.com/yoshiask) - UI: [Leisvan](https://twitter.com/leisvanCT) - Resharper Help: [Sergio](https://github.com/Sergio0694) -