Skip to content

Commit

Permalink
Merge pull request #12 from emiliano84/feature/refactor
Browse files Browse the repository at this point in the history
Feature/refactor
  • Loading branch information
Emiliano84 authored May 23, 2020
2 parents 3377bf2 + be7fb70 commit 83dfdc2
Show file tree
Hide file tree
Showing 10 changed files with 933 additions and 106 deletions.
13 changes: 13 additions & 0 deletions Imagesharp-LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2012 James South

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
# Yugen Mosaic UWP
![logo](/Yugen.Mosaic.Uwp/Assets/SmallTile.scale-400.png)

# Yugen Mosaic UWP
Yugen Mosaic is a free app that helps you to create digital art pictures made from your own pictures. For example you can create a photo mosaic, an image composed of many tiled photos.

## Contributing
Everyone is welcome to contribute, if you're looking to help out with the project, feel free to join and submit anything that you find useful. If you find an issue please could you raise it in the issues section or it would be fantastic if you could have a look at rectifying the issue and submitting a pull request.

## Getting started
The project has been primarily built for the universal Windows platform (UWP), so you'll need the latest version of [Visual Studio 2019](https://www.visualstudio.com/) (including the community edition) and the latest Windows 10 SDK which you can install as part of the Visual Studio installer.

## Download
Get the latest version in the [Microsoft Store.](https://www.microsoft.com/store/apps/9PF0S24CX0D4)

## Dependencies and References
[Yugen Toolkit](https://github.com/emiliano84/Yugen.Toolkit)
[ImageSharp](https://github.com/SixLabors/ImageSharp) is licensed under the [Apache 2.0 License.](Imagesharp-LICENSE)

## Special Thanks
- Icon: [Yoshi](https://github.com/yoshiask)
- UI: [Leisvan](https://twitter.com/leisvanCT)
- Code Help: [Sergio](https://github.com/Sergio0694)
49 changes: 48 additions & 1 deletion Yugen.Mosaic.Uwp/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
</Setter>
</Style>

<Style x:Key="ProgressRingStyle1"
<Style x:Key="YugenProgressRingStyle"
TargetType="ProgressRing">
<Setter Property="Background"
Value="Transparent" />
Expand Down Expand Up @@ -238,6 +238,53 @@
</Setter>
</Style>

<Style x:Key="YugenHyperlinkButtonStyle"
TargetType="HyperlinkButton">
<Setter Property="Foreground"
Value="{ThemeResource DefaultTextForegroundThemeBrush}" />
</Style>

<Style x:Key="YugenBodyTextBlockStyle"
BasedOn="{StaticResource BodyTextBlockStyle}"
TargetType="TextBlock">
<Setter Property="Foreground"
Value="{ThemeResource AppForegroundBrush}" />
</Style>

<Style x:Key="YugenCaptionTextBlockStyle"
BasedOn="{StaticResource CaptionTextBlockStyle}"
TargetType="TextBlock">
<Setter Property="Foreground"
Value="{ThemeResource AppForegroundBrush}" />
</Style>

<Style x:Key="YugenSubtitleTextBlockStyle"
BasedOn="{StaticResource SubtitleTextBlockStyle}"
TargetType="TextBlock">
<Setter Property="Foreground"
Value="{ThemeResource AppForegroundBrush}" />
</Style>

<Style x:Key="YugenTitleTextBlockStyle"
BasedOn="{StaticResource TitleTextBlockStyle}"
TargetType="TextBlock">
<Setter Property="Foreground"
Value="{ThemeResource AppForegroundBrush}" />
</Style>

<Style x:Key="YugenBaseTextBlockStyle"
BasedOn="{StaticResource BaseTextBlockStyle}"
TargetType="TextBlock">
<Setter Property="Foreground"
Value="{ThemeResource AppForegroundBrush}" />
</Style>

<Style x:Key="YugenRadioButtonStyle"
TargetType="RadioButton">
<Setter Property="Foreground"
Value="{ThemeResource AppForegroundBrush}" />
</Style>

</ResourceDictionary>

</ResourceDictionary.MergedDictionaries>
Expand Down
1 change: 0 additions & 1 deletion Yugen.Mosaic.Uwp/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
103 changes: 52 additions & 51 deletions Yugen.Mosaic.Uwp/Controls/SettingsDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,100 +12,101 @@
<ContentDialog.Resources>
<Thickness x:Key="ContentDialogPadding">0</Thickness>
<converters:EnumToBooleanConverter x:Key="EnumToBooleanConverter"
EnumType="ElementTheme" />
EnumType="ElementTheme" />
</ContentDialog.Resources>

<ContentDialog.DataContext>
<vm:SettingsViewModel />
</ContentDialog.DataContext>

<Grid Padding="15,15,15,30"
<Grid Padding="16,16,16,32"
Background="{ThemeResource AppDeepBackgroundBrush}">

<StackPanel Orientation="Vertical"
Spacing="15"
Spacing="16"
MaxWidth="360">

<Grid>
<TextBlock Text="Settings"

<TextBlock x:Uid="SettingsTitleTextBlock"
Style="{ThemeResource TitleTextBlockStyle}"
Foreground="{ThemeResource AppForegroundBrush}"
HorizontalAlignment="Left"
Margin="5,0,0,0" />
Margin="4,0,0,0" />
<Button Style="{StaticResource SoftRevealButtonStyle}"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Command="{x:Bind HideCommand}">
<FontIcon Glyph="" />
</Button>

</Grid>

<StackPanel Spacing="5"
Padding="15,0,15,0">
<TextBlock Text="Theme"
Foreground="{ThemeResource AppForegroundBrush}"
Style="{StaticResource SubtitleTextBlockStyle}" />
<RadioButton Content="Light"
<StackPanel Spacing="4"
Padding="16,0">

<TextBlock x:Uid="SettingsThemeTextBlock"
Style="{StaticResource YugenSubtitleTextBlockStyle}" />
<RadioButton x:Uid="SettingsThemeLightTextBlock"
Command="{x:Bind ViewModel.SwitchThemeCommand}"
IsChecked="{x:Bind ViewModel.ElementTheme, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Light, Mode=OneWay}"
Foreground="{ThemeResource AppForegroundBrush}">
Style="{ThemeResource YugenRadioButtonStyle}">
<RadioButton.CommandParameter>
<xaml:ElementTheme>Light</xaml:ElementTheme>
</RadioButton.CommandParameter>
</RadioButton>
<RadioButton Content="Dark"
<RadioButton x:Uid="SettingsThemeDarkTextBlock"
Command="{x:Bind ViewModel.SwitchThemeCommand}"
IsChecked="{x:Bind ViewModel.ElementTheme, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Dark, Mode=OneWay}"
Foreground="{ThemeResource AppForegroundBrush}">
Style="{ThemeResource YugenRadioButtonStyle}">
<RadioButton.CommandParameter>
<xaml:ElementTheme>Dark</xaml:ElementTheme>
</RadioButton.CommandParameter>
</RadioButton>
<RadioButton Content="Default"
<RadioButton x:Uid="SettingsThemeDefaultTextBlock"
Command="{x:Bind ViewModel.SwitchThemeCommand}"
IsChecked="{x:Bind ViewModel.ElementTheme, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Default, Mode=OneWay}"
Foreground="{ThemeResource AppForegroundBrush}">
Style="{ThemeResource YugenRadioButtonStyle}">
<RadioButton.CommandParameter>
<xaml:ElementTheme>Default</xaml:ElementTheme>
</RadioButton.CommandParameter>
</RadioButton>

</StackPanel>

<StackPanel Spacing="5"
Padding="15,0,15,0">

<TextBlock Text="About"
Foreground="{ThemeResource AppForegroundBrush}"
Style="{StaticResource SubtitleTextBlockStyle}" />

<TextBlock Foreground="{ThemeResource AppForegroundBrush}"
Style="{StaticResource CaptionTextBlockStyle}">
<Run Text="{x:Bind ViewModel.AppName}"
FontWeight="SemiBold" />
<LineBreak />
<Run Text="{x:Bind ViewModel.AppVersion}" />
</TextBlock>

<TextBlock Foreground="{ThemeResource AppForegroundBrush}"
Style="{StaticResource CaptionTextBlockStyle}">
<Run Text="Developed by"
FontWeight="SemiBold" />
<LineBreak />
<Run Text="{x:Bind ViewModel.Publisher}" />
</TextBlock>
<StackPanel Spacing="4"
Padding="16,0">

<TextBlock Foreground="{ThemeResource AppForegroundBrush}"
Style="{StaticResource CaptionTextBlockStyle}">
<Run Text="Colaborators"
FontWeight="SemiBold" />
<LineBreak />
<Run Text="{x:Bind ViewModel.Collaborator[0]}" />
<LineBreak />
<Run Text="{x:Bind ViewModel.Collaborator[1]}" />
</TextBlock>

<HyperlinkButton Content="Rate and review"
Command="{x:Bind ViewModel.LaunchRateAndReviewCommand}" />
<TextBlock x:Uid="SettingsAboutTextBlock"
Style="{StaticResource YugenSubtitleTextBlockStyle}" />

<TextBlock x:Uid="SettingsAppNameTextBlock"
Style="{StaticResource YugenBodyTextBlockStyle}" />
<TextBlock Style="{StaticResource YugenCaptionTextBlockStyle}"
Text="{x:Bind ViewModel.AppVersion}" />

<TextBlock x:Uid="SettingsDevelopedTextBlock"
Margin="0,4,0,0"
Style="{StaticResource YugenBodyTextBlockStyle}"/>
<HyperlinkButton x:Uid="SettingsDevelopedHyperlink"
Content="{x:Bind ViewModel.Publisher}"
Margin="0,-8,0,0"
Style="{ThemeResource YugenHyperlinkButtonStyle}"/>

<TextBlock x:Uid="SettingsUITextBlock"
Style="{StaticResource YugenBodyTextBlockStyle}" />
<HyperlinkButton x:Uid="SettingsUIHyperlink"
Margin="0,-8,0,0"
Style="{ThemeResource YugenHyperlinkButtonStyle}" />

<TextBlock x:Uid="SettingsIconTextBlock"
Style="{StaticResource YugenBodyTextBlockStyle}" />
<HyperlinkButton x:Uid="SettingsIconHyperlink"
Margin="0,-8,0,0"
Style="{ThemeResource YugenHyperlinkButtonStyle}"/>

<HyperlinkButton x:Uid="SettingsRateHyperlink"
NavigateUri="{x:Bind ViewModel.RateAndReviewUri}"
Style="{ThemeResource YugenHyperlinkButtonStyle}"/>

</StackPanel>

Expand Down
99 changes: 99 additions & 0 deletions Yugen.Mosaic.Uwp/Strings/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,54 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="MainAddMasterTextBlock.Text" xml:space="preserve">
<value>Click here to choose a Master image</value>
</data>
<data name="MainAddTilesTextBlock.Text" xml:space="preserve">
<value>Add Tiles</value>
</data>
<data name="MainGenerateButton.Content" xml:space="preserve">
<value>Generate</value>
</data>
<data name="MainHeightTextBlock.Text" xml:space="preserve">
<value>H:</value>
</data>
<data name="MainHelpTextBlock.Text" xml:space="preserve">
<value>Help</value>
</data>
<data name="MainMasterImageTextBlock.Text" xml:space="preserve">
<value>Master Image</value>
</data>
<data name="MainMosaicTypeTextBlock.Text" xml:space="preserve">
<value>MosaicType</value>
</data>
<data name="MainOutputPropertiesTextBlock.Text" xml:space="preserve">
<value>Output Properties</value>
</data>
<data name="MainResetButton.Content" xml:space="preserve">
<value>Reset</value>
</data>
<data name="MainSaveButton.Content" xml:space="preserve">
<value>Save</value>
</data>
<data name="MainSettingsTextBlock.Text" xml:space="preserve">
<value>Settings</value>
</data>
<data name="MainShowGridCheckBox.Content" xml:space="preserve">
<value>Show Grid</value>
</data>
<data name="MainTileProperties.Text" xml:space="preserve">
<value>Tile Properties</value>
</data>
<data name="MainTilesListTextBlock.Text" xml:space="preserve">
<value>Tiles list</value>
</data>
<data name="MainTitleTextBlock.Text" xml:space="preserve">
<value>Yugen Mosaic</value>
</data>
<data name="MainWidthTextBlock.Text" xml:space="preserve">
<value>W:</value>
</data>
<data name="OnboardingStageAddTilesDescription" xml:space="preserve">
<value>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!</value>
</data>
Expand Down Expand Up @@ -163,4 +211,55 @@
<data name="OnboardingStageTilePropertiesTitle" xml:space="preserve">
<value>Set the tile properties</value>
</data>
<data name="SettingsAboutTextBlock.Text" xml:space="preserve">
<value>About</value>
</data>
<data name="SettingsAppNameTextBlock.Text" xml:space="preserve">
<value>Yugen Mosaic</value>
</data>
<data name="SettingsDevelopedHyperlink.Content" xml:space="preserve">
<value />
</data>
<data name="SettingsDevelopedHyperlink.NavigateUri" xml:space="preserve">
<value>http://www.yugenapps.com</value>
</data>
<data name="SettingsDevelopedTextBlock.Text" xml:space="preserve">
<value>Developed By</value>
</data>
<data name="SettingsIconHyperlink.Content" xml:space="preserve">
<value>Yoshi</value>
</data>
<data name="SettingsIconHyperlink.NavigateUri" xml:space="preserve">
<value>https://github.com/yoshiask</value>
</data>
<data name="SettingsIconTextBlock.Text" xml:space="preserve">
<value>Icon</value>
</data>
<data name="SettingsRateHyperlink.Content" xml:space="preserve">
<value>Rate and review</value>
</data>
<data name="SettingsThemeDarkTextBlock.Content" xml:space="preserve">
<value>Dark</value>
</data>
<data name="SettingsThemeDefaultTextBlock.Content" xml:space="preserve">
<value>System Default</value>
</data>
<data name="SettingsThemeLightTextBlock.Content" xml:space="preserve">
<value>Light</value>
</data>
<data name="SettingsThemeTextBlock.Text" xml:space="preserve">
<value>Theme</value>
</data>
<data name="SettingsTitleTextBlock.Text" xml:space="preserve">
<value>Settings</value>
</data>
<data name="SettingsUIHyperlink.Content" xml:space="preserve">
<value>Leisvan</value>
</data>
<data name="SettingsUIHyperlink.NavigateUri" xml:space="preserve">
<value>https://twitter.com/leisvanCT</value>
</data>
<data name="SettingsUITextBlock.Text" xml:space="preserve">
<value>UI</value>
</data>
</root>
Loading

0 comments on commit 83dfdc2

Please sign in to comment.