Files
PowerToys/src/settings-ui/Settings.UI.Library/AdvancedPasteCustomActions.cs
Ani 2a8e211cfd [AdvancedPaste] Custom Actions (#34395)
* [AdvancedPaste] Custom Actions

* Renamed pipe name to make spellcheck happy

* Improved settings page for Custom Actions

* UI improvements, disabled standard paste actions when no clipboard text, update clipboard text and gpo state every second

* Bug fixes, single query/prompt box, Ctrl+num shortcuts for custom actions, error box

* Spellcheck issue

* Bug fixes and used Advanced Paste Window as wait indicator for keyboard shortcuts

* Improvements to PromptBox, incluing show error message as tooltip

* Refactoring

* Fixed issue where ESC sometimes didn't close paste window

* Update src/settings-ui/Settings.UI/Strings/en-us/Resources.resw

Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>

---------

Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
2024-08-22 16:17:12 +02:00

27 lines
771 B
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.Collections.ObjectModel;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Library;
public sealed class AdvancedPasteCustomActions
{
private static readonly JsonSerializerOptions _serializerOptions = new()
{
WriteIndented = true,
};
[JsonPropertyName("value")]
public ObservableCollection<AdvancedPasteCustomAction> Value { get; set; } = [];
public AdvancedPasteCustomActions()
{
}
public string ToJsonString() => JsonSerializer.Serialize(this, _serializerOptions);
}