From 2a5b22b93862ba2799b81a90602dfa5f14ba1ba1 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Thu, 13 Mar 2025 23:29:00 +0800 Subject: [PATCH] Add command keyword change dialog & Support culture change --- Plugins/Flow.Launcher.Plugin.Sys/Command.cs | 33 +++- .../CommandKeywordSetting.xaml | 121 ++++++++++++++ .../CommandKeywordSetting.xaml.cs | 45 ++++++ .../Languages/en.xaml | 9 ++ Plugins/Flow.Launcher.Plugin.Sys/Main.cs | 151 +++++++++--------- .../SysSettings.xaml.cs | 20 +-- 6 files changed, 291 insertions(+), 88 deletions(-) create mode 100644 Plugins/Flow.Launcher.Plugin.Sys/CommandKeywordSetting.xaml create mode 100644 Plugins/Flow.Launcher.Plugin.Sys/CommandKeywordSetting.xaml.cs diff --git a/Plugins/Flow.Launcher.Plugin.Sys/Command.cs b/Plugins/Flow.Launcher.Plugin.Sys/Command.cs index 84f5f046f..6c3a99f3e 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/Command.cs +++ b/Plugins/Flow.Launcher.Plugin.Sys/Command.cs @@ -6,12 +6,39 @@ namespace Flow.Launcher.Plugin.Sys { public string Key { get; set; } + private string name; [JsonIgnore] - public string Name { get; set; } + public string Name + { + get => name; + set + { + name = value; + OnPropertyChanged(); + } + } + private string description; [JsonIgnore] - public string Description { get; set; } + public string Description + { + get => description; + set + { + description = value; + OnPropertyChanged(); + } + } - public string Keyword { get; set; } + private string keyword; + public string Keyword + { + get => keyword; + set + { + keyword = value; + OnPropertyChanged(); + } + } } } diff --git a/Plugins/Flow.Launcher.Plugin.Sys/CommandKeywordSetting.xaml b/Plugins/Flow.Launcher.Plugin.Sys/CommandKeywordSetting.xaml new file mode 100644 index 000000000..a848f2f1f --- /dev/null +++ b/Plugins/Flow.Launcher.Plugin.Sys/CommandKeywordSetting.xaml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +