-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
86 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters