mirror of
https://github.com/microsoft/PowerToys
synced 2025-08-29 05:27:43 +00:00
* upgrade time! * looks like two got orphaned :/ * Fix Measure Tool window style to remove title bar and borders * Fix spellchecker * was tab :( * Update src/modules/MeasureTool/MeasureToolUI/MeasureToolXAML/MainWindow.xaml.cs Co-authored-by: Dustin L. Howett <duhowett@microsoft.com> * added comment about CsWinRT upgrade to verify on next upgrade --------- Co-authored-by: Jaime Bernardo <jaime@janeasystems.com> Co-authored-by: Dustin L. Howett <duhowett@microsoft.com>
30 lines
1.0 KiB
C#
30 lines
1.0 KiB
C#
// 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 EnvironmentVariablesUILib.Helpers;
|
|
using EnvironmentVariablesUILib.Models;
|
|
using Microsoft.UI.Xaml.Data;
|
|
|
|
namespace EnvironmentVariablesUILib.Converters;
|
|
|
|
public partial class EnvironmentStateToTitleConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, string language)
|
|
{
|
|
var resourceLoader = ResourceLoaderInstance.ResourceLoader;
|
|
var type = (EnvironmentState)value;
|
|
return type switch
|
|
{
|
|
EnvironmentState.ProfileNotApplicable => resourceLoader.GetString("ProfileNotApplicableTitle"),
|
|
_ => resourceLoader.GetString("StateNotUpToDateTitle"),
|
|
};
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|