\f0\par
37 | }
38 |
--------------------------------------------------------------------------------
/UTE UWP+/Views/SettingsPageContainer.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
23 |
24 |
31 |
36 |
37 |
38 |
39 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 | ################################################################################
65 | # linguist file type excludes
66 | #
67 | # Excludes certain file types (like RTF) from the Linguist statistics to avoid
68 | # the project being mislabelled.
69 | ################################################################################
70 | *.rtf linguist-documentation
71 |
--------------------------------------------------------------------------------
/UTE UWP+/Views/VelocityIDsPage.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
26 |
27 |
34 |
39 |
40 |
41 |
42 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/UTE UWP+/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 |
18 |
19 |
20 |
21 |
22 | UTE UWP (Preview)
23 | ErrorTek
24 | Assets\StoreLogo.png
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
41 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | Assets\Icon.png
68 | UTE_UWP_
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/UTE UWP+/Services/NavigationService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Windows.UI.Xaml;
4 | using Windows.UI.Xaml.Controls;
5 | using Windows.UI.Xaml.Media.Animation;
6 | using Windows.UI.Xaml.Navigation;
7 |
8 | namespace UTE_UWP_.Services
9 | {
10 | public static class NavigationService
11 | {
12 | public static event NavigatedEventHandler Navigated;
13 |
14 | public static event NavigationFailedEventHandler NavigationFailed;
15 |
16 | private static Frame _frame;
17 | private static object _lastParamUsed;
18 |
19 | public static Frame Frame
20 | {
21 | get
22 | {
23 | if (_frame == null)
24 | {
25 | _frame = Window.Current.Content as Frame;
26 | RegisterFrameEvents();
27 | }
28 |
29 | return _frame;
30 | }
31 |
32 | set
33 | {
34 | UnregisterFrameEvents();
35 | _frame = value;
36 | RegisterFrameEvents();
37 | }
38 | }
39 |
40 | public static bool CanGoBack => Frame.CanGoBack;
41 |
42 | public static bool CanGoForward => Frame.CanGoForward;
43 |
44 | public static bool GoBack()
45 | {
46 | if (CanGoBack)
47 | {
48 | Frame.GoBack();
49 | return true;
50 | }
51 |
52 | return false;
53 | }
54 |
55 | public static void GoForward() => Frame.GoForward();
56 |
57 | public static bool Navigate(Type pageType, object parameter = null, NavigationTransitionInfo infoOverride = null)
58 | {
59 | if (pageType == null || !pageType.IsSubclassOf(typeof(Page)))
60 | {
61 | throw new ArgumentException($"Invalid pageType '{pageType}', please provide a valid pageType.", nameof(pageType));
62 | }
63 |
64 | // Don't open the same page multiple times
65 | if (Frame.Content?.GetType() != pageType || (parameter != null && !parameter.Equals(_lastParamUsed)))
66 | {
67 | var navigationResult = Frame.Navigate(pageType, parameter, infoOverride);
68 | if (navigationResult)
69 | {
70 | _lastParamUsed = parameter;
71 | }
72 |
73 | return navigationResult;
74 | }
75 | else
76 | {
77 | return false;
78 | }
79 | }
80 |
81 | public static bool Navigate(object parameter = null, NavigationTransitionInfo infoOverride = null)
82 | where T : Page
83 | => Navigate(typeof(T), parameter, infoOverride);
84 |
85 | private static void RegisterFrameEvents()
86 | {
87 | if (_frame != null)
88 | {
89 | _frame.Navigated += Frame_Navigated;
90 | _frame.NavigationFailed += Frame_NavigationFailed;
91 | }
92 | }
93 |
94 | private static void UnregisterFrameEvents()
95 | {
96 | if (_frame != null)
97 | {
98 | _frame.Navigated -= Frame_Navigated;
99 | _frame.NavigationFailed -= Frame_NavigationFailed;
100 | }
101 | }
102 |
103 | private static void Frame_NavigationFailed(object sender, NavigationFailedEventArgs e) => NavigationFailed?.Invoke(sender, e);
104 |
105 | private static void Frame_Navigated(object sender, NavigationEventArgs e) => Navigated?.Invoke(sender, e);
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #
UltraTextEdit UWP
2 |
3 | #### UTE UWP is a modern, lightweight text editor adhering to the Fluent Design Guidelines, using the UWP platform.
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | ## ⬇️ Installation
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | ### 📸 Screenshots
25 |
26 | 
27 | 
28 | 
29 |
30 | ## 🧪 Contributing & Feedback
31 |
32 | There are many ways to contribute:
33 |
34 | - Upvote popular feature requests
35 | - Create discussions about new features
36 | - [Submit a new feature contribution or bugfix](https://github.com/jpbandroid/UltraTextEdit-UWP/pulls)
37 | - [File bug reports and feature requests](https://github.com/jpbandroid/UltraTextEdit-UWP/issues/new/choose)
38 | - Review the [latest commits](https://github.com/jpbandroid/UltraTextEdit-UWP/commits)
39 | - Help localize the project via [Crowdin](https://crowdin.com/project/ultratextedit-uwp)
40 | - Join the [Developer Sancutary](https://discord.gg/windows-apps-hub-714581497222398064) Discord server to get the latest product announcements! (the UTE section is found under the #jpb-projects forum channel, in the UltraTextEdit (UWP) forum post!)
41 | ## 🛠️ Compiling from Source
42 |
43 | Compiling the app from source is the best way to make sure that you get the latest features and enhancements. However, some functionality may be incomplete or not functional.
44 |
45 | ### 1️⃣ Prerequisites
46 |
47 | Ensure you have the following components installed on your device:
48 |
49 | - [Git](https://git-scm.com/)
50 | - [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) with following individual components:
51 | - UWP app development compponents
52 | - Windows 11 SDK
53 | - [Windows 11 or Windows 10](https://www.microsoft.com/en-us/windows) (version 1809+)
54 | - At least 4GB of RAM (at least 8GB recommended)
55 |
56 | ### 2️⃣ Get the source
57 |
58 | Clone the repository using Git (git clone then the repo URL)
59 |
60 | ### 3️⃣ Build the project
61 |
62 | - Open the solution file.
63 | - Build with `DEBUG|x64` (or whichever architecture is the most appropriate to your device)
64 | - Note: You may need to add the CommunityToolkitLabs NuGet source for the app to compile (if you don't have it added already), you can find the link you need in the repo of CommunityToolkit Labs.
65 |
66 | ## 📊 Statistics
67 | 
68 |
69 | ## ⚖️ License and Credits
70 |
71 | Copyright ©️ 2021-2024 ErrorTek, Ivirius, other contributors
72 |
73 | Licensed under the [MIT License](LICENSE.md).
74 |
--------------------------------------------------------------------------------
/UTE UWP+/README.md:
--------------------------------------------------------------------------------
1 | #
UltraTextEdit UWP
2 |
3 | #### UTE UWP is a modern, lightweight text editor adhering to the Fluent Design Guidelines, using the UWP platform.
4 | #### NOTE: The repository has been moved over to https://github.com/jpbandroid/UltraTextEdit-UWP, expect new releases over there!
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | ## ⬇️ Installation
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | ### 📸 Screenshots
26 |
27 | 
28 | 
29 | 
30 |
31 | ## 🧪 Contributing & Feedback
32 |
33 | There are many ways to contribute:
34 |
35 | - Upvote popular feature requests
36 | - Create discussions about new features
37 | - [Submit a new feature contribution or bugfix](https://github.com/jpbandroid/UltraTextEdit-UWP/pulls)
38 | - [File bug reports and feature requests](https://github.com/jpbandroid/UltraTextEdit-UWP/issues/new/choose)
39 | - Review the [latest commits](https://github.com/jpbandroid/UltraTextEdit-UWP/commits)
40 | - Help localize the project via [Crowdin](https://crowdin.com/project/ultratextedit-uwp)
41 | - Join the [Developer Sancutary](https://discord.gg/windows-apps-hub-714581497222398064) Discord server to get the latest product announcements! (the UTE section is found under the #jpb-projects forum channel, in the UltraTextEdit (UWP) forum post!)
42 | ## 🛠️ Compiling from Source
43 |
44 | Compiling the app from source is the best way to make sure that you get the latest features and enhancements. However, some functionality may be incomplete or not functional.
45 |
46 | ### 1️⃣ Prerequisites
47 |
48 | Ensure you have the following components installed on your device:
49 |
50 | - [Git](https://git-scm.com/)
51 | - [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) with following individual components:
52 | - UWP app development compponents
53 | - Windows 11 SDK
54 | - [Windows 11 or Windows 10](https://www.microsoft.com/en-us/windows) (version 1809+)
55 | - At least 4GB of RAM (at least 8GB recommended)
56 |
57 | ### 2️⃣ Get the source
58 |
59 | Clone the repository using Git (git clone then the repo URL)
60 |
61 | ### 3️⃣ Build the project
62 |
63 | - Open the solution file.
64 | - Build with `DEBUG|x64` (or whichever architecture is the most appropriate to your device)
65 | - Note: You may need to add the CommunityToolkitLabs NuGet source for the app to compile (if you don't have it added already), you can find the link you need in the repo of CommunityToolkit Labs.
66 |
67 | ## 📊 Statistics
68 | 
69 |
70 | ## ⚖️ License and Credits
71 |
72 | Copyright ©️ 2021-2024 ErrorTek, Ivirius, other contributors
73 |
74 | Licensed under the [MIT License](LICENSE.md).
--------------------------------------------------------------------------------
/UTE UWP+/Views/VelocityIDsPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using MicaForUWP.Media;
2 | using UTE_UWP_.Helpers;
3 | using Windows.Storage;
4 | using Windows.UI.Xaml;
5 | using Windows.UI.Xaml.Controls;
6 | using Windows.UI.Xaml.Media;
7 |
8 | // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
9 |
10 | namespace UTE_UWP_.Views
11 | {
12 | ///
13 | /// An empty page that can be used on its own or navigated to within a Frame.
14 | ///
15 | public sealed partial class VelocityIDsPage : Page
16 | {
17 | public VelocityIDsPage()
18 | {
19 | this.InitializeComponent();
20 |
21 | if (BuildInfo.BeforeWin11)
22 | {
23 | if (App.Current.RequestedTheme == ApplicationTheme.Light)
24 | {
25 | Application.Current.Resources["AppTitleBarBrush"] = new BackdropMicaBrush()
26 | {
27 | LuminosityOpacity = 0.8F,
28 | TintOpacity = 0F,
29 | BackgroundSource = BackgroundSource.WallpaperBackdrop,
30 | Opacity = 1,
31 | TintColor = Windows.UI.Color.FromArgb(255, 230, 230, 230),
32 | FallbackColor = Windows.UI.Color.FromArgb(255, 230, 230, 230)
33 | };
34 | this.Background = (Brush)Application.Current.Resources["AppTitleBarBrush"];
35 | }
36 | else
37 | {
38 | Application.Current.Resources["AppTitleBarBrush"] = new BackdropMicaBrush()
39 | {
40 | LuminosityOpacity = 0.8F,
41 | TintOpacity = 0F,
42 | BackgroundSource = BackgroundSource.WallpaperBackdrop,
43 | Opacity = 1,
44 | TintColor = Windows.UI.Color.FromArgb(255, 25, 25, 25),
45 | FallbackColor = Windows.UI.Color.FromArgb(25, 25, 25, 25)
46 | };
47 | this.Background = (Brush)Application.Current.Resources["AppTitleBarBrush"];
48 | }
49 |
50 | }
51 | else
52 | {
53 |
54 | }
55 |
56 | var LocalSettings = ApplicationData.Current.LocalSettings;
57 | if (LocalSettings.Values["DialogsInRibbonVID"] != null)
58 | {
59 | if ((string)LocalSettings.Values["DialogsInRibbonVID"] == "On")
60 | {
61 | dialogsonribbonvidToggle.IsOn = true;
62 |
63 | }
64 | if ((string)LocalSettings.Values["DialogsInRibbonVID"] == "Off")
65 | {
66 | dialogsonribbonvidToggle.IsOn = false;
67 | }
68 | }
69 | else
70 | {
71 | LocalSettings.Values["DialogsInRibbonVID"] = "Off";
72 | dialogsonribbonvidToggle.IsOn = false;
73 | }
74 |
75 | }
76 |
77 | private void BackButton_Click(object sender, RoutedEventArgs e)
78 | {
79 | if (Window.Current.Content is Frame rootFrame && rootFrame.CanGoBack)
80 | {
81 | rootFrame.GoBack();
82 | }
83 | }
84 |
85 | private void dialogsonribbonvidToggle_Toggled(object sender, RoutedEventArgs e)
86 | {
87 | if (dialogsonribbonvidToggle.IsOn == true)
88 | {
89 | var LocalSettings = ApplicationData.Current.LocalSettings;
90 | if (LocalSettings.Values["DialogsInRibbonVID"] != null)
91 | {
92 | LocalSettings.Values["DialogsInRibbonVID"] = "On";
93 | }
94 | }
95 | else
96 | {
97 | var LocalSettings = ApplicationData.Current.LocalSettings;
98 | if (LocalSettings.Values["DialogsInRibbonVID"] != null)
99 | {
100 | LocalSettings.Values["DialogsInRibbonVID"] = "Off";
101 | }
102 | }
103 | }
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/UTE UWP+/Views/SettingsPageContainer.xaml.cs:
--------------------------------------------------------------------------------
1 | using MicaForUWP.Media;
2 | using UTE_UWP_.Helpers;
3 | using Windows.ApplicationModel.Core;
4 | using Windows.UI.ViewManagement;
5 | using Windows.UI;
6 | using Windows.UI.Xaml;
7 | using Windows.UI.Xaml.Controls;
8 | using Windows.UI.Xaml.Media;
9 |
10 | // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238
11 |
12 | namespace UTE_UWP_.Views
13 | {
14 | ///
15 | /// An empty page that can be used on its own or navigated to within a Frame.
16 | ///
17 | public sealed partial class SettingsPageContainer : Page
18 | {
19 | public SettingsPageContainer()
20 | {
21 | this.InitializeComponent();
22 | SettingsFrame.Navigate(typeof(SettingsPage));
23 |
24 | if (BuildInfo.BeforeWin11)
25 | {
26 | if (App.Current.RequestedTheme == ApplicationTheme.Light)
27 | {
28 | Application.Current.Resources["AppTitleBarBrush"] = new BackdropMicaBrush()
29 | {
30 | LuminosityOpacity = 0.8F,
31 | TintOpacity = 0F,
32 | BackgroundSource = BackgroundSource.WallpaperBackdrop,
33 | Opacity = 1,
34 | TintColor = Windows.UI.Color.FromArgb(255, 230, 230, 230),
35 | FallbackColor = Windows.UI.Color.FromArgb(255, 230, 230, 230)
36 | };
37 | this.Background = (Brush)Application.Current.Resources["AppTitleBarBrush"];
38 | }
39 | else
40 | {
41 | Application.Current.Resources["AppTitleBarBrush"] = new BackdropMicaBrush()
42 | {
43 | LuminosityOpacity = 0.8F,
44 | TintOpacity = 0F,
45 | BackgroundSource = BackgroundSource.WallpaperBackdrop,
46 | Opacity = 1,
47 | TintColor = Windows.UI.Color.FromArgb(255, 25, 25, 25),
48 | FallbackColor = Windows.UI.Color.FromArgb(25, 25, 25, 25)
49 | };
50 | this.Background = (Brush)Application.Current.Resources["AppTitleBarBrush"];
51 | }
52 |
53 | var appViewTitleBar = ApplicationView.GetForCurrentView().TitleBar;
54 |
55 | appViewTitleBar.ButtonBackgroundColor = Colors.Transparent;
56 | appViewTitleBar.ButtonInactiveBackgroundColor = Colors.Transparent;
57 |
58 | var coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
59 | coreTitleBar.ExtendViewIntoTitleBar = true;
60 | UpdateTitleBarLayout(coreTitleBar);
61 |
62 | Window.Current.SetTitleBar(AppTitleBar);
63 |
64 | coreTitleBar.LayoutMetricsChanged += CoreTitleBar_LayoutMetricsChanged;
65 | coreTitleBar.IsVisibleChanged += CoreTitleBar_IsVisibleChanged;
66 | }
67 | }
68 |
69 | private void CoreTitleBar_LayoutMetricsChanged(CoreApplicationViewTitleBar sender, object args)
70 | {
71 | UpdateTitleBarLayout(sender);
72 | }
73 |
74 | private void CoreTitleBar_IsVisibleChanged(CoreApplicationViewTitleBar sender, object args)
75 | {
76 | AppTitleBar.Visibility = sender.IsVisible ? Visibility.Visible : Visibility.Collapsed;
77 | }
78 |
79 | private void UpdateTitleBarLayout(CoreApplicationViewTitleBar coreTitleBar)
80 | {
81 | // Update title bar control size as needed to account for system size changes.
82 | AppTitleBar.Height = coreTitleBar.Height;
83 |
84 | // Ensure the custom title bar does not overlap window caption controls
85 | Thickness currMargin = AppTitleBar.Margin;
86 | AppTitleBar.Margin = new Thickness(currMargin.Left, currMargin.Top, coreTitleBar.SystemOverlayRightInset, currMargin.Bottom);
87 | }
88 |
89 | private void BackButton_Click(object sender, RoutedEventArgs e)
90 | {
91 | if (Window.Current.Content is Frame rootFrame && rootFrame.CanGoBack)
92 | {
93 | rootFrame.GoBack();
94 | }
95 | }
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/UTE UWP+/Views/ViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.ComponentModel;
3 | using System.Runtime.CompilerServices;
4 | using System.Threading;
5 |
6 | namespace UTE_UWP_.ViewModels
7 | {
8 | ///
9 | /// Base ViewModel implementation, wraps a
10 | /// object for the Model-View-ViewModel pattern and contains methods
11 | /// to handle property changes.
12 | ///
13 | /// Type of the underlying model.
14 | public abstract class ViewModel : ViewModel
15 | {
16 | private Type _model;
17 | ///
18 | /// Gets or sets the underlying object.
19 | ///
20 | public Type Model
21 | {
22 | get => _model;
23 | set
24 | {
25 | if (_model == null || !_model.Equals(value))
26 | {
27 | _model = value;
28 |
29 | // Raise the PropertyChanged event for all properties.
30 | OnPropertyChanged(string.Empty);
31 | }
32 | }
33 | }
34 | }
35 |
36 | ///
37 | /// Base ViewModel implementation, contains methods to
38 | /// handle property changes.
39 | ///
40 | public abstract class ViewModel : INotifyPropertyChanged
41 | {
42 | private readonly Dictionary PropertyChangedEvents =
43 | new Dictionary();
44 |
45 | ///
46 | /// Occurs when a property value changes.
47 | ///
48 | public event PropertyChangedEventHandler PropertyChanged
49 | {
50 | add
51 | {
52 | PropertyChangedEvents.Add(value, SynchronizationContext.Current);
53 | }
54 | remove
55 | {
56 | PropertyChangedEvents.Remove(value);
57 | }
58 | }
59 |
60 | ///
61 | /// Notifies listeners that a property value has changed.
62 | ///
63 | /// Name of the property used to notify listeners. This
64 | /// value is optional and can be provided automatically when invoked from compilers
65 | /// that support .
66 | protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
67 | {
68 | PropertyChangedEventArgs args = new PropertyChangedEventArgs(propertyName);
69 | foreach (KeyValuePair @event in PropertyChangedEvents)
70 | {
71 | if (@event.Value == null)
72 | {
73 | @event.Key.Invoke(this, args);
74 | }
75 | else
76 | {
77 | @event.Value.Post(s => @event.Key.Invoke(s, args), this);
78 | }
79 | }
80 | }
81 |
82 | ///
83 | /// Checks if a property already matches a desired value. Sets the property and
84 | /// notifies listeners only when necessary.
85 | ///
86 | /// Type of the property.
87 | /// Reference to a property with both getter and setter.
88 | /// Desired value for the property.
89 | /// Name of the property used to notify listeners. This
90 | /// value is optional and can be provided automatically when invoked from compilers that
91 | /// support CallerMemberName.
92 | /// True if the value was changed, false if the existing value matched the
93 | /// desired value.
94 | protected bool Set(ref T storage, T value,
95 | [CallerMemberName] string propertyName = null)
96 | {
97 | if (Equals(storage, value))
98 | {
99 | return false;
100 | }
101 |
102 | storage = value;
103 | OnPropertyChanged(propertyName);
104 | return true;
105 | }
106 | }
107 | }
--------------------------------------------------------------------------------
/UTE UWP+/Helpers/SettingsStorageExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Threading.Tasks;
4 | using UTE_UWP_.Core.Helpers;
5 | using Windows.Storage;
6 | using Windows.Storage.Streams;
7 |
8 | namespace UTE_UWP_.Helpers
9 | {
10 | // Use these extension methods to store and retrieve local and roaming app data
11 | // More details regarding storing and retrieving app data at https://docs.microsoft.com/windows/uwp/app-settings/store-and-retrieve-app-data
12 | public static class SettingsStorageExtensions
13 | {
14 | private const string FileExtension = ".json";
15 |
16 | public static bool IsRoamingStorageAvailable(this ApplicationData appData)
17 | {
18 | return appData.RoamingStorageQuota == 0;
19 | }
20 |
21 | public static async Task SaveAsync(this StorageFolder folder, string name, T content)
22 | {
23 | var file = await folder.CreateFileAsync(GetFileName(name), CreationCollisionOption.ReplaceExisting);
24 | var fileContent = await Json.StringifyAsync(content);
25 |
26 | await FileIO.WriteTextAsync(file, fileContent);
27 | }
28 |
29 | public static async Task ReadAsync(this StorageFolder folder, string name)
30 | {
31 | if (!File.Exists(Path.Combine(folder.Path, GetFileName(name))))
32 | {
33 | return default;
34 | }
35 |
36 | var file = await folder.GetFileAsync($"{name}.json");
37 | var fileContent = await FileIO.ReadTextAsync(file);
38 |
39 | return await Json.ToObjectAsync(fileContent);
40 | }
41 |
42 | public static async Task SaveAsync(this ApplicationDataContainer settings, string key, T value)
43 | {
44 | settings.SaveString(key, await Json.StringifyAsync(value));
45 | }
46 |
47 | public static void SaveString(this ApplicationDataContainer settings, string key, string value)
48 | {
49 | settings.Values[key] = value;
50 | }
51 |
52 | public static async Task ReadAsync(this ApplicationDataContainer settings, string key)
53 | {
54 | object obj = null;
55 |
56 | if (settings.Values.TryGetValue(key, out obj))
57 | {
58 | return await Json.ToObjectAsync((string)obj);
59 | }
60 |
61 | return default;
62 | }
63 |
64 | public static async Task SaveFileAsync(this StorageFolder folder, byte[] content, string fileName, CreationCollisionOption options = CreationCollisionOption.ReplaceExisting)
65 | {
66 | if (content == null)
67 | {
68 | throw new ArgumentNullException(nameof(content));
69 | }
70 |
71 | if (string.IsNullOrEmpty(fileName))
72 | {
73 | throw new ArgumentException("File name is null or empty. Specify a valid file name", nameof(fileName));
74 | }
75 |
76 | var storageFile = await folder.CreateFileAsync(fileName, options);
77 | await FileIO.WriteBytesAsync(storageFile, content);
78 | return storageFile;
79 | }
80 |
81 | public static async Task ReadFileAsync(this StorageFolder folder, string fileName)
82 | {
83 | var item = await folder.TryGetItemAsync(fileName).AsTask().ConfigureAwait(false);
84 |
85 | if ((item != null) && item.IsOfType(StorageItemTypes.File))
86 | {
87 | var storageFile = await folder.GetFileAsync(fileName);
88 | byte[] content = await storageFile.ReadBytesAsync();
89 | return content;
90 | }
91 |
92 | return null;
93 | }
94 |
95 | public static async Task ReadBytesAsync(this StorageFile file)
96 | {
97 | if (file != null)
98 | {
99 | using (IRandomAccessStream stream = await file.OpenReadAsync())
100 | {
101 | using (var reader = new DataReader(stream.GetInputStreamAt(0)))
102 | {
103 | await reader.LoadAsync((uint)stream.Size);
104 | var bytes = new byte[stream.Size];
105 | reader.ReadBytes(bytes);
106 | return bytes;
107 | }
108 | }
109 | }
110 | return null;
111 | }
112 |
113 | private static string GetFileName(string name)
114 | {
115 | return string.Concat(name, FileExtension);
116 | }
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/UTE UWP+/Helpers/BuildInfo.cs:
--------------------------------------------------------------------------------
1 | using Windows.Foundation.Metadata;
2 | using Windows.UI.Composition;
3 |
4 | namespace UTE_UWP_.Helpers
5 | {
6 | internal class BuildInfo
7 | {
8 | private static BuildInfo _buildInfo;
9 |
10 | private BuildInfo()
11 | {
12 | if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 15))
13 | {
14 | Build = Build.Win11Anniversary;
15 | }
16 | else if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 14))
17 | {
18 | Build = Build.Win11;
19 | }
20 | else if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 13))
21 | {
22 | Build = Build.Nov2021;
23 | }
24 | else if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 12))
25 | {
26 | Build = Build.May2021;
27 | }
28 | else if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 11))
29 | {
30 | Build = Build.Oct2020;
31 | }
32 | else if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 10))
33 | {
34 | Build = Build.May2020;
35 | }
36 | else if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 9))
37 | {
38 | Build = Build.Nov2019;
39 | }
40 | else if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8))
41 | {
42 | Build = Build.May2019;
43 | }
44 | else if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7))
45 | {
46 | Build = Build.Oct2018;
47 | }
48 | else if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 6))
49 | {
50 | Build = Build.Apr2018;
51 | }
52 | else if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 5))
53 | {
54 | Build = Build.FallCreators;
55 | }
56 | else if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 4))
57 | {
58 | Build = Build.Creators;
59 | }
60 | else if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 3))
61 | {
62 | Build = Build.Anniversary;
63 | }
64 | else if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 2))
65 | {
66 | Build = Build.Threshold2;
67 | }
68 | else if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 1))
69 | {
70 | Build = Build.Threshold1;
71 | }
72 | else
73 | {
74 | Build = Build.Unknown;
75 | }
76 |
77 | if (!BeforeCreatorsUpdate)
78 | {
79 | var capabilities = CompositionCapabilities.GetForCurrentView();
80 | capabilities.Changed += (s, e) => UpdateCapabilities(capabilities);
81 | UpdateCapabilities(capabilities);
82 | }
83 |
84 | void UpdateCapabilities(CompositionCapabilities capabilities)
85 | {
86 | AreEffectsSupported = capabilities.AreEffectsSupported();
87 | AreEffectsFast = capabilities.AreEffectsFast();
88 | }
89 | }
90 |
91 | public static Build Build { get; private set; }
92 | public static bool AreEffectsFast { get; private set; }
93 | public static bool AreEffectsSupported { get; private set; }
94 | public static bool BeforeCreatorsUpdate => Build < Build.Creators;
95 |
96 | public static bool BeforeWin11 => Build < Build.Win11;
97 |
98 | public static bool BeforeWin1122H2 => Build < Build.Win11Anniversary;
99 |
100 | public static BuildInfo RetrieveApiInfo() => _buildInfo = new BuildInfo();
101 | }
102 |
103 | public enum Build
104 | {
105 | Unknown = 0,
106 | Threshold1 = 1507, // 10240
107 | Threshold2 = 1511, // 10586
108 | Anniversary = 1607, // 14393 Redstone 1
109 | Creators = 1703, // 15063 Redstone 2
110 | FallCreators = 1709, // 16299 Redstone 3
111 | Apr2018 = 1803, // 17134 Redsone 4
112 | Oct2018 = 1809, // 17763 Redstone 5
113 | May2019 = 1903, // 18362 19H1
114 | Nov2019 = 1909, // 18363 19H2
115 | May2020 = 2004, // 19041 20H1
116 | Oct2020 = 2009, // 19042 20H2
117 | May2021 = 2104, // 19043 21H1
118 | Nov2021 = 2110, // 19044 21H2 (Win10)
119 | Win11 = 2200, // 22000 21H2 (Win11)
120 | Win11Anniversary = 2262 //22621 22H2 (Win11)
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # ErrorTek projects' Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | .
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 |
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 |
124 | [homepage]: https://www.contributor-covenant.org
125 |
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 |
--------------------------------------------------------------------------------
/UTE UWP+/Services/ActivationService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 |
6 | using UTE_UWP_.Activation;
7 | using UTE_UWP_.Core.Helpers;
8 | using UTE_UWP_.Services;
9 |
10 | using Windows.ApplicationModel.Activation;
11 | using Windows.System;
12 | using Windows.UI.Xaml;
13 | using Windows.UI.Xaml.Controls;
14 | using Windows.UI.Xaml.Input;
15 |
16 | namespace UTE_UWP_.Services
17 | {
18 | // For more information on understanding and extending activation flow see
19 | // https://github.com/microsoft/TemplateStudio/blob/main/docs/UWP/activation.md
20 | internal class ActivationService
21 | {
22 | private readonly App _app;
23 | private readonly Type _defaultNavItem;
24 | private Lazy _shell;
25 |
26 | private object _lastActivationArgs;
27 |
28 | public static readonly KeyboardAccelerator AltLeftKeyboardAccelerator = BuildKeyboardAccelerator(VirtualKey.Left, VirtualKeyModifiers.Menu);
29 |
30 | public static readonly KeyboardAccelerator BackKeyboardAccelerator = BuildKeyboardAccelerator(VirtualKey.GoBack);
31 |
32 | public ActivationService(App app, Type defaultNavItem, Lazy shell = null)
33 | {
34 | _app = app;
35 | _shell = shell;
36 | _defaultNavItem = defaultNavItem;
37 | }
38 |
39 | public async Task ActivateAsync(object activationArgs)
40 | {
41 | if (IsInteractive(activationArgs))
42 | {
43 | // Initialize services that you need before app activation
44 | // take into account that the splash screen is shown while this code runs.
45 | await InitializeAsync();
46 |
47 | // Do not repeat app initialization when the Window already has content,
48 | // just ensure that the window is active
49 | if (Window.Current.Content == null)
50 | {
51 | // Create a Shell or Frame to act as the navigation context
52 | Window.Current.Content = _shell?.Value ?? new Frame();
53 | NavigationService.NavigationFailed += (sender, e) =>
54 | {
55 | throw e.Exception;
56 | };
57 | }
58 | }
59 |
60 | // Depending on activationArgs one of ActivationHandlers or DefaultActivationHandler
61 | // will navigate to the first page
62 | await HandleActivationAsync(activationArgs);
63 | _lastActivationArgs = activationArgs;
64 |
65 | if (IsInteractive(activationArgs))
66 | {
67 | // Ensure the current window is active
68 | Window.Current.Activate();
69 |
70 | // Tasks after activation
71 | await StartupAsync();
72 | }
73 | }
74 |
75 | private static KeyboardAccelerator BuildKeyboardAccelerator(VirtualKey key, VirtualKeyModifiers? modifiers = null)
76 | {
77 | var keyboardAccelerator = new KeyboardAccelerator() { Key = key };
78 | if (modifiers.HasValue)
79 | {
80 | keyboardAccelerator.Modifiers = modifiers.Value;
81 | }
82 |
83 | keyboardAccelerator.Invoked += OnKeyboardAcceleratorInvoked;
84 | return keyboardAccelerator;
85 | }
86 |
87 | private static void OnKeyboardAcceleratorInvoked(KeyboardAccelerator sender, KeyboardAcceleratorInvokedEventArgs args)
88 | {
89 | var result = NavigationService.GoBack();
90 | args.Handled = result;
91 | }
92 |
93 | private async Task InitializeAsync()
94 | {
95 | await ThemeSelectorService.InitializeAsync().ConfigureAwait(false);
96 | //await WindowManagerService.Current.InitializeAsync();
97 | }
98 |
99 | private async Task HandleActivationAsync(object activationArgs)
100 | {
101 | var activationHandler = GetActivationHandlers()
102 | .FirstOrDefault(h => h.CanHandle(activationArgs));
103 |
104 | if (activationHandler != null)
105 | {
106 | await activationHandler.HandleAsync(activationArgs);
107 | }
108 |
109 | if (IsInteractive(activationArgs))
110 | {
111 | var defaultHandler = new DefaultActivationHandler(_defaultNavItem);
112 | if (defaultHandler.CanHandle(activationArgs))
113 | {
114 | await defaultHandler.HandleAsync(activationArgs);
115 | }
116 | }
117 | }
118 |
119 | private async Task StartupAsync()
120 | {
121 | // TODO: This is a sample to demonstrate how to add a UserActivity. Please adapt and move this method call to where you consider convenient in your app.
122 | //await UserActivityService.AddSampleUserActivity();
123 | await ThemeSelectorService.SetRequestedThemeAsync();
124 | await FirstRunDisplayService.ShowIfAppropriateAsync();
125 | await WhatsNewDisplayService.ShowIfAppropriateAsync();
126 | }
127 |
128 | private IEnumerable GetActivationHandlers()
129 | {
130 | yield return Singleton.Instance;
131 | //yield return Singleton.Instance;
132 | //yield return Singleton.Instance;
133 | yield return Singleton.Instance;
134 | }
135 |
136 | private bool IsInteractive(object args)
137 | {
138 | return args is IActivatedEventArgs;
139 | }
140 | }
141 | }
142 |
--------------------------------------------------------------------------------
/UTE UWP+/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UTE_UWP_.Services;
3 | using Windows.ApplicationModel.Activation;
4 | using Windows.Storage;
5 | using Windows.UI;
6 | using Windows.UI.Xaml;
7 | using Windows.UI.Xaml.Media;
8 |
9 | namespace UTE_UWP_
10 | {
11 | public sealed partial class App : Application
12 | {
13 | private Lazy _activationService;
14 |
15 | private ActivationService ActivationService
16 | {
17 | get { return _activationService.Value; }
18 | }
19 |
20 | public App()
21 | {
22 | InitializeComponent();
23 | UnhandledException += OnAppUnhandledException;
24 |
25 |
26 | // Deferred execution until used. Check https://docs.microsoft.com/dotnet/api/system.lazy-1 for further info on Lazy class.
27 | _activationService = new Lazy(CreateActivationService);
28 | }
29 |
30 | protected override async void OnLaunched(LaunchActivatedEventArgs args)
31 | {
32 | var LocalSettings = ApplicationData.Current.LocalSettings;
33 | if (LocalSettings.Values["NewRibbon"] == null)
34 | {
35 | LocalSettings.Values["NewRibbon"] = "Off";
36 | }
37 | if (LocalSettings.Values["AccentTheme"] == null) {
38 | LocalSettings.Values["AccentTheme"] = "Default";
39 | }
40 | if ((string)LocalSettings.Values["AccentTheme"] == "Slate Green")
41 | {
42 | var brush = new SolidColorBrush(Color.FromArgb(255, 92, 255, 138));
43 | Application.Current.Resources["SystemAccentColor"] = Color.FromArgb(255, 92, 255, 138);
44 | Application.Current.Resources["SystemAccentColorDark1"] = Color.FromArgb(255, 92, 255, 138);
45 | Application.Current.Resources["SystemAccentColorDark2"] = Color.FromArgb(255, 92, 255, 138);
46 | Application.Current.Resources["SystemAccentColorDark3"] = Color.FromArgb(255, 92, 255, 138);
47 | Application.Current.Resources["SystemAccentColorLight1"] = Color.FromArgb(255, 92, 255, 138);
48 | Application.Current.Resources["SystemAccentColorLight2"] = Color.FromArgb(255, 92, 255, 138);
49 | Application.Current.Resources["SystemAccentColorLight3"] = Color.FromArgb(255, 92, 255, 138);
50 | }
51 | if ((string)LocalSettings.Values["AccentTheme"] == "Lilac")
52 | {
53 | var brush = new SolidColorBrush(Color.FromArgb(255, 0x89, 0x61, 0xCC));
54 | Application.Current.Resources["SystemAccentColor"] = Color.FromArgb(255, 0x89, 0x81, 0xCC);
55 | Application.Current.Resources["SystemAccentColorDark1"] = Color.FromArgb(255, 0x98, 0x75, 0xD4);
56 | Application.Current.Resources["SystemAccentColorDark2"] = Color.FromArgb(255, 0xA7, 0x88, 0xDD);
57 | Application.Current.Resources["SystemAccentColorDark3"] = Color.FromArgb(255, 0xB7, 0x9C, 0xE5);
58 | Application.Current.Resources["SystemAccentColorLight1"] = Color.FromArgb(255, 0x77, 0x52, 0xBA);
59 | Application.Current.Resources["SystemAccentColorLight2"] = Color.FromArgb(255, 0x65, 0x43, 0xA9);
60 | Application.Current.Resources["SystemAccentColorLight3"] = Color.FromArgb(255, 0xA7, 0x88, 0xDD);
61 | }
62 | if ((string)LocalSettings.Values["AccentTheme"] == "Crimson")
63 | {
64 | var brush = new SolidColorBrush(Color.FromArgb(255, 0x89, 0x61, 0xCC));
65 | Application.Current.Resources["SystemAccentColor"] = Color.FromArgb(255, 0xD1, 0x34, 0x38);
66 | Application.Current.Resources["SystemAccentColorDark1"] = Color.FromArgb(255, 0xD9, 0x4D, 0x50);
67 | Application.Current.Resources["SystemAccentColorDark2"] = Color.FromArgb(255, 0xE1, 0x65, 0x68);
68 | Application.Current.Resources["SystemAccentColorDark3"] = Color.FromArgb(255, 0xE9, 0x7E, 0x81);
69 | Application.Current.Resources["SystemAccentColorLight1"] = Color.FromArgb(255, 0xBE, 0x2A, 0x2D);
70 | Application.Current.Resources["SystemAccentColorLight2"] = Color.FromArgb(255, 0xAB, 0x1F, 0x22);
71 | Application.Current.Resources["SystemAccentColorLight3"] = Color.FromArgb(255, 0x99, 0x15, 0x16);
72 | }
73 | if ((string)LocalSettings.Values["AccentTheme"] == "Blue")
74 | {
75 | var brush = new SolidColorBrush(Color.FromArgb(255, 0x89, 0x61, 0xCC));
76 | Application.Current.Resources["SystemAccentColor"] = Color.FromArgb(255, 0x00, 0x73, 0xCF);
77 | Application.Current.Resources["SystemAccentColorDark1"] = Color.FromArgb(255, 0x1D, 0x85, 0xD7);
78 | Application.Current.Resources["SystemAccentColorDark2"] = Color.FromArgb(255, 0x3B, 0x97, 0xDF);
79 | Application.Current.Resources["SystemAccentColorDark3"] = Color.FromArgb(255, 0x58, 0xA8, 0xE8);
80 | Application.Current.Resources["SystemAccentColorLight1"] = Color.FromArgb(255, 0x00, 0x64, 0xBE);
81 | Application.Current.Resources["SystemAccentColorLight2"] = Color.FromArgb(255, 0x00, 0x55, 0xAD);
82 | Application.Current.Resources["SystemAccentColorLight3"] = Color.FromArgb(255, 0x00, 0x45, 0x9D);
83 | }
84 | if ((string)LocalSettings.Values["AccentTheme"] == "Seafoam")
85 | {
86 | var brush = new SolidColorBrush(Color.FromArgb(255, 0x89, 0x61, 0xCC));
87 | Application.Current.Resources["SystemAccentColor"] = Color.FromArgb(255, 0x00, 0xB7, 0xC3);
88 | Application.Current.Resources["SystemAccentColorDark1"] = Color.FromArgb(255, 0x1C, 0xC1, 0xCC);
89 | Application.Current.Resources["SystemAccentColorDark2"] = Color.FromArgb(255, 0x38, 0xCA, 0xD4);
90 | Application.Current.Resources["SystemAccentColorDark3"] = Color.FromArgb(255, 0x54, 0xD4, 0xDD);
91 | Application.Current.Resources["SystemAccentColorLight1"] = Color.FromArgb(255, 0x00, 0xA4, 0xB0);
92 | Application.Current.Resources["SystemAccentColorLight2"] = Color.FromArgb(255, 0x00, 0x90, 0x9D);
93 | Application.Current.Resources["SystemAccentColorLight3"] = Color.FromArgb(255, 0x00, 0x7D, 0x89);
94 | }
95 | if (!args.PrelaunchActivated)
96 | {
97 | await ActivationService.ActivateAsync(args);
98 |
99 | }
100 | }
101 |
102 | protected override async void OnActivated(IActivatedEventArgs args)
103 | {
104 | await ActivationService.ActivateAsync(args);
105 | }
106 |
107 | private void OnAppUnhandledException(object sender, Windows.UI.Xaml.UnhandledExceptionEventArgs e)
108 | {
109 | // TODO: Please log and handle the exception as appropriate to your scenario
110 | // For more info see https://docs.microsoft.com/uwp/api/windows.ui.xaml.application.unhandledexception
111 | }
112 |
113 | private ActivationService CreateActivationService()
114 | {
115 | return new ActivationService(this, typeof(Views.MainPage));
116 | }
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Oo]ut/
33 | [Ll]og/
34 | [Ll]ogs/
35 |
36 | # Visual Studio 2015/2017 cache/options directory
37 | .vs/
38 | # Uncomment if you have tasks that create the project's static files in wwwroot
39 | #wwwroot/
40 |
41 | # Visual Studio 2017 auto generated files
42 | Generated\ Files/
43 |
44 | # MSTest test Results
45 | [Tt]est[Rr]esult*/
46 | [Bb]uild[Ll]og.*
47 |
48 | # NUnit
49 | *.VisualState.xml
50 | TestResult.xml
51 | nunit-*.xml
52 |
53 | # Build Results of an ATL Project
54 | [Dd]ebugPS/
55 | [Rr]eleasePS/
56 | dlldata.c
57 |
58 | # Benchmark Results
59 | BenchmarkDotNet.Artifacts/
60 |
61 | # .NET Core
62 | project.lock.json
63 | project.fragment.lock.json
64 | artifacts/
65 |
66 | # ASP.NET Scaffolding
67 | ScaffoldingReadMe.txt
68 |
69 | # StyleCop
70 | StyleCopReport.xml
71 |
72 | # Files built by Visual Studio
73 | *_i.c
74 | *_p.c
75 | *_h.h
76 | *.ilk
77 | *.meta
78 | *.obj
79 | *.iobj
80 | *.pch
81 | *.pdb
82 | *.ipdb
83 | *.pgc
84 | *.pgd
85 | *.rsp
86 | *.sbr
87 | *.tlb
88 | *.tli
89 | *.tlh
90 | *.tmp
91 | *.tmp_proj
92 | *_wpftmp.csproj
93 | *.log
94 | *.vspscc
95 | *.vssscc
96 | .builds
97 | *.pidb
98 | *.svclog
99 | *.scc
100 |
101 | # Chutzpah Test files
102 | _Chutzpah*
103 |
104 | # Visual C++ cache files
105 | ipch/
106 | *.aps
107 | *.ncb
108 | *.opendb
109 | *.opensdf
110 | *.sdf
111 | *.cachefile
112 | *.VC.db
113 | *.VC.VC.opendb
114 |
115 | # Visual Studio profiler
116 | *.psess
117 | *.vsp
118 | *.vspx
119 | *.sap
120 |
121 | # Visual Studio Trace Files
122 | *.e2e
123 |
124 | # TFS 2012 Local Workspace
125 | $tf/
126 |
127 | # Guidance Automation Toolkit
128 | *.gpState
129 |
130 | # ReSharper is a .NET coding add-in
131 | _ReSharper*/
132 | *.[Rr]e[Ss]harper
133 | *.DotSettings.user
134 |
135 | # TeamCity is a build add-in
136 | _TeamCity*
137 |
138 | # DotCover is a Code Coverage Tool
139 | *.dotCover
140 |
141 | # AxoCover is a Code Coverage Tool
142 | .axoCover/*
143 | !.axoCover/settings.json
144 |
145 | # Coverlet is a free, cross platform Code Coverage Tool
146 | coverage*.json
147 | coverage*.xml
148 | coverage*.info
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Microsoft Azure Build Output
210 | csx/
211 | *.build.csdef
212 |
213 | # Microsoft Azure Emulator
214 | ecf/
215 | rcf/
216 |
217 | # Windows Store app package directories and files
218 | AppPackages/
219 | BundleArtifacts/
220 | Package.StoreAssociation.xml
221 | _pkginfo.txt
222 | *.appx
223 | *.appxbundle
224 | *.appxupload
225 |
226 | # Visual Studio cache files
227 | # files ending in .cache can be ignored
228 | *.[Cc]ache
229 | # but keep track of directories ending in .cache
230 | !?*.[Cc]ache/
231 |
232 | # Others
233 | ClientBin/
234 | ~$*
235 | *~
236 | *.dbmdl
237 | *.dbproj.schemaview
238 | *.jfm
239 | *.pfx
240 | *.publishsettings
241 | orleans.codegen.cs
242 |
243 | # Including strong name files can present a security risk
244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
245 | #*.snk
246 |
247 | # Since there are multiple workflows, uncomment next line to ignore bower_components
248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
249 | #bower_components/
250 |
251 | # RIA/Silverlight projects
252 | Generated_Code/
253 |
254 | # Backup & report files from converting an old project file
255 | # to a newer Visual Studio version. Backup files are not needed,
256 | # because we have git ;-)
257 | _UpgradeReport_Files/
258 | Backup*/
259 | UpgradeLog*.XML
260 | UpgradeLog*.htm
261 | ServiceFabricBackup/
262 | *.rptproj.bak
263 |
264 | # SQL Server files
265 | *.mdf
266 | *.ldf
267 | *.ndf
268 |
269 | # Business Intelligence projects
270 | *.rdl.data
271 | *.bim.layout
272 | *.bim_*.settings
273 | *.rptproj.rsuser
274 | *- [Bb]ackup.rdl
275 | *- [Bb]ackup ([0-9]).rdl
276 | *- [Bb]ackup ([0-9][0-9]).rdl
277 |
278 | # Microsoft Fakes
279 | FakesAssemblies/
280 |
281 | # GhostDoc plugin setting file
282 | *.GhostDoc.xml
283 |
284 | # Node.js Tools for Visual Studio
285 | .ntvs_analysis.dat
286 | node_modules/
287 |
288 | # Visual Studio 6 build log
289 | *.plg
290 |
291 | # Visual Studio 6 workspace options file
292 | *.opt
293 |
294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295 | *.vbw
296 |
297 | # Visual Studio LightSwitch build output
298 | **/*.HTMLClient/GeneratedArtifacts
299 | **/*.DesktopClient/GeneratedArtifacts
300 | **/*.DesktopClient/ModelManifest.xml
301 | **/*.Server/GeneratedArtifacts
302 | **/*.Server/ModelManifest.xml
303 | _Pvt_Extensions
304 |
305 | # Paket dependency manager
306 | .paket/paket.exe
307 | paket-files/
308 |
309 | # FAKE - F# Make
310 | .fake/
311 |
312 | # CodeRush personal settings
313 | .cr/personal
314 |
315 | # Python Tools for Visual Studio (PTVS)
316 | __pycache__/
317 | *.pyc
318 |
319 | # Cake - Uncomment if you are using it
320 | # tools/**
321 | # !tools/packages.config
322 |
323 | # Tabs Studio
324 | *.tss
325 |
326 | # Telerik's JustMock configuration file
327 | *.jmconfig
328 |
329 | # BizTalk build output
330 | *.btp.cs
331 | *.btm.cs
332 | *.odx.cs
333 | *.xsd.cs
334 |
335 | # OpenCover UI analysis results
336 | OpenCover/
337 |
338 | # Azure Stream Analytics local run output
339 | ASALocalRun/
340 |
341 | # MSBuild Binary and Structured Log
342 | *.binlog
343 |
344 | # NVidia Nsight GPU debugger configuration file
345 | *.nvuser
346 |
347 | # MFractors (Xamarin productivity tool) working folder
348 | .mfractor/
349 |
350 | # Local History for Visual Studio
351 | .localhistory/
352 |
353 | # BeatPulse healthcheck temp database
354 | healthchecksdb
355 |
356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
357 | MigrationBackup/
358 |
359 | # Ionide (cross platform F# VS Code tools) working folder
360 | .ionide/
361 |
362 | # Fody - auto-generated XML schema
363 | FodyWeavers.xsd
--------------------------------------------------------------------------------
/UTE UWP+.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.8.34322.80
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UTE UWP+", "UTE UWP+\UTE UWP+.csproj", "{73B4987B-140D-4D2E-92C6-EA7A290D146C}"
7 | EndProject
8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UTE UWP+.Core", "UTE UWP+.Core\UTE UWP+.Core.csproj", "{19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Debug|ARM = Debug|ARM
14 | Debug|ARM64 = Debug|ARM64
15 | Debug|x64 = Debug|x64
16 | Debug|x86 = Debug|x86
17 | Release|Any CPU = Release|Any CPU
18 | Release|ARM = Release|ARM
19 | Release|ARM64 = Release|ARM64
20 | Release|x64 = Release|x64
21 | Release|x86 = Release|x86
22 | EndGlobalSection
23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
24 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Debug|Any CPU.ActiveCfg = Debug|x64
25 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Debug|Any CPU.Build.0 = Debug|x64
26 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Debug|Any CPU.Deploy.0 = Debug|x64
27 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Debug|ARM.ActiveCfg = Debug|ARM
28 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Debug|ARM.Build.0 = Debug|ARM
29 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Debug|ARM.Deploy.0 = Debug|ARM
30 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Debug|ARM64.ActiveCfg = Debug|ARM64
31 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Debug|ARM64.Build.0 = Debug|ARM64
32 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Debug|ARM64.Deploy.0 = Debug|ARM64
33 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Debug|x64.ActiveCfg = Debug|x64
34 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Debug|x64.Build.0 = Debug|x64
35 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Debug|x64.Deploy.0 = Debug|x64
36 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Debug|x86.ActiveCfg = Debug|x86
37 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Debug|x86.Build.0 = Debug|x86
38 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Debug|x86.Deploy.0 = Debug|x86
39 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Release|Any CPU.ActiveCfg = Release|x64
40 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Release|Any CPU.Build.0 = Release|x64
41 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Release|Any CPU.Deploy.0 = Release|x64
42 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Release|ARM.ActiveCfg = Release|ARM
43 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Release|ARM.Build.0 = Release|ARM
44 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Release|ARM.Deploy.0 = Release|ARM
45 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Release|ARM64.ActiveCfg = Release|ARM64
46 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Release|ARM64.Build.0 = Release|ARM64
47 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Release|ARM64.Deploy.0 = Release|ARM64
48 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Release|x64.ActiveCfg = Release|x64
49 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Release|x64.Build.0 = Release|x64
50 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Release|x64.Deploy.0 = Release|x64
51 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Release|x86.ActiveCfg = Release|x86
52 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Release|x86.Build.0 = Release|x86
53 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}.Release|x86.Deploy.0 = Release|x86
54 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
55 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
56 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Debug|ARM.ActiveCfg = Debug|Any CPU
57 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Debug|ARM.Build.0 = Debug|Any CPU
58 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Debug|ARM64.ActiveCfg = Debug|Any CPU
59 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Debug|ARM64.Build.0 = Debug|Any CPU
60 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Debug|x64.ActiveCfg = Debug|Any CPU
61 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Debug|x64.Build.0 = Debug|Any CPU
62 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Debug|x86.ActiveCfg = Debug|Any CPU
63 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Debug|x86.Build.0 = Debug|Any CPU
64 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
65 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Release|Any CPU.Build.0 = Release|Any CPU
66 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Release|ARM.ActiveCfg = Release|Any CPU
67 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Release|ARM.Build.0 = Release|Any CPU
68 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Release|ARM64.ActiveCfg = Release|Any CPU
69 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Release|ARM64.Build.0 = Release|Any CPU
70 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Release|x64.ActiveCfg = Release|Any CPU
71 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Release|x64.Build.0 = Release|Any CPU
72 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Release|x86.ActiveCfg = Release|Any CPU
73 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}.Release|x86.Build.0 = Release|Any CPU
74 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Debug|Any CPU.ActiveCfg = Debug|x64
75 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Debug|Any CPU.Build.0 = Debug|x64
76 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Debug|ARM.ActiveCfg = Debug|x64
77 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Debug|ARM.Build.0 = Debug|x64
78 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Debug|ARM64.ActiveCfg = Debug|arm64
79 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Debug|ARM64.Build.0 = Debug|arm64
80 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Debug|x64.ActiveCfg = Debug|x64
81 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Debug|x64.Build.0 = Debug|x64
82 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Debug|x86.ActiveCfg = Debug|x86
83 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Debug|x86.Build.0 = Debug|x86
84 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Release|Any CPU.ActiveCfg = Release|x64
85 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Release|Any CPU.Build.0 = Release|x64
86 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Release|ARM.ActiveCfg = Release|x64
87 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Release|ARM.Build.0 = Release|x64
88 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Release|ARM64.ActiveCfg = Release|arm64
89 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Release|ARM64.Build.0 = Release|arm64
90 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Release|x64.ActiveCfg = Release|x64
91 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Release|x64.Build.0 = Release|x64
92 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Release|x86.ActiveCfg = Release|x86
93 | {FF1EEBE0-AB84-4B40-A612-44AFB84D2C34}.Release|x86.Build.0 = Release|x86
94 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
95 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Debug|Any CPU.Build.0 = Debug|Any CPU
96 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Debug|ARM.ActiveCfg = Debug|Any CPU
97 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Debug|ARM.Build.0 = Debug|Any CPU
98 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Debug|ARM64.ActiveCfg = Debug|arm64
99 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Debug|ARM64.Build.0 = Debug|arm64
100 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Debug|x64.ActiveCfg = Debug|x64
101 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Debug|x64.Build.0 = Debug|x64
102 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Debug|x86.ActiveCfg = Debug|x86
103 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Debug|x86.Build.0 = Debug|x86
104 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Release|Any CPU.ActiveCfg = Release|Any CPU
105 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Release|Any CPU.Build.0 = Release|Any CPU
106 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Release|ARM.ActiveCfg = Release|Any CPU
107 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Release|ARM.Build.0 = Release|Any CPU
108 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Release|ARM64.ActiveCfg = Release|arm64
109 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Release|ARM64.Build.0 = Release|arm64
110 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Release|x64.ActiveCfg = Release|x64
111 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Release|x64.Build.0 = Release|x64
112 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Release|x86.ActiveCfg = Release|x86
113 | {C5269C6C-3A36-4946-83E9-EE8C994E333C}.Release|x86.Build.0 = Release|x86
114 | EndGlobalSection
115 | GlobalSection(SolutionProperties) = preSolution
116 | HideSolutionNode = FALSE
117 | EndGlobalSection
118 | GlobalSection(ExtensibilityGlobals) = postSolution
119 | SolutionGuid = {D09FD6CD-578E-43B1-A8A3-B8869B56CED6}
120 | EndGlobalSection
121 | EndGlobal
122 |
--------------------------------------------------------------------------------
/UTE UWP+/Views/SettingsPage.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | No wrap
25 | Wrap
26 | Wrap whole words
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
42 |
43 |
49 |
50 | Light
51 |
52 |
53 |
59 |
60 | Dark
61 |
62 |
63 |
69 |
70 | Default
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
96 |
97 |
98 |
99 |
100 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
--------------------------------------------------------------------------------
/UTE UWP+/Views/SettingsPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Runtime.CompilerServices;
5 | using System.Threading.Tasks;
6 |
7 | using UTE_UWP_.Helpers;
8 | using UTE_UWP_.Services;
9 |
10 | using Windows.ApplicationModel;
11 | using Windows.Storage;
12 | using Windows.UI;
13 | using Windows.UI.Xaml;
14 | using Windows.UI.Xaml.Controls;
15 | using Windows.UI.Xaml.Media;
16 | using Windows.UI.Xaml.Navigation;
17 |
18 | namespace UTE_UWP_.Views
19 | {
20 | public sealed partial class SettingsPage : Page, INotifyPropertyChanged
21 | {
22 | private ElementTheme _elementTheme = ThemeSelectorService.Theme;
23 |
24 | public ElementTheme ElementTheme
25 | {
26 | get { return _elementTheme; }
27 |
28 | set { Set(ref _elementTheme, value); }
29 | }
30 |
31 | private string _versionDescription;
32 |
33 | public string VersionDescription
34 | {
35 | get { return _versionDescription; }
36 |
37 | set { Set(ref _versionDescription, value); }
38 | }
39 |
40 | public List accentcolors = new List
41 | {
42 | "Default",
43 | "Blue",
44 | "Seafoam",
45 | "Slate Green",
46 | "Crimson",
47 | "Lilac"
48 | };
49 |
50 | public SettingsPage()
51 | {
52 | InitializeComponent();
53 |
54 | this.Background = new SolidColorBrush(Colors.Transparent);
55 |
56 | var LocalSettings = ApplicationData.Current.LocalSettings;
57 |
58 | if ((string)LocalSettings.Values["AccentTheme"] == "Slate Green")
59 | {
60 | AccentBox.SelectedItem = "Slate Green";
61 | }
62 | if ((string)LocalSettings.Values["AccentTheme"] == "Lilac")
63 | {
64 | AccentBox.SelectedItem = "Lilac";
65 | }
66 | if ((string)LocalSettings.Values["AccentTheme"] == "Crimson")
67 | {
68 | AccentBox.SelectedItem = "Crimson";
69 | }
70 | if ((string)LocalSettings.Values["AccentTheme"] == "Seafoam")
71 | {
72 | AccentBox.SelectedItem = "Seafoam";
73 | }
74 | if ((string)LocalSettings.Values["AccentTheme"] == "Blue")
75 | {
76 | AccentBox.SelectedItem = "Blue";
77 | }
78 | if ((string)LocalSettings.Values["AccentTheme"] == "Default")
79 | {
80 | AccentBox.SelectedItem = "Default";
81 | }
82 |
83 |
84 | if ((string)LocalSettings.Values["TextWrapping"] == "No wrap")
85 | {
86 | TextWrapComboBox.SelectedItem = "No wrap";
87 | }
88 | if ((string)LocalSettings.Values["TextWrapping"] == "Wrap")
89 | {
90 | TextWrapComboBox.SelectedItem = "Wrap";
91 | }
92 | if ((string)LocalSettings.Values["TextWrapping"] == "Wrap whole words")
93 | {
94 | TextWrapComboBox.SelectedItem = "Wrap whole words";
95 | }
96 |
97 |
98 | if (LocalSettings.Values["SpellCheck"] != null)
99 | {
100 | if ((string)LocalSettings.Values["SpellCheck"] == "On")
101 | {
102 | spellcheckBox.IsChecked = true;
103 |
104 | }
105 | if ((string)LocalSettings.Values["SpellCheck"] == "Off")
106 | {
107 | spellcheckBox.IsChecked = false;
108 | }
109 | }
110 | else
111 | {
112 | LocalSettings.Values["SpellCheck"] = "Off";
113 | spellcheckBox.IsChecked = false;
114 | }
115 | }
116 |
117 | protected override async void OnNavigatedTo(NavigationEventArgs e)
118 | {
119 | await InitializeAsync();
120 | }
121 |
122 | private async Task InitializeAsync()
123 | {
124 | VersionDescription = GetVersionDescription();
125 | await Task.CompletedTask;
126 | }
127 |
128 | private string GetVersionDescription()
129 | {
130 | var appName = "AppDisplayName".GetLocalized();
131 | var package = Package.Current;
132 | var packageId = package.Id;
133 | var version = packageId.Version;
134 |
135 | return $"{appName} - {version.Major}.{version.Minor}.{version.Build}.{version.Revision}";
136 | }
137 |
138 | private async void ThemeChanged_CheckedAsync(object sender, RoutedEventArgs e)
139 | {
140 | var param = (sender as RadioButton)?.CommandParameter;
141 |
142 | if (param != null)
143 | {
144 | await ThemeSelectorService.SetThemeAsync((ElementTheme)param);
145 | }
146 | }
147 |
148 | public event PropertyChangedEventHandler PropertyChanged;
149 |
150 | private void Set(ref T storage, T value, [CallerMemberName]string propertyName = null)
151 | {
152 | if (Equals(storage, value))
153 | {
154 | return;
155 | }
156 |
157 | storage = value;
158 | OnPropertyChanged(propertyName);
159 | }
160 |
161 | public List Fonts;
162 |
163 | #region Appearance
164 | public int DocumentViewPadding;
165 |
166 | public string DefaultFont;
167 |
168 | // Modes:
169 | // 0. No wrap
170 | // 1. Wrap
171 | // 2. Wrap whole words
172 |
173 | public int TextWrapping;
174 |
175 | // Modes:
176 | // 0. Light
177 | // 1. Dark
178 | // 2. Default
179 |
180 | public int Theme;
181 | #endregion
182 |
183 | private void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
184 |
185 | private async void GH_Navigate(object sender, RoutedEventArgs e)
186 | {
187 | // The URI to launch
188 | string uriToLaunch = @"https://github.com/jpbandroid/UltraTextEdit-UWP";
189 |
190 | // Create a Uri object from a URI string
191 | var uri = new Uri(uriToLaunch);
192 |
193 | // Launch the URI
194 | async void DefaultLaunch()
195 | {
196 | // Launch the URI
197 | var success = await Windows.System.Launcher.LaunchUriAsync(uri);
198 |
199 | if (success)
200 | {
201 | // URI launched
202 | }
203 | else
204 | {
205 | // URI launch failed
206 | }
207 | }
208 | DefaultLaunch();
209 | }
210 |
211 | private void VIDsButton_Click(object sender, RoutedEventArgs e)
212 | {
213 | if (Window.Current.Content is Frame rootFrame)
214 | {
215 | rootFrame.Navigate(typeof(VelocityIDsPage));
216 | }
217 | }
218 |
219 | private void AccentBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
220 | {
221 | var LocalSettings = ApplicationData.Current.LocalSettings;
222 | if (AccentBox.SelectedItem != null)
223 | {
224 | if ((string)AccentBox.SelectedItem == "Default")
225 | {
226 | LocalSettings.Values["AccentTheme"] = "Default";
227 | } else if ((string)AccentBox.SelectedItem == "Slate Green")
228 | {
229 | LocalSettings.Values["AccentTheme"] = "Slate Green";
230 | } else if ((string)AccentBox.SelectedItem == "Lilac")
231 | {
232 | LocalSettings.Values["AccentTheme"] = "Lilac";
233 | }
234 | else if ((string)AccentBox.SelectedItem == "Seafoam")
235 | {
236 | LocalSettings.Values["AccentTheme"] = "Seafoam";
237 | }
238 | else if ((string)AccentBox.SelectedItem == "Blue")
239 | {
240 | LocalSettings.Values["AccentTheme"] = "Blue";
241 | }
242 | else if ((string)AccentBox.SelectedItem == "Crimson")
243 | {
244 | LocalSettings.Values["AccentTheme"] = "Crimson";
245 | }
246 | }
247 | }
248 |
249 | private void spellcheckBox_Checked(object sender, RoutedEventArgs e)
250 | {
251 | var LocalSettings = ApplicationData.Current.LocalSettings;
252 | if (LocalSettings.Values["SpellCheck"] != null)
253 | {
254 | LocalSettings.Values["SpellCheck"] = "On";
255 | }
256 | }
257 |
258 | private void spellcheckBox_Unchecked(object sender, RoutedEventArgs e)
259 | {
260 | var LocalSettings = ApplicationData.Current.LocalSettings;
261 | if (LocalSettings.Values["SpellCheck"] != null)
262 | {
263 | LocalSettings.Values["SpellCheck"] = "Off";
264 | }
265 | }
266 |
267 | private void TextWrapComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
268 | {
269 | var LocalSettings = ApplicationData.Current.LocalSettings;
270 | if (TextWrapComboBox.SelectedItem != null) {
271 | if (LocalSettings.Values["TextWrapping"] != null)
272 | {
273 | LocalSettings.Values["TextWrapping"] = TextWrapComboBox.SelectedItem.ToString();
274 | } else
275 | {
276 | LocalSettings.Values["TextWrapping"] = "Wrap";
277 | }
278 | }
279 | }
280 |
281 | private void LocalizationContrib_Navigate(object sender, RoutedEventArgs e)
282 | {
283 | // The URI to launch
284 | string uriToLaunch = @"https://crowdin.com/project/ultratextedit-uwp";
285 |
286 | // Create a Uri object from a URI string
287 | var uri = new Uri(uriToLaunch);
288 |
289 | // Launch the URI
290 | async void DefaultLaunch()
291 | {
292 | // Launch the URI
293 | var success = await Windows.System.Launcher.LaunchUriAsync(uri);
294 |
295 | if (success)
296 | {
297 | // URI launched
298 | }
299 | else
300 | {
301 | // URI launch failed
302 | }
303 | }
304 | DefaultLaunch();
305 | }
306 |
307 | public void UpdateButton_Click(object sender, RoutedEventArgs e)
308 | {
309 | UTEUpdateLauncher updateLauncher = new UTEUpdateLauncher();
310 | updateLauncher.LaunchUTEUpdate();
311 | }
312 | }
313 | }
314 |
--------------------------------------------------------------------------------
/UTE UWP+/UTE UWP+.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 9.0
6 | Debug
7 | x86
8 | {73B4987B-140D-4D2E-92C6-EA7A290D146C}
9 | AppContainerExe
10 | Properties
11 | UTE_UWP_
12 | UTE_UWP_
13 | en-US
14 | UAP
15 | 10.0.26100.0
16 | 10.0.17763.0
17 | 14
18 | 512
19 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
20 | true
21 |
22 |
23 | False
24 | C211B2ED7E44682F953BB3FADD3225F23E30558E
25 | SHA256
26 | False
27 | True
28 | Always
29 | x86|x64|arm64
30 | 0
31 | True
32 |
33 |
34 | true
35 | bin\x86\Debug\
36 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;DISABLE_XAML_GENERATED_MAIN
37 | ;2008
38 | full
39 | x86
40 | false
41 | prompt
42 | true
43 |
44 |
45 | bin\x86\Release\
46 | TRACE;NETFX_CORE;WINDOWS_UWP;DISABLE_XAML_GENERATED_MAIN
47 | true
48 | ;2008
49 | pdbonly
50 | x86
51 | false
52 | prompt
53 | true
54 | true
55 |
56 |
57 | true
58 | bin\ARM\Debug\
59 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;DISABLE_XAML_GENERATED_MAIN
60 | ;2008
61 | full
62 | ARM
63 | false
64 | prompt
65 | true
66 |
67 |
68 | bin\ARM\Release\
69 | TRACE;NETFX_CORE;WINDOWS_UWP;DISABLE_XAML_GENERATED_MAIN
70 | true
71 | ;2008
72 | pdbonly
73 | ARM
74 | false
75 | prompt
76 | true
77 | true
78 |
79 |
80 | true
81 | bin\ARM64\Debug\
82 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;DISABLE_XAML_GENERATED_MAIN
83 | ;2008
84 | full
85 | ARM64
86 | false
87 | prompt
88 | true
89 | true
90 |
91 |
92 | bin\ARM64\Release\
93 | TRACE;NETFX_CORE;WINDOWS_UWP;DISABLE_XAML_GENERATED_MAIN
94 | true
95 | ;2008
96 | pdbonly
97 | ARM64
98 | false
99 | prompt
100 | true
101 | true
102 |
103 |
104 | true
105 | bin\x64\Debug\
106 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;DISABLE_XAML_GENERATED_MAIN
107 | ;2008
108 | full
109 | x64
110 | false
111 | prompt
112 | true
113 |
114 |
115 | bin\x64\Release\
116 | TRACE;NETFX_CORE;WINDOWS_UWP;DISABLE_XAML_GENERATED_MAIN
117 | true
118 | ;2008
119 | pdbonly
120 | x64
121 | false
122 | prompt
123 | true
124 | true
125 |
126 |
127 | PackageReference
128 |
129 |
130 |
131 | 3.1.0
132 |
133 |
134 | 8.4.0
135 |
136 |
137 | 0.1.250305-build.2058
138 |
139 |
140 | 8.2.250129-preview2
141 |
142 |
143 | 8.2.250129-preview2
144 |
145 |
146 | 0.40.0
147 |
148 |
149 | 0.2.12
150 |
151 |
152 | 10.0.0-preview.1.25080.5
153 |
154 |
155 | 8.0.0-preview.7.23375.6
156 |
157 |
158 | 6.0.0-preview.4.21253.7
159 |
160 |
161 | 6.2.14
162 |
163 |
164 | 7.1.3
165 |
166 |
167 | 7.1.3
168 |
169 |
170 | 7.1.3
171 |
172 |
173 | 2.8.7
174 |
175 |
176 | 3.0.0
177 |
178 |
179 |
180 |
181 | Designer
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 | AboutUTE.xaml
204 |
205 |
206 | ComputeHash.xaml
207 |
208 |
209 | FirstRunDialog.xaml
210 |
211 |
212 | HelpPage.xaml
213 |
214 |
215 |
216 | MainPage.xaml
217 |
218 |
219 | SettingsPage.xaml
220 |
221 |
222 | SettingsPageContainer.xaml
223 |
224 |
225 |
226 | UTEUpdate.xaml
227 |
228 |
229 | VelocityIDsPage.xaml
230 |
231 |
232 |
233 | WhatsNewDialog.xaml
234 |
235 |
236 |
237 |
238 | App.xaml
239 |
240 |
241 |
242 |
243 |
244 | MSBuild:Compile
245 | Designer
246 |
247 |
248 | Designer
249 | MSBuild:Compile
250 |
251 |
252 | Designer
253 | MSBuild:Compile
254 |
255 |
256 | Designer
257 | MSBuild:Compile
258 |
259 |
260 | Designer
261 | MSBuild:Compile
262 |
263 |
264 | Designer
265 | MSBuild:Compile
266 |
267 |
268 | Designer
269 | MSBuild:Compile
270 |
271 |
272 | MSBuild:Compile
273 | Designer
274 |
275 |
276 | Designer
277 | MSBuild:Compile
278 |
279 |
280 | MSBuild:Compile
281 | Designer
282 |
283 |
284 | MSBuild:Compile
285 | Designer
286 |
287 |
288 | MSBuild:Compile
289 | Designer
290 |
291 |
292 | Designer
293 | MSBuild:Compile
294 |
295 |
296 | MSBuild:Compile
297 | Designer
298 |
299 |
300 | Designer
301 | MSBuild:Compile
302 |
303 |
304 | Designer
305 | MSBuild:Compile
306 |
307 |
308 | MSBuild:Compile
309 | Designer
310 |
311 |
312 |
313 |
314 | Designer
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 | PreserveNewest
398 |
399 |
400 | Always
401 |
402 |
403 | Always
404 |
405 |
406 | Always
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 | MSBuild:Compile
444 | Designer
445 |
446 |
447 |
448 |
449 | {19C9189B-7CEE-43BD-8E96-DA3CADB91BC0}
450 | UTE UWP+.Core
451 |
452 |
453 |
454 |
455 | 14.0
456 |
457 |
458 |
465 |
--------------------------------------------------------------------------------