diff --git a/src/SkyNotepad/Package.appxmanifest b/src/SkyNotepad/Package.appxmanifest index f265d73..8f19f4d 100644 --- a/src/SkyNotepad/Package.appxmanifest +++ b/src/SkyNotepad/Package.appxmanifest @@ -9,7 +9,7 @@ + Version="0.12.0.0" /> @@ -42,24 +42,6 @@ - - - - - .txt - .md - - - - - - - .txt - .md - - - - diff --git a/src/SkyNotepad/Properties/AssemblyInfo.cs b/src/SkyNotepad/Properties/AssemblyInfo.cs index ecfb934..e59cdc6 100644 --- a/src/SkyNotepad/Properties/AssemblyInfo.cs +++ b/src/SkyNotepad/Properties/AssemblyInfo.cs @@ -24,6 +24,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.11.2.0")] -[assembly: AssemblyFileVersion("0.11.2.0")] +[assembly: AssemblyVersion("0.12.0.0")] +[assembly: AssemblyFileVersion("0.12.0.0")] [assembly: ComVisible(false)] \ No newline at end of file diff --git a/src/SkyNotepad/Services/ApplicationSettings.cs b/src/SkyNotepad/Services/ApplicationSettings.cs new file mode 100644 index 0000000..f432376 --- /dev/null +++ b/src/SkyNotepad/Services/ApplicationSettings.cs @@ -0,0 +1,28 @@ +// Imported Librarys +using Windows.Storage; + +namespace SkyNotepad.Services +{ + public static class ApplicationSettings + { + /// + /// Saves settings + /// + /// Settings Value + /// + public static void SaveSettings(string Value, object data) + { + ApplicationData.Current.LocalSettings.Values[Value] = data.ToString(); + } + + /// + /// Gets settings + /// + /// Settings Value + /// Returns value + public static string GetSettings(string Value) + { + return ApplicationData.Current.LocalSettings.Values[Value] as string; + } + } +} \ No newline at end of file diff --git a/src/SkyNotepad/Services/FirstRunDisplayService.cs b/src/SkyNotepad/Services/FirstRunDisplayService.cs index 5e73374..3024817 100644 --- a/src/SkyNotepad/Services/FirstRunDisplayService.cs +++ b/src/SkyNotepad/Services/FirstRunDisplayService.cs @@ -18,18 +18,13 @@ public static class FirstRunDisplayService internal static async Task ShowIfAppropriateAsync() { await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync( - CoreDispatcherPriority.Normal, async () => + CoreDispatcherPriority.Normal, () => { if (SystemInformation.Instance.IsFirstRun && !IsShown) { IsShown = true; - ContentDialog firstRunDialog = new ContentDialog() - { - Title = "Welcome to SkyNotepad", - Content = "This is SkyNotepad. You can open/edit text documents and markdown source files.", - CloseButtonText = "Close" - }; - await firstRunDialog.ShowAsync(); + Frame frame = new Frame(); + frame.Navigate(typeof(FirstRunDialog)); } } ); diff --git a/src/SkyNotepad/Services/WhatsNewDisplayService.cs b/src/SkyNotepad/Services/WhatsNewDisplayService.cs new file mode 100644 index 0000000..234beac --- /dev/null +++ b/src/SkyNotepad/Services/WhatsNewDisplayService.cs @@ -0,0 +1,38 @@ +// Imported Librarys +using System; +using System.Threading.Tasks; +using Windows.UI.Core; +using Windows.UI.Xaml.Controls; +using Windows.ApplicationModel.Core; +using Microsoft.Toolkit.Uwp.Helpers; + +// Projects Folders +using SkyNotepad.Views.Dialogs; + +namespace SkyNotepad.Services +{ + public static class WhatsNewDisplayService + { + private static bool shown = false; + + internal static async Task ShowIfAppropriateAsync() + { + await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync( + CoreDispatcherPriority.Normal, async () => + { + if (SystemInformation.Instance.IsAppUpdated && !shown) + { + shown = true; + ContentDialog whatsNewDialog = new ContentDialog() + { + Title = "What's New In This Version?", + Content = new WhatsNewDialog(), + CloseButtonText = "Close" + }; + await whatsNewDialog.ShowAsync(); + } + } + ); + } + } +} \ No newline at end of file diff --git a/src/SkyNotepad/SkyNotepad.csproj b/src/SkyNotepad/SkyNotepad.csproj index 5662bff..9896a7b 100644 --- a/src/SkyNotepad/SkyNotepad.csproj +++ b/src/SkyNotepad/SkyNotepad.csproj @@ -135,10 +135,12 @@ + + diff --git a/src/SkyNotepad/Views/Dialogs/WhatsNewDialog.xaml b/src/SkyNotepad/Views/Dialogs/WhatsNewDialog.xaml index cdc8fc5..b1b1e72 100644 --- a/src/SkyNotepad/Views/Dialogs/WhatsNewDialog.xaml +++ b/src/SkyNotepad/Views/Dialogs/WhatsNewDialog.xaml @@ -11,11 +11,8 @@ - • Fixed issue#8 - by@AlperAkca79 - - • Added 'Close Dialog'. - • Added 'First Run Dialog'. - • Added 'Whats New Dialog' in First Run Dialog. + • Fixed Some Bugs. + • Added What's New Display Service. + • Updated First Run dialog. \ No newline at end of file diff --git a/src/SkyNotepad/Views/MainPage.xaml.cs b/src/SkyNotepad/Views/MainPage.xaml.cs index 40cd9a4..a77a85b 100644 --- a/src/SkyNotepad/Views/MainPage.xaml.cs +++ b/src/SkyNotepad/Views/MainPage.xaml.cs @@ -6,6 +6,7 @@ using Windows.ApplicationModel.Core; using Windows.ApplicationModel.DataTransfer; using Windows.Foundation; +using SkyNotepad.Services; // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 @@ -23,6 +24,7 @@ public MainPage() { InitializeComponent(); ShareLoad(); + ApplicationSettings.GetSettings("SpellCheck"); } /// @@ -155,6 +157,7 @@ private void MenuItemSelectAll_Click(object sender, RoutedEventArgs e) /// Click private void MenuItemSpellCheck_Click(object sender, RoutedEventArgs e) { + ApplicationSettings.SaveSettings("SpellCheck", MenuItemSpellCheck.IsChecked); if (MenuItemSpellCheck.IsChecked == true) { TextBox.IsSpellCheckEnabled = true; diff --git a/src/SkyNotepad/Views/Settings/AboutPage.xaml b/src/SkyNotepad/Views/Settings/AboutPage.xaml index 2c6703c..3f48977 100644 --- a/src/SkyNotepad/Views/Settings/AboutPage.xaml +++ b/src/SkyNotepad/Views/Settings/AboutPage.xaml @@ -93,7 +93,7 @@ Margin="13" HorizontalAlignment="Left" FontSize="18" - Text="Last Updated: Monday, March 13, 2023" /> + Text="Last Updated: Wednesday, March 15, 2023" /> diff --git a/src/SkyNotepad/Views/Settings/WhatIsNewPage.xaml b/src/SkyNotepad/Views/Settings/WhatIsNewPage.xaml index 3bc74df..0378e7a 100644 --- a/src/SkyNotepad/Views/Settings/WhatIsNewPage.xaml +++ b/src/SkyNotepad/Views/Settings/WhatIsNewPage.xaml @@ -49,7 +49,7 @@ HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="18" - Text="New Dialogs Update" /> + Text="March 15 Update" /> - In this update we've add new dialogs and fix some bugs. + In this update we've update dialogs and fix some bugs. @@ -67,12 +67,9 @@ Margin="10" FontSize="14"> - • Fixed issue#8 - by@AlperAkca79 - - • Added 'Close Dialog'. - • Added 'First Run Dialog'. - • Added 'Whats New Dialog' in First Run Dialog. + • Fixed Some Bugs. + • Added Whats New Dialog display service. + • Updated first run dialog.