From ef445eb0fd00675a24b4c8e07fe71e9bfe09b17d Mon Sep 17 00:00:00 2001 From: Emiliano Magliocca Date: Sat, 23 May 2020 11:46:13 +0300 Subject: [PATCH] Refactor strings and styles --- Yugen.Mosaic.Uwp/App.xaml | 49 ++++++++- Yugen.Mosaic.Uwp/App.xaml.cs | 1 - Yugen.Mosaic.Uwp/Controls/SettingsDialog.xaml | 100 ++++++++---------- Yugen.Mosaic.Uwp/Strings/en-US/Resources.resw | 99 +++++++++++++++++ .../ViewModels/SettingsViewModel.cs | 13 +-- Yugen.Mosaic.Uwp/Views/MainPage.xaml | 70 ++++++------ 6 files changed, 226 insertions(+), 106 deletions(-) diff --git a/Yugen.Mosaic.Uwp/App.xaml b/Yugen.Mosaic.Uwp/App.xaml index a8781e9..ec16e0b 100644 --- a/Yugen.Mosaic.Uwp/App.xaml +++ b/Yugen.Mosaic.Uwp/App.xaml @@ -109,7 +109,7 @@ - + + + + + + + + + + + + + + diff --git a/Yugen.Mosaic.Uwp/App.xaml.cs b/Yugen.Mosaic.Uwp/App.xaml.cs index f932fcf..3642c6b 100644 --- a/Yugen.Mosaic.Uwp/App.xaml.cs +++ b/Yugen.Mosaic.Uwp/App.xaml.cs @@ -7,7 +7,6 @@ using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Navigation; -using Yugen.Mosaic.Uwp.Extensions; using Yugen.Mosaic.Uwp.Services; using Yugen.Mosaic.Uwp.Views; using Yugen.Toolkit.Standard.Extensions; diff --git a/Yugen.Mosaic.Uwp/Controls/SettingsDialog.xaml b/Yugen.Mosaic.Uwp/Controls/SettingsDialog.xaml index 3a65591..f063e38 100644 --- a/Yugen.Mosaic.Uwp/Controls/SettingsDialog.xaml +++ b/Yugen.Mosaic.Uwp/Controls/SettingsDialog.xaml @@ -12,107 +12,101 @@ 0 + EnumType="ElementTheme" /> - - + Margin="4,0,0,0" /> + - - - + + + + Style="{ThemeResource YugenRadioButtonStyle}"> Light - + Style="{ThemeResource YugenRadioButtonStyle}"> Dark - + Style="{ThemeResource YugenRadioButtonStyle}"> Default + - - - - - - - - - - + + + - - + + + + + Style="{ThemeResource YugenHyperlinkButtonStyle}"/> - - + + - - + + Style="{ThemeResource YugenHyperlinkButtonStyle}"/> - + diff --git a/Yugen.Mosaic.Uwp/Strings/en-US/Resources.resw b/Yugen.Mosaic.Uwp/Strings/en-US/Resources.resw index 1825bf9..939fbb6 100644 --- a/Yugen.Mosaic.Uwp/Strings/en-US/Resources.resw +++ b/Yugen.Mosaic.Uwp/Strings/en-US/Resources.resw @@ -117,6 +117,54 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Click here to choose a Master image + + + Add Tiles + + + Generate + + + H: + + + Help + + + Master Image + + + MosaicType + + + Output Properties + + + Reset + + + Save + + + Settings + + + Show Grid + + + Tile Properties + + + Tiles list + + + Yugen Mosaic + + + W: + Then add images. Yugen Mosaic will use them as tiles to build your mosaic. The more tiles you choose, the better result you will get! @@ -163,4 +211,55 @@ Set the tile properties + + About + + + Yugen Mosaic + + + + + + http://www.yugenapps.com + + + Developed By + + + Yoshi + + + https://github.com/yoshiask + + + Icon + + + Rate and review + + + Dark + + + System Default + + + Light + + + Theme + + + Settings + + + Leisvan + + + https://twitter.com/leisvanCT + + + UI + \ No newline at end of file diff --git a/Yugen.Mosaic.Uwp/ViewModels/SettingsViewModel.cs b/Yugen.Mosaic.Uwp/ViewModels/SettingsViewModel.cs index 331e44e..d28a16e 100644 --- a/Yugen.Mosaic.Uwp/ViewModels/SettingsViewModel.cs +++ b/Yugen.Mosaic.Uwp/ViewModels/SettingsViewModel.cs @@ -13,16 +13,12 @@ namespace Yugen.Mosaic.Uwp.ViewModels { public class SettingsViewModel : BaseViewModel { - private const string STORE_REVIEWFORMAT = "ms-windows-store:REVIEW?PFN={0}"; private ElementTheme _elementTheme = ThemeSelectorService.Theme; - private ICommand _launchRateAndReviewCommand; private ICommand _switchThemeCommand; - //This may change if the app gets localized - public string AppName => "Yugen Mosaic"; public string AppVersion => SystemHelper.AppVersion; - - public string[] Collaborator => new[] { "Leisvan", "Yoshi" }; + public string Publisher => SystemHelper.Publisher; + public string RateAndReviewUri => $"ms-windows-store:REVIEW?PFN={Package.Current.Id.FamilyName}"; public ElementTheme ElementTheme { @@ -30,13 +26,8 @@ public ElementTheme ElementTheme set => Set(ref _elementTheme, value); } - public string Publisher => SystemHelper.Publisher; - - public ICommand LaunchRateAndReviewCommand => _launchRateAndReviewCommand ?? (_launchRateAndReviewCommand = new AsyncRelayCommand(LaunchRateAndReviewCommandBehavior)); public ICommand SwitchThemeCommand => _switchThemeCommand ?? (_switchThemeCommand = new AsyncRelayCommand(SwitchThemeCommandBehavior)); - private async Task LaunchRateAndReviewCommandBehavior() => await Launcher.LaunchUriAsync(new Uri(string.Format(STORE_REVIEWFORMAT, Package.Current.Id.FamilyName))); - private async Task SwitchThemeCommandBehavior(ElementTheme param) { ElementTheme = param; diff --git a/Yugen.Mosaic.Uwp/Views/MainPage.xaml b/Yugen.Mosaic.Uwp/Views/MainPage.xaml index e21163d..e072516 100644 --- a/Yugen.Mosaic.Uwp/Views/MainPage.xaml +++ b/Yugen.Mosaic.Uwp/Views/MainPage.xaml @@ -39,10 +39,9 @@ - + Style="{StaticResource YugenBaseTextBlockStyle}" /> @@ -60,9 +59,8 @@ - + @@ -98,7 +96,7 @@ Spacing="10"> - @@ -115,9 +113,8 @@ Spacing="5" Margin="0,25,0,10"> - + @@ -176,7 +173,7 @@ Stretch="Uniform" /> - - + @@ -215,10 +211,9 @@ - - + - + @@ -275,10 +267,9 @@ - - @@ -327,13 +317,13 @@