2021-03-03 01:56:37 +08:00
|
|
|
// Copyright (c) Microsoft Corporation
|
|
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
using System.Diagnostics.CodeAnalysis;
|
2021-08-24 01:48:52 +08:00
|
|
|
using Microsoft.PowerToys.Settings.UI.Library;
|
2021-03-03 01:56:37 +08:00
|
|
|
using Microsoft.PowerToys.Settings.UI.OOBE.Enums;
|
|
|
|
using Microsoft.PowerToys.Settings.UI.OOBE.ViewModel;
|
|
|
|
using Windows.ApplicationModel.Resources;
|
2021-08-24 01:48:52 +08:00
|
|
|
using Windows.UI.Xaml;
|
2021-03-03 01:56:37 +08:00
|
|
|
using Windows.UI.Xaml.Controls;
|
|
|
|
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.OOBE.Views
|
|
|
|
{
|
|
|
|
public sealed partial class OobeShellPage : UserControl
|
|
|
|
{
|
|
|
|
public static Func<string> RunSharedEventCallback { get; set; }
|
|
|
|
|
|
|
|
public static void SetRunSharedEventCallback(Func<string> implementation)
|
|
|
|
{
|
|
|
|
RunSharedEventCallback = implementation;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Func<string> ColorPickerSharedEventCallback { get; set; }
|
|
|
|
|
|
|
|
public static void SetColorPickerSharedEventCallback(Func<string> implementation)
|
|
|
|
{
|
|
|
|
ColorPickerSharedEventCallback = implementation;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Action<Type> OpenMainWindowCallback { get; set; }
|
|
|
|
|
|
|
|
public static void SetOpenMainWindowCallback(Action<Type> implementation)
|
|
|
|
{
|
|
|
|
OpenMainWindowCallback = implementation;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets view model.
|
|
|
|
/// </summary>
|
|
|
|
public OobeShellViewModel ViewModel { get; } = new OobeShellViewModel();
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a shell handler to be used to update contents of the shell dynamically from page within the frame.
|
|
|
|
/// </summary>
|
|
|
|
public static OobeShellPage OobeShellHandler { get; set; }
|
|
|
|
|
|
|
|
public ObservableCollection<OobePowerToysModule> Modules { get; }
|
|
|
|
|
|
|
|
public OobeShellPage()
|
|
|
|
{
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
|
|
DataContext = ViewModel;
|
|
|
|
OobeShellHandler = this;
|
2021-08-24 01:48:52 +08:00
|
|
|
UpdateUITheme();
|
2021-03-03 01:56:37 +08:00
|
|
|
Modules = new ObservableCollection<OobePowerToysModule>();
|
|
|
|
ResourceLoader loader = ResourceLoader.GetForViewIndependentUse();
|
|
|
|
|
|
|
|
Modules.Insert((int)PowerToysModulesEnum.Overview, new OobePowerToysModule()
|
|
|
|
{
|
|
|
|
ModuleName = loader.GetString("Oobe_Welcome"),
|
|
|
|
Tag = "Overview",
|
|
|
|
IsNew = false,
|
|
|
|
Icon = "\uEF3C",
|
|
|
|
Image = "ms-appx:///Assets/Modules/ColorPicker.png",
|
|
|
|
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsPowerToys.png",
|
2021-03-04 05:48:36 +08:00
|
|
|
PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/OOBEPTHero.png",
|
2021-03-03 01:56:37 +08:00
|
|
|
DescriptionLink = "https://aka.ms/PowerToysOverview",
|
|
|
|
Link = "https://github.com/microsoft/PowerToys/releases/",
|
|
|
|
});
|
2022-02-22 19:02:08 +08:00
|
|
|
Modules.Insert((int)PowerToysModulesEnum.WhatsNew, new OobePowerToysModule()
|
|
|
|
{
|
|
|
|
ModuleName = loader.GetString("Oobe_WhatsNew"),
|
|
|
|
Tag = "WhatsNew",
|
|
|
|
IsNew = false,
|
|
|
|
Icon = "\uEF3C",
|
|
|
|
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsSettings.png",
|
|
|
|
});
|
2021-12-30 01:33:20 +08:00
|
|
|
Modules.Insert((int)PowerToysModulesEnum.AlwaysOnTop, new OobePowerToysModule()
|
|
|
|
{
|
|
|
|
ModuleName = loader.GetString("Oobe_AlwaysOnTop"),
|
|
|
|
Tag = "AlwaysOnTop",
|
|
|
|
IsNew = true,
|
|
|
|
Icon = "\uEC32",
|
|
|
|
Image = "ms-appx:///Assets/Modules/AlwaysOnTop.png",
|
|
|
|
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsAlwaysOnTop.png",
|
|
|
|
PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/AlwaysOnTop.png",
|
|
|
|
Description = loader.GetString("Oobe_AlwaysOnTop_Description"),
|
|
|
|
Link = "https://aka.ms/PowerToysOverview_AlwaysOnTop",
|
|
|
|
});
|
2021-06-10 00:13:58 +08:00
|
|
|
Modules.Insert((int)PowerToysModulesEnum.Awake, new OobePowerToysModule()
|
Espresso (#11303)
* Update README.md
* Espresso (#11245)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Update Product.wxs
* Update Shortcut.cpp
* Update with more logging (#11332)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Fix minor issue in the module branch (#11340)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Update Product.wxs
* Update Program.cs
* fixing typo
* removing a unneeded removal
* [Espresso] More minor tweaks to logging (#11341)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Update patterns.txt
* Fix binding issues (#11368)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
* Fix binding issue with the time settings
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Introduce the off mode and fix binding issues (#11385)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
* Fix binding issue with the time settings
* Proper Espresso behavior for binding
* Fix settings UI
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Update with missing strings. (#11386)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
* Fix binding issue with the time settings
* Proper Espresso behavior for binding
* Fix settings UI
* Re-add missing strings
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Fix whitespace issue (#11387)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
* Fix binding issue with the time settings
* Proper Espresso behavior for binding
* Fix settings UI
* Re-add missing strings
* Fix whitespace issue
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Fix default (#11388)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
* Fix binding issue with the time settings
* Proper Espresso behavior for binding
* Fix settings UI
* Re-add missing strings
* Fix whitespace issue
* Fix the default mode of operation
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Update Microsoft.PowerToys.Settings.UI.csproj
* Localization improvements
* Replaced a computer with your pc
* Updated Espresso imagery
* Fixed inconsistent string
* Margin fix and updated images
* Removed unused code
Co-authored-by: Den Delimarsky <1389609+dend@users.noreply.github.com>
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
Co-authored-by: Enrico Giordani <enrico.giordani@gmail.com>
2021-05-26 01:13:04 +08:00
|
|
|
{
|
2021-06-10 00:13:58 +08:00
|
|
|
ModuleName = loader.GetString("Oobe_Awake"),
|
|
|
|
Tag = "Awake",
|
Espresso (#11303)
* Update README.md
* Espresso (#11245)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Update Product.wxs
* Update Shortcut.cpp
* Update with more logging (#11332)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Fix minor issue in the module branch (#11340)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Update Product.wxs
* Update Program.cs
* fixing typo
* removing a unneeded removal
* [Espresso] More minor tweaks to logging (#11341)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Update patterns.txt
* Fix binding issues (#11368)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
* Fix binding issue with the time settings
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Introduce the off mode and fix binding issues (#11385)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
* Fix binding issue with the time settings
* Proper Espresso behavior for binding
* Fix settings UI
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Update with missing strings. (#11386)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
* Fix binding issue with the time settings
* Proper Espresso behavior for binding
* Fix settings UI
* Re-add missing strings
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Fix whitespace issue (#11387)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
* Fix binding issue with the time settings
* Proper Espresso behavior for binding
* Fix settings UI
* Re-add missing strings
* Fix whitespace issue
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Fix default (#11388)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
* Fix binding issue with the time settings
* Proper Espresso behavior for binding
* Fix settings UI
* Re-add missing strings
* Fix whitespace issue
* Fix the default mode of operation
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Update Microsoft.PowerToys.Settings.UI.csproj
* Localization improvements
* Replaced a computer with your pc
* Updated Espresso imagery
* Fixed inconsistent string
* Margin fix and updated images
* Removed unused code
Co-authored-by: Den Delimarsky <1389609+dend@users.noreply.github.com>
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
Co-authored-by: Enrico Giordani <enrico.giordani@gmail.com>
2021-05-26 01:13:04 +08:00
|
|
|
IsNew = false,
|
|
|
|
Icon = "\uEC32",
|
2021-06-10 00:13:58 +08:00
|
|
|
Image = "ms-appx:///Assets/Modules/Awake.png",
|
|
|
|
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsAwake.png",
|
|
|
|
PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/Awake.png",
|
|
|
|
Description = loader.GetString("Oobe_Awake_Description"),
|
|
|
|
Link = "https://aka.ms/PowerToysOverview_Awake",
|
Espresso (#11303)
* Update README.md
* Espresso (#11245)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Update Product.wxs
* Update Shortcut.cpp
* Update with more logging (#11332)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Fix minor issue in the module branch (#11340)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Update Product.wxs
* Update Program.cs
* fixing typo
* removing a unneeded removal
* [Espresso] More minor tweaks to logging (#11341)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Update patterns.txt
* Fix binding issues (#11368)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
* Fix binding issue with the time settings
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Introduce the off mode and fix binding issues (#11385)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
* Fix binding issue with the time settings
* Proper Espresso behavior for binding
* Fix settings UI
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Update with missing strings. (#11386)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
* Fix binding issue with the time settings
* Proper Espresso behavior for binding
* Fix settings UI
* Re-add missing strings
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Fix whitespace issue (#11387)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
* Fix binding issue with the time settings
* Proper Espresso behavior for binding
* Fix settings UI
* Re-add missing strings
* Fix whitespace issue
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Fix default (#11388)
* Revert "Merge branch 'microsoft:master' into master"
This reverts commit b080908712557fce0e93a98e8d3bcb58fbd111fc, reversing
changes made to 8463c95a43a737532ae21dfa9aee1894a3a37dde.
* Fix conversion of settings in the UX
* Update terminology
* Updating logging configuration
* Set up how tray and setting configuration works
* Adding hero images
* Fix how binding works
* Update OOBE string
* Fix spelling error
* fixing dep to include espresso, adding in yml
* Update API components and fix display keep-awake bug
* Adding words that the spell check is yelling about
* tweak wsx
* Change default setting for Espresso
* Adding some extra logging
* Update Shortcut.cpp
* Fix log location coming from the runner
* More chatty logging for console allocation
* Installer config to add the missing assets
* Remove unused handle codes
* Update log file name for the Espresso C++ code.
* Update the project configuration to fix build issue
* Fix binding issue with the time settings
* Proper Espresso behavior for binding
* Fix settings UI
* Re-add missing strings
* Fix whitespace issue
* Fix the default mode of operation
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
* Update Microsoft.PowerToys.Settings.UI.csproj
* Localization improvements
* Replaced a computer with your pc
* Updated Espresso imagery
* Fixed inconsistent string
* Margin fix and updated images
* Removed unused code
Co-authored-by: Den Delimarsky <1389609+dend@users.noreply.github.com>
Co-authored-by: Niels Laute <niels9001@hotmail.com>
Co-authored-by: crutkas <crutkas@microsoft.com>
Co-authored-by: Enrico Giordani <enrico.giordani@gmail.com>
2021-05-26 01:13:04 +08:00
|
|
|
});
|
2021-06-15 01:34:32 +08:00
|
|
|
Modules.Insert((int)PowerToysModulesEnum.ColorPicker, new OobePowerToysModule()
|
|
|
|
{
|
|
|
|
ModuleName = loader.GetString("Oobe_ColorPicker"),
|
|
|
|
Tag = "ColorPicker",
|
|
|
|
IsNew = false,
|
|
|
|
Icon = "\uEF3C",
|
|
|
|
Image = "ms-appx:///Assets/Modules/ColorPicker.png",
|
|
|
|
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsColorPicker.png",
|
|
|
|
PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/ColorPicker.gif",
|
|
|
|
Description = loader.GetString("Oobe_ColorPicker_Description"),
|
|
|
|
Link = "https://aka.ms/PowerToysOverview_ColorPicker",
|
|
|
|
});
|
2021-03-03 01:56:37 +08:00
|
|
|
Modules.Insert((int)PowerToysModulesEnum.FancyZones, new OobePowerToysModule()
|
|
|
|
{
|
|
|
|
ModuleName = loader.GetString("Oobe_FancyZones"),
|
|
|
|
Tag = "FancyZones",
|
|
|
|
IsNew = false,
|
|
|
|
Icon = "\uE737",
|
|
|
|
Image = "ms-appx:///Assets/Modules/FancyZones.png",
|
|
|
|
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsFancyZones.png",
|
|
|
|
PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/FancyZones.gif",
|
|
|
|
Description = loader.GetString("Oobe_FancyZones_Description"),
|
|
|
|
Link = "https://aka.ms/PowerToysOverview_FancyZones",
|
|
|
|
});
|
2021-03-04 20:33:50 +08:00
|
|
|
Modules.Insert((int)PowerToysModulesEnum.FileExplorer, new OobePowerToysModule()
|
|
|
|
{
|
|
|
|
ModuleName = loader.GetString("Oobe_FileExplorer"),
|
|
|
|
Tag = "FileExplorer",
|
|
|
|
IsNew = false,
|
|
|
|
Icon = "\uEC50",
|
|
|
|
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsFileExplorerPreview.png",
|
|
|
|
Image = "ms-appx:///Assets/Modules/PowerPreview.png",
|
|
|
|
Description = loader.GetString("Oobe_FileExplorer_Description"),
|
|
|
|
PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/FileExplorer.png",
|
|
|
|
Link = "https://aka.ms/PowerToysOverview_FileExplorerAddOns",
|
|
|
|
});
|
2021-03-03 01:56:37 +08:00
|
|
|
Modules.Insert((int)PowerToysModulesEnum.ImageResizer, new OobePowerToysModule()
|
|
|
|
{
|
|
|
|
ModuleName = loader.GetString("Oobe_ImageResizer"),
|
|
|
|
Tag = "ImageResizer",
|
|
|
|
IsNew = false,
|
|
|
|
Icon = "\uEB9F",
|
|
|
|
Image = "ms-appx:///Assets/Modules/ImageResizer.png",
|
|
|
|
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsImageResizer.png",
|
|
|
|
Description = loader.GetString("Oobe_ImageResizer_Description"),
|
|
|
|
PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/ImageResizer.gif",
|
|
|
|
Link = "https://aka.ms/PowerToysOverview_ImageResizer",
|
|
|
|
});
|
|
|
|
Modules.Insert((int)PowerToysModulesEnum.KBM, new OobePowerToysModule()
|
|
|
|
{
|
|
|
|
ModuleName = loader.GetString("Oobe_KBM"),
|
|
|
|
Tag = "KBM",
|
|
|
|
IsNew = false,
|
|
|
|
Icon = "\uE765",
|
|
|
|
Image = "ms-appx:///Assets/Modules/KeyboardManager.png",
|
|
|
|
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsKeyboardManager.png",
|
|
|
|
Description = loader.GetString("Oobe_KBM_Description"),
|
|
|
|
PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/KBM.gif",
|
|
|
|
Link = "https://aka.ms/PowerToysOverview_KeyboardManager",
|
|
|
|
});
|
2021-10-22 20:30:18 +08:00
|
|
|
Modules.Insert((int)PowerToysModulesEnum.MouseUtils, new OobePowerToysModule()
|
|
|
|
{
|
|
|
|
ModuleName = loader.GetString("Oobe_MouseUtils"),
|
|
|
|
Tag = "MouseUtils",
|
|
|
|
IsNew = true,
|
|
|
|
Icon = "\uE962",
|
|
|
|
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsMouseUtils.png",
|
|
|
|
Image = "ms-appx:///Assets/Modules/MouseUtils.png",
|
|
|
|
Description = loader.GetString("Oobe_MouseUtils_Description"),
|
|
|
|
PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/MouseUtils.gif",
|
|
|
|
Link = "https://aka.ms/PowerToysOverview_MouseUtilities", // TODO: Add correct link after it's been created.
|
|
|
|
});
|
2021-03-03 01:56:37 +08:00
|
|
|
Modules.Insert((int)PowerToysModulesEnum.PowerRename, new OobePowerToysModule()
|
|
|
|
{
|
|
|
|
ModuleName = loader.GetString("Oobe_PowerRename"),
|
|
|
|
Tag = "PowerRename",
|
|
|
|
IsNew = false,
|
|
|
|
Icon = "\uE8AC",
|
|
|
|
Image = "ms-appx:///Assets/Modules/PowerRename.png",
|
|
|
|
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsPowerRename.png",
|
|
|
|
Description = loader.GetString("Oobe_PowerRename_Description"),
|
|
|
|
PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/PowerRename.gif",
|
|
|
|
Link = "https://aka.ms/PowerToysOverview_PowerRename",
|
|
|
|
});
|
2021-04-05 17:15:08 +08:00
|
|
|
Modules.Insert((int)PowerToysModulesEnum.Run, new OobePowerToysModule()
|
|
|
|
{
|
|
|
|
ModuleName = loader.GetString("Oobe_Run"),
|
|
|
|
Tag = "Run",
|
|
|
|
IsNew = false,
|
|
|
|
Icon = "\uE773",
|
|
|
|
Image = "ms-appx:///Assets/Modules/PowerLauncher.png",
|
|
|
|
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsPowerToysRun.png",
|
|
|
|
PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/Run.gif",
|
|
|
|
Description = loader.GetString("Oobe_PowerRun_Description"),
|
|
|
|
Link = "https://aka.ms/PowerToysOverview_PowerToysRun",
|
|
|
|
});
|
2021-03-03 01:56:37 +08:00
|
|
|
Modules.Insert((int)PowerToysModulesEnum.ShortcutGuide, new OobePowerToysModule()
|
|
|
|
{
|
|
|
|
ModuleName = loader.GetString("Oobe_ShortcutGuide"),
|
|
|
|
Tag = "ShortcutGuide",
|
|
|
|
IsNew = false,
|
|
|
|
Icon = "\uEDA7",
|
|
|
|
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsShortcutGuide.png",
|
|
|
|
Image = "ms-appx:///Assets/Modules/ShortcutGuide.png",
|
|
|
|
Description = loader.GetString("Oobe_ShortcutGuide_Description"),
|
|
|
|
PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/OOBEShortcutGuide.png",
|
|
|
|
Link = "https://aka.ms/PowerToysOverview_ShortcutGuide",
|
|
|
|
});
|
2021-08-24 01:48:52 +08:00
|
|
|
|
2021-10-07 21:48:45 +08:00
|
|
|
Modules.Insert((int)PowerToysModulesEnum.VideoConference, new OobePowerToysModule()
|
2021-03-03 01:56:37 +08:00
|
|
|
{
|
|
|
|
ModuleName = loader.GetString("Oobe_VideoConference"),
|
|
|
|
Tag = "VideoConference",
|
|
|
|
IsNew = true,
|
|
|
|
Icon = "\uEC50",
|
|
|
|
FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsVideoConferenceMute.png",
|
|
|
|
Image = "ms-appx:///Assets/Modules/VideoConference.png",
|
|
|
|
Description = loader.GetString("Oobe_VideoConference_Description"),
|
|
|
|
PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/VideoConferenceMute.png",
|
|
|
|
Link = "https://aka.ms/PowerToysOverview_VideoConference",
|
2021-10-07 21:48:45 +08:00
|
|
|
});
|
2021-03-03 01:56:37 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
public void OnClosing()
|
|
|
|
{
|
|
|
|
if (NavigationView.SelectedItem != null)
|
|
|
|
{
|
|
|
|
((OobePowerToysModule)NavigationView.SelectedItem).LogClosingModuleEvent();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-22 19:02:08 +08:00
|
|
|
public void NavigateToModule(int moduleIndex)
|
2021-03-03 01:56:37 +08:00
|
|
|
{
|
|
|
|
if (Modules.Count > 0)
|
|
|
|
{
|
2022-02-22 19:02:08 +08:00
|
|
|
NavigationView.SelectedItem = Modules[moduleIndex];
|
2021-03-03 01:56:37 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
[SuppressMessage("Usage", "CA1801:Review unused parameters", Justification = "Params are required for event handler signature requirements.")]
|
|
|
|
private void NavigationView_SelectionChanged(Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs args)
|
|
|
|
{
|
|
|
|
OobePowerToysModule selectedItem = args.SelectedItem as OobePowerToysModule;
|
|
|
|
|
|
|
|
switch (selectedItem.Tag)
|
|
|
|
{
|
|
|
|
case "Overview": NavigationFrame.Navigate(typeof(OobeOverview)); break;
|
2022-02-22 19:02:08 +08:00
|
|
|
case "WhatsNew": NavigationFrame.Navigate(typeof(OobeWhatsNew)); break;
|
2021-12-30 01:33:20 +08:00
|
|
|
case "AlwaysOnTop": NavigationFrame.Navigate(typeof(OobeAlwaysOnTop)); break;
|
2021-06-10 00:13:58 +08:00
|
|
|
case "Awake": NavigationFrame.Navigate(typeof(OobeAwake)); break;
|
2021-06-15 01:34:32 +08:00
|
|
|
case "ColorPicker": NavigationFrame.Navigate(typeof(OobeColorPicker)); break;
|
2021-03-03 01:56:37 +08:00
|
|
|
case "FancyZones": NavigationFrame.Navigate(typeof(OobeFancyZones)); break;
|
|
|
|
case "Run": NavigationFrame.Navigate(typeof(OobeRun)); break;
|
|
|
|
case "ImageResizer": NavigationFrame.Navigate(typeof(OobeImageResizer)); break;
|
|
|
|
case "KBM": NavigationFrame.Navigate(typeof(OobeKBM)); break;
|
|
|
|
case "PowerRename": NavigationFrame.Navigate(typeof(OobePowerRename)); break;
|
|
|
|
case "FileExplorer": NavigationFrame.Navigate(typeof(OobeFileExplorer)); break;
|
|
|
|
case "ShortcutGuide": NavigationFrame.Navigate(typeof(OobeShortcutGuide)); break;
|
|
|
|
case "VideoConference": NavigationFrame.Navigate(typeof(OobeVideoConference)); break;
|
2021-10-22 20:30:18 +08:00
|
|
|
case "MouseUtils": NavigationFrame.Navigate(typeof(OobeMouseUtils)); break;
|
2021-03-03 01:56:37 +08:00
|
|
|
}
|
|
|
|
}
|
2021-08-24 01:48:52 +08:00
|
|
|
|
|
|
|
public void UpdateUITheme()
|
|
|
|
{
|
2021-09-07 02:21:18 +08:00
|
|
|
switch (SettingsRepository<GeneralSettings>.GetInstance(new SettingsUtils()).SettingsConfig.Theme.ToUpperInvariant())
|
2021-08-24 01:48:52 +08:00
|
|
|
{
|
|
|
|
case "LIGHT":
|
|
|
|
this.RequestedTheme = ElementTheme.Light;
|
|
|
|
break;
|
|
|
|
case "DARK":
|
|
|
|
this.RequestedTheme = ElementTheme.Dark;
|
|
|
|
break;
|
|
|
|
case "SYSTEM":
|
|
|
|
this.RequestedTheme = ElementTheme.Default;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2021-03-03 01:56:37 +08:00
|
|
|
}
|
|
|
|
}
|