Skip to content

Commit

Permalink
Updated to v0.12.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lnxwizard committed Mar 15, 2023
1 parent c4c970f commit 0524fe8
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 44 deletions.
20 changes: 1 addition & 19 deletions src/SkyNotepad/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Identity
Name="41411AlperAkca79.704697DF414B"
Publisher="CN=A0EAEA81-EA76-45FD-AD09-7A84D195F2DA"
Version="0.11.2.0" />
Version="0.12.0.0" />

<mp:PhoneIdentity PhoneProductId="8f0ed1fa-47f3-43de-a2b5-990d2e82465e" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down Expand Up @@ -42,24 +42,6 @@
<uap:InitialRotationPreference>
<uap:Rotation Preference="landscape"/></uap:InitialRotationPreference>
</uap:VisualElements>
<Extensions>
<uap:Extension Category="windows.fileSavePicker">
<uap:FileSavePicker>
<uap:SupportedFileTypes>
<uap:FileType>.txt</uap:FileType>
<uap:FileType>.md</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileSavePicker>
</uap:Extension>
<uap:Extension Category="windows.fileOpenPicker">
<uap:FileOpenPicker>
<uap:SupportedFileTypes>
<uap:FileType>.txt</uap:FileType>
<uap:FileType>.md</uap:FileType>
</uap:SupportedFileTypes>
</uap:FileOpenPicker>
</uap:Extension>
</Extensions>
</Application>
</Applications>

Expand Down
4 changes: 2 additions & 2 deletions src/SkyNotepad/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
28 changes: 28 additions & 0 deletions src/SkyNotepad/Services/ApplicationSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Imported Librarys
using Windows.Storage;

namespace SkyNotepad.Services
{
public static class ApplicationSettings
{
/// <summary>
/// Saves settings
/// </summary>
/// <param name="Value">Settings Value</param>
/// <param name="data"></param>
public static void SaveSettings(string Value, object data)
{
ApplicationData.Current.LocalSettings.Values[Value] = data.ToString();
}

/// <summary>
/// Gets settings
/// </summary>
/// <param name="Value">Settings Value</param>
/// <returns>Returns value</returns>
public static string GetSettings(string Value)
{
return ApplicationData.Current.LocalSettings.Values[Value] as string;
}
}
}
11 changes: 3 additions & 8 deletions src/SkyNotepad/Services/FirstRunDisplayService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
);
Expand Down
38 changes: 38 additions & 0 deletions src/SkyNotepad/Services/WhatsNewDisplayService.cs
Original file line number Diff line number Diff line change
@@ -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();
}
}
);
}
}
}
2 changes: 2 additions & 0 deletions src/SkyNotepad/SkyNotepad.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,12 @@
<Compile Include="Helpers\RelayCommand.cs" />
<Compile Include="Models\DocumentModel.cs" />
<Compile Include="Models\FormatModel.cs" />
<Compile Include="Services\ApplicationSettings.cs" />
<Compile Include="Services\FileExtensionProvider.cs" />
<Compile Include="Services\FirstRunDisplayService.cs" />
<Compile Include="Services\SettingContentsProvider.cs" />
<Compile Include="Services\SharingService.cs" />
<Compile Include="Services\WhatsNewDisplayService.cs" />
<Compile Include="ViewModels\EditViewModel.cs" />
<Compile Include="ViewModels\FileViewModel.cs" />
<Compile Include="ViewModels\FormatViewModel.cs" />
Expand Down
9 changes: 3 additions & 6 deletions src/SkyNotepad/Views/Dialogs/WhatsNewDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@
<Grid Background="White">
<TextBlock x:Name="ChangelogText">
<LineBreak />
• Fixed issue<Hyperlink NavigateUri="https://github.com/AlperAkca79/SkyNotepad/issues/8">#8</Hyperlink>
by<Hyperlink NavigateUri="https://github.com/AlperAkca79/">@AlperAkca79</Hyperlink>
<LineBreak />
• Added 'Close Dialog'.<LineBreak />
• Added 'First Run Dialog'.<LineBreak />
• Added 'Whats New Dialog' in First Run Dialog.</TextBlock>
• Fixed Some Bugs.<LineBreak />
• Added What's New Display Service.<LineBreak />
• Updated First Run dialog.</TextBlock>
</Grid>
</Page>
3 changes: 3 additions & 0 deletions src/SkyNotepad/Views/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -23,6 +24,7 @@ public MainPage()
{
InitializeComponent();
ShareLoad();
ApplicationSettings.GetSettings("SpellCheck");
}

/// <summary>
Expand Down Expand Up @@ -155,6 +157,7 @@ private void MenuItemSelectAll_Click(object sender, RoutedEventArgs e)
/// <param name="e">Click</param>
private void MenuItemSpellCheck_Click(object sender, RoutedEventArgs e)
{
ApplicationSettings.SaveSettings("SpellCheck", MenuItemSpellCheck.IsChecked);
if (MenuItemSpellCheck.IsChecked == true)
{
TextBox.IsSpellCheckEnabled = true;
Expand Down
2 changes: 1 addition & 1 deletion src/SkyNotepad/Views/Settings/AboutPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
Margin="13"
HorizontalAlignment="Left"
FontSize="18"
Text="Last Updated: Monday, March 13, 2023" />
Text="Last Updated: Wednesday, March 15, 2023" />
</StackPanel>

<!-- License -->
Expand Down
13 changes: 5 additions & 8 deletions src/SkyNotepad/Views/Settings/WhatIsNewPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="18"
Text="New Dialogs Update" />
Text="March 15 Update" />

<!-- Intro to Changelog -->
<TextBlock
x:Name="TextBlockIntroChangelog"
Grid.Row="1"
Margin="10"
FontSize="14">
In this update we've add new dialogs and fix some bugs.
In this update we've update dialogs and fix some bugs.
</TextBlock>

<!-- Changelog -->
Expand All @@ -67,12 +67,9 @@
Margin="10"
FontSize="14">
<LineBreak />
• Fixed issue<Hyperlink NavigateUri="https://github.com/AlperAkca79/SkyNotepad/issues/8">#8</Hyperlink>
by<Hyperlink NavigateUri="https://github.com/AlperAkca79/">@AlperAkca79</Hyperlink>
<LineBreak />
• Added 'Close Dialog'.<LineBreak />
• Added 'First Run Dialog'.<LineBreak />
• Added 'Whats New Dialog' in First Run Dialog.</TextBlock>
• Fixed Some Bugs.<LineBreak />
• Added Whats New Dialog display service.<LineBreak />
• Updated first run dialog.</TextBlock>
</Grid>
</Grid>
</ScrollViewer>
Expand Down

0 comments on commit 0524fe8

Please sign in to comment.