diff --git a/src/Shared/HandyControlDemo_Shared/App.xaml.cs b/src/Shared/HandyControlDemo_Shared/App.xaml.cs index 0dd38bb4..07cb8e23 100644 --- a/src/Shared/HandyControlDemo_Shared/App.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/App.xaml.cs @@ -15,17 +15,17 @@ using HandyControlDemo.Data; using HandyControlDemo.Properties.Langs; using HandyControlDemo.Tools; -namespace HandyControlDemo +namespace HandyControlDemo; + +public partial class App { - public partial class App - { #pragma warning disable IDE0052 - [SuppressMessage("ReSharper", "NotAccessedField.Local")] - private static Mutex AppMutex; + [SuppressMessage("ReSharper", "NotAccessedField.Local")] + private static Mutex AppMutex; #pragma warning restore IDE0052 - public App() - { + public App() + { #if !NET40 var cachePath = $"{AppDomain.CurrentDomain.BaseDirectory}Cache"; if (!Directory.Exists(cachePath)) @@ -35,106 +35,105 @@ namespace HandyControlDemo ProfileOptimization.SetProfileRoot(cachePath); ProfileOptimization.StartProfile("Profile"); #endif - } + } - protected override void OnStartup(StartupEventArgs e) + protected override void OnStartup(StartupEventArgs e) + { + AppMutex = new Mutex(true, "HandyControlDemo", out var createdNew); + + if (!createdNew) { - AppMutex = new Mutex(true, "HandyControlDemo", out var createdNew); + var current = Process.GetCurrentProcess(); - if (!createdNew) + foreach (var process in Process.GetProcessesByName(current.ProcessName)) { - var current = Process.GetCurrentProcess(); - - foreach (var process in Process.GetProcessesByName(current.ProcessName)) + if (process.Id != current.Id) { - if (process.Id != current.Id) - { - Win32Helper.SetForegroundWindow(process.MainWindowHandle); - break; - } + Win32Helper.SetForegroundWindow(process.MainWindowHandle); + break; } - Shutdown(); } - else + Shutdown(); + } + else + { + var splashScreen = new SplashScreen("Resources/Img/Cover.png"); + splashScreen.Show(true); + + base.OnStartup(e); + + UpdateRegistry(); + + ShutdownMode = ShutdownMode.OnMainWindowClose; + GlobalData.Init(); + ConfigHelper.Instance.SetLang(GlobalData.Config.Lang); + LangProvider.Culture = new CultureInfo(GlobalData.Config.Lang); + + if (GlobalData.Config.Skin != SkinType.Default) { - var splashScreen = new SplashScreen("Resources/Img/Cover.png"); - splashScreen.Show(true); + UpdateSkin(GlobalData.Config.Skin); + } - base.OnStartup(e); - - UpdateRegistry(); - - ShutdownMode = ShutdownMode.OnMainWindowClose; - GlobalData.Init(); - ConfigHelper.Instance.SetLang(GlobalData.Config.Lang); - LangProvider.Culture = new CultureInfo(GlobalData.Config.Lang); - - if (GlobalData.Config.Skin != SkinType.Default) - { - UpdateSkin(GlobalData.Config.Skin); - } - - ConfigHelper.Instance.SetWindowDefaultStyle(); - ConfigHelper.Instance.SetNavigationWindowDefaultStyle(); + ConfigHelper.Instance.SetWindowDefaultStyle(); + ConfigHelper.Instance.SetNavigationWindowDefaultStyle(); #if NET40 - ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; + ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; #else ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; #endif - } } + } - protected override void OnExit(ExitEventArgs e) + protected override void OnExit(ExitEventArgs e) + { + base.OnExit(e); + GlobalData.Save(); + } + + internal void UpdateSkin(SkinType skin) + { + var skins0 = Resources.MergedDictionaries[0]; + skins0.MergedDictionaries.Clear(); + skins0.MergedDictionaries.Add(ResourceHelper.GetSkin(skin)); + skins0.MergedDictionaries.Add(ResourceHelper.GetSkin(typeof(App).Assembly, "Resources/Themes", skin)); + + var skins1 = Resources.MergedDictionaries[1]; + skins1.MergedDictionaries.Clear(); + skins1.MergedDictionaries.Add(new ResourceDictionary { - base.OnExit(e); - GlobalData.Save(); - } - - internal void UpdateSkin(SkinType skin) + Source = new Uri("pack://application:,,,/HandyControl;component/Themes/Theme.xaml") + }); + skins1.MergedDictionaries.Add(new ResourceDictionary { - var skins0 = Resources.MergedDictionaries[0]; - skins0.MergedDictionaries.Clear(); - skins0.MergedDictionaries.Add(ResourceHelper.GetSkin(skin)); - skins0.MergedDictionaries.Add(ResourceHelper.GetSkin(typeof(App).Assembly, "Resources/Themes", skin)); + Source = new Uri("pack://application:,,,/HandyControlDemo;component/Resources/Themes/Theme.xaml") + }); - var skins1 = Resources.MergedDictionaries[1]; - skins1.MergedDictionaries.Clear(); - skins1.MergedDictionaries.Add(new ResourceDictionary - { - Source = new Uri("pack://application:,,,/HandyControl;component/Themes/Theme.xaml") - }); - skins1.MergedDictionaries.Add(new ResourceDictionary - { - Source = new Uri("pack://application:,,,/HandyControlDemo;component/Resources/Themes/Theme.xaml") - }); + Current.MainWindow?.OnApplyTemplate(); + } - Current.MainWindow?.OnApplyTemplate(); - } - - private void UpdateRegistry() + private void UpdateRegistry() + { + var processModule = Process.GetCurrentProcess().MainModule; + if (processModule != null) { - var processModule = Process.GetCurrentProcess().MainModule; - if (processModule != null) + var registryFilePath = $"{Path.GetDirectoryName(processModule.FileName)}\\Registry.reg"; + if (!File.Exists(registryFilePath)) { - var registryFilePath = $"{Path.GetDirectoryName(processModule.FileName)}\\Registry.reg"; - if (!File.Exists(registryFilePath)) + var streamResourceInfo = GetResourceStream(new Uri("pack://application:,,,/Resources/Registry.txt")); + if (streamResourceInfo != null) { - var streamResourceInfo = GetResourceStream(new Uri("pack://application:,,,/Resources/Registry.txt")); - if (streamResourceInfo != null) + using var reader = new StreamReader(streamResourceInfo.Stream); + var registryStr = reader.ReadToEnd(); + var newRegistryStr = registryStr.Replace("#", processModule.FileName.Replace("\\", "\\\\")); + File.WriteAllText(registryFilePath, newRegistryStr); + Process.Start(new ProcessStartInfo("cmd", $"/c {registryFilePath}") { - using var reader = new StreamReader(streamResourceInfo.Stream); - var registryStr = reader.ReadToEnd(); - var newRegistryStr = registryStr.Replace("#", processModule.FileName.Replace("\\", "\\\\")); - File.WriteAllText(registryFilePath, newRegistryStr); - Process.Start(new ProcessStartInfo("cmd", $"/c {registryFilePath}") - { - UseShellExecute = false, - CreateNoWindow = true - }); - } + UseShellExecute = false, + CreateNoWindow = true + }); } } } } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/AppConfig.cs b/src/Shared/HandyControlDemo_Shared/Data/AppConfig.cs index 5162608b..03b456d4 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/AppConfig.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/AppConfig.cs @@ -1,14 +1,13 @@ using System; using HandyControl.Data; -namespace HandyControlDemo.Data +namespace HandyControlDemo.Data; + +internal class AppConfig { - internal class AppConfig - { - public static readonly string SavePath = $"{AppDomain.CurrentDomain.BaseDirectory}AppConfig.json"; + public static readonly string SavePath = $"{AppDomain.CurrentDomain.BaseDirectory}AppConfig.json"; - public string Lang { get; set; } = "zh-cn"; + public string Lang { get; set; } = "zh-cn"; - public SkinType Skin { get; set; } - } -} + public SkinType Skin { get; set; } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/Enum/DemoType.cs b/src/Shared/HandyControlDemo_Shared/Data/Enum/DemoType.cs index 1bc162c7..b2221317 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/Enum/DemoType.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/Enum/DemoType.cs @@ -1,13 +1,12 @@  -namespace HandyControlDemo.Data +namespace HandyControlDemo.Data; + +public enum DemoType { - public enum DemoType - { - Type1 = 1, - Type2, - Type3, - Type4, - Type5, - Type6 - } -} + Type1 = 1, + Type2, + Type3, + Type4, + Type5, + Type6 +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/GlobalData.cs b/src/Shared/HandyControlDemo_Shared/Data/GlobalData.cs index d4c8af00..276ec339 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/GlobalData.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/GlobalData.cs @@ -1,38 +1,37 @@ using System.IO; using Newtonsoft.Json; -namespace HandyControlDemo.Data +namespace HandyControlDemo.Data; + +internal class GlobalData { - internal class GlobalData + public static void Init() { - public static void Init() + if (File.Exists(AppConfig.SavePath)) { - if (File.Exists(AppConfig.SavePath)) + try { - try - { - var json = File.ReadAllText(AppConfig.SavePath); - Config = (string.IsNullOrEmpty(json) ? new AppConfig() : JsonConvert.DeserializeObject(json)) ?? new AppConfig(); - } - catch - { - Config = new AppConfig(); - } + var json = File.ReadAllText(AppConfig.SavePath); + Config = (string.IsNullOrEmpty(json) ? new AppConfig() : JsonConvert.DeserializeObject(json)) ?? new AppConfig(); } - else + catch { Config = new AppConfig(); } } - - public static void Save() + else { - var json = JsonConvert.SerializeObject(Config); - File.WriteAllText(AppConfig.SavePath, json); + Config = new AppConfig(); } - - public static AppConfig Config { get; set; } - - public static bool NotifyIconIsShow { get; set; } } -} + + public static void Save() + { + var json = JsonConvert.SerializeObject(Config); + File.WriteAllText(AppConfig.SavePath, json); + } + + public static AppConfig Config { get; set; } + + public static bool NotifyIconIsShow { get; set; } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/MessageToken.cs b/src/Shared/HandyControlDemo_Shared/Data/MessageToken.cs index 989304b7..71651e81 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/MessageToken.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/MessageToken.cs @@ -1,58 +1,57 @@ -namespace HandyControlDemo.Data +namespace HandyControlDemo.Data; + +public class MessageToken { - public class MessageToken - { - public static readonly string LoadShowContent = nameof(LoadShowContent); + public static readonly string LoadShowContent = nameof(LoadShowContent); - public static readonly string FullSwitch = nameof(FullSwitch); + public static readonly string FullSwitch = nameof(FullSwitch); - public static readonly string ContributorsView = nameof(ContributorsView); + public static readonly string ContributorsView = nameof(ContributorsView); - public static readonly string ClearLeftSelected = nameof(ClearLeftSelected); + public static readonly string ClearLeftSelected = nameof(ClearLeftSelected); - public static readonly string SendChatMessage = nameof(SendChatMessage); + public static readonly string SendChatMessage = nameof(SendChatMessage); - public static readonly string GrowlDemoPanel = nameof(GrowlDemoPanel); + public static readonly string GrowlDemoPanel = nameof(GrowlDemoPanel); - public static readonly string DialogDemoWindow = nameof(DialogDemoWindow); + public static readonly string DialogDemoWindow = nameof(DialogDemoWindow); - public static readonly string MainWindow = nameof(MainWindow); + public static readonly string MainWindow = nameof(MainWindow); - public static readonly string PracticalDemo = nameof(PracticalDemo); + public static readonly string PracticalDemo = nameof(PracticalDemo); - public static readonly string ProjectsView = nameof(ProjectsView); + public static readonly string ProjectsView = nameof(ProjectsView); - public static readonly string BlogsView = nameof(BlogsView); + public static readonly string BlogsView = nameof(BlogsView); - public static readonly string WebsitesView = nameof(WebsitesView); + public static readonly string WebsitesView = nameof(WebsitesView); - public static readonly string NotifyIconDemo = nameof(NotifyIconDemo); + public static readonly string NotifyIconDemo = nameof(NotifyIconDemo); - public static readonly string NotifyIconContextDemo = nameof(NotifyIconContextDemo); + public static readonly string NotifyIconContextDemo = nameof(NotifyIconContextDemo); - public static readonly string CommonWindow = nameof(CommonWindow); + public static readonly string CommonWindow = nameof(CommonWindow); - public static readonly string BlurWindow = nameof(BlurWindow); + public static readonly string BlurWindow = nameof(BlurWindow); - public static readonly string CustomNonClientAreaWindow = nameof(CustomNonClientAreaWindow); + public static readonly string CustomNonClientAreaWindow = nameof(CustomNonClientAreaWindow); - public static readonly string NoNonClientAreaDragableWindow = nameof(NoNonClientAreaDragableWindow); + public static readonly string NoNonClientAreaDragableWindow = nameof(NoNonClientAreaDragableWindow); - public static readonly string QQGroupView = nameof(QQGroupView); + public static readonly string QQGroupView = nameof(QQGroupView); - public static readonly string GlowWindow = nameof(GlowWindow); + public static readonly string GlowWindow = nameof(GlowWindow); - public static readonly string NativeCommonWindow = nameof(NativeCommonWindow); + public static readonly string NativeCommonWindow = nameof(NativeCommonWindow); - public static readonly string NavigationWindow = nameof(NavigationWindow); + public static readonly string NavigationWindow = nameof(NavigationWindow); - public static readonly string TouchDragMoveWindow = nameof(TouchDragMoveWindow); + public static readonly string TouchDragMoveWindow = nameof(TouchDragMoveWindow); - public static readonly string DialogContainer = nameof(DialogContainer); + public static readonly string DialogContainer = nameof(DialogContainer); - public static readonly string LangUpdated = nameof(LangUpdated); + public static readonly string LangUpdated = nameof(LangUpdated); - public static readonly string SkinUpdated = nameof(SkinUpdated); + public static readonly string SkinUpdated = nameof(SkinUpdated); - } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/Model/AvatarModel.cs b/src/Shared/HandyControlDemo_Shared/Data/Model/AvatarModel.cs index 9168a52a..75cc2a50 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/Model/AvatarModel.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/Model/AvatarModel.cs @@ -1,12 +1,11 @@  -namespace HandyControlDemo.Data +namespace HandyControlDemo.Data; + +public class AvatarModel { - public class AvatarModel - { - public string DisplayName { get; set; } + public string DisplayName { get; set; } - public string Link { get; set; } + public string Link { get; set; } - public string AvatarUri { get; set; } - } -} + public string AvatarUri { get; set; } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/Model/CardModel.cs b/src/Shared/HandyControlDemo_Shared/Data/Model/CardModel.cs index e8867f26..3e8ff759 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/Model/CardModel.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/Model/CardModel.cs @@ -1,11 +1,10 @@ -namespace HandyControlDemo.Data +namespace HandyControlDemo.Data; + +public class CardModel { - public class CardModel - { - public string Header { get; set; } + public string Header { get; set; } - public string Content { get; set; } + public string Content { get; set; } - public string Footer { get; set; } - } -} + public string Footer { get; set; } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/Model/ChatInfoModel.cs b/src/Shared/HandyControlDemo_Shared/Data/Model/ChatInfoModel.cs index 6f77fefc..9e137151 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/Model/ChatInfoModel.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/Model/ChatInfoModel.cs @@ -1,17 +1,16 @@ using HandyControl.Data; -namespace HandyControlDemo.Data +namespace HandyControlDemo.Data; + +public struct ChatInfoModel { - public struct ChatInfoModel - { - public object Message { get; set; } + public object Message { get; set; } - public string SenderId { get; set; } + public string SenderId { get; set; } - public ChatRoleType Role { get; set; } + public ChatRoleType Role { get; set; } - public ChatMessageType Type { get; set; } + public ChatMessageType Type { get; set; } - public object Enclosure { get; set; } - } -} + public object Enclosure { get; set; } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/Model/CoverViewDemoModel.cs b/src/Shared/HandyControlDemo_Shared/Data/Model/CoverViewDemoModel.cs index 23d5b341..b407c3c9 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/Model/CoverViewDemoModel.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/Model/CoverViewDemoModel.cs @@ -1,9 +1,8 @@ -namespace HandyControlDemo.Data -{ - public class CoverViewDemoModel - { - public string ImgPath { get; set; } +namespace HandyControlDemo.Data; - public string BackgroundToken { get; set; } - } -} +public class CoverViewDemoModel +{ + public string ImgPath { get; set; } + + public string BackgroundToken { get; set; } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/Model/DemoDataModel.cs b/src/Shared/HandyControlDemo_Shared/Data/Model/DemoDataModel.cs index 800a5f38..0cfbcae0 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/Model/DemoDataModel.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/Model/DemoDataModel.cs @@ -1,22 +1,21 @@ using System.Collections.Generic; -namespace HandyControlDemo.Data +namespace HandyControlDemo.Data; + +public class DemoDataModel { - public class DemoDataModel - { - public int Index { get; set; } + public int Index { get; set; } - public string Name { get; set; } + public string Name { get; set; } - public bool IsSelected { get; set; } + public bool IsSelected { get; set; } - public string Remark { get; set; } + public string Remark { get; set; } - public DemoType Type { get; set; } + public DemoType Type { get; set; } - public string ImgPath { get; set; } + public string ImgPath { get; set; } - public List DataList { get; set; } - } -} + public List DataList { get; set; } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/Model/DemoInfoModel.cs b/src/Shared/HandyControlDemo_Shared/Data/Model/DemoInfoModel.cs index ad5dc2fd..f25a0746 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/Model/DemoInfoModel.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/Model/DemoInfoModel.cs @@ -1,38 +1,37 @@ using System.Collections.Generic; using GalaSoft.MvvmLight; -namespace HandyControlDemo.Data +namespace HandyControlDemo.Data; + +public class DemoInfoModel : ViewModelBase { - public class DemoInfoModel : ViewModelBase + public string Key { get; set; } + + private string _title; + + public string Title { - public string Key { get; set; } - - private string _title; - - public string Title - { - get => _title; + get => _title; #if NET40 set => Set(nameof(Title), ref _title, value); #else - set => Set(ref _title, value); + set => Set(ref _title, value); #endif - } + } - private int _selectedIndex; + private int _selectedIndex; - public int SelectedIndex - { - get => _selectedIndex; + public int SelectedIndex + { + get => _selectedIndex; #if NET40 set => Set(nameof(SelectedIndex), ref _selectedIndex, value); #else - set => Set(ref _selectedIndex, value); + set => Set(ref _selectedIndex, value); #endif - } - - public bool IsGroupEnabled { get; set; } - - public IList DemoItemList { get; set; } } -} + + public bool IsGroupEnabled { get; set; } + + public IList DemoItemList { get; set; } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/Model/DemoItemModel.cs b/src/Shared/HandyControlDemo_Shared/Data/Model/DemoItemModel.cs index 3cbaab9c..e06440b5 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/Model/DemoItemModel.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/Model/DemoItemModel.cs @@ -1,40 +1,39 @@ using GalaSoft.MvvmLight; -namespace HandyControlDemo.Data +namespace HandyControlDemo.Data; + +public class DemoItemModel : ObservableObject { - public class DemoItemModel : ObservableObject + private bool _isVisible = true; + private string _queriesText = string.Empty; + + public string Name { get; set; } + + public string GroupName { get; set; } + + public string TargetCtlName { get; set; } + + public string ImageName { get; set; } + + public bool IsNew { get; set; } + + public string QueriesText { - private bool _isVisible = true; - private string _queriesText = string.Empty; - - public string Name { get; set; } - - public string GroupName { get; set; } - - public string TargetCtlName { get; set; } - - public string ImageName { get; set; } - - public bool IsNew { get; set; } - - public string QueriesText - { - get => _queriesText; + get => _queriesText; #if NET40 - set => Set(nameof(QueriesText), ref _queriesText, value); + set => Set(nameof(QueriesText), ref _queriesText, value); #else set => Set(ref _queriesText, value); #endif - } + } - public bool IsVisible - { - get => _isVisible; + public bool IsVisible + { + get => _isVisible; #if NET40 - set => Set(nameof(IsVisible), ref _isVisible, value); + set => Set(nameof(IsVisible), ref _isVisible, value); #else set => Set(ref _isVisible, value); #endif - } } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/Model/GeometryItemModel.cs b/src/Shared/HandyControlDemo_Shared/Data/Model/GeometryItemModel.cs index 6068897a..53727ce9 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/Model/GeometryItemModel.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/Model/GeometryItemModel.cs @@ -1,13 +1,12 @@ using System.Windows.Media; -namespace HandyControlDemo.Data +namespace HandyControlDemo.Data; + +public class GeometryItemModel { - public class GeometryItemModel - { - public Geometry Data { get; set; } + public Geometry Data { get; set; } - public string Key { get; set; } + public string Key { get; set; } - public bool Line { get; set; } - } -} + public bool Line { get; set; } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/Model/PropertyGridDemoModel.cs b/src/Shared/HandyControlDemo_Shared/Data/Model/PropertyGridDemoModel.cs index a6c48a91..a5f9e2bc 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/Model/PropertyGridDemoModel.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/Model/PropertyGridDemoModel.cs @@ -2,32 +2,31 @@ using System.Windows; using System.Windows.Media; -namespace HandyControlDemo.Data +namespace HandyControlDemo.Data; + +public class PropertyGridDemoModel { - public class PropertyGridDemoModel - { - [Category("Category1")] - public string String { get; set; } + [Category("Category1")] + public string String { get; set; } - [Category("Category2")] - public int Integer { get; set; } + [Category("Category2")] + public int Integer { get; set; } - [Category("Category2")] - public bool Boolean { get; set; } + [Category("Category2")] + public bool Boolean { get; set; } - [Category("Category1")] - public Gender Enum { get; set; } + [Category("Category1")] + public Gender Enum { get; set; } - public HorizontalAlignment HorizontalAlignment { get; set; } + public HorizontalAlignment HorizontalAlignment { get; set; } - public VerticalAlignment VerticalAlignment { get; set; } + public VerticalAlignment VerticalAlignment { get; set; } - public ImageSource ImageSource { get; set; } - } - - public enum Gender - { - Male, - Female - } + public ImageSource ImageSource { get; set; } } + +public enum Gender +{ + Male, + Female +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/Model/StepBarDemoModel.cs b/src/Shared/HandyControlDemo_Shared/Data/Model/StepBarDemoModel.cs index 317054a5..a9c97244 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/Model/StepBarDemoModel.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/Model/StepBarDemoModel.cs @@ -1,9 +1,8 @@ -namespace HandyControlDemo.Data -{ - public class StepBarDemoModel - { - public string Header { get; set; } +namespace HandyControlDemo.Data; - public string Content { get; set; } - } -} +public class StepBarDemoModel +{ + public string Header { get; set; } + + public string Content { get; set; } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Data/Model/TabControlDemoModel.cs b/src/Shared/HandyControlDemo_Shared/Data/Model/TabControlDemoModel.cs index 5f27697e..89b5fa1d 100644 --- a/src/Shared/HandyControlDemo_Shared/Data/Model/TabControlDemoModel.cs +++ b/src/Shared/HandyControlDemo_Shared/Data/Model/TabControlDemoModel.cs @@ -1,9 +1,8 @@ -namespace HandyControlDemo.Data -{ - public class TabControlDemoModel - { - public string Header { get; set; } +namespace HandyControlDemo.Data; - public string BackgroundToken { get; set; } - } -} +public class TabControlDemoModel +{ + public string Header { get; set; } + + public string BackgroundToken { get; set; } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/MainWindow.xaml.cs b/src/Shared/HandyControlDemo_Shared/MainWindow.xaml.cs index b49f96ba..6121e2a4 100644 --- a/src/Shared/HandyControlDemo_Shared/MainWindow.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/MainWindow.xaml.cs @@ -10,45 +10,44 @@ using HandyControlDemo.Tools; using HandyControlDemo.UserControl; using HandyControlDemo.ViewModel; -namespace HandyControlDemo +namespace HandyControlDemo; + +public partial class MainWindow { - public partial class MainWindow + public MainWindow() => InitializeComponent(); + + protected override void OnContentRendered(EventArgs e) { - public MainWindow() => InitializeComponent(); + base.OnContentRendered(e); - protected override void OnContentRendered(EventArgs e) + DataContext = ViewModelLocator.Instance.Main; + NonClientAreaContent = new NonClientAreaContent(); + ControlMain.Content = new MainWindowContent(); + + GlobalShortcut.Init(new List { - base.OnContentRendered(e); + new(ViewModelLocator.Instance.Main.GlobalShortcutInfoCmd, Key.I, ModifierKeys.Control | ModifierKeys.Alt), + new(ViewModelLocator.Instance.Main.GlobalShortcutWarningCmd, Key.E, ModifierKeys.Control | ModifierKeys.Alt) + }); - DataContext = ViewModelLocator.Instance.Main; - NonClientAreaContent = new NonClientAreaContent(); - ControlMain.Content = new MainWindowContent(); + Dialog.SetToken(this, MessageToken.MainWindow); + WindowAttach.SetIgnoreAltF4(this, true); - GlobalShortcut.Init(new List - { - new(ViewModelLocator.Instance.Main.GlobalShortcutInfoCmd, Key.I, ModifierKeys.Control | ModifierKeys.Alt), - new(ViewModelLocator.Instance.Main.GlobalShortcutWarningCmd, Key.E, ModifierKeys.Control | ModifierKeys.Alt) - }); + Messenger.Default.Send(true, MessageToken.FullSwitch); + Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{MessageToken.PracticalDemo}"), MessageToken.LoadShowContent); + } - Dialog.SetToken(this, MessageToken.MainWindow); - WindowAttach.SetIgnoreAltF4(this, true); - - Messenger.Default.Send(true, MessageToken.FullSwitch); - Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{MessageToken.PracticalDemo}"), MessageToken.LoadShowContent); + protected override void OnClosing(CancelEventArgs e) + { + if (GlobalData.NotifyIconIsShow) + { + MessageBox.Info(Properties.Langs.Lang.AppClosingTip, Properties.Langs.Lang.Tip); + Hide(); + e.Cancel = true; } - - protected override void OnClosing(CancelEventArgs e) + else { - if (GlobalData.NotifyIconIsShow) - { - MessageBox.Info(Properties.Langs.Lang.AppClosingTip, Properties.Langs.Lang.Tip); - Hide(); - e.Cancel = true; - } - else - { - base.OnClosing(e); - } + base.OnClosing(e); } } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Properties/Langs/LangProvider.cs b/src/Shared/HandyControlDemo_Shared/Properties/Langs/LangProvider.cs index da3d7230..e1538e95 100644 --- a/src/Shared/HandyControlDemo_Shared/Properties/Langs/LangProvider.cs +++ b/src/Shared/HandyControlDemo_Shared/Properties/Langs/LangProvider.cs @@ -4,2557 +4,2556 @@ using System.Windows; using System.Windows.Data; using HandyControl.Tools; -namespace HandyControlDemo.Properties.Langs +namespace HandyControlDemo.Properties.Langs; + +public class LangProvider : INotifyPropertyChanged { - public class LangProvider : INotifyPropertyChanged + internal static LangProvider Instance { get; } = ResourceHelper.GetResource("DemoLangs"); + + private static string CultureInfoStr; + + public static CultureInfo Culture { - internal static LangProvider Instance { get; } = ResourceHelper.GetResource("DemoLangs"); - - private static string CultureInfoStr; - - public static CultureInfo Culture + get => Lang.Culture; + set { - get => Lang.Culture; - set - { - if (value == null) return; - if (Equals(CultureInfoStr, value.EnglishName)) return; - Lang.Culture = value; - CultureInfoStr = value.EnglishName; + if (value == null) return; + if (Equals(CultureInfoStr, value.EnglishName)) return; + Lang.Culture = value; + CultureInfoStr = value.EnglishName; - Instance.UpdateLangs(); - } + Instance.UpdateLangs(); } - - public static string GetLang(string key) => Lang.ResourceManager.GetString(key, Culture); - - public static void SetLang(DependencyObject dependencyObject, DependencyProperty dependencyProperty, string key) => - BindingOperations.SetBinding(dependencyObject, dependencyProperty, new Binding(key) - { - Source = Instance, - Mode = BindingMode.OneWay - }); - - private void UpdateLangs() - { - OnPropertyChanged(nameof(About)); - OnPropertyChanged(nameof(AddItem)); - OnPropertyChanged(nameof(AnimationPath)); - OnPropertyChanged(nameof(AppClosingTip)); - OnPropertyChanged(nameof(Ask)); - OnPropertyChanged(nameof(AutoCompleteTextBox)); - OnPropertyChanged(nameof(Badge)); - OnPropertyChanged(nameof(BasicInfo)); - OnPropertyChanged(nameof(BasicLayout)); - OnPropertyChanged(nameof(Blink)); - OnPropertyChanged(nameof(Blog)); - OnPropertyChanged(nameof(Border)); - OnPropertyChanged(nameof(Brush)); - OnPropertyChanged(nameof(Button)); - OnPropertyChanged(nameof(ButtonCustom)); - OnPropertyChanged(nameof(ButtonGroup)); - OnPropertyChanged(nameof(Calendar)); - OnPropertyChanged(nameof(CalendarWithClock)); - OnPropertyChanged(nameof(Card)); - OnPropertyChanged(nameof(Carousel)); - OnPropertyChanged(nameof(ChangeLangAsk)); - OnPropertyChanged(nameof(ChatBubble)); - OnPropertyChanged(nameof(Chatroom)); - OnPropertyChanged(nameof(CheckBox)); - OnPropertyChanged(nameof(CheckComboBox)); - OnPropertyChanged(nameof(CirclePanel)); - OnPropertyChanged(nameof(Clear)); - OnPropertyChanged(nameof(Click2Count)); - OnPropertyChanged(nameof(Clock)); - OnPropertyChanged(nameof(ColorPicker)); - OnPropertyChanged(nameof(ColumnOffset)); - OnPropertyChanged(nameof(ColumnSpacing)); - OnPropertyChanged(nameof(ComboBox)); - OnPropertyChanged(nameof(ComingSoon)); - OnPropertyChanged(nameof(Comment)); - OnPropertyChanged(nameof(Common)); - OnPropertyChanged(nameof(CompareSlider)); - OnPropertyChanged(nameof(Complete)); - OnPropertyChanged(nameof(ContentDemoStr)); - OnPropertyChanged(nameof(Contributors)); - OnPropertyChanged(nameof(Controls)); - OnPropertyChanged(nameof(CoverFlow)); - OnPropertyChanged(nameof(CoverView)); - OnPropertyChanged(nameof(Danger)); - OnPropertyChanged(nameof(DataDisplay)); - OnPropertyChanged(nameof(DataEntry)); - OnPropertyChanged(nameof(DataGrid)); - OnPropertyChanged(nameof(DatePicker)); - OnPropertyChanged(nameof(DateTimePicker)); - OnPropertyChanged(nameof(Default)); - OnPropertyChanged(nameof(Demo)); - OnPropertyChanged(nameof(Dialog)); - OnPropertyChanged(nameof(DialogDemo)); - OnPropertyChanged(nameof(Divider)); - OnPropertyChanged(nameof(Doc_cn)); - OnPropertyChanged(nameof(Doc_en)); - OnPropertyChanged(nameof(Documentation)); - OnPropertyChanged(nameof(DragHere)); - OnPropertyChanged(nameof(Drawer)); - OnPropertyChanged(nameof(Effects)); - OnPropertyChanged(nameof(ElementGroup)); - OnPropertyChanged(nameof(Email)); - OnPropertyChanged(nameof(Empty)); - OnPropertyChanged(nameof(Error)); - OnPropertyChanged(nameof(Exit)); - OnPropertyChanged(nameof(Expander)); - OnPropertyChanged(nameof(Fatal)); - OnPropertyChanged(nameof(Feedback)); - OnPropertyChanged(nameof(FlexPanel)); - OnPropertyChanged(nameof(FlipClock)); - OnPropertyChanged(nameof(FloatingBlock)); - OnPropertyChanged(nameof(FlowDocument)); - OnPropertyChanged(nameof(FlowDocumentPageViewer)); - OnPropertyChanged(nameof(FlowDocumentReader)); - OnPropertyChanged(nameof(FlowDocumentScrollViewer)); - OnPropertyChanged(nameof(Frame)); - OnPropertyChanged(nameof(Geometry)); - OnPropertyChanged(nameof(GifImage)); - OnPropertyChanged(nameof(GotoTop)); - OnPropertyChanged(nameof(Gravatar)); - OnPropertyChanged(nameof(Grid)); - OnPropertyChanged(nameof(GroupBox)); - OnPropertyChanged(nameof(Groups)); - OnPropertyChanged(nameof(Growl)); - OnPropertyChanged(nameof(GrowlAsk)); - OnPropertyChanged(nameof(GrowlDemo)); - OnPropertyChanged(nameof(GrowlError)); - OnPropertyChanged(nameof(GrowlFatal)); - OnPropertyChanged(nameof(GrowlInfo)); - OnPropertyChanged(nameof(GrowlSuccess)); - OnPropertyChanged(nameof(GrowlWarning)); - OnPropertyChanged(nameof(HatchBrushGenerator)); - OnPropertyChanged(nameof(HoneycombPanel)); - OnPropertyChanged(nameof(HybridLayout)); - OnPropertyChanged(nameof(Ignore)); - OnPropertyChanged(nameof(ImageBlock)); - OnPropertyChanged(nameof(ImageBrowser)); - OnPropertyChanged(nameof(ImageSelector)); - OnPropertyChanged(nameof(Index)); - OnPropertyChanged(nameof(Info)); - OnPropertyChanged(nameof(Interacting)); - OnPropertyChanged(nameof(InteractiveDialog)); - OnPropertyChanged(nameof(IsNotPhone)); - OnPropertyChanged(nameof(Label)); - OnPropertyChanged(nameof(LangComment)); - OnPropertyChanged(nameof(Layout)); - OnPropertyChanged(nameof(ListBox)); - OnPropertyChanged(nameof(ListView)); - OnPropertyChanged(nameof(Loading)); - OnPropertyChanged(nameof(Magnifier)); - OnPropertyChanged(nameof(Menu)); - OnPropertyChanged(nameof(MessageBox)); - OnPropertyChanged(nameof(Misc)); - OnPropertyChanged(nameof(Morphing_Animation)); - OnPropertyChanged(nameof(Name)); - OnPropertyChanged(nameof(Navigation)); - OnPropertyChanged(nameof(NewWindow)); - OnPropertyChanged(nameof(Next)); - OnPropertyChanged(nameof(Notification)); - OnPropertyChanged(nameof(NotifyIcon)); - OnPropertyChanged(nameof(NumericUpDown)); - OnPropertyChanged(nameof(Off)); - OnPropertyChanged(nameof(Ok)); - OnPropertyChanged(nameof(On)); - OnPropertyChanged(nameof(OpenBlurWindow)); - OnPropertyChanged(nameof(OpenCommonWindow)); - OnPropertyChanged(nameof(OpenCustomContentWindow)); - OnPropertyChanged(nameof(OpenCustomMessageWindow)); - OnPropertyChanged(nameof(OpenCustomNonClientAreaWindow)); - OnPropertyChanged(nameof(OpenGlowWindow)); - OnPropertyChanged(nameof(OpenImageBrowser)); - OnPropertyChanged(nameof(OpenMessageWindow)); - OnPropertyChanged(nameof(OpenMouseFollowWindow)); - OnPropertyChanged(nameof(OpenNativeCommonWindow)); - OnPropertyChanged(nameof(OpenNavigationWindow)); - OnPropertyChanged(nameof(OpenNoNonClientAreaDragableWindow)); - OnPropertyChanged(nameof(OpenPanel)); - OnPropertyChanged(nameof(OpenSprite)); - OnPropertyChanged(nameof(OpenTouchDragMoveWindow)); - OnPropertyChanged(nameof(OutlineText)); - OnPropertyChanged(nameof(Pagination)); - OnPropertyChanged(nameof(PasswordBox)); - OnPropertyChanged(nameof(PinBox)); - OnPropertyChanged(nameof(PleaseInput)); - OnPropertyChanged(nameof(PleaseWait)); - OnPropertyChanged(nameof(PlsEnterContent)); - OnPropertyChanged(nameof(PlsEnterEmail)); - OnPropertyChanged(nameof(PlsEnterKey)); - OnPropertyChanged(nameof(Poptip)); - OnPropertyChanged(nameof(PoptipPositionStr)); - OnPropertyChanged(nameof(PracticalDemos)); - OnPropertyChanged(nameof(Prev)); - OnPropertyChanged(nameof(PreviewSlider)); - OnPropertyChanged(nameof(Primary)); - OnPropertyChanged(nameof(ProgressBar)); - OnPropertyChanged(nameof(ProgressButton)); - OnPropertyChanged(nameof(Project)); - OnPropertyChanged(nameof(PropertyGrid)); - OnPropertyChanged(nameof(PushToTalk)); - OnPropertyChanged(nameof(QQGroup)); - OnPropertyChanged(nameof(RadioButton)); - OnPropertyChanged(nameof(RangeSlider)); - OnPropertyChanged(nameof(Rate)); - OnPropertyChanged(nameof(Recommendation)); - OnPropertyChanged(nameof(Register)); - OnPropertyChanged(nameof(RelativePanel)); - OnPropertyChanged(nameof(Remark)); - OnPropertyChanged(nameof(RemoveItem)); - OnPropertyChanged(nameof(RepeatButton)); - OnPropertyChanged(nameof(Reply)); - OnPropertyChanged(nameof(Repository)); - OnPropertyChanged(nameof(ResponsiveLayout)); - OnPropertyChanged(nameof(RichTextBox)); - OnPropertyChanged(nameof(RightClickHere)); - OnPropertyChanged(nameof(RunningBlock)); - OnPropertyChanged(nameof(Screenshot)); - OnPropertyChanged(nameof(ScrollViewer)); - OnPropertyChanged(nameof(SearchBar)); - OnPropertyChanged(nameof(Second)); - OnPropertyChanged(nameof(Selected)); - OnPropertyChanged(nameof(SendNotification)); - OnPropertyChanged(nameof(Shield)); - OnPropertyChanged(nameof(ShowInCurrentWindow)); - OnPropertyChanged(nameof(ShowInMainWindow)); - OnPropertyChanged(nameof(ShowRowNumber)); - OnPropertyChanged(nameof(SideMenu)); - OnPropertyChanged(nameof(Slider)); - OnPropertyChanged(nameof(SplitButton)); - OnPropertyChanged(nameof(Sprite)); - OnPropertyChanged(nameof(StartScreenshot)); - OnPropertyChanged(nameof(StaysOpen)); - OnPropertyChanged(nameof(Step)); - OnPropertyChanged(nameof(StepBar)); - OnPropertyChanged(nameof(Styles)); - OnPropertyChanged(nameof(SubTitle)); - OnPropertyChanged(nameof(Success)); - OnPropertyChanged(nameof(TabControl)); - OnPropertyChanged(nameof(Tag)); - OnPropertyChanged(nameof(Text)); - OnPropertyChanged(nameof(TextBlock)); - OnPropertyChanged(nameof(TextBox)); - OnPropertyChanged(nameof(TextDialog)); - OnPropertyChanged(nameof(TextDialogInControl)); - OnPropertyChanged(nameof(TextDialogWithTimer)); - OnPropertyChanged(nameof(TimeBar)); - OnPropertyChanged(nameof(TimePicker)); - OnPropertyChanged(nameof(Tip)); - OnPropertyChanged(nameof(Title)); - OnPropertyChanged(nameof(TitleDemoStr1)); - OnPropertyChanged(nameof(TitleDemoStr2)); - OnPropertyChanged(nameof(TitleDemoStr3)); - OnPropertyChanged(nameof(ToggleButton)); - OnPropertyChanged(nameof(ToolBar)); - OnPropertyChanged(nameof(Tools)); - OnPropertyChanged(nameof(Transfer)); - OnPropertyChanged(nameof(TransitioningContentControl)); - OnPropertyChanged(nameof(TreeView)); - OnPropertyChanged(nameof(Try2CloseApp)); - OnPropertyChanged(nameof(Type)); - OnPropertyChanged(nameof(UniformSpacingPanel)); - OnPropertyChanged(nameof(UploadFile)); - OnPropertyChanged(nameof(UploadStr)); - OnPropertyChanged(nameof(Visibility)); - OnPropertyChanged(nameof(Vsix)); - OnPropertyChanged(nameof(Warning)); - OnPropertyChanged(nameof(WaterfallPanel)); - OnPropertyChanged(nameof(Website)); - OnPropertyChanged(nameof(Window)); - } - - /// - /// 查找类似 关于 的本地化字符串。 - /// - public string About => Lang.About; - - /// - /// 查找类似 添加项 的本地化字符串。 - /// - public string AddItem => Lang.AddItem; - - /// - /// 查找类似 动画路径 的本地化字符串。 - /// - public string AnimationPath => Lang.AnimationPath; - - /// - /// 查找类似 托盘图标已打开,将隐藏窗口而不是关闭程序 的本地化字符串。 - /// - public string AppClosingTip => Lang.AppClosingTip; - - /// - /// 查找类似 询问 的本地化字符串。 - /// - public string Ask => Lang.Ask; - - /// - /// 查找类似 自动补全文本框 的本地化字符串。 - /// - public string AutoCompleteTextBox => Lang.AutoCompleteTextBox; - - /// - /// 查找类似 标记 的本地化字符串。 - /// - public string Badge => Lang.Badge; - - /// - /// 查找类似 填写基本信息 的本地化字符串。 - /// - public string BasicInfo => Lang.BasicInfo; - - /// - /// 查找类似 基础布局 的本地化字符串。 - /// - public string BasicLayout => Lang.BasicLayout; - - /// - /// 查找类似 闪烁 的本地化字符串。 - /// - public string Blink => Lang.Blink; - - /// - /// 查找类似 博客 的本地化字符串。 - /// - public string Blog => Lang.Blog; - - /// - /// 查找类似 边框 的本地化字符串。 - /// - public string Border => Lang.Border; - - /// - /// 查找类似 画刷 的本地化字符串。 - /// - public string Brush => Lang.Brush; - - /// - /// 查找类似 按钮 的本地化字符串。 - /// - public string Button => Lang.Button; - - /// - /// 查找类似 自定义按钮 的本地化字符串。 - /// - public string ButtonCustom => Lang.ButtonCustom; - - /// - /// 查找类似 按钮组 的本地化字符串。 - /// - public string ButtonGroup => Lang.ButtonGroup; - - /// - /// 查找类似 日历 的本地化字符串。 - /// - public string Calendar => Lang.Calendar; - - /// - /// 查找类似 带时钟的日历 的本地化字符串。 - /// - public string CalendarWithClock => Lang.CalendarWithClock; - - /// - /// 查找类似 卡片 的本地化字符串。 - /// - public string Card => Lang.Card; - - /// - /// 查找类似 轮播 的本地化字符串。 - /// - public string Carousel => Lang.Carousel; - - /// - /// 查找类似 是否重启以更改语言? 的本地化字符串。 - /// - public string ChangeLangAsk => Lang.ChangeLangAsk; - - /// - /// 查找类似 对话气泡 的本地化字符串。 - /// - public string ChatBubble => Lang.ChatBubble; - - /// - /// 查找类似 讨论室 的本地化字符串。 - /// - public string Chatroom => Lang.Chatroom; - - /// - /// 查找类似 复选框 的本地化字符串。 - /// - public string CheckBox => Lang.CheckBox; - - /// - /// 查找类似 多选组合框 的本地化字符串。 - /// - public string CheckComboBox => Lang.CheckComboBox; - - /// - /// 查找类似 圆形布局 的本地化字符串。 - /// - public string CirclePanel => Lang.CirclePanel; - - /// - /// 查找类似 清空 的本地化字符串。 - /// - public string Clear => Lang.Clear; - - /// - /// 查找类似 点击计数 的本地化字符串。 - /// - public string Click2Count => Lang.Click2Count; - - /// - /// 查找类似 时钟 的本地化字符串。 - /// - public string Clock => Lang.Clock; - - /// - /// 查找类似 颜色拾取器 的本地化字符串。 - /// - public string ColorPicker => Lang.ColorPicker; - - /// - /// 查找类似 分栏偏移 的本地化字符串。 - /// - public string ColumnOffset => Lang.ColumnOffset; - - /// - /// 查找类似 分栏间隔 的本地化字符串。 - /// - public string ColumnSpacing => Lang.ColumnSpacing; - - /// - /// 查找类似 组合框 的本地化字符串。 - /// - public string ComboBox => Lang.ComboBox; - - /// - /// 查找类似 敬请期待 的本地化字符串。 - /// - public string ComingSoon => Lang.ComingSoon; - - /// - /// 查找类似 评论 的本地化字符串。 - /// - public string Comment => Lang.Comment; - - /// - /// 查找类似 一般 的本地化字符串。 - /// - public string Common => Lang.Common; - - /// - /// 查找类似 对比滑块 的本地化字符串。 - /// - public string CompareSlider => Lang.CompareSlider; - - /// - /// 查找类似 完成 的本地化字符串。 - /// - public string Complete => Lang.Complete; - - /// - /// 查找类似 这是内容 的本地化字符串。 - /// - public string ContentDemoStr => Lang.ContentDemoStr; - - /// - /// 查找类似 贡献者 的本地化字符串。 - /// - public string Contributors => Lang.Contributors; - - /// - /// 查找类似 控件 的本地化字符串。 - /// - public string Controls => Lang.Controls; - - /// - /// 查找类似 封面流 的本地化字符串。 - /// - public string CoverFlow => Lang.CoverFlow; - - /// - /// 查找类似 封面视图 的本地化字符串。 - /// - public string CoverView => Lang.CoverView; - - /// - /// 查找类似 危险 的本地化字符串。 - /// - public string Danger => Lang.Danger; - - /// - /// 查找类似 数据展示 的本地化字符串。 - /// - public string DataDisplay => Lang.DataDisplay; - - /// - /// 查找类似 数据录入 的本地化字符串。 - /// - public string DataEntry => Lang.DataEntry; - - /// - /// 查找类似 数据表格 的本地化字符串。 - /// - public string DataGrid => Lang.DataGrid; - - /// - /// 查找类似 日期选择器 的本地化字符串。 - /// - public string DatePicker => Lang.DatePicker; - - /// - /// 查找类似 日期时间选择器 的本地化字符串。 - /// - public string DateTimePicker => Lang.DateTimePicker; - - /// - /// 查找类似 默认 的本地化字符串。 - /// - public string Default => Lang.Default; - - /// - /// 查找类似 示例 的本地化字符串。 - /// - public string Demo => Lang.Demo; - - /// - /// 查找类似 对话框 的本地化字符串。 - /// - public string Dialog => Lang.Dialog; - - /// - /// 查找类似 对话框示例 的本地化字符串。 - /// - public string DialogDemo => Lang.DialogDemo; - - /// - /// 查找类似 分割线 的本地化字符串。 - /// - public string Divider => Lang.Divider; - - /// - /// 查找类似 中文文档 的本地化字符串。 - /// - public string Doc_cn => Lang.Doc_cn; - - /// - /// 查找类似 英文文档 的本地化字符串。 - /// - public string Doc_en => Lang.Doc_en; - - /// - /// 查找类似 文献资料 的本地化字符串。 - /// - public string Documentation => Lang.Documentation; - - /// - /// 查找类似 在这里拖拽 的本地化字符串。 - /// - public string DragHere => Lang.DragHere; - - /// - /// 查找类似 抽屉 的本地化字符串。 - /// - public string Drawer => Lang.Drawer; - - /// - /// 查找类似 效果 的本地化字符串。 - /// - public string Effects => Lang.Effects; - - /// - /// 查找类似 元素组 的本地化字符串。 - /// - public string ElementGroup => Lang.ElementGroup; - - /// - /// 查找类似 邮箱 的本地化字符串。 - /// - public string Email => Lang.Email; - - /// - /// 查找类似 空状态 的本地化字符串。 - /// - public string Empty => Lang.Empty; - - /// - /// 查找类似 错误 的本地化字符串。 - /// - public string Error => Lang.Error; - - /// - /// 查找类似 退出 的本地化字符串。 - /// - public string Exit => Lang.Exit; - - /// - /// 查找类似 展开框 的本地化字符串。 - /// - public string Expander => Lang.Expander; - - /// - /// 查找类似 严重 的本地化字符串。 - /// - public string Fatal => Lang.Fatal; - - /// - /// 查找类似 反馈 的本地化字符串。 - /// - public string Feedback => Lang.Feedback; - - /// - /// 查找类似 弹性盒子 的本地化字符串。 - /// - public string FlexPanel => Lang.FlexPanel; - - /// - /// 查找类似 翻页时钟 的本地化字符串。 - /// - public string FlipClock => Lang.FlipClock; - - /// - /// 查找类似 漂浮块 的本地化字符串。 - /// - public string FloatingBlock => Lang.FloatingBlock; - - /// - /// 查找类似 流文档 的本地化字符串。 - /// - public string FlowDocument => Lang.FlowDocument; - - /// - /// 查找类似 流文档单页视图 的本地化字符串。 - /// - public string FlowDocumentPageViewer => Lang.FlowDocumentPageViewer; - - /// - /// 查找类似 流文档查看器 的本地化字符串。 - /// - public string FlowDocumentReader => Lang.FlowDocumentReader; - - /// - /// 查找类似 流文档滚动视图 的本地化字符串。 - /// - public string FlowDocumentScrollViewer => Lang.FlowDocumentScrollViewer; - - /// - /// 查找类似 导航框架 的本地化字符串。 - /// - public string Frame => Lang.Frame; - - /// - /// 查找类似 几何形状 的本地化字符串。 - /// - public string Geometry => Lang.Geometry; - - /// - /// 查找类似 Gif图片 的本地化字符串。 - /// - public string GifImage => Lang.GifImage; - - /// - /// 查找类似 回到顶部 的本地化字符串。 - /// - public string GotoTop => Lang.GotoTop; - - /// - /// 查找类似 头像 的本地化字符串。 - /// - public string Gravatar => Lang.Gravatar; - - /// - /// 查找类似 栅格 的本地化字符串。 - /// - public string Grid => Lang.Grid; - - /// - /// 查找类似 分组框 的本地化字符串。 - /// - public string GroupBox => Lang.GroupBox; - - /// - /// 查找类似 组数 的本地化字符串。 - /// - public string Groups => Lang.Groups; - - /// - /// 查找类似 信息通知 的本地化字符串。 - /// - public string Growl => Lang.Growl; - - /// - /// 查找类似 检测到有新版本!是否更新? 的本地化字符串。 - /// - public string GrowlAsk => Lang.GrowlAsk; - - /// - /// 查找类似 消息通知示例 的本地化字符串。 - /// - public string GrowlDemo => Lang.GrowlDemo; - - /// - /// 查找类似 连接失败,请检查网络! 的本地化字符串。 - /// - public string GrowlError => Lang.GrowlError; - - /// - /// 查找类似 程序已崩溃~~~ 的本地化字符串。 - /// - public string GrowlFatal => Lang.GrowlFatal; - - /// - /// 查找类似 今天的天气不错~~~ 的本地化字符串。 - /// - public string GrowlInfo => Lang.GrowlInfo; - - /// - /// 查找类似 文件保存成功! 的本地化字符串。 - /// - public string GrowlSuccess => Lang.GrowlSuccess; - - /// - /// 查找类似 磁盘空间快要满了! 的本地化字符串。 - /// - public string GrowlWarning => Lang.GrowlWarning; - - /// - /// 查找类似 阴影画笔生成器 的本地化字符串。 - /// - public string HatchBrushGenerator => Lang.HatchBrushGenerator; - - /// - /// 查找类似 蜂窝布局 的本地化字符串。 - /// - public string HoneycombPanel => Lang.HoneycombPanel; - - /// - /// 查找类似 混合布局 的本地化字符串。 - /// - public string HybridLayout => Lang.HybridLayout; - - /// - /// 查找类似 忽略 的本地化字符串。 - /// - public string Ignore => Lang.Ignore; - - /// - /// 查找类似 图片块 的本地化字符串。 - /// - public string ImageBlock => Lang.ImageBlock; - - /// - /// 查找类似 图片浏览器 的本地化字符串。 - /// - public string ImageBrowser => Lang.ImageBrowser; - - /// - /// 查找类似 图片选择器 的本地化字符串。 - /// - public string ImageSelector => Lang.ImageSelector; - - /// - /// 查找类似 索引 的本地化字符串。 - /// - public string Index => Lang.Index; - - /// - /// 查找类似 信息 的本地化字符串。 - /// - public string Info => Lang.Info; - - /// - /// 查找类似 交互 的本地化字符串。 - /// - public string Interacting => Lang.Interacting; - - /// - /// 查找类似 可交互对话框 的本地化字符串。 - /// - public string InteractiveDialog => Lang.InteractiveDialog; - - /// - /// 查找类似 不是手机号码 的本地化字符串。 - /// - public string IsNotPhone => Lang.IsNotPhone; - - /// - /// 查找类似 标签 的本地化字符串。 - /// - public string Label => Lang.Label; - - /// - /// 查找类似 查找类似 {0} 的本地化字符串。 的本地化字符串。 - /// - public string LangComment => Lang.LangComment; - - /// - /// 查找类似 布局 的本地化字符串。 - /// - public string Layout => Lang.Layout; - - /// - /// 查找类似 列表框 的本地化字符串。 - /// - public string ListBox => Lang.ListBox; - - /// - /// 查找类似 列表视图 的本地化字符串。 - /// - public string ListView => Lang.ListView; - - /// - /// 查找类似 加载条 的本地化字符串。 - /// - public string Loading => Lang.Loading; - - /// - /// 查找类似 放大镜 的本地化字符串。 - /// - public string Magnifier => Lang.Magnifier; - - /// - /// 查找类似 菜单 的本地化字符串。 - /// - public string Menu => Lang.Menu; - - /// - /// 查找类似 消息框 的本地化字符串。 - /// - public string MessageBox => Lang.MessageBox; - - /// - /// 查找类似 杂项 的本地化字符串。 - /// - public string Misc => Lang.Misc; - - /// - /// 查找类似 的本地化字符串。 - /// - public string Morphing_Animation => Lang.Morphing_Animation; - - /// - /// 查找类似 名称 的本地化字符串。 - /// - public string Name => Lang.Name; - - /// - /// 查找类似 导航 的本地化字符串。 - /// - public string Navigation => Lang.Navigation; - - /// - /// 查找类似 新建窗口 的本地化字符串。 - /// - public string NewWindow => Lang.NewWindow; - - /// - /// 查找类似 下一步 的本地化字符串。 - /// - public string Next => Lang.Next; - - /// - /// 查找类似 桌面通知 的本地化字符串。 - /// - public string Notification => Lang.Notification; - - /// - /// 查找类似 托盘图标 的本地化字符串。 - /// - public string NotifyIcon => Lang.NotifyIcon; - - /// - /// 查找类似 数值选择控件 的本地化字符串。 - /// - public string NumericUpDown => Lang.NumericUpDown; - - /// - /// 查找类似 关 的本地化字符串。 - /// - public string Off => Lang.Off; - - /// - /// 查找类似 确定 的本地化字符串。 - /// - public string Ok => Lang.Ok; - - /// - /// 查找类似 开 的本地化字符串。 - /// - public string On => Lang.On; - - /// - /// 查找类似 点击打开背景模糊窗口 的本地化字符串。 - /// - public string OpenBlurWindow => Lang.OpenBlurWindow; - - /// - /// 查找类似 点击打开常规窗口 的本地化字符串。 - /// - public string OpenCommonWindow => Lang.OpenCommonWindow; - - /// - /// 查找类似 点击打开自定义内容窗口 的本地化字符串。 - /// - public string OpenCustomContentWindow => Lang.OpenCustomContentWindow; - - /// - /// 查找类似 点击打开自定义消息窗口 的本地化字符串。 - /// - public string OpenCustomMessageWindow => Lang.OpenCustomMessageWindow; - - /// - /// 查找类似 点击打开自定义非客户端区域窗口 的本地化字符串。 - /// - public string OpenCustomNonClientAreaWindow => Lang.OpenCustomNonClientAreaWindow; - - /// - /// 查找类似 点击打开辉光窗口 的本地化字符串。 - /// - public string OpenGlowWindow => Lang.OpenGlowWindow; - - /// - /// 查找类似 点击打开图片浏览器 的本地化字符串。 - /// - public string OpenImageBrowser => Lang.OpenImageBrowser; - - /// - /// 查找类似 点击打开消息窗口 的本地化字符串。 - /// - public string OpenMessageWindow => Lang.OpenMessageWindow; - - /// - /// 查找类似 点击打开鼠标跟随窗口 的本地化字符串。 - /// - public string OpenMouseFollowWindow => Lang.OpenMouseFollowWindow; - - /// - /// 查找类似 点击打开原生常规窗口 的本地化字符串。 - /// - public string OpenNativeCommonWindow => Lang.OpenNativeCommonWindow; - - /// - /// 查找类似 点击打开导航窗口 的本地化字符串。 - /// - public string OpenNavigationWindow => Lang.OpenNavigationWindow; - - /// - /// 查找类似 打开无非客户端区域可拖拽窗口 的本地化字符串。 - /// - public string OpenNoNonClientAreaDragableWindow => Lang.OpenNoNonClientAreaDragableWindow; - - /// - /// 查找类似 打开面板 的本地化字符串。 - /// - public string OpenPanel => Lang.OpenPanel; - - /// - /// 查找类似 打开精灵 的本地化字符串。 - /// - public string OpenSprite => Lang.OpenSprite; - - /// - /// 查找类似 点击打开触摸拖动窗口 的本地化字符串。 - /// - public string OpenTouchDragMoveWindow => Lang.OpenTouchDragMoveWindow; - - /// - /// 查找类似 轮廓文本 的本地化字符串。 - /// - public string OutlineText => Lang.OutlineText; - - /// - /// 查找类似 页码条 的本地化字符串。 - /// - public string Pagination => Lang.Pagination; - - /// - /// 查找类似 密码框 的本地化字符串。 - /// - public string PasswordBox => Lang.PasswordBox; - - /// - /// 查找类似 PIN码框 的本地化字符串。 - /// - public string PinBox => Lang.PinBox; - - /// - /// 查找类似 请输入... 的本地化字符串。 - /// - public string PleaseInput => Lang.PleaseInput; - - /// - /// 查找类似 请稍后... 的本地化字符串。 - /// - public string PleaseWait => Lang.PleaseWait; - - /// - /// 查找类似 请输入内容 的本地化字符串。 - /// - public string PlsEnterContent => Lang.PlsEnterContent; - - /// - /// 查找类似 请输入邮箱 的本地化字符串。 - /// - public string PlsEnterEmail => Lang.PlsEnterEmail; - - /// - /// 查找类似 请输入关键字 的本地化字符串。 - /// - public string PlsEnterKey => Lang.PlsEnterKey; - - /// - /// 查找类似 气泡提示 的本地化字符串。 - /// - public string Poptip => Lang.Poptip; - - /// - /// 查找类似 上左;上边;上右;右上;右边;右下;下右;下边;下左;左下;左边;左上 的本地化字符串。 - /// - public string PoptipPositionStr => Lang.PoptipPositionStr; - - /// - /// 查找类似 实用例子 的本地化字符串。 - /// - public string PracticalDemos => Lang.PracticalDemos; - - /// - /// 查找类似 上一步 的本地化字符串。 - /// - public string Prev => Lang.Prev; - - /// - /// 查找类似 预览滑块 的本地化字符串。 - /// - public string PreviewSlider => Lang.PreviewSlider; - - /// - /// 查找类似 主要 的本地化字符串。 - /// - public string Primary => Lang.Primary; - - /// - /// 查找类似 进度条 的本地化字符串。 - /// - public string ProgressBar => Lang.ProgressBar; - - /// - /// 查找类似 进度按钮 的本地化字符串。 - /// - public string ProgressButton => Lang.ProgressButton; - - /// - /// 查找类似 项目 的本地化字符串。 - /// - public string Project => Lang.Project; - - /// - /// 查找类似 属性编辑器 的本地化字符串。 - /// - public string PropertyGrid => Lang.PropertyGrid; - - /// - /// 查找类似 按住说话 的本地化字符串。 - /// - public string PushToTalk => Lang.PushToTalk; - - /// - /// 查找类似 QQ群 的本地化字符串。 - /// - public string QQGroup => Lang.QQGroup; - - /// - /// 查找类似 单选按钮 的本地化字符串。 - /// - public string RadioButton => Lang.RadioButton; - - /// - /// 查找类似 范围滑块 的本地化字符串。 - /// - public string RangeSlider => Lang.RangeSlider; - - /// - /// 查找类似 评分 的本地化字符串。 - /// - public string Rate => Lang.Rate; - - /// - /// 查找类似 群友推荐 的本地化字符串。 - /// - public string Recommendation => Lang.Recommendation; - - /// - /// 查找类似 注册 的本地化字符串。 - /// - public string Register => Lang.Register; - - /// - /// 查找类似 相对布局 的本地化字符串。 - /// - public string RelativePanel => Lang.RelativePanel; - - /// - /// 查找类似 备注 的本地化字符串。 - /// - public string Remark => Lang.Remark; - - /// - /// 查找类似 删除项 的本地化字符串。 - /// - public string RemoveItem => Lang.RemoveItem; - - /// - /// 查找类似 重复按钮 的本地化字符串。 - /// - public string RepeatButton => Lang.RepeatButton; - - /// - /// 查找类似 回复 的本地化字符串。 - /// - public string Reply => Lang.Reply; - - /// - /// 查找类似 代码仓库 的本地化字符串。 - /// - public string Repository => Lang.Repository; - - /// - /// 查找类似 响应式布局 的本地化字符串。 - /// - public string ResponsiveLayout => Lang.ResponsiveLayout; - - /// - /// 查找类似 富文本框 的本地化字符串。 - /// - public string RichTextBox => Lang.RichTextBox; - - /// - /// 查找类似 在这里右击 的本地化字符串。 - /// - public string RightClickHere => Lang.RightClickHere; - - /// - /// 查找类似 滚动块 的本地化字符串。 - /// - public string RunningBlock => Lang.RunningBlock; - - /// - /// 查找类似 截图 的本地化字符串。 - /// - public string Screenshot => Lang.Screenshot; - - /// - /// 查找类似 滚动视图 的本地化字符串。 - /// - public string ScrollViewer => Lang.ScrollViewer; - - /// - /// 查找类似 搜索栏 的本地化字符串。 - /// - public string SearchBar => Lang.SearchBar; - - /// - /// 查找类似 秒 的本地化字符串。 - /// - public string Second => Lang.Second; - - /// - /// 查找类似 选中 的本地化字符串。 - /// - public string Selected => Lang.Selected; - - /// - /// 查找类似 发送通知 的本地化字符串。 - /// - public string SendNotification => Lang.SendNotification; - - /// - /// 查找类似 徽章 的本地化字符串。 - /// - public string Shield => Lang.Shield; - - /// - /// 查找类似 在当前窗口显示 的本地化字符串。 - /// - public string ShowInCurrentWindow => Lang.ShowInCurrentWindow; - - /// - /// 查找类似 在主窗口显示 的本地化字符串。 - /// - public string ShowInMainWindow => Lang.ShowInMainWindow; - - /// - /// 查找类似 显示行号 的本地化字符串。 - /// - public string ShowRowNumber => Lang.ShowRowNumber; - - /// - /// 查找类似 侧边菜单 的本地化字符串。 - /// - public string SideMenu => Lang.SideMenu; - - /// - /// 查找类似 滑块 的本地化字符串。 - /// - public string Slider => Lang.Slider; - - /// - /// 查找类似 分割按钮 的本地化字符串。 - /// - public string SplitButton => Lang.SplitButton; - - /// - /// 查找类似 精灵 的本地化字符串。 - /// - public string Sprite => Lang.Sprite; - - /// - /// 查找类似 开始截图 的本地化字符串。 - /// - public string StartScreenshot => Lang.StartScreenshot; - - /// - /// 查找类似 保持打开 的本地化字符串。 - /// - public string StaysOpen => Lang.StaysOpen; - - /// - /// 查找类似 步骤 的本地化字符串。 - /// - public string Step => Lang.Step; - - /// - /// 查找类似 步骤条 的本地化字符串。 - /// - public string StepBar => Lang.StepBar; - - /// - /// 查找类似 样式模板 的本地化字符串。 - /// - public string Styles => Lang.Styles; - - /// - /// 查找类似 子标题 的本地化字符串。 - /// - public string SubTitle => Lang.SubTitle; - - /// - /// 查找类似 成功 的本地化字符串。 - /// - public string Success => Lang.Success; - - /// - /// 查找类似 选项卡控件 的本地化字符串。 - /// - public string TabControl => Lang.TabControl; - - /// - /// 查找类似 标签 的本地化字符串。 - /// - public string Tag => Lang.Tag; - - /// - /// 查找类似 正文 的本地化字符串。 - /// - public string Text => Lang.Text; - - /// - /// 查找类似 文本块 的本地化字符串。 - /// - public string TextBlock => Lang.TextBlock; - - /// - /// 查找类似 文本框 的本地化字符串。 - /// - public string TextBox => Lang.TextBox; - - /// - /// 查找类似 文本对话框 的本地化字符串。 - /// - public string TextDialog => Lang.TextDialog; - - /// - /// 查找类似 文本对话框(控件中) 的本地化字符串。 - /// - public string TextDialogInControl => Lang.TextDialogInControl; - - /// - /// 查找类似 文本对话框,带计时器 的本地化字符串。 - /// - public string TextDialogWithTimer => Lang.TextDialogWithTimer; - - /// - /// 查找类似 时间条 的本地化字符串。 - /// - public string TimeBar => Lang.TimeBar; - - /// - /// 查找类似 时间选择器 的本地化字符串。 - /// - public string TimePicker => Lang.TimePicker; - - /// - /// 查找类似 提示 的本地化字符串。 - /// - public string Tip => Lang.Tip; - - /// - /// 查找类似 标题 的本地化字符串。 - /// - public string Title => Lang.Title; - - /// - /// 查找类似 这是标题 的本地化字符串。 - /// - public string TitleDemoStr1 => Lang.TitleDemoStr1; - - /// - /// 查找类似 此项必填 的本地化字符串。 - /// - public string TitleDemoStr2 => Lang.TitleDemoStr2; - - /// - /// 查找类似 标题在左侧 的本地化字符串。 - /// - public string TitleDemoStr3 => Lang.TitleDemoStr3; - - /// - /// 查找类似 切换按钮 的本地化字符串。 - /// - public string ToggleButton => Lang.ToggleButton; - - /// - /// 查找类似 工具条 的本地化字符串。 - /// - public string ToolBar => Lang.ToolBar; - - /// - /// 查找类似 工具 的本地化字符串。 - /// - public string Tools => Lang.Tools; - - /// - /// 查找类似 穿梭框 的本地化字符串。 - /// - public string Transfer => Lang.Transfer; - - /// - /// 查找类似 内容过渡控件 的本地化字符串。 - /// - public string TransitioningContentControl => Lang.TransitioningContentControl; - - /// - /// 查找类似 树视图 的本地化字符串。 - /// - public string TreeView => Lang.TreeView; - - /// - /// 查找类似 试试关闭程序吧? 的本地化字符串。 - /// - public string Try2CloseApp => Lang.Try2CloseApp; - - /// - /// 查找类似 类型 的本地化字符串。 - /// - public string Type => Lang.Type; - - /// - /// 查找类似 等间距布局 的本地化字符串。 - /// - public string UniformSpacingPanel => Lang.UniformSpacingPanel; - - /// - /// 查找类似 上传文件 的本地化字符串。 - /// - public string UploadFile => Lang.UploadFile; - - /// - /// 查找类似 上传;上传中 的本地化字符串。 - /// - public string UploadStr => Lang.UploadStr; - - /// - /// 查找类似 可见性 的本地化字符串。 - /// - public string Visibility => Lang.Visibility; - - /// - /// 查找类似 VS 插件 的本地化字符串。 - /// - public string Vsix => Lang.Vsix; - - /// - /// 查找类似 警告 的本地化字符串。 - /// - public string Warning => Lang.Warning; - - /// - /// 查找类似 瀑布流 的本地化字符串。 - /// - public string WaterfallPanel => Lang.WaterfallPanel; - - /// - /// 查找类似 网站 的本地化字符串。 - /// - public string Website => Lang.Website; - - /// - /// 查找类似 窗口 的本地化字符串。 - /// - public string Window => Lang.Window; - - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void OnPropertyChanged(string propertyName) => - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } - public class LangKeys + public static string GetLang(string key) => Lang.ResourceManager.GetString(key, Culture); + + public static void SetLang(DependencyObject dependencyObject, DependencyProperty dependencyProperty, string key) => + BindingOperations.SetBinding(dependencyObject, dependencyProperty, new Binding(key) + { + Source = Instance, + Mode = BindingMode.OneWay + }); + + private void UpdateLangs() { - /// - /// 查找类似 关于 的本地化字符串。 - /// - public static string About = nameof(About); - - /// - /// 查找类似 添加项 的本地化字符串。 - /// - public static string AddItem = nameof(AddItem); - - /// - /// 查找类似 动画路径 的本地化字符串。 - /// - public static string AnimationPath = nameof(AnimationPath); - - /// - /// 查找类似 托盘图标已打开,将隐藏窗口而不是关闭程序 的本地化字符串。 - /// - public static string AppClosingTip = nameof(AppClosingTip); - - /// - /// 查找类似 询问 的本地化字符串。 - /// - public static string Ask = nameof(Ask); - - /// - /// 查找类似 自动补全文本框 的本地化字符串。 - /// - public static string AutoCompleteTextBox = nameof(AutoCompleteTextBox); - - /// - /// 查找类似 标记 的本地化字符串。 - /// - public static string Badge = nameof(Badge); - - /// - /// 查找类似 填写基本信息 的本地化字符串。 - /// - public static string BasicInfo = nameof(BasicInfo); - - /// - /// 查找类似 基础布局 的本地化字符串。 - /// - public static string BasicLayout = nameof(BasicLayout); - - /// - /// 查找类似 闪烁 的本地化字符串。 - /// - public static string Blink = nameof(Blink); - - /// - /// 查找类似 博客 的本地化字符串。 - /// - public static string Blog = nameof(Blog); - - /// - /// 查找类似 边框 的本地化字符串。 - /// - public static string Border = nameof(Border); - - /// - /// 查找类似 画刷 的本地化字符串。 - /// - public static string Brush = nameof(Brush); - - /// - /// 查找类似 按钮 的本地化字符串。 - /// - public static string Button = nameof(Button); - - /// - /// 查找类似 自定义按钮 的本地化字符串。 - /// - public static string ButtonCustom = nameof(ButtonCustom); - - /// - /// 查找类似 按钮组 的本地化字符串。 - /// - public static string ButtonGroup = nameof(ButtonGroup); - - /// - /// 查找类似 日历 的本地化字符串。 - /// - public static string Calendar = nameof(Calendar); - - /// - /// 查找类似 带时钟的日历 的本地化字符串。 - /// - public static string CalendarWithClock = nameof(CalendarWithClock); - - /// - /// 查找类似 卡片 的本地化字符串。 - /// - public static string Card = nameof(Card); - - /// - /// 查找类似 轮播 的本地化字符串。 - /// - public static string Carousel = nameof(Carousel); - - /// - /// 查找类似 是否重启以更改语言? 的本地化字符串。 - /// - public static string ChangeLangAsk = nameof(ChangeLangAsk); - - /// - /// 查找类似 对话气泡 的本地化字符串。 - /// - public static string ChatBubble = nameof(ChatBubble); - - /// - /// 查找类似 讨论室 的本地化字符串。 - /// - public static string Chatroom = nameof(Chatroom); - - /// - /// 查找类似 复选框 的本地化字符串。 - /// - public static string CheckBox = nameof(CheckBox); - - /// - /// 查找类似 多选组合框 的本地化字符串。 - /// - public static string CheckComboBox = nameof(CheckComboBox); - - /// - /// 查找类似 圆形布局 的本地化字符串。 - /// - public static string CirclePanel = nameof(CirclePanel); - - /// - /// 查找类似 清空 的本地化字符串。 - /// - public static string Clear = nameof(Clear); - - /// - /// 查找类似 点击计数 的本地化字符串。 - /// - public static string Click2Count = nameof(Click2Count); - - /// - /// 查找类似 时钟 的本地化字符串。 - /// - public static string Clock = nameof(Clock); - - /// - /// 查找类似 颜色拾取器 的本地化字符串。 - /// - public static string ColorPicker = nameof(ColorPicker); - - /// - /// 查找类似 分栏偏移 的本地化字符串。 - /// - public static string ColumnOffset = nameof(ColumnOffset); - - /// - /// 查找类似 分栏间隔 的本地化字符串。 - /// - public static string ColumnSpacing = nameof(ColumnSpacing); - - /// - /// 查找类似 组合框 的本地化字符串。 - /// - public static string ComboBox = nameof(ComboBox); - - /// - /// 查找类似 敬请期待 的本地化字符串。 - /// - public static string ComingSoon = nameof(ComingSoon); - - /// - /// 查找类似 评论 的本地化字符串。 - /// - public static string Comment = nameof(Comment); - - /// - /// 查找类似 一般 的本地化字符串。 - /// - public static string Common = nameof(Common); - - /// - /// 查找类似 对比滑块 的本地化字符串。 - /// - public static string CompareSlider = nameof(CompareSlider); - - /// - /// 查找类似 完成 的本地化字符串。 - /// - public static string Complete = nameof(Complete); - - /// - /// 查找类似 这是内容 的本地化字符串。 - /// - public static string ContentDemoStr = nameof(ContentDemoStr); - - /// - /// 查找类似 贡献者 的本地化字符串。 - /// - public static string Contributors = nameof(Contributors); - - /// - /// 查找类似 控件 的本地化字符串。 - /// - public static string Controls = nameof(Controls); - - /// - /// 查找类似 封面流 的本地化字符串。 - /// - public static string CoverFlow = nameof(CoverFlow); - - /// - /// 查找类似 封面视图 的本地化字符串。 - /// - public static string CoverView = nameof(CoverView); - - /// - /// 查找类似 危险 的本地化字符串。 - /// - public static string Danger = nameof(Danger); - - /// - /// 查找类似 数据展示 的本地化字符串。 - /// - public static string DataDisplay = nameof(DataDisplay); - - /// - /// 查找类似 数据录入 的本地化字符串。 - /// - public static string DataEntry = nameof(DataEntry); - - /// - /// 查找类似 数据表格 的本地化字符串。 - /// - public static string DataGrid = nameof(DataGrid); - - /// - /// 查找类似 日期选择器 的本地化字符串。 - /// - public static string DatePicker = nameof(DatePicker); - - /// - /// 查找类似 日期时间选择器 的本地化字符串。 - /// - public static string DateTimePicker = nameof(DateTimePicker); - - /// - /// 查找类似 默认 的本地化字符串。 - /// - public static string Default = nameof(Default); - - /// - /// 查找类似 示例 的本地化字符串。 - /// - public static string Demo = nameof(Demo); - - /// - /// 查找类似 对话框 的本地化字符串。 - /// - public static string Dialog = nameof(Dialog); - - /// - /// 查找类似 对话框示例 的本地化字符串。 - /// - public static string DialogDemo = nameof(DialogDemo); - - /// - /// 查找类似 分割线 的本地化字符串。 - /// - public static string Divider = nameof(Divider); - - /// - /// 查找类似 中文文档 的本地化字符串。 - /// - public static string Doc_cn = nameof(Doc_cn); - - /// - /// 查找类似 英文文档 的本地化字符串。 - /// - public static string Doc_en = nameof(Doc_en); - - /// - /// 查找类似 文献资料 的本地化字符串。 - /// - public static string Documentation = nameof(Documentation); - - /// - /// 查找类似 在这里拖拽 的本地化字符串。 - /// - public static string DragHere = nameof(DragHere); - - /// - /// 查找类似 抽屉 的本地化字符串。 - /// - public static string Drawer = nameof(Drawer); - - /// - /// 查找类似 效果 的本地化字符串。 - /// - public static string Effects = nameof(Effects); - - /// - /// 查找类似 元素组 的本地化字符串。 - /// - public static string ElementGroup = nameof(ElementGroup); - - /// - /// 查找类似 邮箱 的本地化字符串。 - /// - public static string Email = nameof(Email); - - /// - /// 查找类似 空状态 的本地化字符串。 - /// - public static string Empty = nameof(Empty); - - /// - /// 查找类似 错误 的本地化字符串。 - /// - public static string Error = nameof(Error); - - /// - /// 查找类似 退出 的本地化字符串。 - /// - public static string Exit = nameof(Exit); - - /// - /// 查找类似 展开框 的本地化字符串。 - /// - public static string Expander = nameof(Expander); - - /// - /// 查找类似 严重 的本地化字符串。 - /// - public static string Fatal = nameof(Fatal); - - /// - /// 查找类似 反馈 的本地化字符串。 - /// - public static string Feedback = nameof(Feedback); - - /// - /// 查找类似 弹性盒子 的本地化字符串。 - /// - public static string FlexPanel = nameof(FlexPanel); - - /// - /// 查找类似 翻页时钟 的本地化字符串。 - /// - public static string FlipClock = nameof(FlipClock); - - /// - /// 查找类似 漂浮块 的本地化字符串。 - /// - public static string FloatingBlock = nameof(FloatingBlock); - - /// - /// 查找类似 流文档 的本地化字符串。 - /// - public static string FlowDocument = nameof(FlowDocument); - - /// - /// 查找类似 流文档单页视图 的本地化字符串。 - /// - public static string FlowDocumentPageViewer = nameof(FlowDocumentPageViewer); - - /// - /// 查找类似 流文档查看器 的本地化字符串。 - /// - public static string FlowDocumentReader = nameof(FlowDocumentReader); - - /// - /// 查找类似 流文档滚动视图 的本地化字符串。 - /// - public static string FlowDocumentScrollViewer = nameof(FlowDocumentScrollViewer); - - /// - /// 查找类似 导航框架 的本地化字符串。 - /// - public static string Frame = nameof(Frame); - - /// - /// 查找类似 几何形状 的本地化字符串。 - /// - public static string Geometry = nameof(Geometry); - - /// - /// 查找类似 Gif图片 的本地化字符串。 - /// - public static string GifImage = nameof(GifImage); - - /// - /// 查找类似 回到顶部 的本地化字符串。 - /// - public static string GotoTop = nameof(GotoTop); - - /// - /// 查找类似 头像 的本地化字符串。 - /// - public static string Gravatar = nameof(Gravatar); - - /// - /// 查找类似 栅格 的本地化字符串。 - /// - public static string Grid = nameof(Grid); - - /// - /// 查找类似 分组框 的本地化字符串。 - /// - public static string GroupBox = nameof(GroupBox); - - /// - /// 查找类似 组数 的本地化字符串。 - /// - public static string Groups = nameof(Groups); - - /// - /// 查找类似 信息通知 的本地化字符串。 - /// - public static string Growl = nameof(Growl); - - /// - /// 查找类似 检测到有新版本!是否更新? 的本地化字符串。 - /// - public static string GrowlAsk = nameof(GrowlAsk); - - /// - /// 查找类似 消息通知示例 的本地化字符串。 - /// - public static string GrowlDemo = nameof(GrowlDemo); - - /// - /// 查找类似 连接失败,请检查网络! 的本地化字符串。 - /// - public static string GrowlError = nameof(GrowlError); - - /// - /// 查找类似 程序已崩溃~~~ 的本地化字符串。 - /// - public static string GrowlFatal = nameof(GrowlFatal); - - /// - /// 查找类似 今天的天气不错~~~ 的本地化字符串。 - /// - public static string GrowlInfo = nameof(GrowlInfo); - - /// - /// 查找类似 文件保存成功! 的本地化字符串。 - /// - public static string GrowlSuccess = nameof(GrowlSuccess); - - /// - /// 查找类似 磁盘空间快要满了! 的本地化字符串。 - /// - public static string GrowlWarning = nameof(GrowlWarning); - - /// - /// 查找类似 阴影画笔生成器 的本地化字符串。 - /// - public static string HatchBrushGenerator = nameof(HatchBrushGenerator); - - /// - /// 查找类似 蜂窝布局 的本地化字符串。 - /// - public static string HoneycombPanel = nameof(HoneycombPanel); - - /// - /// 查找类似 混合布局 的本地化字符串。 - /// - public static string HybridLayout = nameof(HybridLayout); - - /// - /// 查找类似 忽略 的本地化字符串。 - /// - public static string Ignore = nameof(Ignore); - - /// - /// 查找类似 图片块 的本地化字符串。 - /// - public static string ImageBlock = nameof(ImageBlock); - - /// - /// 查找类似 图片浏览器 的本地化字符串。 - /// - public static string ImageBrowser = nameof(ImageBrowser); - - /// - /// 查找类似 图片选择器 的本地化字符串。 - /// - public static string ImageSelector = nameof(ImageSelector); - - /// - /// 查找类似 索引 的本地化字符串。 - /// - public static string Index = nameof(Index); - - /// - /// 查找类似 信息 的本地化字符串。 - /// - public static string Info = nameof(Info); - - /// - /// 查找类似 交互 的本地化字符串。 - /// - public static string Interacting = nameof(Interacting); - - /// - /// 查找类似 可交互对话框 的本地化字符串。 - /// - public static string InteractiveDialog = nameof(InteractiveDialog); - - /// - /// 查找类似 不是手机号码 的本地化字符串。 - /// - public static string IsNotPhone = nameof(IsNotPhone); - - /// - /// 查找类似 标签 的本地化字符串。 - /// - public static string Label = nameof(Label); - - /// - /// 查找类似 查找类似 {0} 的本地化字符串。 的本地化字符串。 - /// - public static string LangComment = nameof(LangComment); - - /// - /// 查找类似 布局 的本地化字符串。 - /// - public static string Layout = nameof(Layout); - - /// - /// 查找类似 列表框 的本地化字符串。 - /// - public static string ListBox = nameof(ListBox); - - /// - /// 查找类似 列表视图 的本地化字符串。 - /// - public static string ListView = nameof(ListView); - - /// - /// 查找类似 加载条 的本地化字符串。 - /// - public static string Loading = nameof(Loading); - - /// - /// 查找类似 放大镜 的本地化字符串。 - /// - public static string Magnifier = nameof(Magnifier); - - /// - /// 查找类似 菜单 的本地化字符串。 - /// - public static string Menu = nameof(Menu); - - /// - /// 查找类似 消息框 的本地化字符串。 - /// - public static string MessageBox = nameof(MessageBox); - - /// - /// 查找类似 杂项 的本地化字符串。 - /// - public static string Misc = nameof(Misc); - - /// - /// 查找类似 的本地化字符串。 - /// - public static string Morphing_Animation = nameof(Morphing_Animation); - - /// - /// 查找类似 名称 的本地化字符串。 - /// - public static string Name = nameof(Name); - - /// - /// 查找类似 导航 的本地化字符串。 - /// - public static string Navigation = nameof(Navigation); - - /// - /// 查找类似 新建窗口 的本地化字符串。 - /// - public static string NewWindow = nameof(NewWindow); - - /// - /// 查找类似 下一步 的本地化字符串。 - /// - public static string Next = nameof(Next); - - /// - /// 查找类似 桌面通知 的本地化字符串。 - /// - public static string Notification = nameof(Notification); - - /// - /// 查找类似 托盘图标 的本地化字符串。 - /// - public static string NotifyIcon = nameof(NotifyIcon); - - /// - /// 查找类似 数值选择控件 的本地化字符串。 - /// - public static string NumericUpDown = nameof(NumericUpDown); - - /// - /// 查找类似 关 的本地化字符串。 - /// - public static string Off = nameof(Off); - - /// - /// 查找类似 确定 的本地化字符串。 - /// - public static string Ok = nameof(Ok); - - /// - /// 查找类似 开 的本地化字符串。 - /// - public static string On = nameof(On); - - /// - /// 查找类似 点击打开背景模糊窗口 的本地化字符串。 - /// - public static string OpenBlurWindow = nameof(OpenBlurWindow); - - /// - /// 查找类似 点击打开常规窗口 的本地化字符串。 - /// - public static string OpenCommonWindow = nameof(OpenCommonWindow); - - /// - /// 查找类似 点击打开自定义内容窗口 的本地化字符串。 - /// - public static string OpenCustomContentWindow = nameof(OpenCustomContentWindow); - - /// - /// 查找类似 点击打开自定义消息窗口 的本地化字符串。 - /// - public static string OpenCustomMessageWindow = nameof(OpenCustomMessageWindow); - - /// - /// 查找类似 点击打开自定义非客户端区域窗口 的本地化字符串。 - /// - public static string OpenCustomNonClientAreaWindow = nameof(OpenCustomNonClientAreaWindow); - - /// - /// 查找类似 点击打开辉光窗口 的本地化字符串。 - /// - public static string OpenGlowWindow = nameof(OpenGlowWindow); - - /// - /// 查找类似 点击打开图片浏览器 的本地化字符串。 - /// - public static string OpenImageBrowser = nameof(OpenImageBrowser); - - /// - /// 查找类似 点击打开消息窗口 的本地化字符串。 - /// - public static string OpenMessageWindow = nameof(OpenMessageWindow); - - /// - /// 查找类似 点击打开鼠标跟随窗口 的本地化字符串。 - /// - public static string OpenMouseFollowWindow = nameof(OpenMouseFollowWindow); - - /// - /// 查找类似 点击打开原生常规窗口 的本地化字符串。 - /// - public static string OpenNativeCommonWindow = nameof(OpenNativeCommonWindow); - - /// - /// 查找类似 点击打开导航窗口 的本地化字符串。 - /// - public static string OpenNavigationWindow = nameof(OpenNavigationWindow); - - /// - /// 查找类似 打开无非客户端区域可拖拽窗口 的本地化字符串。 - /// - public static string OpenNoNonClientAreaDragableWindow = nameof(OpenNoNonClientAreaDragableWindow); - - /// - /// 查找类似 打开面板 的本地化字符串。 - /// - public static string OpenPanel = nameof(OpenPanel); - - /// - /// 查找类似 打开精灵 的本地化字符串。 - /// - public static string OpenSprite = nameof(OpenSprite); - - /// - /// 查找类似 点击打开触摸拖动窗口 的本地化字符串。 - /// - public static string OpenTouchDragMoveWindow = nameof(OpenTouchDragMoveWindow); - - /// - /// 查找类似 轮廓文本 的本地化字符串。 - /// - public static string OutlineText = nameof(OutlineText); - - /// - /// 查找类似 页码条 的本地化字符串。 - /// - public static string Pagination = nameof(Pagination); - - /// - /// 查找类似 密码框 的本地化字符串。 - /// - public static string PasswordBox = nameof(PasswordBox); - - /// - /// 查找类似 PIN码框 的本地化字符串。 - /// - public static string PinBox = nameof(PinBox); - - /// - /// 查找类似 请输入... 的本地化字符串。 - /// - public static string PleaseInput = nameof(PleaseInput); - - /// - /// 查找类似 请稍后... 的本地化字符串。 - /// - public static string PleaseWait = nameof(PleaseWait); - - /// - /// 查找类似 请输入内容 的本地化字符串。 - /// - public static string PlsEnterContent = nameof(PlsEnterContent); - - /// - /// 查找类似 请输入邮箱 的本地化字符串。 - /// - public static string PlsEnterEmail = nameof(PlsEnterEmail); - - /// - /// 查找类似 请输入关键字 的本地化字符串。 - /// - public static string PlsEnterKey = nameof(PlsEnterKey); - - /// - /// 查找类似 气泡提示 的本地化字符串。 - /// - public static string Poptip = nameof(Poptip); - - /// - /// 查找类似 上左;上边;上右;右上;右边;右下;下右;下边;下左;左下;左边;左上 的本地化字符串。 - /// - public static string PoptipPositionStr = nameof(PoptipPositionStr); - - /// - /// 查找类似 实用例子 的本地化字符串。 - /// - public static string PracticalDemos = nameof(PracticalDemos); - - /// - /// 查找类似 上一步 的本地化字符串。 - /// - public static string Prev = nameof(Prev); - - /// - /// 查找类似 预览滑块 的本地化字符串。 - /// - public static string PreviewSlider = nameof(PreviewSlider); - - /// - /// 查找类似 主要 的本地化字符串。 - /// - public static string Primary = nameof(Primary); - - /// - /// 查找类似 进度条 的本地化字符串。 - /// - public static string ProgressBar = nameof(ProgressBar); - - /// - /// 查找类似 进度按钮 的本地化字符串。 - /// - public static string ProgressButton = nameof(ProgressButton); - - /// - /// 查找类似 项目 的本地化字符串。 - /// - public static string Project = nameof(Project); - - /// - /// 查找类似 属性编辑器 的本地化字符串。 - /// - public static string PropertyGrid = nameof(PropertyGrid); - - /// - /// 查找类似 按住说话 的本地化字符串。 - /// - public static string PushToTalk = nameof(PushToTalk); - - /// - /// 查找类似 QQ群 的本地化字符串。 - /// - public static string QQGroup = nameof(QQGroup); - - /// - /// 查找类似 单选按钮 的本地化字符串。 - /// - public static string RadioButton = nameof(RadioButton); - - /// - /// 查找类似 范围滑块 的本地化字符串。 - /// - public static string RangeSlider = nameof(RangeSlider); - - /// - /// 查找类似 评分 的本地化字符串。 - /// - public static string Rate = nameof(Rate); - - /// - /// 查找类似 群友推荐 的本地化字符串。 - /// - public static string Recommendation = nameof(Recommendation); - - /// - /// 查找类似 注册 的本地化字符串。 - /// - public static string Register = nameof(Register); - - /// - /// 查找类似 相对布局 的本地化字符串。 - /// - public static string RelativePanel = nameof(RelativePanel); - - /// - /// 查找类似 备注 的本地化字符串。 - /// - public static string Remark = nameof(Remark); - - /// - /// 查找类似 删除项 的本地化字符串。 - /// - public static string RemoveItem = nameof(RemoveItem); - - /// - /// 查找类似 重复按钮 的本地化字符串。 - /// - public static string RepeatButton = nameof(RepeatButton); - - /// - /// 查找类似 回复 的本地化字符串。 - /// - public static string Reply = nameof(Reply); - - /// - /// 查找类似 代码仓库 的本地化字符串。 - /// - public static string Repository = nameof(Repository); - - /// - /// 查找类似 响应式布局 的本地化字符串。 - /// - public static string ResponsiveLayout = nameof(ResponsiveLayout); - - /// - /// 查找类似 富文本框 的本地化字符串。 - /// - public static string RichTextBox = nameof(RichTextBox); - - /// - /// 查找类似 在这里右击 的本地化字符串。 - /// - public static string RightClickHere = nameof(RightClickHere); - - /// - /// 查找类似 滚动块 的本地化字符串。 - /// - public static string RunningBlock = nameof(RunningBlock); - - /// - /// 查找类似 截图 的本地化字符串。 - /// - public static string Screenshot = nameof(Screenshot); - - /// - /// 查找类似 滚动视图 的本地化字符串。 - /// - public static string ScrollViewer = nameof(ScrollViewer); - - /// - /// 查找类似 搜索栏 的本地化字符串。 - /// - public static string SearchBar = nameof(SearchBar); - - /// - /// 查找类似 秒 的本地化字符串。 - /// - public static string Second = nameof(Second); - - /// - /// 查找类似 选中 的本地化字符串。 - /// - public static string Selected = nameof(Selected); - - /// - /// 查找类似 发送通知 的本地化字符串。 - /// - public static string SendNotification = nameof(SendNotification); - - /// - /// 查找类似 徽章 的本地化字符串。 - /// - public static string Shield = nameof(Shield); - - /// - /// 查找类似 在当前窗口显示 的本地化字符串。 - /// - public static string ShowInCurrentWindow = nameof(ShowInCurrentWindow); - - /// - /// 查找类似 在主窗口显示 的本地化字符串。 - /// - public static string ShowInMainWindow = nameof(ShowInMainWindow); - - /// - /// 查找类似 显示行号 的本地化字符串。 - /// - public static string ShowRowNumber = nameof(ShowRowNumber); - - /// - /// 查找类似 侧边菜单 的本地化字符串。 - /// - public static string SideMenu = nameof(SideMenu); - - /// - /// 查找类似 滑块 的本地化字符串。 - /// - public static string Slider = nameof(Slider); - - /// - /// 查找类似 分割按钮 的本地化字符串。 - /// - public static string SplitButton = nameof(SplitButton); - - /// - /// 查找类似 精灵 的本地化字符串。 - /// - public static string Sprite = nameof(Sprite); - - /// - /// 查找类似 开始截图 的本地化字符串。 - /// - public static string StartScreenshot = nameof(StartScreenshot); - - /// - /// 查找类似 保持打开 的本地化字符串。 - /// - public static string StaysOpen = nameof(StaysOpen); - - /// - /// 查找类似 步骤 的本地化字符串。 - /// - public static string Step = nameof(Step); - - /// - /// 查找类似 步骤条 的本地化字符串。 - /// - public static string StepBar = nameof(StepBar); - - /// - /// 查找类似 样式模板 的本地化字符串。 - /// - public static string Styles = nameof(Styles); - - /// - /// 查找类似 子标题 的本地化字符串。 - /// - public static string SubTitle = nameof(SubTitle); - - /// - /// 查找类似 成功 的本地化字符串。 - /// - public static string Success = nameof(Success); - - /// - /// 查找类似 选项卡控件 的本地化字符串。 - /// - public static string TabControl = nameof(TabControl); - - /// - /// 查找类似 标签 的本地化字符串。 - /// - public static string Tag = nameof(Tag); - - /// - /// 查找类似 正文 的本地化字符串。 - /// - public static string Text = nameof(Text); - - /// - /// 查找类似 文本块 的本地化字符串。 - /// - public static string TextBlock = nameof(TextBlock); - - /// - /// 查找类似 文本框 的本地化字符串。 - /// - public static string TextBox = nameof(TextBox); - - /// - /// 查找类似 文本对话框 的本地化字符串。 - /// - public static string TextDialog = nameof(TextDialog); - - /// - /// 查找类似 文本对话框(控件中) 的本地化字符串。 - /// - public static string TextDialogInControl = nameof(TextDialogInControl); - - /// - /// 查找类似 文本对话框,带计时器 的本地化字符串。 - /// - public static string TextDialogWithTimer = nameof(TextDialogWithTimer); - - /// - /// 查找类似 时间条 的本地化字符串。 - /// - public static string TimeBar = nameof(TimeBar); - - /// - /// 查找类似 时间选择器 的本地化字符串。 - /// - public static string TimePicker = nameof(TimePicker); - - /// - /// 查找类似 提示 的本地化字符串。 - /// - public static string Tip = nameof(Tip); - - /// - /// 查找类似 标题 的本地化字符串。 - /// - public static string Title = nameof(Title); - - /// - /// 查找类似 这是标题 的本地化字符串。 - /// - public static string TitleDemoStr1 = nameof(TitleDemoStr1); - - /// - /// 查找类似 此项必填 的本地化字符串。 - /// - public static string TitleDemoStr2 = nameof(TitleDemoStr2); - - /// - /// 查找类似 标题在左侧 的本地化字符串。 - /// - public static string TitleDemoStr3 = nameof(TitleDemoStr3); - - /// - /// 查找类似 切换按钮 的本地化字符串。 - /// - public static string ToggleButton = nameof(ToggleButton); - - /// - /// 查找类似 工具条 的本地化字符串。 - /// - public static string ToolBar = nameof(ToolBar); - - /// - /// 查找类似 工具 的本地化字符串。 - /// - public static string Tools = nameof(Tools); - - /// - /// 查找类似 穿梭框 的本地化字符串。 - /// - public static string Transfer = nameof(Transfer); - - /// - /// 查找类似 内容过渡控件 的本地化字符串。 - /// - public static string TransitioningContentControl = nameof(TransitioningContentControl); - - /// - /// 查找类似 树视图 的本地化字符串。 - /// - public static string TreeView = nameof(TreeView); - - /// - /// 查找类似 试试关闭程序吧? 的本地化字符串。 - /// - public static string Try2CloseApp = nameof(Try2CloseApp); - - /// - /// 查找类似 类型 的本地化字符串。 - /// - public static string Type = nameof(Type); - - /// - /// 查找类似 等间距布局 的本地化字符串。 - /// - public static string UniformSpacingPanel = nameof(UniformSpacingPanel); - - /// - /// 查找类似 上传文件 的本地化字符串。 - /// - public static string UploadFile = nameof(UploadFile); - - /// - /// 查找类似 上传;上传中 的本地化字符串。 - /// - public static string UploadStr = nameof(UploadStr); - - /// - /// 查找类似 可见性 的本地化字符串。 - /// - public static string Visibility = nameof(Visibility); - - /// - /// 查找类似 VS 插件 的本地化字符串。 - /// - public static string Vsix = nameof(Vsix); - - /// - /// 查找类似 警告 的本地化字符串。 - /// - public static string Warning = nameof(Warning); - - /// - /// 查找类似 瀑布流 的本地化字符串。 - /// - public static string WaterfallPanel = nameof(WaterfallPanel); - - /// - /// 查找类似 网站 的本地化字符串。 - /// - public static string Website = nameof(Website); - - /// - /// 查找类似 窗口 的本地化字符串。 - /// - public static string Window = nameof(Window); - + OnPropertyChanged(nameof(About)); + OnPropertyChanged(nameof(AddItem)); + OnPropertyChanged(nameof(AnimationPath)); + OnPropertyChanged(nameof(AppClosingTip)); + OnPropertyChanged(nameof(Ask)); + OnPropertyChanged(nameof(AutoCompleteTextBox)); + OnPropertyChanged(nameof(Badge)); + OnPropertyChanged(nameof(BasicInfo)); + OnPropertyChanged(nameof(BasicLayout)); + OnPropertyChanged(nameof(Blink)); + OnPropertyChanged(nameof(Blog)); + OnPropertyChanged(nameof(Border)); + OnPropertyChanged(nameof(Brush)); + OnPropertyChanged(nameof(Button)); + OnPropertyChanged(nameof(ButtonCustom)); + OnPropertyChanged(nameof(ButtonGroup)); + OnPropertyChanged(nameof(Calendar)); + OnPropertyChanged(nameof(CalendarWithClock)); + OnPropertyChanged(nameof(Card)); + OnPropertyChanged(nameof(Carousel)); + OnPropertyChanged(nameof(ChangeLangAsk)); + OnPropertyChanged(nameof(ChatBubble)); + OnPropertyChanged(nameof(Chatroom)); + OnPropertyChanged(nameof(CheckBox)); + OnPropertyChanged(nameof(CheckComboBox)); + OnPropertyChanged(nameof(CirclePanel)); + OnPropertyChanged(nameof(Clear)); + OnPropertyChanged(nameof(Click2Count)); + OnPropertyChanged(nameof(Clock)); + OnPropertyChanged(nameof(ColorPicker)); + OnPropertyChanged(nameof(ColumnOffset)); + OnPropertyChanged(nameof(ColumnSpacing)); + OnPropertyChanged(nameof(ComboBox)); + OnPropertyChanged(nameof(ComingSoon)); + OnPropertyChanged(nameof(Comment)); + OnPropertyChanged(nameof(Common)); + OnPropertyChanged(nameof(CompareSlider)); + OnPropertyChanged(nameof(Complete)); + OnPropertyChanged(nameof(ContentDemoStr)); + OnPropertyChanged(nameof(Contributors)); + OnPropertyChanged(nameof(Controls)); + OnPropertyChanged(nameof(CoverFlow)); + OnPropertyChanged(nameof(CoverView)); + OnPropertyChanged(nameof(Danger)); + OnPropertyChanged(nameof(DataDisplay)); + OnPropertyChanged(nameof(DataEntry)); + OnPropertyChanged(nameof(DataGrid)); + OnPropertyChanged(nameof(DatePicker)); + OnPropertyChanged(nameof(DateTimePicker)); + OnPropertyChanged(nameof(Default)); + OnPropertyChanged(nameof(Demo)); + OnPropertyChanged(nameof(Dialog)); + OnPropertyChanged(nameof(DialogDemo)); + OnPropertyChanged(nameof(Divider)); + OnPropertyChanged(nameof(Doc_cn)); + OnPropertyChanged(nameof(Doc_en)); + OnPropertyChanged(nameof(Documentation)); + OnPropertyChanged(nameof(DragHere)); + OnPropertyChanged(nameof(Drawer)); + OnPropertyChanged(nameof(Effects)); + OnPropertyChanged(nameof(ElementGroup)); + OnPropertyChanged(nameof(Email)); + OnPropertyChanged(nameof(Empty)); + OnPropertyChanged(nameof(Error)); + OnPropertyChanged(nameof(Exit)); + OnPropertyChanged(nameof(Expander)); + OnPropertyChanged(nameof(Fatal)); + OnPropertyChanged(nameof(Feedback)); + OnPropertyChanged(nameof(FlexPanel)); + OnPropertyChanged(nameof(FlipClock)); + OnPropertyChanged(nameof(FloatingBlock)); + OnPropertyChanged(nameof(FlowDocument)); + OnPropertyChanged(nameof(FlowDocumentPageViewer)); + OnPropertyChanged(nameof(FlowDocumentReader)); + OnPropertyChanged(nameof(FlowDocumentScrollViewer)); + OnPropertyChanged(nameof(Frame)); + OnPropertyChanged(nameof(Geometry)); + OnPropertyChanged(nameof(GifImage)); + OnPropertyChanged(nameof(GotoTop)); + OnPropertyChanged(nameof(Gravatar)); + OnPropertyChanged(nameof(Grid)); + OnPropertyChanged(nameof(GroupBox)); + OnPropertyChanged(nameof(Groups)); + OnPropertyChanged(nameof(Growl)); + OnPropertyChanged(nameof(GrowlAsk)); + OnPropertyChanged(nameof(GrowlDemo)); + OnPropertyChanged(nameof(GrowlError)); + OnPropertyChanged(nameof(GrowlFatal)); + OnPropertyChanged(nameof(GrowlInfo)); + OnPropertyChanged(nameof(GrowlSuccess)); + OnPropertyChanged(nameof(GrowlWarning)); + OnPropertyChanged(nameof(HatchBrushGenerator)); + OnPropertyChanged(nameof(HoneycombPanel)); + OnPropertyChanged(nameof(HybridLayout)); + OnPropertyChanged(nameof(Ignore)); + OnPropertyChanged(nameof(ImageBlock)); + OnPropertyChanged(nameof(ImageBrowser)); + OnPropertyChanged(nameof(ImageSelector)); + OnPropertyChanged(nameof(Index)); + OnPropertyChanged(nameof(Info)); + OnPropertyChanged(nameof(Interacting)); + OnPropertyChanged(nameof(InteractiveDialog)); + OnPropertyChanged(nameof(IsNotPhone)); + OnPropertyChanged(nameof(Label)); + OnPropertyChanged(nameof(LangComment)); + OnPropertyChanged(nameof(Layout)); + OnPropertyChanged(nameof(ListBox)); + OnPropertyChanged(nameof(ListView)); + OnPropertyChanged(nameof(Loading)); + OnPropertyChanged(nameof(Magnifier)); + OnPropertyChanged(nameof(Menu)); + OnPropertyChanged(nameof(MessageBox)); + OnPropertyChanged(nameof(Misc)); + OnPropertyChanged(nameof(Morphing_Animation)); + OnPropertyChanged(nameof(Name)); + OnPropertyChanged(nameof(Navigation)); + OnPropertyChanged(nameof(NewWindow)); + OnPropertyChanged(nameof(Next)); + OnPropertyChanged(nameof(Notification)); + OnPropertyChanged(nameof(NotifyIcon)); + OnPropertyChanged(nameof(NumericUpDown)); + OnPropertyChanged(nameof(Off)); + OnPropertyChanged(nameof(Ok)); + OnPropertyChanged(nameof(On)); + OnPropertyChanged(nameof(OpenBlurWindow)); + OnPropertyChanged(nameof(OpenCommonWindow)); + OnPropertyChanged(nameof(OpenCustomContentWindow)); + OnPropertyChanged(nameof(OpenCustomMessageWindow)); + OnPropertyChanged(nameof(OpenCustomNonClientAreaWindow)); + OnPropertyChanged(nameof(OpenGlowWindow)); + OnPropertyChanged(nameof(OpenImageBrowser)); + OnPropertyChanged(nameof(OpenMessageWindow)); + OnPropertyChanged(nameof(OpenMouseFollowWindow)); + OnPropertyChanged(nameof(OpenNativeCommonWindow)); + OnPropertyChanged(nameof(OpenNavigationWindow)); + OnPropertyChanged(nameof(OpenNoNonClientAreaDragableWindow)); + OnPropertyChanged(nameof(OpenPanel)); + OnPropertyChanged(nameof(OpenSprite)); + OnPropertyChanged(nameof(OpenTouchDragMoveWindow)); + OnPropertyChanged(nameof(OutlineText)); + OnPropertyChanged(nameof(Pagination)); + OnPropertyChanged(nameof(PasswordBox)); + OnPropertyChanged(nameof(PinBox)); + OnPropertyChanged(nameof(PleaseInput)); + OnPropertyChanged(nameof(PleaseWait)); + OnPropertyChanged(nameof(PlsEnterContent)); + OnPropertyChanged(nameof(PlsEnterEmail)); + OnPropertyChanged(nameof(PlsEnterKey)); + OnPropertyChanged(nameof(Poptip)); + OnPropertyChanged(nameof(PoptipPositionStr)); + OnPropertyChanged(nameof(PracticalDemos)); + OnPropertyChanged(nameof(Prev)); + OnPropertyChanged(nameof(PreviewSlider)); + OnPropertyChanged(nameof(Primary)); + OnPropertyChanged(nameof(ProgressBar)); + OnPropertyChanged(nameof(ProgressButton)); + OnPropertyChanged(nameof(Project)); + OnPropertyChanged(nameof(PropertyGrid)); + OnPropertyChanged(nameof(PushToTalk)); + OnPropertyChanged(nameof(QQGroup)); + OnPropertyChanged(nameof(RadioButton)); + OnPropertyChanged(nameof(RangeSlider)); + OnPropertyChanged(nameof(Rate)); + OnPropertyChanged(nameof(Recommendation)); + OnPropertyChanged(nameof(Register)); + OnPropertyChanged(nameof(RelativePanel)); + OnPropertyChanged(nameof(Remark)); + OnPropertyChanged(nameof(RemoveItem)); + OnPropertyChanged(nameof(RepeatButton)); + OnPropertyChanged(nameof(Reply)); + OnPropertyChanged(nameof(Repository)); + OnPropertyChanged(nameof(ResponsiveLayout)); + OnPropertyChanged(nameof(RichTextBox)); + OnPropertyChanged(nameof(RightClickHere)); + OnPropertyChanged(nameof(RunningBlock)); + OnPropertyChanged(nameof(Screenshot)); + OnPropertyChanged(nameof(ScrollViewer)); + OnPropertyChanged(nameof(SearchBar)); + OnPropertyChanged(nameof(Second)); + OnPropertyChanged(nameof(Selected)); + OnPropertyChanged(nameof(SendNotification)); + OnPropertyChanged(nameof(Shield)); + OnPropertyChanged(nameof(ShowInCurrentWindow)); + OnPropertyChanged(nameof(ShowInMainWindow)); + OnPropertyChanged(nameof(ShowRowNumber)); + OnPropertyChanged(nameof(SideMenu)); + OnPropertyChanged(nameof(Slider)); + OnPropertyChanged(nameof(SplitButton)); + OnPropertyChanged(nameof(Sprite)); + OnPropertyChanged(nameof(StartScreenshot)); + OnPropertyChanged(nameof(StaysOpen)); + OnPropertyChanged(nameof(Step)); + OnPropertyChanged(nameof(StepBar)); + OnPropertyChanged(nameof(Styles)); + OnPropertyChanged(nameof(SubTitle)); + OnPropertyChanged(nameof(Success)); + OnPropertyChanged(nameof(TabControl)); + OnPropertyChanged(nameof(Tag)); + OnPropertyChanged(nameof(Text)); + OnPropertyChanged(nameof(TextBlock)); + OnPropertyChanged(nameof(TextBox)); + OnPropertyChanged(nameof(TextDialog)); + OnPropertyChanged(nameof(TextDialogInControl)); + OnPropertyChanged(nameof(TextDialogWithTimer)); + OnPropertyChanged(nameof(TimeBar)); + OnPropertyChanged(nameof(TimePicker)); + OnPropertyChanged(nameof(Tip)); + OnPropertyChanged(nameof(Title)); + OnPropertyChanged(nameof(TitleDemoStr1)); + OnPropertyChanged(nameof(TitleDemoStr2)); + OnPropertyChanged(nameof(TitleDemoStr3)); + OnPropertyChanged(nameof(ToggleButton)); + OnPropertyChanged(nameof(ToolBar)); + OnPropertyChanged(nameof(Tools)); + OnPropertyChanged(nameof(Transfer)); + OnPropertyChanged(nameof(TransitioningContentControl)); + OnPropertyChanged(nameof(TreeView)); + OnPropertyChanged(nameof(Try2CloseApp)); + OnPropertyChanged(nameof(Type)); + OnPropertyChanged(nameof(UniformSpacingPanel)); + OnPropertyChanged(nameof(UploadFile)); + OnPropertyChanged(nameof(UploadStr)); + OnPropertyChanged(nameof(Visibility)); + OnPropertyChanged(nameof(Vsix)); + OnPropertyChanged(nameof(Warning)); + OnPropertyChanged(nameof(WaterfallPanel)); + OnPropertyChanged(nameof(Website)); + OnPropertyChanged(nameof(Window)); } + + /// + /// 查找类似 关于 的本地化字符串。 + /// + public string About => Lang.About; + + /// + /// 查找类似 添加项 的本地化字符串。 + /// + public string AddItem => Lang.AddItem; + + /// + /// 查找类似 动画路径 的本地化字符串。 + /// + public string AnimationPath => Lang.AnimationPath; + + /// + /// 查找类似 托盘图标已打开,将隐藏窗口而不是关闭程序 的本地化字符串。 + /// + public string AppClosingTip => Lang.AppClosingTip; + + /// + /// 查找类似 询问 的本地化字符串。 + /// + public string Ask => Lang.Ask; + + /// + /// 查找类似 自动补全文本框 的本地化字符串。 + /// + public string AutoCompleteTextBox => Lang.AutoCompleteTextBox; + + /// + /// 查找类似 标记 的本地化字符串。 + /// + public string Badge => Lang.Badge; + + /// + /// 查找类似 填写基本信息 的本地化字符串。 + /// + public string BasicInfo => Lang.BasicInfo; + + /// + /// 查找类似 基础布局 的本地化字符串。 + /// + public string BasicLayout => Lang.BasicLayout; + + /// + /// 查找类似 闪烁 的本地化字符串。 + /// + public string Blink => Lang.Blink; + + /// + /// 查找类似 博客 的本地化字符串。 + /// + public string Blog => Lang.Blog; + + /// + /// 查找类似 边框 的本地化字符串。 + /// + public string Border => Lang.Border; + + /// + /// 查找类似 画刷 的本地化字符串。 + /// + public string Brush => Lang.Brush; + + /// + /// 查找类似 按钮 的本地化字符串。 + /// + public string Button => Lang.Button; + + /// + /// 查找类似 自定义按钮 的本地化字符串。 + /// + public string ButtonCustom => Lang.ButtonCustom; + + /// + /// 查找类似 按钮组 的本地化字符串。 + /// + public string ButtonGroup => Lang.ButtonGroup; + + /// + /// 查找类似 日历 的本地化字符串。 + /// + public string Calendar => Lang.Calendar; + + /// + /// 查找类似 带时钟的日历 的本地化字符串。 + /// + public string CalendarWithClock => Lang.CalendarWithClock; + + /// + /// 查找类似 卡片 的本地化字符串。 + /// + public string Card => Lang.Card; + + /// + /// 查找类似 轮播 的本地化字符串。 + /// + public string Carousel => Lang.Carousel; + + /// + /// 查找类似 是否重启以更改语言? 的本地化字符串。 + /// + public string ChangeLangAsk => Lang.ChangeLangAsk; + + /// + /// 查找类似 对话气泡 的本地化字符串。 + /// + public string ChatBubble => Lang.ChatBubble; + + /// + /// 查找类似 讨论室 的本地化字符串。 + /// + public string Chatroom => Lang.Chatroom; + + /// + /// 查找类似 复选框 的本地化字符串。 + /// + public string CheckBox => Lang.CheckBox; + + /// + /// 查找类似 多选组合框 的本地化字符串。 + /// + public string CheckComboBox => Lang.CheckComboBox; + + /// + /// 查找类似 圆形布局 的本地化字符串。 + /// + public string CirclePanel => Lang.CirclePanel; + + /// + /// 查找类似 清空 的本地化字符串。 + /// + public string Clear => Lang.Clear; + + /// + /// 查找类似 点击计数 的本地化字符串。 + /// + public string Click2Count => Lang.Click2Count; + + /// + /// 查找类似 时钟 的本地化字符串。 + /// + public string Clock => Lang.Clock; + + /// + /// 查找类似 颜色拾取器 的本地化字符串。 + /// + public string ColorPicker => Lang.ColorPicker; + + /// + /// 查找类似 分栏偏移 的本地化字符串。 + /// + public string ColumnOffset => Lang.ColumnOffset; + + /// + /// 查找类似 分栏间隔 的本地化字符串。 + /// + public string ColumnSpacing => Lang.ColumnSpacing; + + /// + /// 查找类似 组合框 的本地化字符串。 + /// + public string ComboBox => Lang.ComboBox; + + /// + /// 查找类似 敬请期待 的本地化字符串。 + /// + public string ComingSoon => Lang.ComingSoon; + + /// + /// 查找类似 评论 的本地化字符串。 + /// + public string Comment => Lang.Comment; + + /// + /// 查找类似 一般 的本地化字符串。 + /// + public string Common => Lang.Common; + + /// + /// 查找类似 对比滑块 的本地化字符串。 + /// + public string CompareSlider => Lang.CompareSlider; + + /// + /// 查找类似 完成 的本地化字符串。 + /// + public string Complete => Lang.Complete; + + /// + /// 查找类似 这是内容 的本地化字符串。 + /// + public string ContentDemoStr => Lang.ContentDemoStr; + + /// + /// 查找类似 贡献者 的本地化字符串。 + /// + public string Contributors => Lang.Contributors; + + /// + /// 查找类似 控件 的本地化字符串。 + /// + public string Controls => Lang.Controls; + + /// + /// 查找类似 封面流 的本地化字符串。 + /// + public string CoverFlow => Lang.CoverFlow; + + /// + /// 查找类似 封面视图 的本地化字符串。 + /// + public string CoverView => Lang.CoverView; + + /// + /// 查找类似 危险 的本地化字符串。 + /// + public string Danger => Lang.Danger; + + /// + /// 查找类似 数据展示 的本地化字符串。 + /// + public string DataDisplay => Lang.DataDisplay; + + /// + /// 查找类似 数据录入 的本地化字符串。 + /// + public string DataEntry => Lang.DataEntry; + + /// + /// 查找类似 数据表格 的本地化字符串。 + /// + public string DataGrid => Lang.DataGrid; + + /// + /// 查找类似 日期选择器 的本地化字符串。 + /// + public string DatePicker => Lang.DatePicker; + + /// + /// 查找类似 日期时间选择器 的本地化字符串。 + /// + public string DateTimePicker => Lang.DateTimePicker; + + /// + /// 查找类似 默认 的本地化字符串。 + /// + public string Default => Lang.Default; + + /// + /// 查找类似 示例 的本地化字符串。 + /// + public string Demo => Lang.Demo; + + /// + /// 查找类似 对话框 的本地化字符串。 + /// + public string Dialog => Lang.Dialog; + + /// + /// 查找类似 对话框示例 的本地化字符串。 + /// + public string DialogDemo => Lang.DialogDemo; + + /// + /// 查找类似 分割线 的本地化字符串。 + /// + public string Divider => Lang.Divider; + + /// + /// 查找类似 中文文档 的本地化字符串。 + /// + public string Doc_cn => Lang.Doc_cn; + + /// + /// 查找类似 英文文档 的本地化字符串。 + /// + public string Doc_en => Lang.Doc_en; + + /// + /// 查找类似 文献资料 的本地化字符串。 + /// + public string Documentation => Lang.Documentation; + + /// + /// 查找类似 在这里拖拽 的本地化字符串。 + /// + public string DragHere => Lang.DragHere; + + /// + /// 查找类似 抽屉 的本地化字符串。 + /// + public string Drawer => Lang.Drawer; + + /// + /// 查找类似 效果 的本地化字符串。 + /// + public string Effects => Lang.Effects; + + /// + /// 查找类似 元素组 的本地化字符串。 + /// + public string ElementGroup => Lang.ElementGroup; + + /// + /// 查找类似 邮箱 的本地化字符串。 + /// + public string Email => Lang.Email; + + /// + /// 查找类似 空状态 的本地化字符串。 + /// + public string Empty => Lang.Empty; + + /// + /// 查找类似 错误 的本地化字符串。 + /// + public string Error => Lang.Error; + + /// + /// 查找类似 退出 的本地化字符串。 + /// + public string Exit => Lang.Exit; + + /// + /// 查找类似 展开框 的本地化字符串。 + /// + public string Expander => Lang.Expander; + + /// + /// 查找类似 严重 的本地化字符串。 + /// + public string Fatal => Lang.Fatal; + + /// + /// 查找类似 反馈 的本地化字符串。 + /// + public string Feedback => Lang.Feedback; + + /// + /// 查找类似 弹性盒子 的本地化字符串。 + /// + public string FlexPanel => Lang.FlexPanel; + + /// + /// 查找类似 翻页时钟 的本地化字符串。 + /// + public string FlipClock => Lang.FlipClock; + + /// + /// 查找类似 漂浮块 的本地化字符串。 + /// + public string FloatingBlock => Lang.FloatingBlock; + + /// + /// 查找类似 流文档 的本地化字符串。 + /// + public string FlowDocument => Lang.FlowDocument; + + /// + /// 查找类似 流文档单页视图 的本地化字符串。 + /// + public string FlowDocumentPageViewer => Lang.FlowDocumentPageViewer; + + /// + /// 查找类似 流文档查看器 的本地化字符串。 + /// + public string FlowDocumentReader => Lang.FlowDocumentReader; + + /// + /// 查找类似 流文档滚动视图 的本地化字符串。 + /// + public string FlowDocumentScrollViewer => Lang.FlowDocumentScrollViewer; + + /// + /// 查找类似 导航框架 的本地化字符串。 + /// + public string Frame => Lang.Frame; + + /// + /// 查找类似 几何形状 的本地化字符串。 + /// + public string Geometry => Lang.Geometry; + + /// + /// 查找类似 Gif图片 的本地化字符串。 + /// + public string GifImage => Lang.GifImage; + + /// + /// 查找类似 回到顶部 的本地化字符串。 + /// + public string GotoTop => Lang.GotoTop; + + /// + /// 查找类似 头像 的本地化字符串。 + /// + public string Gravatar => Lang.Gravatar; + + /// + /// 查找类似 栅格 的本地化字符串。 + /// + public string Grid => Lang.Grid; + + /// + /// 查找类似 分组框 的本地化字符串。 + /// + public string GroupBox => Lang.GroupBox; + + /// + /// 查找类似 组数 的本地化字符串。 + /// + public string Groups => Lang.Groups; + + /// + /// 查找类似 信息通知 的本地化字符串。 + /// + public string Growl => Lang.Growl; + + /// + /// 查找类似 检测到有新版本!是否更新? 的本地化字符串。 + /// + public string GrowlAsk => Lang.GrowlAsk; + + /// + /// 查找类似 消息通知示例 的本地化字符串。 + /// + public string GrowlDemo => Lang.GrowlDemo; + + /// + /// 查找类似 连接失败,请检查网络! 的本地化字符串。 + /// + public string GrowlError => Lang.GrowlError; + + /// + /// 查找类似 程序已崩溃~~~ 的本地化字符串。 + /// + public string GrowlFatal => Lang.GrowlFatal; + + /// + /// 查找类似 今天的天气不错~~~ 的本地化字符串。 + /// + public string GrowlInfo => Lang.GrowlInfo; + + /// + /// 查找类似 文件保存成功! 的本地化字符串。 + /// + public string GrowlSuccess => Lang.GrowlSuccess; + + /// + /// 查找类似 磁盘空间快要满了! 的本地化字符串。 + /// + public string GrowlWarning => Lang.GrowlWarning; + + /// + /// 查找类似 阴影画笔生成器 的本地化字符串。 + /// + public string HatchBrushGenerator => Lang.HatchBrushGenerator; + + /// + /// 查找类似 蜂窝布局 的本地化字符串。 + /// + public string HoneycombPanel => Lang.HoneycombPanel; + + /// + /// 查找类似 混合布局 的本地化字符串。 + /// + public string HybridLayout => Lang.HybridLayout; + + /// + /// 查找类似 忽略 的本地化字符串。 + /// + public string Ignore => Lang.Ignore; + + /// + /// 查找类似 图片块 的本地化字符串。 + /// + public string ImageBlock => Lang.ImageBlock; + + /// + /// 查找类似 图片浏览器 的本地化字符串。 + /// + public string ImageBrowser => Lang.ImageBrowser; + + /// + /// 查找类似 图片选择器 的本地化字符串。 + /// + public string ImageSelector => Lang.ImageSelector; + + /// + /// 查找类似 索引 的本地化字符串。 + /// + public string Index => Lang.Index; + + /// + /// 查找类似 信息 的本地化字符串。 + /// + public string Info => Lang.Info; + + /// + /// 查找类似 交互 的本地化字符串。 + /// + public string Interacting => Lang.Interacting; + + /// + /// 查找类似 可交互对话框 的本地化字符串。 + /// + public string InteractiveDialog => Lang.InteractiveDialog; + + /// + /// 查找类似 不是手机号码 的本地化字符串。 + /// + public string IsNotPhone => Lang.IsNotPhone; + + /// + /// 查找类似 标签 的本地化字符串。 + /// + public string Label => Lang.Label; + + /// + /// 查找类似 查找类似 {0} 的本地化字符串。 的本地化字符串。 + /// + public string LangComment => Lang.LangComment; + + /// + /// 查找类似 布局 的本地化字符串。 + /// + public string Layout => Lang.Layout; + + /// + /// 查找类似 列表框 的本地化字符串。 + /// + public string ListBox => Lang.ListBox; + + /// + /// 查找类似 列表视图 的本地化字符串。 + /// + public string ListView => Lang.ListView; + + /// + /// 查找类似 加载条 的本地化字符串。 + /// + public string Loading => Lang.Loading; + + /// + /// 查找类似 放大镜 的本地化字符串。 + /// + public string Magnifier => Lang.Magnifier; + + /// + /// 查找类似 菜单 的本地化字符串。 + /// + public string Menu => Lang.Menu; + + /// + /// 查找类似 消息框 的本地化字符串。 + /// + public string MessageBox => Lang.MessageBox; + + /// + /// 查找类似 杂项 的本地化字符串。 + /// + public string Misc => Lang.Misc; + + /// + /// 查找类似 的本地化字符串。 + /// + public string Morphing_Animation => Lang.Morphing_Animation; + + /// + /// 查找类似 名称 的本地化字符串。 + /// + public string Name => Lang.Name; + + /// + /// 查找类似 导航 的本地化字符串。 + /// + public string Navigation => Lang.Navigation; + + /// + /// 查找类似 新建窗口 的本地化字符串。 + /// + public string NewWindow => Lang.NewWindow; + + /// + /// 查找类似 下一步 的本地化字符串。 + /// + public string Next => Lang.Next; + + /// + /// 查找类似 桌面通知 的本地化字符串。 + /// + public string Notification => Lang.Notification; + + /// + /// 查找类似 托盘图标 的本地化字符串。 + /// + public string NotifyIcon => Lang.NotifyIcon; + + /// + /// 查找类似 数值选择控件 的本地化字符串。 + /// + public string NumericUpDown => Lang.NumericUpDown; + + /// + /// 查找类似 关 的本地化字符串。 + /// + public string Off => Lang.Off; + + /// + /// 查找类似 确定 的本地化字符串。 + /// + public string Ok => Lang.Ok; + + /// + /// 查找类似 开 的本地化字符串。 + /// + public string On => Lang.On; + + /// + /// 查找类似 点击打开背景模糊窗口 的本地化字符串。 + /// + public string OpenBlurWindow => Lang.OpenBlurWindow; + + /// + /// 查找类似 点击打开常规窗口 的本地化字符串。 + /// + public string OpenCommonWindow => Lang.OpenCommonWindow; + + /// + /// 查找类似 点击打开自定义内容窗口 的本地化字符串。 + /// + public string OpenCustomContentWindow => Lang.OpenCustomContentWindow; + + /// + /// 查找类似 点击打开自定义消息窗口 的本地化字符串。 + /// + public string OpenCustomMessageWindow => Lang.OpenCustomMessageWindow; + + /// + /// 查找类似 点击打开自定义非客户端区域窗口 的本地化字符串。 + /// + public string OpenCustomNonClientAreaWindow => Lang.OpenCustomNonClientAreaWindow; + + /// + /// 查找类似 点击打开辉光窗口 的本地化字符串。 + /// + public string OpenGlowWindow => Lang.OpenGlowWindow; + + /// + /// 查找类似 点击打开图片浏览器 的本地化字符串。 + /// + public string OpenImageBrowser => Lang.OpenImageBrowser; + + /// + /// 查找类似 点击打开消息窗口 的本地化字符串。 + /// + public string OpenMessageWindow => Lang.OpenMessageWindow; + + /// + /// 查找类似 点击打开鼠标跟随窗口 的本地化字符串。 + /// + public string OpenMouseFollowWindow => Lang.OpenMouseFollowWindow; + + /// + /// 查找类似 点击打开原生常规窗口 的本地化字符串。 + /// + public string OpenNativeCommonWindow => Lang.OpenNativeCommonWindow; + + /// + /// 查找类似 点击打开导航窗口 的本地化字符串。 + /// + public string OpenNavigationWindow => Lang.OpenNavigationWindow; + + /// + /// 查找类似 打开无非客户端区域可拖拽窗口 的本地化字符串。 + /// + public string OpenNoNonClientAreaDragableWindow => Lang.OpenNoNonClientAreaDragableWindow; + + /// + /// 查找类似 打开面板 的本地化字符串。 + /// + public string OpenPanel => Lang.OpenPanel; + + /// + /// 查找类似 打开精灵 的本地化字符串。 + /// + public string OpenSprite => Lang.OpenSprite; + + /// + /// 查找类似 点击打开触摸拖动窗口 的本地化字符串。 + /// + public string OpenTouchDragMoveWindow => Lang.OpenTouchDragMoveWindow; + + /// + /// 查找类似 轮廓文本 的本地化字符串。 + /// + public string OutlineText => Lang.OutlineText; + + /// + /// 查找类似 页码条 的本地化字符串。 + /// + public string Pagination => Lang.Pagination; + + /// + /// 查找类似 密码框 的本地化字符串。 + /// + public string PasswordBox => Lang.PasswordBox; + + /// + /// 查找类似 PIN码框 的本地化字符串。 + /// + public string PinBox => Lang.PinBox; + + /// + /// 查找类似 请输入... 的本地化字符串。 + /// + public string PleaseInput => Lang.PleaseInput; + + /// + /// 查找类似 请稍后... 的本地化字符串。 + /// + public string PleaseWait => Lang.PleaseWait; + + /// + /// 查找类似 请输入内容 的本地化字符串。 + /// + public string PlsEnterContent => Lang.PlsEnterContent; + + /// + /// 查找类似 请输入邮箱 的本地化字符串。 + /// + public string PlsEnterEmail => Lang.PlsEnterEmail; + + /// + /// 查找类似 请输入关键字 的本地化字符串。 + /// + public string PlsEnterKey => Lang.PlsEnterKey; + + /// + /// 查找类似 气泡提示 的本地化字符串。 + /// + public string Poptip => Lang.Poptip; + + /// + /// 查找类似 上左;上边;上右;右上;右边;右下;下右;下边;下左;左下;左边;左上 的本地化字符串。 + /// + public string PoptipPositionStr => Lang.PoptipPositionStr; + + /// + /// 查找类似 实用例子 的本地化字符串。 + /// + public string PracticalDemos => Lang.PracticalDemos; + + /// + /// 查找类似 上一步 的本地化字符串。 + /// + public string Prev => Lang.Prev; + + /// + /// 查找类似 预览滑块 的本地化字符串。 + /// + public string PreviewSlider => Lang.PreviewSlider; + + /// + /// 查找类似 主要 的本地化字符串。 + /// + public string Primary => Lang.Primary; + + /// + /// 查找类似 进度条 的本地化字符串。 + /// + public string ProgressBar => Lang.ProgressBar; + + /// + /// 查找类似 进度按钮 的本地化字符串。 + /// + public string ProgressButton => Lang.ProgressButton; + + /// + /// 查找类似 项目 的本地化字符串。 + /// + public string Project => Lang.Project; + + /// + /// 查找类似 属性编辑器 的本地化字符串。 + /// + public string PropertyGrid => Lang.PropertyGrid; + + /// + /// 查找类似 按住说话 的本地化字符串。 + /// + public string PushToTalk => Lang.PushToTalk; + + /// + /// 查找类似 QQ群 的本地化字符串。 + /// + public string QQGroup => Lang.QQGroup; + + /// + /// 查找类似 单选按钮 的本地化字符串。 + /// + public string RadioButton => Lang.RadioButton; + + /// + /// 查找类似 范围滑块 的本地化字符串。 + /// + public string RangeSlider => Lang.RangeSlider; + + /// + /// 查找类似 评分 的本地化字符串。 + /// + public string Rate => Lang.Rate; + + /// + /// 查找类似 群友推荐 的本地化字符串。 + /// + public string Recommendation => Lang.Recommendation; + + /// + /// 查找类似 注册 的本地化字符串。 + /// + public string Register => Lang.Register; + + /// + /// 查找类似 相对布局 的本地化字符串。 + /// + public string RelativePanel => Lang.RelativePanel; + + /// + /// 查找类似 备注 的本地化字符串。 + /// + public string Remark => Lang.Remark; + + /// + /// 查找类似 删除项 的本地化字符串。 + /// + public string RemoveItem => Lang.RemoveItem; + + /// + /// 查找类似 重复按钮 的本地化字符串。 + /// + public string RepeatButton => Lang.RepeatButton; + + /// + /// 查找类似 回复 的本地化字符串。 + /// + public string Reply => Lang.Reply; + + /// + /// 查找类似 代码仓库 的本地化字符串。 + /// + public string Repository => Lang.Repository; + + /// + /// 查找类似 响应式布局 的本地化字符串。 + /// + public string ResponsiveLayout => Lang.ResponsiveLayout; + + /// + /// 查找类似 富文本框 的本地化字符串。 + /// + public string RichTextBox => Lang.RichTextBox; + + /// + /// 查找类似 在这里右击 的本地化字符串。 + /// + public string RightClickHere => Lang.RightClickHere; + + /// + /// 查找类似 滚动块 的本地化字符串。 + /// + public string RunningBlock => Lang.RunningBlock; + + /// + /// 查找类似 截图 的本地化字符串。 + /// + public string Screenshot => Lang.Screenshot; + + /// + /// 查找类似 滚动视图 的本地化字符串。 + /// + public string ScrollViewer => Lang.ScrollViewer; + + /// + /// 查找类似 搜索栏 的本地化字符串。 + /// + public string SearchBar => Lang.SearchBar; + + /// + /// 查找类似 秒 的本地化字符串。 + /// + public string Second => Lang.Second; + + /// + /// 查找类似 选中 的本地化字符串。 + /// + public string Selected => Lang.Selected; + + /// + /// 查找类似 发送通知 的本地化字符串。 + /// + public string SendNotification => Lang.SendNotification; + + /// + /// 查找类似 徽章 的本地化字符串。 + /// + public string Shield => Lang.Shield; + + /// + /// 查找类似 在当前窗口显示 的本地化字符串。 + /// + public string ShowInCurrentWindow => Lang.ShowInCurrentWindow; + + /// + /// 查找类似 在主窗口显示 的本地化字符串。 + /// + public string ShowInMainWindow => Lang.ShowInMainWindow; + + /// + /// 查找类似 显示行号 的本地化字符串。 + /// + public string ShowRowNumber => Lang.ShowRowNumber; + + /// + /// 查找类似 侧边菜单 的本地化字符串。 + /// + public string SideMenu => Lang.SideMenu; + + /// + /// 查找类似 滑块 的本地化字符串。 + /// + public string Slider => Lang.Slider; + + /// + /// 查找类似 分割按钮 的本地化字符串。 + /// + public string SplitButton => Lang.SplitButton; + + /// + /// 查找类似 精灵 的本地化字符串。 + /// + public string Sprite => Lang.Sprite; + + /// + /// 查找类似 开始截图 的本地化字符串。 + /// + public string StartScreenshot => Lang.StartScreenshot; + + /// + /// 查找类似 保持打开 的本地化字符串。 + /// + public string StaysOpen => Lang.StaysOpen; + + /// + /// 查找类似 步骤 的本地化字符串。 + /// + public string Step => Lang.Step; + + /// + /// 查找类似 步骤条 的本地化字符串。 + /// + public string StepBar => Lang.StepBar; + + /// + /// 查找类似 样式模板 的本地化字符串。 + /// + public string Styles => Lang.Styles; + + /// + /// 查找类似 子标题 的本地化字符串。 + /// + public string SubTitle => Lang.SubTitle; + + /// + /// 查找类似 成功 的本地化字符串。 + /// + public string Success => Lang.Success; + + /// + /// 查找类似 选项卡控件 的本地化字符串。 + /// + public string TabControl => Lang.TabControl; + + /// + /// 查找类似 标签 的本地化字符串。 + /// + public string Tag => Lang.Tag; + + /// + /// 查找类似 正文 的本地化字符串。 + /// + public string Text => Lang.Text; + + /// + /// 查找类似 文本块 的本地化字符串。 + /// + public string TextBlock => Lang.TextBlock; + + /// + /// 查找类似 文本框 的本地化字符串。 + /// + public string TextBox => Lang.TextBox; + + /// + /// 查找类似 文本对话框 的本地化字符串。 + /// + public string TextDialog => Lang.TextDialog; + + /// + /// 查找类似 文本对话框(控件中) 的本地化字符串。 + /// + public string TextDialogInControl => Lang.TextDialogInControl; + + /// + /// 查找类似 文本对话框,带计时器 的本地化字符串。 + /// + public string TextDialogWithTimer => Lang.TextDialogWithTimer; + + /// + /// 查找类似 时间条 的本地化字符串。 + /// + public string TimeBar => Lang.TimeBar; + + /// + /// 查找类似 时间选择器 的本地化字符串。 + /// + public string TimePicker => Lang.TimePicker; + + /// + /// 查找类似 提示 的本地化字符串。 + /// + public string Tip => Lang.Tip; + + /// + /// 查找类似 标题 的本地化字符串。 + /// + public string Title => Lang.Title; + + /// + /// 查找类似 这是标题 的本地化字符串。 + /// + public string TitleDemoStr1 => Lang.TitleDemoStr1; + + /// + /// 查找类似 此项必填 的本地化字符串。 + /// + public string TitleDemoStr2 => Lang.TitleDemoStr2; + + /// + /// 查找类似 标题在左侧 的本地化字符串。 + /// + public string TitleDemoStr3 => Lang.TitleDemoStr3; + + /// + /// 查找类似 切换按钮 的本地化字符串。 + /// + public string ToggleButton => Lang.ToggleButton; + + /// + /// 查找类似 工具条 的本地化字符串。 + /// + public string ToolBar => Lang.ToolBar; + + /// + /// 查找类似 工具 的本地化字符串。 + /// + public string Tools => Lang.Tools; + + /// + /// 查找类似 穿梭框 的本地化字符串。 + /// + public string Transfer => Lang.Transfer; + + /// + /// 查找类似 内容过渡控件 的本地化字符串。 + /// + public string TransitioningContentControl => Lang.TransitioningContentControl; + + /// + /// 查找类似 树视图 的本地化字符串。 + /// + public string TreeView => Lang.TreeView; + + /// + /// 查找类似 试试关闭程序吧? 的本地化字符串。 + /// + public string Try2CloseApp => Lang.Try2CloseApp; + + /// + /// 查找类似 类型 的本地化字符串。 + /// + public string Type => Lang.Type; + + /// + /// 查找类似 等间距布局 的本地化字符串。 + /// + public string UniformSpacingPanel => Lang.UniformSpacingPanel; + + /// + /// 查找类似 上传文件 的本地化字符串。 + /// + public string UploadFile => Lang.UploadFile; + + /// + /// 查找类似 上传;上传中 的本地化字符串。 + /// + public string UploadStr => Lang.UploadStr; + + /// + /// 查找类似 可见性 的本地化字符串。 + /// + public string Visibility => Lang.Visibility; + + /// + /// 查找类似 VS 插件 的本地化字符串。 + /// + public string Vsix => Lang.Vsix; + + /// + /// 查找类似 警告 的本地化字符串。 + /// + public string Warning => Lang.Warning; + + /// + /// 查找类似 瀑布流 的本地化字符串。 + /// + public string WaterfallPanel => Lang.WaterfallPanel; + + /// + /// 查找类似 网站 的本地化字符串。 + /// + public string Website => Lang.Website; + + /// + /// 查找类似 窗口 的本地化字符串。 + /// + public string Window => Lang.Window; + + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void OnPropertyChanged(string propertyName) => + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } + +public class LangKeys +{ + /// + /// 查找类似 关于 的本地化字符串。 + /// + public static string About = nameof(About); + + /// + /// 查找类似 添加项 的本地化字符串。 + /// + public static string AddItem = nameof(AddItem); + + /// + /// 查找类似 动画路径 的本地化字符串。 + /// + public static string AnimationPath = nameof(AnimationPath); + + /// + /// 查找类似 托盘图标已打开,将隐藏窗口而不是关闭程序 的本地化字符串。 + /// + public static string AppClosingTip = nameof(AppClosingTip); + + /// + /// 查找类似 询问 的本地化字符串。 + /// + public static string Ask = nameof(Ask); + + /// + /// 查找类似 自动补全文本框 的本地化字符串。 + /// + public static string AutoCompleteTextBox = nameof(AutoCompleteTextBox); + + /// + /// 查找类似 标记 的本地化字符串。 + /// + public static string Badge = nameof(Badge); + + /// + /// 查找类似 填写基本信息 的本地化字符串。 + /// + public static string BasicInfo = nameof(BasicInfo); + + /// + /// 查找类似 基础布局 的本地化字符串。 + /// + public static string BasicLayout = nameof(BasicLayout); + + /// + /// 查找类似 闪烁 的本地化字符串。 + /// + public static string Blink = nameof(Blink); + + /// + /// 查找类似 博客 的本地化字符串。 + /// + public static string Blog = nameof(Blog); + + /// + /// 查找类似 边框 的本地化字符串。 + /// + public static string Border = nameof(Border); + + /// + /// 查找类似 画刷 的本地化字符串。 + /// + public static string Brush = nameof(Brush); + + /// + /// 查找类似 按钮 的本地化字符串。 + /// + public static string Button = nameof(Button); + + /// + /// 查找类似 自定义按钮 的本地化字符串。 + /// + public static string ButtonCustom = nameof(ButtonCustom); + + /// + /// 查找类似 按钮组 的本地化字符串。 + /// + public static string ButtonGroup = nameof(ButtonGroup); + + /// + /// 查找类似 日历 的本地化字符串。 + /// + public static string Calendar = nameof(Calendar); + + /// + /// 查找类似 带时钟的日历 的本地化字符串。 + /// + public static string CalendarWithClock = nameof(CalendarWithClock); + + /// + /// 查找类似 卡片 的本地化字符串。 + /// + public static string Card = nameof(Card); + + /// + /// 查找类似 轮播 的本地化字符串。 + /// + public static string Carousel = nameof(Carousel); + + /// + /// 查找类似 是否重启以更改语言? 的本地化字符串。 + /// + public static string ChangeLangAsk = nameof(ChangeLangAsk); + + /// + /// 查找类似 对话气泡 的本地化字符串。 + /// + public static string ChatBubble = nameof(ChatBubble); + + /// + /// 查找类似 讨论室 的本地化字符串。 + /// + public static string Chatroom = nameof(Chatroom); + + /// + /// 查找类似 复选框 的本地化字符串。 + /// + public static string CheckBox = nameof(CheckBox); + + /// + /// 查找类似 多选组合框 的本地化字符串。 + /// + public static string CheckComboBox = nameof(CheckComboBox); + + /// + /// 查找类似 圆形布局 的本地化字符串。 + /// + public static string CirclePanel = nameof(CirclePanel); + + /// + /// 查找类似 清空 的本地化字符串。 + /// + public static string Clear = nameof(Clear); + + /// + /// 查找类似 点击计数 的本地化字符串。 + /// + public static string Click2Count = nameof(Click2Count); + + /// + /// 查找类似 时钟 的本地化字符串。 + /// + public static string Clock = nameof(Clock); + + /// + /// 查找类似 颜色拾取器 的本地化字符串。 + /// + public static string ColorPicker = nameof(ColorPicker); + + /// + /// 查找类似 分栏偏移 的本地化字符串。 + /// + public static string ColumnOffset = nameof(ColumnOffset); + + /// + /// 查找类似 分栏间隔 的本地化字符串。 + /// + public static string ColumnSpacing = nameof(ColumnSpacing); + + /// + /// 查找类似 组合框 的本地化字符串。 + /// + public static string ComboBox = nameof(ComboBox); + + /// + /// 查找类似 敬请期待 的本地化字符串。 + /// + public static string ComingSoon = nameof(ComingSoon); + + /// + /// 查找类似 评论 的本地化字符串。 + /// + public static string Comment = nameof(Comment); + + /// + /// 查找类似 一般 的本地化字符串。 + /// + public static string Common = nameof(Common); + + /// + /// 查找类似 对比滑块 的本地化字符串。 + /// + public static string CompareSlider = nameof(CompareSlider); + + /// + /// 查找类似 完成 的本地化字符串。 + /// + public static string Complete = nameof(Complete); + + /// + /// 查找类似 这是内容 的本地化字符串。 + /// + public static string ContentDemoStr = nameof(ContentDemoStr); + + /// + /// 查找类似 贡献者 的本地化字符串。 + /// + public static string Contributors = nameof(Contributors); + + /// + /// 查找类似 控件 的本地化字符串。 + /// + public static string Controls = nameof(Controls); + + /// + /// 查找类似 封面流 的本地化字符串。 + /// + public static string CoverFlow = nameof(CoverFlow); + + /// + /// 查找类似 封面视图 的本地化字符串。 + /// + public static string CoverView = nameof(CoverView); + + /// + /// 查找类似 危险 的本地化字符串。 + /// + public static string Danger = nameof(Danger); + + /// + /// 查找类似 数据展示 的本地化字符串。 + /// + public static string DataDisplay = nameof(DataDisplay); + + /// + /// 查找类似 数据录入 的本地化字符串。 + /// + public static string DataEntry = nameof(DataEntry); + + /// + /// 查找类似 数据表格 的本地化字符串。 + /// + public static string DataGrid = nameof(DataGrid); + + /// + /// 查找类似 日期选择器 的本地化字符串。 + /// + public static string DatePicker = nameof(DatePicker); + + /// + /// 查找类似 日期时间选择器 的本地化字符串。 + /// + public static string DateTimePicker = nameof(DateTimePicker); + + /// + /// 查找类似 默认 的本地化字符串。 + /// + public static string Default = nameof(Default); + + /// + /// 查找类似 示例 的本地化字符串。 + /// + public static string Demo = nameof(Demo); + + /// + /// 查找类似 对话框 的本地化字符串。 + /// + public static string Dialog = nameof(Dialog); + + /// + /// 查找类似 对话框示例 的本地化字符串。 + /// + public static string DialogDemo = nameof(DialogDemo); + + /// + /// 查找类似 分割线 的本地化字符串。 + /// + public static string Divider = nameof(Divider); + + /// + /// 查找类似 中文文档 的本地化字符串。 + /// + public static string Doc_cn = nameof(Doc_cn); + + /// + /// 查找类似 英文文档 的本地化字符串。 + /// + public static string Doc_en = nameof(Doc_en); + + /// + /// 查找类似 文献资料 的本地化字符串。 + /// + public static string Documentation = nameof(Documentation); + + /// + /// 查找类似 在这里拖拽 的本地化字符串。 + /// + public static string DragHere = nameof(DragHere); + + /// + /// 查找类似 抽屉 的本地化字符串。 + /// + public static string Drawer = nameof(Drawer); + + /// + /// 查找类似 效果 的本地化字符串。 + /// + public static string Effects = nameof(Effects); + + /// + /// 查找类似 元素组 的本地化字符串。 + /// + public static string ElementGroup = nameof(ElementGroup); + + /// + /// 查找类似 邮箱 的本地化字符串。 + /// + public static string Email = nameof(Email); + + /// + /// 查找类似 空状态 的本地化字符串。 + /// + public static string Empty = nameof(Empty); + + /// + /// 查找类似 错误 的本地化字符串。 + /// + public static string Error = nameof(Error); + + /// + /// 查找类似 退出 的本地化字符串。 + /// + public static string Exit = nameof(Exit); + + /// + /// 查找类似 展开框 的本地化字符串。 + /// + public static string Expander = nameof(Expander); + + /// + /// 查找类似 严重 的本地化字符串。 + /// + public static string Fatal = nameof(Fatal); + + /// + /// 查找类似 反馈 的本地化字符串。 + /// + public static string Feedback = nameof(Feedback); + + /// + /// 查找类似 弹性盒子 的本地化字符串。 + /// + public static string FlexPanel = nameof(FlexPanel); + + /// + /// 查找类似 翻页时钟 的本地化字符串。 + /// + public static string FlipClock = nameof(FlipClock); + + /// + /// 查找类似 漂浮块 的本地化字符串。 + /// + public static string FloatingBlock = nameof(FloatingBlock); + + /// + /// 查找类似 流文档 的本地化字符串。 + /// + public static string FlowDocument = nameof(FlowDocument); + + /// + /// 查找类似 流文档单页视图 的本地化字符串。 + /// + public static string FlowDocumentPageViewer = nameof(FlowDocumentPageViewer); + + /// + /// 查找类似 流文档查看器 的本地化字符串。 + /// + public static string FlowDocumentReader = nameof(FlowDocumentReader); + + /// + /// 查找类似 流文档滚动视图 的本地化字符串。 + /// + public static string FlowDocumentScrollViewer = nameof(FlowDocumentScrollViewer); + + /// + /// 查找类似 导航框架 的本地化字符串。 + /// + public static string Frame = nameof(Frame); + + /// + /// 查找类似 几何形状 的本地化字符串。 + /// + public static string Geometry = nameof(Geometry); + + /// + /// 查找类似 Gif图片 的本地化字符串。 + /// + public static string GifImage = nameof(GifImage); + + /// + /// 查找类似 回到顶部 的本地化字符串。 + /// + public static string GotoTop = nameof(GotoTop); + + /// + /// 查找类似 头像 的本地化字符串。 + /// + public static string Gravatar = nameof(Gravatar); + + /// + /// 查找类似 栅格 的本地化字符串。 + /// + public static string Grid = nameof(Grid); + + /// + /// 查找类似 分组框 的本地化字符串。 + /// + public static string GroupBox = nameof(GroupBox); + + /// + /// 查找类似 组数 的本地化字符串。 + /// + public static string Groups = nameof(Groups); + + /// + /// 查找类似 信息通知 的本地化字符串。 + /// + public static string Growl = nameof(Growl); + + /// + /// 查找类似 检测到有新版本!是否更新? 的本地化字符串。 + /// + public static string GrowlAsk = nameof(GrowlAsk); + + /// + /// 查找类似 消息通知示例 的本地化字符串。 + /// + public static string GrowlDemo = nameof(GrowlDemo); + + /// + /// 查找类似 连接失败,请检查网络! 的本地化字符串。 + /// + public static string GrowlError = nameof(GrowlError); + + /// + /// 查找类似 程序已崩溃~~~ 的本地化字符串。 + /// + public static string GrowlFatal = nameof(GrowlFatal); + + /// + /// 查找类似 今天的天气不错~~~ 的本地化字符串。 + /// + public static string GrowlInfo = nameof(GrowlInfo); + + /// + /// 查找类似 文件保存成功! 的本地化字符串。 + /// + public static string GrowlSuccess = nameof(GrowlSuccess); + + /// + /// 查找类似 磁盘空间快要满了! 的本地化字符串。 + /// + public static string GrowlWarning = nameof(GrowlWarning); + + /// + /// 查找类似 阴影画笔生成器 的本地化字符串。 + /// + public static string HatchBrushGenerator = nameof(HatchBrushGenerator); + + /// + /// 查找类似 蜂窝布局 的本地化字符串。 + /// + public static string HoneycombPanel = nameof(HoneycombPanel); + + /// + /// 查找类似 混合布局 的本地化字符串。 + /// + public static string HybridLayout = nameof(HybridLayout); + + /// + /// 查找类似 忽略 的本地化字符串。 + /// + public static string Ignore = nameof(Ignore); + + /// + /// 查找类似 图片块 的本地化字符串。 + /// + public static string ImageBlock = nameof(ImageBlock); + + /// + /// 查找类似 图片浏览器 的本地化字符串。 + /// + public static string ImageBrowser = nameof(ImageBrowser); + + /// + /// 查找类似 图片选择器 的本地化字符串。 + /// + public static string ImageSelector = nameof(ImageSelector); + + /// + /// 查找类似 索引 的本地化字符串。 + /// + public static string Index = nameof(Index); + + /// + /// 查找类似 信息 的本地化字符串。 + /// + public static string Info = nameof(Info); + + /// + /// 查找类似 交互 的本地化字符串。 + /// + public static string Interacting = nameof(Interacting); + + /// + /// 查找类似 可交互对话框 的本地化字符串。 + /// + public static string InteractiveDialog = nameof(InteractiveDialog); + + /// + /// 查找类似 不是手机号码 的本地化字符串。 + /// + public static string IsNotPhone = nameof(IsNotPhone); + + /// + /// 查找类似 标签 的本地化字符串。 + /// + public static string Label = nameof(Label); + + /// + /// 查找类似 查找类似 {0} 的本地化字符串。 的本地化字符串。 + /// + public static string LangComment = nameof(LangComment); + + /// + /// 查找类似 布局 的本地化字符串。 + /// + public static string Layout = nameof(Layout); + + /// + /// 查找类似 列表框 的本地化字符串。 + /// + public static string ListBox = nameof(ListBox); + + /// + /// 查找类似 列表视图 的本地化字符串。 + /// + public static string ListView = nameof(ListView); + + /// + /// 查找类似 加载条 的本地化字符串。 + /// + public static string Loading = nameof(Loading); + + /// + /// 查找类似 放大镜 的本地化字符串。 + /// + public static string Magnifier = nameof(Magnifier); + + /// + /// 查找类似 菜单 的本地化字符串。 + /// + public static string Menu = nameof(Menu); + + /// + /// 查找类似 消息框 的本地化字符串。 + /// + public static string MessageBox = nameof(MessageBox); + + /// + /// 查找类似 杂项 的本地化字符串。 + /// + public static string Misc = nameof(Misc); + + /// + /// 查找类似 的本地化字符串。 + /// + public static string Morphing_Animation = nameof(Morphing_Animation); + + /// + /// 查找类似 名称 的本地化字符串。 + /// + public static string Name = nameof(Name); + + /// + /// 查找类似 导航 的本地化字符串。 + /// + public static string Navigation = nameof(Navigation); + + /// + /// 查找类似 新建窗口 的本地化字符串。 + /// + public static string NewWindow = nameof(NewWindow); + + /// + /// 查找类似 下一步 的本地化字符串。 + /// + public static string Next = nameof(Next); + + /// + /// 查找类似 桌面通知 的本地化字符串。 + /// + public static string Notification = nameof(Notification); + + /// + /// 查找类似 托盘图标 的本地化字符串。 + /// + public static string NotifyIcon = nameof(NotifyIcon); + + /// + /// 查找类似 数值选择控件 的本地化字符串。 + /// + public static string NumericUpDown = nameof(NumericUpDown); + + /// + /// 查找类似 关 的本地化字符串。 + /// + public static string Off = nameof(Off); + + /// + /// 查找类似 确定 的本地化字符串。 + /// + public static string Ok = nameof(Ok); + + /// + /// 查找类似 开 的本地化字符串。 + /// + public static string On = nameof(On); + + /// + /// 查找类似 点击打开背景模糊窗口 的本地化字符串。 + /// + public static string OpenBlurWindow = nameof(OpenBlurWindow); + + /// + /// 查找类似 点击打开常规窗口 的本地化字符串。 + /// + public static string OpenCommonWindow = nameof(OpenCommonWindow); + + /// + /// 查找类似 点击打开自定义内容窗口 的本地化字符串。 + /// + public static string OpenCustomContentWindow = nameof(OpenCustomContentWindow); + + /// + /// 查找类似 点击打开自定义消息窗口 的本地化字符串。 + /// + public static string OpenCustomMessageWindow = nameof(OpenCustomMessageWindow); + + /// + /// 查找类似 点击打开自定义非客户端区域窗口 的本地化字符串。 + /// + public static string OpenCustomNonClientAreaWindow = nameof(OpenCustomNonClientAreaWindow); + + /// + /// 查找类似 点击打开辉光窗口 的本地化字符串。 + /// + public static string OpenGlowWindow = nameof(OpenGlowWindow); + + /// + /// 查找类似 点击打开图片浏览器 的本地化字符串。 + /// + public static string OpenImageBrowser = nameof(OpenImageBrowser); + + /// + /// 查找类似 点击打开消息窗口 的本地化字符串。 + /// + public static string OpenMessageWindow = nameof(OpenMessageWindow); + + /// + /// 查找类似 点击打开鼠标跟随窗口 的本地化字符串。 + /// + public static string OpenMouseFollowWindow = nameof(OpenMouseFollowWindow); + + /// + /// 查找类似 点击打开原生常规窗口 的本地化字符串。 + /// + public static string OpenNativeCommonWindow = nameof(OpenNativeCommonWindow); + + /// + /// 查找类似 点击打开导航窗口 的本地化字符串。 + /// + public static string OpenNavigationWindow = nameof(OpenNavigationWindow); + + /// + /// 查找类似 打开无非客户端区域可拖拽窗口 的本地化字符串。 + /// + public static string OpenNoNonClientAreaDragableWindow = nameof(OpenNoNonClientAreaDragableWindow); + + /// + /// 查找类似 打开面板 的本地化字符串。 + /// + public static string OpenPanel = nameof(OpenPanel); + + /// + /// 查找类似 打开精灵 的本地化字符串。 + /// + public static string OpenSprite = nameof(OpenSprite); + + /// + /// 查找类似 点击打开触摸拖动窗口 的本地化字符串。 + /// + public static string OpenTouchDragMoveWindow = nameof(OpenTouchDragMoveWindow); + + /// + /// 查找类似 轮廓文本 的本地化字符串。 + /// + public static string OutlineText = nameof(OutlineText); + + /// + /// 查找类似 页码条 的本地化字符串。 + /// + public static string Pagination = nameof(Pagination); + + /// + /// 查找类似 密码框 的本地化字符串。 + /// + public static string PasswordBox = nameof(PasswordBox); + + /// + /// 查找类似 PIN码框 的本地化字符串。 + /// + public static string PinBox = nameof(PinBox); + + /// + /// 查找类似 请输入... 的本地化字符串。 + /// + public static string PleaseInput = nameof(PleaseInput); + + /// + /// 查找类似 请稍后... 的本地化字符串。 + /// + public static string PleaseWait = nameof(PleaseWait); + + /// + /// 查找类似 请输入内容 的本地化字符串。 + /// + public static string PlsEnterContent = nameof(PlsEnterContent); + + /// + /// 查找类似 请输入邮箱 的本地化字符串。 + /// + public static string PlsEnterEmail = nameof(PlsEnterEmail); + + /// + /// 查找类似 请输入关键字 的本地化字符串。 + /// + public static string PlsEnterKey = nameof(PlsEnterKey); + + /// + /// 查找类似 气泡提示 的本地化字符串。 + /// + public static string Poptip = nameof(Poptip); + + /// + /// 查找类似 上左;上边;上右;右上;右边;右下;下右;下边;下左;左下;左边;左上 的本地化字符串。 + /// + public static string PoptipPositionStr = nameof(PoptipPositionStr); + + /// + /// 查找类似 实用例子 的本地化字符串。 + /// + public static string PracticalDemos = nameof(PracticalDemos); + + /// + /// 查找类似 上一步 的本地化字符串。 + /// + public static string Prev = nameof(Prev); + + /// + /// 查找类似 预览滑块 的本地化字符串。 + /// + public static string PreviewSlider = nameof(PreviewSlider); + + /// + /// 查找类似 主要 的本地化字符串。 + /// + public static string Primary = nameof(Primary); + + /// + /// 查找类似 进度条 的本地化字符串。 + /// + public static string ProgressBar = nameof(ProgressBar); + + /// + /// 查找类似 进度按钮 的本地化字符串。 + /// + public static string ProgressButton = nameof(ProgressButton); + + /// + /// 查找类似 项目 的本地化字符串。 + /// + public static string Project = nameof(Project); + + /// + /// 查找类似 属性编辑器 的本地化字符串。 + /// + public static string PropertyGrid = nameof(PropertyGrid); + + /// + /// 查找类似 按住说话 的本地化字符串。 + /// + public static string PushToTalk = nameof(PushToTalk); + + /// + /// 查找类似 QQ群 的本地化字符串。 + /// + public static string QQGroup = nameof(QQGroup); + + /// + /// 查找类似 单选按钮 的本地化字符串。 + /// + public static string RadioButton = nameof(RadioButton); + + /// + /// 查找类似 范围滑块 的本地化字符串。 + /// + public static string RangeSlider = nameof(RangeSlider); + + /// + /// 查找类似 评分 的本地化字符串。 + /// + public static string Rate = nameof(Rate); + + /// + /// 查找类似 群友推荐 的本地化字符串。 + /// + public static string Recommendation = nameof(Recommendation); + + /// + /// 查找类似 注册 的本地化字符串。 + /// + public static string Register = nameof(Register); + + /// + /// 查找类似 相对布局 的本地化字符串。 + /// + public static string RelativePanel = nameof(RelativePanel); + + /// + /// 查找类似 备注 的本地化字符串。 + /// + public static string Remark = nameof(Remark); + + /// + /// 查找类似 删除项 的本地化字符串。 + /// + public static string RemoveItem = nameof(RemoveItem); + + /// + /// 查找类似 重复按钮 的本地化字符串。 + /// + public static string RepeatButton = nameof(RepeatButton); + + /// + /// 查找类似 回复 的本地化字符串。 + /// + public static string Reply = nameof(Reply); + + /// + /// 查找类似 代码仓库 的本地化字符串。 + /// + public static string Repository = nameof(Repository); + + /// + /// 查找类似 响应式布局 的本地化字符串。 + /// + public static string ResponsiveLayout = nameof(ResponsiveLayout); + + /// + /// 查找类似 富文本框 的本地化字符串。 + /// + public static string RichTextBox = nameof(RichTextBox); + + /// + /// 查找类似 在这里右击 的本地化字符串。 + /// + public static string RightClickHere = nameof(RightClickHere); + + /// + /// 查找类似 滚动块 的本地化字符串。 + /// + public static string RunningBlock = nameof(RunningBlock); + + /// + /// 查找类似 截图 的本地化字符串。 + /// + public static string Screenshot = nameof(Screenshot); + + /// + /// 查找类似 滚动视图 的本地化字符串。 + /// + public static string ScrollViewer = nameof(ScrollViewer); + + /// + /// 查找类似 搜索栏 的本地化字符串。 + /// + public static string SearchBar = nameof(SearchBar); + + /// + /// 查找类似 秒 的本地化字符串。 + /// + public static string Second = nameof(Second); + + /// + /// 查找类似 选中 的本地化字符串。 + /// + public static string Selected = nameof(Selected); + + /// + /// 查找类似 发送通知 的本地化字符串。 + /// + public static string SendNotification = nameof(SendNotification); + + /// + /// 查找类似 徽章 的本地化字符串。 + /// + public static string Shield = nameof(Shield); + + /// + /// 查找类似 在当前窗口显示 的本地化字符串。 + /// + public static string ShowInCurrentWindow = nameof(ShowInCurrentWindow); + + /// + /// 查找类似 在主窗口显示 的本地化字符串。 + /// + public static string ShowInMainWindow = nameof(ShowInMainWindow); + + /// + /// 查找类似 显示行号 的本地化字符串。 + /// + public static string ShowRowNumber = nameof(ShowRowNumber); + + /// + /// 查找类似 侧边菜单 的本地化字符串。 + /// + public static string SideMenu = nameof(SideMenu); + + /// + /// 查找类似 滑块 的本地化字符串。 + /// + public static string Slider = nameof(Slider); + + /// + /// 查找类似 分割按钮 的本地化字符串。 + /// + public static string SplitButton = nameof(SplitButton); + + /// + /// 查找类似 精灵 的本地化字符串。 + /// + public static string Sprite = nameof(Sprite); + + /// + /// 查找类似 开始截图 的本地化字符串。 + /// + public static string StartScreenshot = nameof(StartScreenshot); + + /// + /// 查找类似 保持打开 的本地化字符串。 + /// + public static string StaysOpen = nameof(StaysOpen); + + /// + /// 查找类似 步骤 的本地化字符串。 + /// + public static string Step = nameof(Step); + + /// + /// 查找类似 步骤条 的本地化字符串。 + /// + public static string StepBar = nameof(StepBar); + + /// + /// 查找类似 样式模板 的本地化字符串。 + /// + public static string Styles = nameof(Styles); + + /// + /// 查找类似 子标题 的本地化字符串。 + /// + public static string SubTitle = nameof(SubTitle); + + /// + /// 查找类似 成功 的本地化字符串。 + /// + public static string Success = nameof(Success); + + /// + /// 查找类似 选项卡控件 的本地化字符串。 + /// + public static string TabControl = nameof(TabControl); + + /// + /// 查找类似 标签 的本地化字符串。 + /// + public static string Tag = nameof(Tag); + + /// + /// 查找类似 正文 的本地化字符串。 + /// + public static string Text = nameof(Text); + + /// + /// 查找类似 文本块 的本地化字符串。 + /// + public static string TextBlock = nameof(TextBlock); + + /// + /// 查找类似 文本框 的本地化字符串。 + /// + public static string TextBox = nameof(TextBox); + + /// + /// 查找类似 文本对话框 的本地化字符串。 + /// + public static string TextDialog = nameof(TextDialog); + + /// + /// 查找类似 文本对话框(控件中) 的本地化字符串。 + /// + public static string TextDialogInControl = nameof(TextDialogInControl); + + /// + /// 查找类似 文本对话框,带计时器 的本地化字符串。 + /// + public static string TextDialogWithTimer = nameof(TextDialogWithTimer); + + /// + /// 查找类似 时间条 的本地化字符串。 + /// + public static string TimeBar = nameof(TimeBar); + + /// + /// 查找类似 时间选择器 的本地化字符串。 + /// + public static string TimePicker = nameof(TimePicker); + + /// + /// 查找类似 提示 的本地化字符串。 + /// + public static string Tip = nameof(Tip); + + /// + /// 查找类似 标题 的本地化字符串。 + /// + public static string Title = nameof(Title); + + /// + /// 查找类似 这是标题 的本地化字符串。 + /// + public static string TitleDemoStr1 = nameof(TitleDemoStr1); + + /// + /// 查找类似 此项必填 的本地化字符串。 + /// + public static string TitleDemoStr2 = nameof(TitleDemoStr2); + + /// + /// 查找类似 标题在左侧 的本地化字符串。 + /// + public static string TitleDemoStr3 = nameof(TitleDemoStr3); + + /// + /// 查找类似 切换按钮 的本地化字符串。 + /// + public static string ToggleButton = nameof(ToggleButton); + + /// + /// 查找类似 工具条 的本地化字符串。 + /// + public static string ToolBar = nameof(ToolBar); + + /// + /// 查找类似 工具 的本地化字符串。 + /// + public static string Tools = nameof(Tools); + + /// + /// 查找类似 穿梭框 的本地化字符串。 + /// + public static string Transfer = nameof(Transfer); + + /// + /// 查找类似 内容过渡控件 的本地化字符串。 + /// + public static string TransitioningContentControl = nameof(TransitioningContentControl); + + /// + /// 查找类似 树视图 的本地化字符串。 + /// + public static string TreeView = nameof(TreeView); + + /// + /// 查找类似 试试关闭程序吧? 的本地化字符串。 + /// + public static string Try2CloseApp = nameof(Try2CloseApp); + + /// + /// 查找类似 类型 的本地化字符串。 + /// + public static string Type = nameof(Type); + + /// + /// 查找类似 等间距布局 的本地化字符串。 + /// + public static string UniformSpacingPanel = nameof(UniformSpacingPanel); + + /// + /// 查找类似 上传文件 的本地化字符串。 + /// + public static string UploadFile = nameof(UploadFile); + + /// + /// 查找类似 上传;上传中 的本地化字符串。 + /// + public static string UploadStr = nameof(UploadStr); + + /// + /// 查找类似 可见性 的本地化字符串。 + /// + public static string Visibility = nameof(Visibility); + + /// + /// 查找类似 VS 插件 的本地化字符串。 + /// + public static string Vsix = nameof(Vsix); + + /// + /// 查找类似 警告 的本地化字符串。 + /// + public static string Warning = nameof(Warning); + + /// + /// 查找类似 瀑布流 的本地化字符串。 + /// + public static string WaterfallPanel = nameof(WaterfallPanel); + + /// + /// 查找类似 网站 的本地化字符串。 + /// + public static string Website = nameof(Website); + + /// + /// 查找类似 窗口 的本地化字符串。 + /// + public static string Window = nameof(Window); + +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Resources/DemoTheme.cs b/src/Shared/HandyControlDemo_Shared/Resources/DemoTheme.cs index cbade368..155ac909 100644 --- a/src/Shared/HandyControlDemo_Shared/Resources/DemoTheme.cs +++ b/src/Shared/HandyControlDemo_Shared/Resources/DemoTheme.cs @@ -4,16 +4,15 @@ using HandyControl.Data; using HandyControl.Themes; using HandyControl.Tools; -namespace HandyControlDemo.Resources -{ - public class DemoTheme : Theme - { - public override ResourceDictionary GetSkin(SkinType skinType) => - ResourceHelper.GetSkin(typeof(App).Assembly, "Resources/Themes", skinType); +namespace HandyControlDemo.Resources; - public override ResourceDictionary GetTheme() => new() - { - Source = new Uri("pack://application:,,,/HandyControlDemo;component/Resources/Themes/Theme.xaml") - }; - } -} +public class DemoTheme : Theme +{ + public override ResourceDictionary GetSkin(SkinType skinType) => + ResourceHelper.GetSkin(typeof(App).Assembly, "Resources/Themes", skinType); + + public override ResourceDictionary GetTheme() => new() + { + Source = new Uri("pack://application:,,,/HandyControlDemo;component/Resources/Themes/Theme.xaml") + }; +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Service/Data/DataService.cs b/src/Shared/HandyControlDemo_Shared/Service/Data/DataService.cs index aa09bcc5..b6549001 100644 --- a/src/Shared/HandyControlDemo_Shared/Service/Data/DataService.cs +++ b/src/Shared/HandyControlDemo_Shared/Service/Data/DataService.cs @@ -12,431 +12,430 @@ using HandyControlDemo.Properties.Langs; using HandyControlDemo.Tools.Converter; using Newtonsoft.Json; -namespace HandyControlDemo.Service +namespace HandyControlDemo.Service; + +public class DataService { - public class DataService + internal ObservableCollection GetTabControlDemoDataList() { - internal ObservableCollection GetTabControlDemoDataList() + return new() { - return new() + new TabControlDemoModel { - new TabControlDemoModel - { - Header = "Success", - BackgroundToken = ResourceToken.SuccessBrush - }, - new TabControlDemoModel - { - Header = "Primary", - BackgroundToken = ResourceToken.PrimaryBrush - }, - new TabControlDemoModel - { - Header = "Warning", - BackgroundToken = ResourceToken.WarningBrush - }, - new TabControlDemoModel - { - Header = "Danger", - BackgroundToken = ResourceToken.DangerBrush - }, - new TabControlDemoModel - { - Header = "Info", - BackgroundToken = ResourceToken.InfoBrush - } - }; - } - - internal List GetDemoDataList() - { - var list = new List(); - for (var i = 1; i <= 20; i++) + Header = "Success", + BackgroundToken = ResourceToken.SuccessBrush + }, + new TabControlDemoModel { - var dataList = new List(); - for (var j = 0; j < 3; j++) - { - dataList.Add(new DemoDataModel - { - Index = j, - IsSelected = j % 2 == 0, - Name = $"SubName{j}", - Type = (DemoType) j - }); - } - var model = new DemoDataModel - { - Index = i, - IsSelected = i % 2 == 0, - Name = $"Name{i}", - Type = (DemoType) (i % 6 + 1), - DataList = dataList, - ImgPath = $"/HandyControlDemo;component/Resources/Img/Avatar/avatar{i % 6 + 1}.png", - Remark = new string(i.ToString()[0], 10) - }; - list.Add(model); + Header = "Primary", + BackgroundToken = ResourceToken.PrimaryBrush + }, + new TabControlDemoModel + { + Header = "Warning", + BackgroundToken = ResourceToken.WarningBrush + }, + new TabControlDemoModel + { + Header = "Danger", + BackgroundToken = ResourceToken.DangerBrush + }, + new TabControlDemoModel + { + Header = "Info", + BackgroundToken = ResourceToken.InfoBrush } + }; + } - return list; - } - - internal List GetDemoDataList(int count) + internal List GetDemoDataList() + { + var list = new List(); + for (var i = 1; i <= 20; i++) { - var list = new List(); - for (var i = 1; i <= count; i++) + var dataList = new List(); + for (var j = 0; j < 3; j++) { - var index = i % 6 + 1; - var model = new DemoDataModel + dataList.Add(new DemoDataModel { - Index = i, - IsSelected = i % 2 == 0, - Name = $"Name{i}", - Type = (DemoType) index, - ImgPath = $"/HandyControlDemo;component/Resources/Img/Avatar/avatar{index}.png", - Remark = new string(i.ToString()[0], 10) - }; - list.Add(model); - } - - return list; - } - - internal List GetContributorDataList() - { - var client = new WebClient(); - client.Headers.Add("User-Agent", "request"); - var list = new List(); - try - { - var json = client.DownloadString(new Uri("https://api.github.com/repos/nabian/handycontrol/contributors")); - var objList = JsonConvert.DeserializeObject>(json); - list.AddRange(objList.Select(item => new AvatarModel - { - DisplayName = item.login, - AvatarUri = item.avatar_url, - Link = item.html_url - })); - } - catch (Exception e) - { - HandyControl.Controls.MessageBox.Error(e.Message, Lang.Error); - } - - return list; - } - - internal List GetBlogDataList() - { - return new() - { - new AvatarModel - { - DisplayName = "林德熙", - AvatarUri = "https://avatars3.githubusercontent.com/u/16054566?s=400&v=4", - Link = "https://blog.lindexi.com/" - }, - new AvatarModel - { - DisplayName = "吕毅", - AvatarUri = "https://avatars2.githubusercontent.com/u/9959623?s=400&v=4", - Link = "https://blog.walterlv.com/" - }, - new AvatarModel - { - DisplayName = "DinoChan", - AvatarUri = "https://avatars1.githubusercontent.com/u/6076257?s=400&v=4", - Link = "https://www.cnblogs.com/dino623/" - }, - new AvatarModel - { - DisplayName = "noctwolf", - AvatarUri = "https://avatars3.githubusercontent.com/u/21022467?s=400&v=4", - Link = "https://www.cnblogs.com/noctwolf/" - }, - new AvatarModel - { - DisplayName = "关关长语", - AvatarUri = "https://avatars3.githubusercontent.com/u/25916858?s=400&v=4", - Link = "https://blog.csdn.net/qq_28806349/category_11213909.html" - } - }; - } - - internal List GetProjectDataList() - { - return new() - { - new AvatarModel - { - DisplayName = "phpEnv", - AvatarUri = "https://cdn.phpenv.cn:444/logo.png", - Link = "https://www.phpenv.cn/" - }, - new AvatarModel - { - DisplayName = "AutumnBox", - AvatarUri = "https://raw.githubusercontent.com/zsh2401/AutumnBox/master/src/AutumnBox.GUI/Resources/Images/icon.png", - Link = "https://github.com/zsh2401/AutumnBox" - }, - new AvatarModel - { - DisplayName = "quicker", - AvatarUri = "https://files.getquicker.net/_sitefiles/quicker_round_128.png", - Link = "https://getquicker.net" - } - }; - } - - internal List GetWebsiteDataList() - { - return new() - { - new AvatarModel - { - DisplayName = "Dotnet9", - AvatarUri = "https://pic.cnblogs.com/avatar/1663243/20191124121029.png", - Link = "https://dotnet9.com/" - } - }; - } - - internal ObservableCollection GetCardDataList() - { - return new() - { - new CardModel - { - Header = "Atomic", - Content = "/HandyControlDemo;component/Resources/Img/Album/1.jpg", - Footer = "Stive Morgan" - }, - new CardModel - { - Header = "Zinderlong", - Content = "/HandyControlDemo;component/Resources/Img/Album/2.jpg", - Footer = "Zonderling" - }, - new CardModel - { - Header = "Busy Doin' Nothin'", - Content = "/HandyControlDemo;component/Resources/Img/Album/3.jpg", - Footer = "Ace Wilder" - }, - new CardModel - { - Header = "Wrong", - Content = "/HandyControlDemo;component/Resources/Img/Album/4.jpg", - Footer = "Blaxy Girls" - }, - new CardModel - { - Header = "The Lights", - Content = "/HandyControlDemo;component/Resources/Img/Album/5.jpg", - Footer = "Panda Eyes" - }, - new CardModel - { - Header = "EA7-50-Cent Disco", - Content = "/HandyControlDemo;component/Resources/Img/Album/6.jpg", - Footer = "еяхат музыка" - }, - new CardModel - { - Header = "Monsters", - Content = "/HandyControlDemo;component/Resources/Img/Album/7.jpg", - Footer = "Different Heaven" - }, - new CardModel - { - Header = "Gangsta Walk", - Content = "/HandyControlDemo;component/Resources/Img/Album/8.jpg", - Footer = "Illusionize" - }, - new CardModel - { - Header = "Won't Back Down", - Content = "/HandyControlDemo;component/Resources/Img/Album/9.jpg", - Footer = "Boehm / Benjamin Francis Leftwich" - }, - new CardModel - { - Header = "Katchi", - Content = "/HandyControlDemo;component/Resources/Img/Album/10.jpg", - Footer = "Ofenbach / Nick Waterhouse" - } - }; - } - - internal CardModel GetCardData() - { - return new() - { - Content = $"/HandyControlDemo;component/Resources/Img/Album/{DateTime.Now.Second % 10 + 1}.jpg" - }; - } - - internal List GetStepBarDemoDataList() - { - return new() - { - new StepBarDemoModel - { - Header = LangKeys.Step, - Content = LangKeys.Register - }, - new StepBarDemoModel - { - Header = LangKeys.Step, - Content = LangKeys.BasicInfo - }, - new StepBarDemoModel - { - Header = LangKeys.Step, - Content = LangKeys.UploadFile - }, - new StepBarDemoModel - { - Header = LangKeys.Step, - Content = LangKeys.Complete - } - }; - } - - internal ObservableCollection GetCoverViewDemoDataList() - { - return new() - { - new CoverViewDemoModel - { - ImgPath = "/HandyControlDemo;component/Resources/Img/Album/1.jpg", - BackgroundToken = ResourceToken.SuccessBrush - }, - new CoverViewDemoModel - { - ImgPath = "/HandyControlDemo;component/Resources/Img/Album/2.jpg", - BackgroundToken = ResourceToken.PrimaryBrush - }, - new CoverViewDemoModel - { - ImgPath = "/HandyControlDemo;component/Resources/Img/Album/3.jpg", - BackgroundToken = ResourceToken.WarningBrush - }, - new CoverViewDemoModel - { - ImgPath = "/HandyControlDemo;component/Resources/Img/Album/4.jpg", - BackgroundToken = ResourceToken.DangerBrush - }, - new CoverViewDemoModel - { - ImgPath = "/HandyControlDemo;component/Resources/Img/Album/5.jpg", - BackgroundToken = ResourceToken.SuccessBrush - }, - new CoverViewDemoModel - { - ImgPath = "/HandyControlDemo;component/Resources/Img/Album/6.jpg", - BackgroundToken = ResourceToken.PrimaryBrush - }, - new CoverViewDemoModel - { - ImgPath = "/HandyControlDemo;component/Resources/Img/Album/7.jpg", - BackgroundToken = ResourceToken.InfoBrush - }, - new CoverViewDemoModel - { - ImgPath = "/HandyControlDemo;component/Resources/Img/Album/8.jpg", - BackgroundToken = ResourceToken.WarningBrush - }, - new CoverViewDemoModel - { - ImgPath = "/HandyControlDemo;component/Resources/Img/Album/9.jpg", - BackgroundToken = ResourceToken.PrimaryBrush - }, - new CoverViewDemoModel - { - ImgPath = "/HandyControlDemo;component/Resources/Img/Album/10.jpg", - BackgroundToken = ResourceToken.DangerBrush - } - }; - } - - internal List GetDemoInfo() - { - var infoList = new List(); - - var stream = Application.GetResourceStream(new Uri("Data/DemoInfo.json", UriKind.Relative))?.Stream; - if (stream == null) return infoList; - - string jsonStr; - using (var reader = new StreamReader(stream)) - { - jsonStr = reader.ReadToEnd(); - } - - var jsonObj = JsonConvert.DeserializeObject(jsonStr); - foreach (var item in jsonObj) - { - var titleKey = (string) item.title; - var title = titleKey; - List list = Convert2DemoItemList(item.demoItemList); - - var demoInfoModel = new DemoInfoModel - { - Key = titleKey, - Title = title, - DemoItemList = list, - SelectedIndex = (int) item.selectedIndex, - IsGroupEnabled = (bool) item.group - }; - - infoList.Add(demoInfoModel); - } - - return infoList; - } - - private List Convert2DemoItemList(dynamic list) - { - var resultList = new List(); - - foreach (var item in list) - { - var name = (string) item[0]; - string targetCtlName = item[1]; - string imageName = item[2]; - var isNew = !string.IsNullOrEmpty((string) item[3]); - var groupName = (string) item[4]; - if (string.IsNullOrEmpty(groupName)) - { - groupName = "Misc"; - } - - resultList.Add(new DemoItemModel - { - Name = name, - TargetCtlName = targetCtlName, - ImageName = $"../../Resources/Img/LeftMainContent/{imageName}.png", - IsNew = isNew, - GroupName = groupName + Index = j, + IsSelected = j % 2 == 0, + Name = $"SubName{j}", + Type = (DemoType) j }); } - - return resultList; + var model = new DemoDataModel + { + Index = i, + IsSelected = i % 2 == 0, + Name = $"Name{i}", + Type = (DemoType) (i % 6 + 1), + DataList = dataList, + ImgPath = $"/HandyControlDemo;component/Resources/Img/Avatar/avatar{i % 6 + 1}.png", + Remark = new string(i.ToString()[0], 10) + }; + list.Add(model); } - public string GetDemoUrl(DemoInfoModel demoInfo, DemoItemModel demoItem) + return list; + } + + internal List GetDemoDataList(int count) + { + var list = new List(); + for (var i = 1; i <= count; i++) { - var key = demoInfo.Key switch + var index = i % 6 + 1; + var model = new DemoDataModel { - "Styles" => "native_controls", - "Controls" => "extend_controls", - "Tools" => "tools", - _ => string.Empty + Index = i, + IsSelected = i % 2 == 0, + Name = $"Name{i}", + Type = (DemoType) index, + ImgPath = $"/HandyControlDemo;component/Resources/Img/Avatar/avatar{index}.png", + Remark = new string(i.ToString()[0], 10) + }; + list.Add(model); + } + + return list; + } + + internal List GetContributorDataList() + { + var client = new WebClient(); + client.Headers.Add("User-Agent", "request"); + var list = new List(); + try + { + var json = client.DownloadString(new Uri("https://api.github.com/repos/nabian/handycontrol/contributors")); + var objList = JsonConvert.DeserializeObject>(json); + list.AddRange(objList.Select(item => new AvatarModel + { + DisplayName = item.login, + AvatarUri = item.avatar_url, + Link = item.html_url + })); + } + catch (Exception e) + { + HandyControl.Controls.MessageBox.Error(e.Message, Lang.Error); + } + + return list; + } + + internal List GetBlogDataList() + { + return new() + { + new AvatarModel + { + DisplayName = "林德熙", + AvatarUri = "https://avatars3.githubusercontent.com/u/16054566?s=400&v=4", + Link = "https://blog.lindexi.com/" + }, + new AvatarModel + { + DisplayName = "吕毅", + AvatarUri = "https://avatars2.githubusercontent.com/u/9959623?s=400&v=4", + Link = "https://blog.walterlv.com/" + }, + new AvatarModel + { + DisplayName = "DinoChan", + AvatarUri = "https://avatars1.githubusercontent.com/u/6076257?s=400&v=4", + Link = "https://www.cnblogs.com/dino623/" + }, + new AvatarModel + { + DisplayName = "noctwolf", + AvatarUri = "https://avatars3.githubusercontent.com/u/21022467?s=400&v=4", + Link = "https://www.cnblogs.com/noctwolf/" + }, + new AvatarModel + { + DisplayName = "关关长语", + AvatarUri = "https://avatars3.githubusercontent.com/u/25916858?s=400&v=4", + Link = "https://blog.csdn.net/qq_28806349/category_11213909.html" + } + }; + } + + internal List GetProjectDataList() + { + return new() + { + new AvatarModel + { + DisplayName = "phpEnv", + AvatarUri = "https://cdn.phpenv.cn:444/logo.png", + Link = "https://www.phpenv.cn/" + }, + new AvatarModel + { + DisplayName = "AutumnBox", + AvatarUri = "https://raw.githubusercontent.com/zsh2401/AutumnBox/master/src/AutumnBox.GUI/Resources/Images/icon.png", + Link = "https://github.com/zsh2401/AutumnBox" + }, + new AvatarModel + { + DisplayName = "quicker", + AvatarUri = "https://files.getquicker.net/_sitefiles/quicker_round_128.png", + Link = "https://getquicker.net" + } + }; + } + + internal List GetWebsiteDataList() + { + return new() + { + new AvatarModel + { + DisplayName = "Dotnet9", + AvatarUri = "https://pic.cnblogs.com/avatar/1663243/20191124121029.png", + Link = "https://dotnet9.com/" + } + }; + } + + internal ObservableCollection GetCardDataList() + { + return new() + { + new CardModel + { + Header = "Atomic", + Content = "/HandyControlDemo;component/Resources/Img/Album/1.jpg", + Footer = "Stive Morgan" + }, + new CardModel + { + Header = "Zinderlong", + Content = "/HandyControlDemo;component/Resources/Img/Album/2.jpg", + Footer = "Zonderling" + }, + new CardModel + { + Header = "Busy Doin' Nothin'", + Content = "/HandyControlDemo;component/Resources/Img/Album/3.jpg", + Footer = "Ace Wilder" + }, + new CardModel + { + Header = "Wrong", + Content = "/HandyControlDemo;component/Resources/Img/Album/4.jpg", + Footer = "Blaxy Girls" + }, + new CardModel + { + Header = "The Lights", + Content = "/HandyControlDemo;component/Resources/Img/Album/5.jpg", + Footer = "Panda Eyes" + }, + new CardModel + { + Header = "EA7-50-Cent Disco", + Content = "/HandyControlDemo;component/Resources/Img/Album/6.jpg", + Footer = "еяхат музыка" + }, + new CardModel + { + Header = "Monsters", + Content = "/HandyControlDemo;component/Resources/Img/Album/7.jpg", + Footer = "Different Heaven" + }, + new CardModel + { + Header = "Gangsta Walk", + Content = "/HandyControlDemo;component/Resources/Img/Album/8.jpg", + Footer = "Illusionize" + }, + new CardModel + { + Header = "Won't Back Down", + Content = "/HandyControlDemo;component/Resources/Img/Album/9.jpg", + Footer = "Boehm / Benjamin Francis Leftwich" + }, + new CardModel + { + Header = "Katchi", + Content = "/HandyControlDemo;component/Resources/Img/Album/10.jpg", + Footer = "Ofenbach / Nick Waterhouse" + } + }; + } + + internal CardModel GetCardData() + { + return new() + { + Content = $"/HandyControlDemo;component/Resources/Img/Album/{DateTime.Now.Second % 10 + 1}.jpg" + }; + } + + internal List GetStepBarDemoDataList() + { + return new() + { + new StepBarDemoModel + { + Header = LangKeys.Step, + Content = LangKeys.Register + }, + new StepBarDemoModel + { + Header = LangKeys.Step, + Content = LangKeys.BasicInfo + }, + new StepBarDemoModel + { + Header = LangKeys.Step, + Content = LangKeys.UploadFile + }, + new StepBarDemoModel + { + Header = LangKeys.Step, + Content = LangKeys.Complete + } + }; + } + + internal ObservableCollection GetCoverViewDemoDataList() + { + return new() + { + new CoverViewDemoModel + { + ImgPath = "/HandyControlDemo;component/Resources/Img/Album/1.jpg", + BackgroundToken = ResourceToken.SuccessBrush + }, + new CoverViewDemoModel + { + ImgPath = "/HandyControlDemo;component/Resources/Img/Album/2.jpg", + BackgroundToken = ResourceToken.PrimaryBrush + }, + new CoverViewDemoModel + { + ImgPath = "/HandyControlDemo;component/Resources/Img/Album/3.jpg", + BackgroundToken = ResourceToken.WarningBrush + }, + new CoverViewDemoModel + { + ImgPath = "/HandyControlDemo;component/Resources/Img/Album/4.jpg", + BackgroundToken = ResourceToken.DangerBrush + }, + new CoverViewDemoModel + { + ImgPath = "/HandyControlDemo;component/Resources/Img/Album/5.jpg", + BackgroundToken = ResourceToken.SuccessBrush + }, + new CoverViewDemoModel + { + ImgPath = "/HandyControlDemo;component/Resources/Img/Album/6.jpg", + BackgroundToken = ResourceToken.PrimaryBrush + }, + new CoverViewDemoModel + { + ImgPath = "/HandyControlDemo;component/Resources/Img/Album/7.jpg", + BackgroundToken = ResourceToken.InfoBrush + }, + new CoverViewDemoModel + { + ImgPath = "/HandyControlDemo;component/Resources/Img/Album/8.jpg", + BackgroundToken = ResourceToken.WarningBrush + }, + new CoverViewDemoModel + { + ImgPath = "/HandyControlDemo;component/Resources/Img/Album/9.jpg", + BackgroundToken = ResourceToken.PrimaryBrush + }, + new CoverViewDemoModel + { + ImgPath = "/HandyControlDemo;component/Resources/Img/Album/10.jpg", + BackgroundToken = ResourceToken.DangerBrush + } + }; + } + + internal List GetDemoInfo() + { + var infoList = new List(); + + var stream = Application.GetResourceStream(new Uri("Data/DemoInfo.json", UriKind.Relative))?.Stream; + if (stream == null) return infoList; + + string jsonStr; + using (var reader = new StreamReader(stream)) + { + jsonStr = reader.ReadToEnd(); + } + + var jsonObj = JsonConvert.DeserializeObject(jsonStr); + foreach (var item in jsonObj) + { + var titleKey = (string) item.title; + var title = titleKey; + List list = Convert2DemoItemList(item.demoItemList); + + var demoInfoModel = new DemoInfoModel + { + Key = titleKey, + Title = title, + DemoItemList = list, + SelectedIndex = (int) item.selectedIndex, + IsGroupEnabled = (bool) item.group }; - var domainName = LangProvider.Culture == null || LangProvider.Culture.Name.ToLower() == "zh-cn" - ? "handyorg" - : "ghost1372"; - return $"https://{domainName}.github.io/handycontrol/{key}/{demoItem.Name[0].ToString().ToLower()}{demoItem.Name.Substring(1)}"; + infoList.Add(demoInfoModel); } + + return infoList; } -} + + private List Convert2DemoItemList(dynamic list) + { + var resultList = new List(); + + foreach (var item in list) + { + var name = (string) item[0]; + string targetCtlName = item[1]; + string imageName = item[2]; + var isNew = !string.IsNullOrEmpty((string) item[3]); + var groupName = (string) item[4]; + if (string.IsNullOrEmpty(groupName)) + { + groupName = "Misc"; + } + + resultList.Add(new DemoItemModel + { + Name = name, + TargetCtlName = targetCtlName, + ImageName = $"../../Resources/Img/LeftMainContent/{imageName}.png", + IsNew = isNew, + GroupName = groupName + }); + } + + return resultList; + } + + public string GetDemoUrl(DemoInfoModel demoInfo, DemoItemModel demoItem) + { + var key = demoInfo.Key switch + { + "Styles" => "native_controls", + "Controls" => "extend_controls", + "Tools" => "tools", + _ => string.Empty + }; + + var domainName = LangProvider.Culture == null || LangProvider.Culture.Name.ToLower() == "zh-cn" + ? "handyorg" + : "ghost1372"; + return $"https://{domainName}.github.io/handycontrol/{key}/{demoItem.Name[0].ToString().ToLower()}{demoItem.Name.Substring(1)}"; + } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Tools/Converter/HatchBrushConverter.cs b/src/Shared/HandyControlDemo_Shared/Tools/Converter/HatchBrushConverter.cs index 978efe48..caf07363 100644 --- a/src/Shared/HandyControlDemo_Shared/Tools/Converter/HatchBrushConverter.cs +++ b/src/Shared/HandyControlDemo_Shared/Tools/Converter/HatchBrushConverter.cs @@ -5,29 +5,28 @@ using System.Windows.Media; using HandyControl.Data; using HandyControl.Tools; -namespace HandyControlDemo.Tools.Converter +namespace HandyControlDemo.Tools.Converter; + +public class HatchBrushConverter : IValueConverter { - public class HatchBrushConverter : IValueConverter + private readonly HatchBrushGenerator _brushGenerator; + + public HatchBrushConverter() { - private readonly HatchBrushGenerator _brushGenerator; - - public HatchBrushConverter() - { - _brushGenerator = new HatchBrushGenerator(); - } - - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - if (value is HatchStyle style) - { - return _brushGenerator.GetHatchBrush(style, ResourceHelper.GetResource(ResourceToken.DarkPrimaryColor), Colors.Transparent); - } - return Brushes.Transparent; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotSupportedException(); - } + _brushGenerator = new HatchBrushGenerator(); } -} + + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is HatchStyle style) + { + return _brushGenerator.GetHatchBrush(style, ResourceHelper.GetResource(ResourceToken.DarkPrimaryColor), Colors.Transparent); + } + return Brushes.Transparent; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotSupportedException(); + } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Tools/Converter/String2BrushConverter.cs b/src/Shared/HandyControlDemo_Shared/Tools/Converter/String2BrushConverter.cs index a6a66284..676807c9 100644 --- a/src/Shared/HandyControlDemo_Shared/Tools/Converter/String2BrushConverter.cs +++ b/src/Shared/HandyControlDemo_Shared/Tools/Converter/String2BrushConverter.cs @@ -4,18 +4,17 @@ using System.Windows.Data; using System.Windows.Media; using HandyControl.Tools; -namespace HandyControlDemo.Tools.Converter -{ - public class String2BrushConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - return value is string str ? ResourceHelper.GetResource(str) : default; - } +namespace HandyControlDemo.Tools.Converter; - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotSupportedException(); - } +public class String2BrushConverter : IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return value is string str ? ResourceHelper.GetResource(str) : default; } -} + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotSupportedException(); + } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Tools/Converter/StringRepeatConverter.cs b/src/Shared/HandyControlDemo_Shared/Tools/Converter/StringRepeatConverter.cs index 77ed023f..4a8db1cf 100644 --- a/src/Shared/HandyControlDemo_Shared/Tools/Converter/StringRepeatConverter.cs +++ b/src/Shared/HandyControlDemo_Shared/Tools/Converter/StringRepeatConverter.cs @@ -3,43 +3,42 @@ using System.Globalization; using System.Text; using System.Windows.Data; -namespace HandyControlDemo.Tools.Converter +namespace HandyControlDemo.Tools.Converter; + +public class StringRepeatConverter : IValueConverter { - public class StringRepeatConverter : IValueConverter + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + if (value is string strValue) { - if (value is string strValue) + var builder = new StringBuilder(); + int num; + if (parameter is string numStr) { - var builder = new StringBuilder(); - int num; - if (parameter is string numStr) - { - if (!int.TryParse(numStr, out num)) - { - return strValue; - } - } - else if (parameter is int intValue) - { - num = intValue; - } - else + if (!int.TryParse(numStr, out num)) { return strValue; } - for (var i = 0; i < num; i++) - { - builder.Append(strValue); - } - return builder.ToString(); } - return string.Empty; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - throw new NotSupportedException(); + else if (parameter is int intValue) + { + num = intValue; + } + else + { + return strValue; + } + for (var i = 0; i < num; i++) + { + builder.Append(strValue); + } + return builder.ToString(); } + return string.Empty; } -} + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotSupportedException(); + } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Tools/Extension/LangExtension.cs b/src/Shared/HandyControlDemo_Shared/Tools/Extension/LangExtension.cs index 00f8d96d..3722b133 100644 --- a/src/Shared/HandyControlDemo_Shared/Tools/Extension/LangExtension.cs +++ b/src/Shared/HandyControlDemo_Shared/Tools/Extension/LangExtension.cs @@ -1,12 +1,11 @@ using HandyControlDemo.Properties.Langs; -namespace HandyControlDemo.Tools.Extension +namespace HandyControlDemo.Tools.Extension; + +public class LangExtension : HandyControl.Tools.Extension.LangExtension { - public class LangExtension : HandyControl.Tools.Extension.LangExtension + public LangExtension() { - public LangExtension() - { - Source = LangProvider.Instance; - } + Source = LangProvider.Instance; } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Tools/Helper/AssemblyHelper.cs b/src/Shared/HandyControlDemo_Shared/Tools/Helper/AssemblyHelper.cs index b3921178..849d9111 100644 --- a/src/Shared/HandyControlDemo_Shared/Tools/Helper/AssemblyHelper.cs +++ b/src/Shared/HandyControlDemo_Shared/Tools/Helper/AssemblyHelper.cs @@ -1,37 +1,36 @@ using System; using System.Collections.Generic; -namespace HandyControlDemo.Tools +namespace HandyControlDemo.Tools; + +internal class AssemblyHelper { - internal class AssemblyHelper + private static readonly string NameSpaceStr = typeof(AssemblyHelper).Assembly.GetName().Name; + + private static readonly Dictionary CacheDic = new(); + + public static void Register(string name, object instance) => CacheDic[name] = instance; + + public static object ResolveByKey(string key) { - private static readonly string NameSpaceStr = typeof(AssemblyHelper).Assembly.GetName().Name; - - private static readonly Dictionary CacheDic = new(); - - public static void Register(string name, object instance) => CacheDic[name] = instance; - - public static object ResolveByKey(string key) + if (CacheDic.TryGetValue(key, out var value)) { - if (CacheDic.TryGetValue(key, out var value)) - { - return value; - } + return value; + } + return null; + } + + public static object CreateInternalInstance(string className) + { + try + { + var type = Type.GetType($"{NameSpaceStr}.{className}"); + return type == null ? null : Activator.CreateInstance(type); + } + catch + { return null; } - - public static object CreateInternalInstance(string className) - { - try - { - var type = Type.GetType($"{NameSpaceStr}.{className}"); - return type == null ? null : Activator.CreateInstance(type); - } - catch - { - return null; - } - } } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs b/src/Shared/HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs index 84bbed1c..adfccb0f 100644 --- a/src/Shared/HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs +++ b/src/Shared/HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs @@ -1,15 +1,15 @@ using System.Diagnostics; using System.Reflection; -namespace HandyControlDemo.Tools +namespace HandyControlDemo.Tools; + +internal class VersionHelper { - internal class VersionHelper + internal static string GetVersion() { - internal static string GetVersion() - { - var versionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location); + var versionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location); #if NET40 - var netVersion = "NET 40"; + var netVersion = "NET 40"; #elif NET45 var netVersion = "NET 45"; #elif NET451 @@ -39,10 +39,9 @@ namespace HandyControlDemo.Tools #elif NETCOREAPP3_1 var netVersion = "CORE 31"; #endif - return $"v {versionInfo.FileVersion} {netVersion}"; - } - - internal static string GetCopyright() => - FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location).LegalCopyright; + return $"v {versionInfo.FileVersion} {netVersion}"; } -} + + internal static string GetCopyright() => + FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location).LegalCopyright; +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Tools/Helper/Win32Helper.cs b/src/Shared/HandyControlDemo_Shared/Tools/Helper/Win32Helper.cs index c8929ae9..1b5b3ac6 100644 --- a/src/Shared/HandyControlDemo_Shared/Tools/Helper/Win32Helper.cs +++ b/src/Shared/HandyControlDemo_Shared/Tools/Helper/Win32Helper.cs @@ -1,14 +1,13 @@ using System; using System.Runtime.InteropServices; -namespace HandyControlDemo.Tools -{ - internal class Win32Helper - { - [DllImport("user32.dll", ExactSpelling = true, CharSet = CharSet.Auto)] - public static extern bool SetForegroundWindow(IntPtr hWnd); +namespace HandyControlDemo.Tools; - [DllImport("winmm.dll", EntryPoint = "mciSendString", CharSet = CharSet.Auto)] - public static extern int MciSendString(string lpstrCommand, string lpstrReturnString, int uReturnLength, int hwndCallback); - } -} +internal class Win32Helper +{ + [DllImport("user32.dll", ExactSpelling = true, CharSet = CharSet.Auto)] + public static extern bool SetForegroundWindow(IntPtr hWnd); + + [DllImport("winmm.dll", EntryPoint = "mciSendString", CharSet = CharSet.Auto)] + public static extern int MciSendString(string lpstrCommand, string lpstrReturnString, int uReturnLength, int hwndCallback); +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/Tools/HighlightingProvider.cs b/src/Shared/HandyControlDemo_Shared/Tools/HighlightingProvider.cs index 48770e36..9a6a519c 100644 --- a/src/Shared/HandyControlDemo_Shared/Tools/HighlightingProvider.cs +++ b/src/Shared/HandyControlDemo_Shared/Tools/HighlightingProvider.cs @@ -6,75 +6,74 @@ using HandyControl.Data; using ICSharpCode.AvalonEdit.Highlighting; using ICSharpCode.AvalonEdit.Highlighting.Xshd; -namespace HandyControlDemo.Tools +namespace HandyControlDemo.Tools; + +internal class HighlightingProvider { - internal class HighlightingProvider + public static HighlightingProvider Default = new Lazy(() => new HighlightingProvider()).Value; + + protected static readonly Lazy DefaultDefinition = new(() => HighlightingManager.Instance.GetDefinition("C#")); + + private static readonly Dictionary Providers = new(); + + protected Dictionary> Definition; + + public static void Register(SkinType skinType, HighlightingProvider provider) { - public static HighlightingProvider Default = new Lazy(() => new HighlightingProvider()).Value; - - protected static readonly Lazy DefaultDefinition = new(() => HighlightingManager.Instance.GetDefinition("C#")); - - private static readonly Dictionary Providers = new(); - - protected Dictionary> Definition; - - public static void Register(SkinType skinType, HighlightingProvider provider) - { - Providers[skinType] = provider ?? throw new ArgumentNullException(nameof(provider)); - provider.InitDefinitions(); - } - - public static IHighlightingDefinition GetDefinition(SkinType skinType, string name) - { - if (Providers.TryGetValue(skinType, out var provider)) - { - return provider.GetDefinition(name); - } - - return DefaultDefinition.Value; - } - - protected static IHighlightingDefinition LoadDefinition(string xshdName) - { - var streamResourceInfo = Application.GetResourceStream(new Uri($"pack://application:,,,/Resources/xshd/{xshdName}.xshd")); - if (streamResourceInfo == null) - { - return DefaultDefinition.Value; - } - - using var reader = new XmlTextReader(streamResourceInfo.Stream); - return HighlightingLoader.Load(reader, HighlightingManager.Instance); - } - - protected virtual IHighlightingDefinition GetDefinition(string name) - { - if (Definition.TryGetValue(name, out var definition)) - { - return definition.Value; - } - - return DefaultDefinition.Value; - } - - protected virtual void InitDefinitions() - { - Definition = new Dictionary> - { - ["XML"] = new(() => HighlightingManager.Instance.GetDefinition("XML")), - ["C#"] = new(() => DefaultDefinition.Value) - }; - } + Providers[skinType] = provider ?? throw new ArgumentNullException(nameof(provider)); + provider.InitDefinitions(); } - internal class HighlightingProviderDark : HighlightingProvider + public static IHighlightingDefinition GetDefinition(SkinType skinType, string name) { - protected override void InitDefinitions() + if (Providers.TryGetValue(skinType, out var provider)) { - Definition = new Dictionary> - { - ["XML"] = new(() => LoadDefinition("XML-Dark")), - ["C#"] = new(() => LoadDefinition("CSharp-Dark")), - }; + return provider.GetDefinition(name); } + + return DefaultDefinition.Value; + } + + protected static IHighlightingDefinition LoadDefinition(string xshdName) + { + var streamResourceInfo = Application.GetResourceStream(new Uri($"pack://application:,,,/Resources/xshd/{xshdName}.xshd")); + if (streamResourceInfo == null) + { + return DefaultDefinition.Value; + } + + using var reader = new XmlTextReader(streamResourceInfo.Stream); + return HighlightingLoader.Load(reader, HighlightingManager.Instance); + } + + protected virtual IHighlightingDefinition GetDefinition(string name) + { + if (Definition.TryGetValue(name, out var definition)) + { + return definition.Value; + } + + return DefaultDefinition.Value; + } + + protected virtual void InitDefinitions() + { + Definition = new Dictionary> + { + ["XML"] = new(() => HighlightingManager.Instance.GetDefinition("XML")), + ["C#"] = new(() => DefaultDefinition.Value) + }; } } + +internal class HighlightingProviderDark : HighlightingProvider +{ + protected override void InitDefinitions() + { + Definition = new Dictionary> + { + ["XML"] = new(() => LoadDefinition("XML-Dark")), + ["C#"] = new(() => LoadDefinition("CSharp-Dark")), + }; + } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/Avatar.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/Avatar.xaml.cs index 3ee1da1e..6309f694 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/Avatar.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/Avatar.xaml.cs @@ -1,40 +1,39 @@ using System.Windows; using System.Windows.Media.Imaging; -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class Avatar { - public partial class Avatar + public Avatar() { - public Avatar() - { - InitializeComponent(); - } - - public static readonly DependencyProperty SourceProperty = DependencyProperty.Register( - "Source", typeof(BitmapFrame), typeof(Avatar), new PropertyMetadata(default(BitmapFrame))); - - public BitmapFrame Source - { - get => (BitmapFrame) GetValue(SourceProperty); - set => SetValue(SourceProperty, value); - } - - public static readonly DependencyProperty UserNameProperty = DependencyProperty.Register( - "DisplayName", typeof(string), typeof(Avatar), new PropertyMetadata(default(string))); - - public string DisplayName - { - get => (string) GetValue(UserNameProperty); - set => SetValue(UserNameProperty, value); - } - - public static readonly DependencyProperty LinkProperty = DependencyProperty.Register( - "Link", typeof(string), typeof(Avatar), new PropertyMetadata(default(string))); - - public string Link - { - get => (string) GetValue(LinkProperty); - set => SetValue(LinkProperty, value); - } + InitializeComponent(); } -} + + public static readonly DependencyProperty SourceProperty = DependencyProperty.Register( + "Source", typeof(BitmapFrame), typeof(Avatar), new PropertyMetadata(default(BitmapFrame))); + + public BitmapFrame Source + { + get => (BitmapFrame) GetValue(SourceProperty); + set => SetValue(SourceProperty, value); + } + + public static readonly DependencyProperty UserNameProperty = DependencyProperty.Register( + "DisplayName", typeof(string), typeof(Avatar), new PropertyMetadata(default(string))); + + public string DisplayName + { + get => (string) GetValue(UserNameProperty); + set => SetValue(UserNameProperty, value); + } + + public static readonly DependencyProperty LinkProperty = DependencyProperty.Register( + "Link", typeof(string), typeof(Avatar), new PropertyMetadata(default(string))); + + public string Link + { + get => (string) GetValue(LinkProperty); + set => SetValue(LinkProperty, value); + } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/ChatBox.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/ChatBox.xaml.cs index 86df6eef..4507049e 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/ChatBox.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/ChatBox.xaml.cs @@ -1,22 +1,21 @@ using System.Windows.Controls; using HandyControl.Tools; -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class ChatBox { - public partial class ChatBox + private ScrollViewer _scrollViewer; + + public ChatBox() { - private ScrollViewer _scrollViewer; - - public ChatBox() - { - InitializeComponent(); - ListBoxChat.ItemContainerGenerator.ItemsChanged += ItemContainerGenerator_ItemsChanged; - } - - private void ItemContainerGenerator_ItemsChanged(object sender, System.Windows.Controls.Primitives.ItemsChangedEventArgs e) - { - _scrollViewer ??= VisualHelper.GetChild(ListBoxChat); - _scrollViewer?.ScrollToBottom(); - } + InitializeComponent(); + ListBoxChat.ItemContainerGenerator.ItemsChanged += ItemContainerGenerator_ItemsChanged; } -} + + private void ItemContainerGenerator_ItemsChanged(object sender, System.Windows.Controls.Primitives.ItemsChangedEventArgs e) + { + _scrollViewer ??= VisualHelper.GetChild(ListBoxChat); + _scrollViewer?.ScrollToBottom(); + } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/GeometryItem.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/GeometryItem.xaml.cs index ae6da16c..d7fe1cf0 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/GeometryItem.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/GeometryItem.xaml.cs @@ -1,19 +1,18 @@ using System.Windows; using HandyControlDemo.Data; -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class GeometryItem { - public partial class GeometryItem + public GeometryItem() => InitializeComponent(); + + public static readonly DependencyProperty InfoProperty = DependencyProperty.Register( + "Info", typeof(GeometryItemModel), typeof(GeometryItem), new PropertyMetadata(default(GeometryItemModel))); + + public GeometryItemModel Info { - public GeometryItem() => InitializeComponent(); - - public static readonly DependencyProperty InfoProperty = DependencyProperty.Register( - "Info", typeof(GeometryItemModel), typeof(GeometryItem), new PropertyMetadata(default(GeometryItemModel))); - - public GeometryItemModel Info - { - get => (GeometryItemModel) GetValue(InfoProperty); - set => SetValue(InfoProperty, value); - } + get => (GeometryItemModel) GetValue(InfoProperty); + set => SetValue(InfoProperty, value); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/IFull.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/IFull.cs index 8d7e9aa4..781f1960 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/IFull.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/IFull.cs @@ -1,7 +1,6 @@ -namespace HandyControlDemo.UserControl -{ - internal interface IFull - { +namespace HandyControlDemo.UserControl; - } -} +internal interface IFull +{ + +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/InteractiveDialog.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/InteractiveDialog.xaml.cs index 393fa350..e63fb04f 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/InteractiveDialog.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/InteractiveDialog.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class InteractiveDialog { - public partial class InteractiveDialog + public InteractiveDialog() { - public InteractiveDialog() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/TextDialog.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/TextDialog.xaml.cs index 5977cf29..4a0fb073 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/TextDialog.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/TextDialog.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class TextDialog { - public partial class TextDialog + public TextDialog() { - public TextDialog() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/TextDialogWithTimer.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/TextDialogWithTimer.xaml.cs index 73765ea6..c2dbbe6a 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Basic/TextDialogWithTimer.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Basic/TextDialogWithTimer.xaml.cs @@ -2,23 +2,22 @@ using System.Windows.Controls.Primitives; using HandyControl.Tools; -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class TextDialogWithTimer { - public partial class TextDialogWithTimer + public TextDialogWithTimer() { - public TextDialogWithTimer() - { - InitializeComponent(); + InitializeComponent(); - var animation = AnimationHelper.CreateAnimation(100, 5000); - animation.EasingFunction = null; - animation.Completed += Animation_Completed; - ProgressBarTimer.BeginAnimation(RangeBase.ValueProperty, animation); - } - - private void Animation_Completed(object sender, EventArgs e) - { - ButtonClose.Command.Execute(null); - } + var animation = AnimationHelper.CreateAnimation(100, 5000); + animation.EasingFunction = null; + animation.Completed += Animation_Completed; + ProgressBarTimer.BeginAnimation(RangeBase.ValueProperty, animation); } -} + + private void Animation_Completed(object sender, EventArgs e) + { + ButtonClose.Command.Execute(null); + } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/AnimationPathDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/AnimationPathDemoCtl.xaml.cs index e24baa6e..c21e1e0f 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/AnimationPathDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/AnimationPathDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class AnimationPathDemoCtl { - public partial class AnimationPathDemoCtl + public AnimationPathDemoCtl() { - public AnimationPathDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/AutoCompleteTextBoxDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/AutoCompleteTextBoxDemoCtl.xaml.cs index 1baf6628..2d7c0b57 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/AutoCompleteTextBoxDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/AutoCompleteTextBoxDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class AutoCompleteTextBoxDemoCtl { - public partial class AutoCompleteTextBoxDemoCtl + public AutoCompleteTextBoxDemoCtl() { - public AutoCompleteTextBoxDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/BadgeDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/BadgeDemoCtl.xaml.cs index 7c745584..29d86bba 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/BadgeDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/BadgeDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class BadgeDemoCtl { - public partial class BadgeDemoCtl + public BadgeDemoCtl() { - public BadgeDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ButtonGroupDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ButtonGroupDemoCtl.xaml.cs index eb922b4c..464b40f5 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ButtonGroupDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ButtonGroupDemoCtl.xaml.cs @@ -1,40 +1,39 @@ using System.Windows; using System.Windows.Media.Imaging; -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class ButtonGroupDemoCtl { - public partial class ButtonGroupDemoCtl + public ButtonGroupDemoCtl() { - public ButtonGroupDemoCtl() - { - InitializeComponent(); - } - - public static readonly DependencyProperty SourceProperty = DependencyProperty.Register( - "Source", typeof(BitmapFrame), typeof(Avatar), new PropertyMetadata(default(BitmapFrame))); - - public BitmapFrame Source - { - get => (BitmapFrame) GetValue(SourceProperty); - set => SetValue(SourceProperty, value); - } - - public static readonly DependencyProperty UserNameProperty = DependencyProperty.Register( - "DisplayName", typeof(string), typeof(Avatar), new PropertyMetadata(default(string))); - - public string DisplayName - { - get => (string) GetValue(UserNameProperty); - set => SetValue(UserNameProperty, value); - } - - public static readonly DependencyProperty LinkProperty = DependencyProperty.Register( - "Link", typeof(string), typeof(Avatar), new PropertyMetadata(default(string))); - - public string Link - { - get => (string) GetValue(LinkProperty); - set => SetValue(LinkProperty, value); - } + InitializeComponent(); } -} + + public static readonly DependencyProperty SourceProperty = DependencyProperty.Register( + "Source", typeof(BitmapFrame), typeof(Avatar), new PropertyMetadata(default(BitmapFrame))); + + public BitmapFrame Source + { + get => (BitmapFrame) GetValue(SourceProperty); + set => SetValue(SourceProperty, value); + } + + public static readonly DependencyProperty UserNameProperty = DependencyProperty.Register( + "DisplayName", typeof(string), typeof(Avatar), new PropertyMetadata(default(string))); + + public string DisplayName + { + get => (string) GetValue(UserNameProperty); + set => SetValue(UserNameProperty, value); + } + + public static readonly DependencyProperty LinkProperty = DependencyProperty.Register( + "Link", typeof(string), typeof(Avatar), new PropertyMetadata(default(string))); + + public string Link + { + get => (string) GetValue(LinkProperty); + set => SetValue(LinkProperty, value); + } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CalendarWithClockDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CalendarWithClockDemoCtl.xaml.cs index ec65eb73..5d98c916 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CalendarWithClockDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CalendarWithClockDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class CalendarWithClockDemoCtl { - public partial class CalendarWithClockDemoCtl + public CalendarWithClockDemoCtl() { - public CalendarWithClockDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CardDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CardDemoCtl.xaml.cs index bff18126..e11d66c0 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CardDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CardDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class CardDemoCtl { - public partial class CardDemoCtl + public CardDemoCtl() { - public CardDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CarouselDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CarouselDemoCtl.xaml.cs index 51545d68..f4b283c6 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CarouselDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CarouselDemoCtl.xaml.cs @@ -1,11 +1,10 @@  -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class CarouselDemoCtl { - public partial class CarouselDemoCtl + public CarouselDemoCtl() { - public CarouselDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ChatBubbleDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ChatBubbleDemoCtl.xaml.cs index 6c68a1de..faae0b96 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ChatBubbleDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ChatBubbleDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class ChatBubbleDemoCtl { - public partial class ChatBubbleDemoCtl + public ChatBubbleDemoCtl() { - public ChatBubbleDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CheckComboBoxDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CheckComboBoxDemoCtl.xaml.cs index 44bbec67..02b162dc 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CheckComboBoxDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CheckComboBoxDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class CheckComboBoxDemoCtl { - public partial class CheckComboBoxDemoCtl + public CheckComboBoxDemoCtl() { - public CheckComboBoxDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CirclePanelDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CirclePanelDemoCtl.xaml.cs index 62bee1d5..86f3e060 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CirclePanelDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CirclePanelDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class CirclePanelDemoCtl { - public partial class CirclePanelDemoCtl + public CirclePanelDemoCtl() { - public CirclePanelDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ClockDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ClockDemoCtl.xaml.cs index 2603a663..4029c869 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ClockDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ClockDemoCtl.xaml.cs @@ -1,11 +1,10 @@  -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class ClockDemoCtl { - public partial class ClockDemoCtl + public ClockDemoCtl() { - public ClockDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ColorPickerDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ColorPickerDemoCtl.xaml.cs index 16863a27..cdaaa8de 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ColorPickerDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ColorPickerDemoCtl.xaml.cs @@ -1,11 +1,10 @@  -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class ColorPickerDemoCtl { - public partial class ColorPickerDemoCtl + public ColorPickerDemoCtl() { - public ColorPickerDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ComboBoxDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ComboBoxDemoCtl.xaml.cs index 95f82acf..732861b7 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ComboBoxDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ComboBoxDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class ComboBoxDemoCtl { - public partial class ComboBoxDemoCtl + public ComboBoxDemoCtl() { - public ComboBoxDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CompareSliderDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CompareSliderDemoCtl.xaml.cs index 4ae9ffa1..6f95f6a0 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CompareSliderDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CompareSliderDemoCtl.xaml.cs @@ -1,11 +1,10 @@  -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class CompareSliderDemoCtl { - public partial class CompareSliderDemoCtl + public CompareSliderDemoCtl() { - public CompareSliderDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CoverFlowDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CoverFlowDemoCtl.xaml.cs index b482538a..055c0647 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CoverFlowDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CoverFlowDemoCtl.xaml.cs @@ -1,28 +1,27 @@ using System; -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class CoverFlowDemoCtl { - public partial class CoverFlowDemoCtl + public CoverFlowDemoCtl() { - public CoverFlowDemoCtl() + InitializeComponent(); + + CoverFlowMain.AddRange(new[] { - InitializeComponent(); + new Uri(@"pack://application:,,,/Resources/Img/Album/1.jpg"), + new Uri(@"pack://application:,,,/Resources/Img/Album/2.jpg"), + new Uri(@"pack://application:,,,/Resources/Img/Album/3.jpg"), + new Uri(@"pack://application:,,,/Resources/Img/Album/4.jpg"), + new Uri(@"pack://application:,,,/Resources/Img/Album/5.jpg"), + new Uri(@"pack://application:,,,/Resources/Img/Album/6.jpg"), + new Uri(@"pack://application:,,,/Resources/Img/Album/7.jpg"), + new Uri(@"pack://application:,,,/Resources/Img/Album/8.jpg"), + new Uri(@"pack://application:,,,/Resources/Img/Album/9.jpg"), + new Uri(@"pack://application:,,,/Resources/Img/Album/10.jpg") + }); - CoverFlowMain.AddRange(new[] - { - new Uri(@"pack://application:,,,/Resources/Img/Album/1.jpg"), - new Uri(@"pack://application:,,,/Resources/Img/Album/2.jpg"), - new Uri(@"pack://application:,,,/Resources/Img/Album/3.jpg"), - new Uri(@"pack://application:,,,/Resources/Img/Album/4.jpg"), - new Uri(@"pack://application:,,,/Resources/Img/Album/5.jpg"), - new Uri(@"pack://application:,,,/Resources/Img/Album/6.jpg"), - new Uri(@"pack://application:,,,/Resources/Img/Album/7.jpg"), - new Uri(@"pack://application:,,,/Resources/Img/Album/8.jpg"), - new Uri(@"pack://application:,,,/Resources/Img/Album/9.jpg"), - new Uri(@"pack://application:,,,/Resources/Img/Album/10.jpg") - }); - - CoverFlowMain.PageIndex = 2; - } + CoverFlowMain.PageIndex = 2; } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CoverViewDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CoverViewDemoCtl.xaml.cs index 32f1adf9..cd236e23 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CoverViewDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CoverViewDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class CoverViewDemoCtl { - public partial class CoverViewDemoCtl + public CoverViewDemoCtl() { - public CoverViewDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DatePickerDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DatePickerDemoCtl.xaml.cs index a7f7a755..92c3311d 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DatePickerDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DatePickerDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class DatePickerDemoCtl { - public partial class DatePickerDemoCtl + public DatePickerDemoCtl() { - public DatePickerDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DateTimePickerDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DateTimePickerDemoCtl.xaml.cs index 2ddac486..7a1158ff 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DateTimePickerDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DateTimePickerDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class DateTimePickerDemoCtl { - public partial class DateTimePickerDemoCtl + public DateTimePickerDemoCtl() { - public DateTimePickerDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DialogDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DialogDemoCtl.xaml.cs index a67e46c5..1f2bdab3 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DialogDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DialogDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class DialogDemoCtl { - public partial class DialogDemoCtl + public DialogDemoCtl() { - public DialogDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DividerDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DividerDemoCtl.xaml.cs index 7cd8f16f..80858209 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DividerDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DividerDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class DividerDemoCtl { - public partial class DividerDemoCtl + public DividerDemoCtl() { - public DividerDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DrawerDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DrawerDemoCtl.xaml.cs index 81259d96..a465d301 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DrawerDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DrawerDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class DrawerDemoCtl { - public partial class DrawerDemoCtl + public DrawerDemoCtl() { - public DrawerDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ElementGroupDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ElementGroupDemoCtl.xaml.cs index e18109c3..cdcaeee8 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ElementGroupDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ElementGroupDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class ElementGroupDemoCtl { - public partial class ElementGroupDemoCtl + public ElementGroupDemoCtl() { - public ElementGroupDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/FlexPanelDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/FlexPanelDemoCtl.xaml.cs index d9089da2..0108f042 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/FlexPanelDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/FlexPanelDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class FlexPanelDemoCtl : IFull { - public partial class FlexPanelDemoCtl : IFull + public FlexPanelDemoCtl() { - public FlexPanelDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/FlipClockDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/FlipClockDemoCtl.xaml.cs index 01474c10..f551b19a 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/FlipClockDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/FlipClockDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class FlipClockDemoCtl { - public partial class FlipClockDemoCtl + public FlipClockDemoCtl() { - public FlipClockDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/FloatingBlockDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/FloatingBlockDemoCtl.xaml.cs index f7cbc776..2483dd02 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/FloatingBlockDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/FloatingBlockDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class FloatingBlockDemoCtl { - public partial class FloatingBlockDemoCtl + public FloatingBlockDemoCtl() { - public FloatingBlockDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GifImageDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GifImageDemoCtl.xaml.cs index 315e0296..11cd210c 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GifImageDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GifImageDemoCtl.xaml.cs @@ -1,17 +1,16 @@ using System; -namespace HandyControlDemo.UserControl -{ - public partial class GifImageDemoCtl : IDisposable - { - public GifImageDemoCtl() - { - InitializeComponent(); - } +namespace HandyControlDemo.UserControl; - public void Dispose() - { - GifImageMain.Dispose(); - } +public partial class GifImageDemoCtl : IDisposable +{ + public GifImageDemoCtl() + { + InitializeComponent(); } -} + + public void Dispose() + { + GifImageMain.Dispose(); + } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GotoTopDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GotoTopDemoCtl.xaml.cs index 3626a1df..fb97c5b1 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GotoTopDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GotoTopDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class GotoTopDemoCtl { - public partial class GotoTopDemoCtl + public GotoTopDemoCtl() { - public GotoTopDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GravatarDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GravatarDemoCtl.xaml.cs index 3a27748e..2c8e5957 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GravatarDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GravatarDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class GravatarDemoCtl { - public partial class GravatarDemoCtl + public GravatarDemoCtl() { - public GravatarDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GridDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GridDemoCtl.xaml.cs index f8443e4e..a19b3137 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GridDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GridDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class GridDemoCtl : IFull { - public partial class GridDemoCtl : IFull + public GridDemoCtl() { - public GridDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GrowlDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GrowlDemoCtl.xaml.cs index c3474865..3dcb6714 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GrowlDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/GrowlDemoCtl.xaml.cs @@ -1,11 +1,10 @@  -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class GrowlDemoCtl { - public partial class GrowlDemoCtl + public GrowlDemoCtl() { - public GrowlDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/HoneycombPanelDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/HoneycombPanelDemoCtl.xaml.cs index 13c4d23e..d52f881d 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/HoneycombPanelDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/HoneycombPanelDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class HoneycombPanelDemoCtl { - public partial class HoneycombPanelDemoCtl + public HoneycombPanelDemoCtl() { - public HoneycombPanelDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ImageBlockDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ImageBlockDemoCtl.xaml.cs index abf2962a..62ee9dc0 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ImageBlockDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ImageBlockDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class ImageBlockDemoCtl { - public partial class ImageBlockDemoCtl + public ImageBlockDemoCtl() { - public ImageBlockDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ImageBrowserDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ImageBrowserDemoCtl.xaml.cs index da51a2c1..50c047d6 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ImageBrowserDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ImageBrowserDemoCtl.xaml.cs @@ -1,11 +1,10 @@  -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class ImageBrowserDemoCtl { - public partial class ImageBrowserDemoCtl + public ImageBrowserDemoCtl() { - public ImageBrowserDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ImageSelectorDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ImageSelectorDemoCtl.xaml.cs index b71a7746..f2a4c8ee 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ImageSelectorDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ImageSelectorDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class ImageSelectorDemoCtl { - public partial class ImageSelectorDemoCtl + public ImageSelectorDemoCtl() { - public ImageSelectorDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/LoadingDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/LoadingDemoCtl.xaml.cs index 005ed41a..7e36a7d5 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/LoadingDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/LoadingDemoCtl.xaml.cs @@ -1,11 +1,10 @@  -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class LoadingDemoCtl { - public partial class LoadingDemoCtl + public LoadingDemoCtl() { - public LoadingDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/MagnifierDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/MagnifierDemoCtl.xaml.cs index a09d3502..ddbf7a80 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/MagnifierDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/MagnifierDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class MagnifierDemoCtl { - public partial class MagnifierDemoCtl + public MagnifierDemoCtl() { - public MagnifierDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NotificationDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NotificationDemoCtl.xaml.cs index 4a86ef88..8142824e 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NotificationDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NotificationDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class NotificationDemoCtl { - public partial class NotificationDemoCtl + public NotificationDemoCtl() { - public NotificationDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NotifyIconDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NotifyIconDemoCtl.xaml.cs index 402408dd..cd461a9b 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NotifyIconDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NotifyIconDemoCtl.xaml.cs @@ -2,20 +2,19 @@ using HandyControlDemo.Tools; using HandyControlDemo.ViewModel; -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class NotifyIconDemoCtl { - public partial class NotifyIconDemoCtl + public NotifyIconDemoCtl() { - public NotifyIconDemoCtl() - { - InitializeComponent(); + InitializeComponent(); - AssemblyHelper.Register(nameof(NotifyIconDemoCtl), this); - Unloaded += NotifyIconDemoCtl_Unloaded; - } - - private void NotifyIconDemoCtl_Unloaded(object sender, RoutedEventArgs e) => ViewModelLocator.Instance.NotifyIconDemo.Cleanup(); - - private void ButtonPush_OnClick(object sender, RoutedEventArgs e) => NotifyIconContextContent.CloseContextControl(); + AssemblyHelper.Register(nameof(NotifyIconDemoCtl), this); + Unloaded += NotifyIconDemoCtl_Unloaded; } -} + + private void NotifyIconDemoCtl_Unloaded(object sender, RoutedEventArgs e) => ViewModelLocator.Instance.NotifyIconDemo.Cleanup(); + + private void ButtonPush_OnClick(object sender, RoutedEventArgs e) => NotifyIconContextContent.CloseContextControl(); +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NumericUpDownDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NumericUpDownDemoCtl.xaml.cs index 8e966a21..6e8097bd 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NumericUpDownDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NumericUpDownDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class NumericUpDownDemoCtl { - public partial class NumericUpDownDemoCtl + public NumericUpDownDemoCtl() { - public NumericUpDownDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/OutlineTextDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/OutlineTextDemoCtl.xaml.cs index 1e637136..a4afac74 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/OutlineTextDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/OutlineTextDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class OutlineTextDemoCtl { - public partial class OutlineTextDemoCtl + public OutlineTextDemoCtl() { - public OutlineTextDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PaginationDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PaginationDemoCtl.xaml.cs index 054499d8..43280026 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PaginationDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PaginationDemoCtl.xaml.cs @@ -1,11 +1,10 @@  -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class PaginationDemoCtl { - public partial class PaginationDemoCtl + public PaginationDemoCtl() { - public PaginationDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PasswordBoxDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PasswordBoxDemoCtl.xaml.cs index 8e750253..3c30f019 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PasswordBoxDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PasswordBoxDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class PasswordBoxDemoCtl { - public partial class PasswordBoxDemoCtl + public PasswordBoxDemoCtl() { - public PasswordBoxDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PinBoxDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PinBoxDemoCtl.xaml.cs index 02c0ca3a..8d367028 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PinBoxDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PinBoxDemoCtl.xaml.cs @@ -1,21 +1,20 @@ using System.Windows; using HandyControl.Controls; -namespace HandyControlDemo.UserControl -{ - public partial class PinBoxDemoCtl - { - public PinBoxDemoCtl() - { - InitializeComponent(); - } +namespace HandyControlDemo.UserControl; - private void PinBox_OnCompleted(object sender, RoutedEventArgs e) +public partial class PinBoxDemoCtl +{ + public PinBoxDemoCtl() + { + InitializeComponent(); + } + + private void PinBox_OnCompleted(object sender, RoutedEventArgs e) + { + if (e.OriginalSource is PinBox pinBox) { - if (e.OriginalSource is PinBox pinBox) - { - Growl.Info(pinBox.Password); - } + Growl.Info(pinBox.Password); } } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PoptipDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PoptipDemoCtl.xaml.cs index 8daa08f5..3ae529d7 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PoptipDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PoptipDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class PoptipDemoCtl { - public partial class PoptipDemoCtl + public PoptipDemoCtl() { - public PoptipDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PreviewSliderDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PreviewSliderDemoCtl.xaml.cs index 9869b2ca..c7de6e22 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PreviewSliderDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PreviewSliderDemoCtl.xaml.cs @@ -1,11 +1,10 @@  -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class PreviewSliderDemoCtl { - public partial class PreviewSliderDemoCtl + public PreviewSliderDemoCtl() { - public PreviewSliderDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ProgressBarDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ProgressBarDemoCtl.xaml.cs index eb096c94..8e63b600 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ProgressBarDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ProgressBarDemoCtl.xaml.cs @@ -1,11 +1,10 @@  -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class ProgressBarDemoCtl { - public partial class ProgressBarDemoCtl + public ProgressBarDemoCtl() { - public ProgressBarDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ProgressButtonDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ProgressButtonDemoCtl.xaml.cs index f44f7110..1db731a7 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ProgressButtonDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ProgressButtonDemoCtl.xaml.cs @@ -2,64 +2,63 @@ using System.Windows; using System.Windows.Threading; -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class ProgressButtonDemoCtl { - public partial class ProgressButtonDemoCtl + public static readonly DependencyProperty ProgressProperty = DependencyProperty.Register( + "Progress", typeof(int), typeof(ProgressButtonDemoCtl), new PropertyMetadata(default(int))); + + public int Progress { - public static readonly DependencyProperty ProgressProperty = DependencyProperty.Register( - "Progress", typeof(int), typeof(ProgressButtonDemoCtl), new PropertyMetadata(default(int))); + get => (int) GetValue(ProgressProperty); + set => SetValue(ProgressProperty, value); + } - public int Progress + public static readonly DependencyProperty IsUploadingProperty = DependencyProperty.Register( + "IsUploading", typeof(bool), typeof(ProgressButtonDemoCtl), new PropertyMetadata(default(bool))); + + public bool IsUploading + { + get => (bool) GetValue(IsUploadingProperty); + set => SetValue(IsUploadingProperty, value); + } + + private readonly DispatcherTimer _timer; + + public ProgressButtonDemoCtl() + { + InitializeComponent(); + + DataContext = this; + + _timer = new DispatcherTimer { - get => (int) GetValue(ProgressProperty); - set => SetValue(ProgressProperty, value); - } + Interval = TimeSpan.FromMilliseconds(200) + }; + _timer.Tick += Timer_Tick; + } - public static readonly DependencyProperty IsUploadingProperty = DependencyProperty.Register( - "IsUploading", typeof(bool), typeof(ProgressButtonDemoCtl), new PropertyMetadata(default(bool))); - - public bool IsUploading + private void Timer_Tick(object sender, EventArgs e) + { + Progress++; + if (Progress == 100) { - get => (bool) GetValue(IsUploadingProperty); - set => SetValue(IsUploadingProperty, value); - } - - private readonly DispatcherTimer _timer; - - public ProgressButtonDemoCtl() - { - InitializeComponent(); - - DataContext = this; - - _timer = new DispatcherTimer - { - Interval = TimeSpan.FromMilliseconds(200) - }; - _timer.Tick += Timer_Tick; - } - - private void Timer_Tick(object sender, EventArgs e) - { - Progress++; - if (Progress == 100) - { - Progress = 0; - _timer.Stop(); - IsUploading = false; - } - } - - private void ButtonProgress_OnClick(object sender, RoutedEventArgs e) - { - if (_timer.IsEnabled) - { - _timer.Stop(); - } - else - { - _timer.Start(); - } + Progress = 0; + _timer.Stop(); + IsUploading = false; } } -} + + private void ButtonProgress_OnClick(object sender, RoutedEventArgs e) + { + if (_timer.IsEnabled) + { + _timer.Stop(); + } + else + { + _timer.Start(); + } + } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PropertyGridDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PropertyGridDemoCtl.xaml.cs index 54d15322..bfc235ac 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PropertyGridDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PropertyGridDemoCtl.xaml.cs @@ -1,31 +1,30 @@ using System.Windows; using HandyControlDemo.Data; -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class PropertyGridDemoCtl { - public partial class PropertyGridDemoCtl + public PropertyGridDemoCtl() { - public PropertyGridDemoCtl() + InitializeComponent(); + + DemoModel = new PropertyGridDemoModel { - InitializeComponent(); - - DemoModel = new PropertyGridDemoModel - { - String = "TestString", - Enum = Gender.Female, - Boolean = true, - Integer = 98, - VerticalAlignment = VerticalAlignment.Stretch - }; - } - - public static readonly DependencyProperty DemoModelProperty = DependencyProperty.Register( - "DemoModel", typeof(PropertyGridDemoModel), typeof(PropertyGridDemoCtl), new PropertyMetadata(default(PropertyGridDemoModel))); - - public PropertyGridDemoModel DemoModel - { - get => (PropertyGridDemoModel) GetValue(DemoModelProperty); - set => SetValue(DemoModelProperty, value); - } + String = "TestString", + Enum = Gender.Female, + Boolean = true, + Integer = 98, + VerticalAlignment = VerticalAlignment.Stretch + }; } -} + + public static readonly DependencyProperty DemoModelProperty = DependencyProperty.Register( + "DemoModel", typeof(PropertyGridDemoModel), typeof(PropertyGridDemoCtl), new PropertyMetadata(default(PropertyGridDemoModel))); + + public PropertyGridDemoModel DemoModel + { + get => (PropertyGridDemoModel) GetValue(DemoModelProperty); + set => SetValue(DemoModelProperty, value); + } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/RangeSliderDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/RangeSliderDemoCtl.xaml.cs index cf953706..dfb64cc0 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/RangeSliderDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/RangeSliderDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class RangeSliderDemoCtl { - public partial class RangeSliderDemoCtl + public RangeSliderDemoCtl() { - public RangeSliderDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/RateDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/RateDemoCtl.xaml.cs index 5f5c2bb6..17770b5a 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/RateDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/RateDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class RateDemoCtl { - public partial class RateDemoCtl + public RateDemoCtl() { - public RateDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/RelativePanelDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/RelativePanelDemoCtl.xaml.cs index 747c9b57..c905890f 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/RelativePanelDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/RelativePanelDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class RelativePanelDemoCtl { - public partial class RelativePanelDemoCtl + public RelativePanelDemoCtl() { - public RelativePanelDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/RunningBlockDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/RunningBlockDemoCtl.xaml.cs index a115d149..1a7e1291 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/RunningBlockDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/RunningBlockDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class RunningBlockDemoCtl { - public partial class RunningBlockDemoCtl + public RunningBlockDemoCtl() { - public RunningBlockDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ScreenshotDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ScreenshotDemoCtl.xaml.cs index 7f237020..107719b8 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ScreenshotDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ScreenshotDemoCtl.xaml.cs @@ -5,29 +5,28 @@ using System.Windows.Media; using HandyControl.Controls; using HandyControl.Data; -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class ScreenshotDemoCtl : IDisposable { - public partial class ScreenshotDemoCtl : IDisposable + public ScreenshotDemoCtl() { - public ScreenshotDemoCtl() - { - InitializeComponent(); - Screenshot.Snapped += Screenshot_Snapped; - } - - private void Screenshot_Snapped(object sender, FunctionEventArgs e) - { - new HandyControl.Controls.Window - { - Content = new Image - { - Source = e.Info, - Stretch = Stretch.None - }, - WindowStartupLocation = WindowStartupLocation.CenterScreen - }.ShowDialog(); - } - - public void Dispose() => Screenshot.Snapped -= Screenshot_Snapped; + InitializeComponent(); + Screenshot.Snapped += Screenshot_Snapped; } -} + + private void Screenshot_Snapped(object sender, FunctionEventArgs e) + { + new HandyControl.Controls.Window + { + Content = new Image + { + Source = e.Info, + Stretch = Stretch.None + }, + WindowStartupLocation = WindowStartupLocation.CenterScreen + }.ShowDialog(); + } + + public void Dispose() => Screenshot.Snapped -= Screenshot_Snapped; +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ScrollViewerDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ScrollViewerDemoCtl.xaml.cs index 56df29a7..8c43ec1f 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ScrollViewerDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ScrollViewerDemoCtl.xaml.cs @@ -1,11 +1,10 @@  -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class ScrollViewerDemoCtl { - public partial class ScrollViewerDemoCtl + public ScrollViewerDemoCtl() { - public ScrollViewerDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SearchBarDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SearchBarDemoCtl.xaml.cs index 0375fd53..ec99efd4 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SearchBarDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SearchBarDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class SearchBarDemoCtl { - public partial class SearchBarDemoCtl + public SearchBarDemoCtl() { - public SearchBarDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ShieldDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ShieldDemoCtl.xaml.cs index 6cfbc669..04c7a55e 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ShieldDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ShieldDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class ShieldDemoCtl { - public partial class ShieldDemoCtl + public ShieldDemoCtl() { - public ShieldDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SideMenuDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SideMenuDemoCtl.xaml.cs index 021ff249..7283c25e 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SideMenuDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SideMenuDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class SideMenuDemoCtl { - public partial class SideMenuDemoCtl + public SideMenuDemoCtl() { - public SideMenuDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SplitButtonDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SplitButtonDemoCtl.xaml.cs index 6c369070..b5f7011d 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SplitButtonDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SplitButtonDemoCtl.xaml.cs @@ -1,17 +1,16 @@ using System.Windows; -namespace HandyControlDemo.UserControl -{ - public partial class SplitButtonDemoCtl - { - public SplitButtonDemoCtl() - { - InitializeComponent(); - } +namespace HandyControlDemo.UserControl; - private void ButtonBase_OnClick(object sender, RoutedEventArgs e) - { - MessageBox.Show("123"); - } +public partial class SplitButtonDemoCtl +{ + public SplitButtonDemoCtl() + { + InitializeComponent(); } -} + + private void ButtonBase_OnClick(object sender, RoutedEventArgs e) + { + MessageBox.Show("123"); + } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SpriteDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SpriteDemoCtl.xaml.cs index fa59e94e..607e5cf3 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SpriteDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SpriteDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class SpriteDemoCtl { - public partial class SpriteDemoCtl + public SpriteDemoCtl() { - public SpriteDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/StepBarDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/StepBarDemoCtl.xaml.cs index 991bab9b..d6305143 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/StepBarDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/StepBarDemoCtl.xaml.cs @@ -1,11 +1,10 @@  -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class StepBarDemoCtl { - public partial class StepBarDemoCtl + public StepBarDemoCtl() { - public StepBarDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TabControlDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TabControlDemoCtl.xaml.cs index 7df67fc8..9bb07a7e 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TabControlDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TabControlDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class TabControlDemoCtl { - public partial class TabControlDemoCtl + public TabControlDemoCtl() { - public TabControlDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TagDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TagDemoCtl.xaml.cs index aaeb7890..9b0f5056 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TagDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TagDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class TagDemoCtl { - public partial class TagDemoCtl + public TagDemoCtl() { - public TagDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TextBoxDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TextBoxDemoCtl.xaml.cs index f68246b0..30b7a3aa 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TextBoxDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TextBoxDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class TextBoxDemoCtl { - public partial class TextBoxDemoCtl + public TextBoxDemoCtl() { - public TextBoxDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TimeBarDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TimeBarDemoCtl.xaml.cs index 03270e26..5f65974e 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TimeBarDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TimeBarDemoCtl.xaml.cs @@ -1,20 +1,19 @@ using System; using HandyControl.Data; -namespace HandyControlDemo.UserControl -{ - public partial class TimeBarDemoCtl - { - public TimeBarDemoCtl() - { - InitializeComponent(); +namespace HandyControlDemo.UserControl; - for (int i = 0; i < 10; i++) - { - var hour = 6 * i; - TimeBarDemo.Hotspots.Add(new DateTimeRange(DateTime.Today.AddHours(hour), DateTime.Today.AddHours(hour + 1))); - TimeBarDemo.Hotspots.Add(new DateTimeRange(DateTime.Today.AddHours(-hour), DateTime.Today.AddHours(-hour + 1))); - } +public partial class TimeBarDemoCtl +{ + public TimeBarDemoCtl() + { + InitializeComponent(); + + for (int i = 0; i < 10; i++) + { + var hour = 6 * i; + TimeBarDemo.Hotspots.Add(new DateTimeRange(DateTime.Today.AddHours(hour), DateTime.Today.AddHours(hour + 1))); + TimeBarDemo.Hotspots.Add(new DateTimeRange(DateTime.Today.AddHours(-hour), DateTime.Today.AddHours(-hour + 1))); } } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TimePickerDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TimePickerDemoCtl.xaml.cs index 9c4fcf0f..4fdd4b89 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TimePickerDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TimePickerDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class TimePickerDemoCtl { - public partial class TimePickerDemoCtl + public TimePickerDemoCtl() { - public TimePickerDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TransferDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TransferDemoCtl.xaml.cs index 4fba3b92..a708d975 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TransferDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TransferDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class TransferDemoCtl { - public partial class TransferDemoCtl + public TransferDemoCtl() { - public TransferDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TransitioningContentControlDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TransitioningContentControlDemoCtl.xaml.cs index 92a140ce..5bfd12bb 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TransitioningContentControlDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TransitioningContentControlDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class TransitioningContentControlDemoCtl { - public partial class TransitioningContentControlDemoCtl + public TransitioningContentControlDemoCtl() { - public TransitioningContentControlDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/UniformSpacingPanelDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/UniformSpacingPanelDemoCtl.xaml.cs index 781aa558..14b3700b 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/UniformSpacingPanelDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/UniformSpacingPanelDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class UniformSpacingPanelDemoCtl { - public partial class UniformSpacingPanelDemoCtl + public UniformSpacingPanelDemoCtl() { - public UniformSpacingPanelDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/WaterfallPanelDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/WaterfallPanelDemoCtl.xaml.cs index 3e9c2468..442ab8d1 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/WaterfallPanelDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/WaterfallPanelDemoCtl.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class WaterfallPanelDemoCtl { - public partial class WaterfallPanelDemoCtl + public WaterfallPanelDemoCtl() { - public WaterfallPanelDemoCtl() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/WindowDemoCtl.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/WindowDemoCtl.xaml.cs index dccc1d0f..fe8108cd 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/WindowDemoCtl.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/WindowDemoCtl.xaml.cs @@ -4,61 +4,60 @@ using HandyControl.Data; using HandyControl.Tools; using MessageBox = HandyControl.Controls.MessageBox; -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class WindowDemoCtl { - public partial class WindowDemoCtl + public WindowDemoCtl() { - public WindowDemoCtl() - { - InitializeComponent(); - } - - private void ButtonMessage_OnClick(object sender, RoutedEventArgs e) - { - MessageBox.Show(Properties.Langs.Lang.GrowlAsk, Properties.Langs.Lang.Title, MessageBoxButton.YesNo, MessageBoxImage.Question); - } - - private void ButtonCustomMessage_OnClick(object sender, RoutedEventArgs e) - { - MessageBox.Show(new MessageBoxInfo - { - Message = Properties.Langs.Lang.GrowlAsk, - Caption = Properties.Langs.Lang.Title, - Button = MessageBoxButton.YesNo, - IconBrushKey = ResourceToken.AccentBrush, - IconKey = ResourceToken.AskGeometry, - StyleKey = "MessageBoxCustom" - }); - } - - private void ButtonMouseFollow_OnClick(object sender, RoutedEventArgs e) - { - var picker = SingleOpenHelper.CreateControl(); - var window = new PopupWindow - { - PopupElement = picker - }; - picker.SelectedColorChanged += delegate { window.Close(); }; - picker.Canceled += delegate { window.Close(); }; - window.Show(ButtonMouseFollow, false); - } - - private void ButtonCustomContent_OnClick(object sender, RoutedEventArgs e) - { - var picker = SingleOpenHelper.CreateControl(); - var window = new PopupWindow - { - PopupElement = picker, - WindowStartupLocation = WindowStartupLocation.CenterScreen, - AllowsTransparency = true, - WindowStyle = WindowStyle.None, - MinWidth = 0, - MinHeight = 0, - Title = Properties.Langs.Lang.ColorPicker - }; - picker.SelectedColorChanged += delegate { window.Close(); }; - picker.Canceled += delegate { window.Close(); }; - window.Show(); - } + InitializeComponent(); } -} + + private void ButtonMessage_OnClick(object sender, RoutedEventArgs e) + { + MessageBox.Show(Properties.Langs.Lang.GrowlAsk, Properties.Langs.Lang.Title, MessageBoxButton.YesNo, MessageBoxImage.Question); + } + + private void ButtonCustomMessage_OnClick(object sender, RoutedEventArgs e) + { + MessageBox.Show(new MessageBoxInfo + { + Message = Properties.Langs.Lang.GrowlAsk, + Caption = Properties.Langs.Lang.Title, + Button = MessageBoxButton.YesNo, + IconBrushKey = ResourceToken.AccentBrush, + IconKey = ResourceToken.AskGeometry, + StyleKey = "MessageBoxCustom" + }); + } + + private void ButtonMouseFollow_OnClick(object sender, RoutedEventArgs e) + { + var picker = SingleOpenHelper.CreateControl(); + var window = new PopupWindow + { + PopupElement = picker + }; + picker.SelectedColorChanged += delegate { window.Close(); }; + picker.Canceled += delegate { window.Close(); }; + window.Show(ButtonMouseFollow, false); + } + + private void ButtonCustomContent_OnClick(object sender, RoutedEventArgs e) + { + var picker = SingleOpenHelper.CreateControl(); + var window = new PopupWindow + { + PopupElement = picker, + WindowStartupLocation = WindowStartupLocation.CenterScreen, + AllowsTransparency = true, + WindowStyle = WindowStyle.None, + MinWidth = 0, + MinHeight = 0, + Title = Properties.Langs.Lang.ColorPicker + }; + picker.SelectedColorChanged += delegate { window.Close(); }; + picker.Canceled += delegate { window.Close(); }; + window.Show(); + } +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Main/AppNotification.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Main/AppNotification.xaml.cs index ffc76c31..53887f7b 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Main/AppNotification.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Main/AppNotification.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class AppNotification { - public partial class AppNotification + public AppNotification() { - public AppNotification() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Main/AppSprite.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Main/AppSprite.xaml.cs index b0cba5f3..bee165cc 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Main/AppSprite.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Main/AppSprite.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class AppSprite { - public partial class AppSprite + public AppSprite() { - public AppSprite() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Main/BlogsView.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Main/BlogsView.xaml.cs index 8c69a7c4..a47ba05f 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Main/BlogsView.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Main/BlogsView.xaml.cs @@ -1,10 +1,9 @@ -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class BlogsView { - public partial class BlogsView + public BlogsView() { - public BlogsView() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Main/ContributorsView.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Main/ContributorsView.xaml.cs index 3f213c1d..00592399 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Main/ContributorsView.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Main/ContributorsView.xaml.cs @@ -1,11 +1,10 @@  -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +public partial class ContributorsView { - public partial class ContributorsView + public ContributorsView() { - public ContributorsView() - { - InitializeComponent(); - } + InitializeComponent(); } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml.cs index 224a8ae3..6a06b8ac 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml.cs @@ -11,112 +11,111 @@ using HandyControlDemo.Data; using HandyControlDemo.ViewModel; -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +/// +/// 左侧主内容 +/// +public partial class LeftMainContent { - /// - /// 左侧主内容 - /// - public partial class LeftMainContent + private string _searchKey; + + public LeftMainContent() { - private string _searchKey; + InitializeComponent(); + } - public LeftMainContent() + private void TabControl_OnSelectionChanged(object sender, SelectionChangedEventArgs e) + { + if (e.AddedItems.Count == 0) return; + if (e.AddedItems[0] is DemoInfoModel demoInfo) { - InitializeComponent(); - } + ViewModelLocator.Instance.Main.DemoInfoCurrent = demoInfo; + var selectedIndex = demoInfo.SelectedIndex; + demoInfo.SelectedIndex = -1; + demoInfo.SelectedIndex = selectedIndex; - private void TabControl_OnSelectionChanged(object sender, SelectionChangedEventArgs e) - { - if (e.AddedItems.Count == 0) return; - if (e.AddedItems[0] is DemoInfoModel demoInfo) - { - ViewModelLocator.Instance.Main.DemoInfoCurrent = demoInfo; - var selectedIndex = demoInfo.SelectedIndex; - demoInfo.SelectedIndex = -1; - demoInfo.SelectedIndex = selectedIndex; - - FilterItems(); - GroupItems(sender as TabControl, demoInfo); - } - } - - private void ButtonAscending_OnClick(object sender, RoutedEventArgs e) - { - if (sender is ToggleButton button && button.Tag is ItemsControl itemsControl) - { - if (button.IsChecked == true) - { - itemsControl.Items.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending)); - } - else - { - itemsControl.Items.SortDescriptions.Clear(); - } - } - } - - private void SearchBar_OnSearchStarted(object sender, FunctionEventArgs e) - { - _searchKey = e.Info; FilterItems(); + GroupItems(sender as TabControl, demoInfo); } + } - private void FilterItems() + private void ButtonAscending_OnClick(object sender, RoutedEventArgs e) + { + if (sender is ToggleButton button && button.Tag is ItemsControl itemsControl) { - if (string.IsNullOrEmpty(_searchKey)) + if (button.IsChecked == true) { - foreach (var item in ViewModelLocator.Instance.Main.DemoInfoCurrent.DemoItemList) - { - item.IsVisible = true; - item.QueriesText = string.Empty; - } + itemsControl.Items.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending)); } else { - var key = _searchKey.ToLower(); - foreach (var item in ViewModelLocator.Instance.Main.DemoInfoCurrent.DemoItemList) + itemsControl.Items.SortDescriptions.Clear(); + } + } + } + + private void SearchBar_OnSearchStarted(object sender, FunctionEventArgs e) + { + _searchKey = e.Info; + FilterItems(); + } + + private void FilterItems() + { + if (string.IsNullOrEmpty(_searchKey)) + { + foreach (var item in ViewModelLocator.Instance.Main.DemoInfoCurrent.DemoItemList) + { + item.IsVisible = true; + item.QueriesText = string.Empty; + } + } + else + { + var key = _searchKey.ToLower(); + foreach (var item in ViewModelLocator.Instance.Main.DemoInfoCurrent.DemoItemList) + { + if (item.Name.ToLower().Contains(key)) { - if (item.Name.ToLower().Contains(key)) - { - item.IsVisible = true; - item.QueriesText = _searchKey; - } - else if (item.TargetCtlName.Replace("DemoCtl", "").ToLower().Contains(key)) + item.IsVisible = true; + item.QueriesText = _searchKey; + } + else if (item.TargetCtlName.Replace("DemoCtl", "").ToLower().Contains(key)) + { + item.IsVisible = true; + item.QueriesText = _searchKey; + } + else + { + var name = Properties.Langs.LangProvider.GetLang(item.Name); + if (!string.IsNullOrEmpty(name) && name.ToLower().Contains(key)) { item.IsVisible = true; item.QueriesText = _searchKey; } else { - var name = Properties.Langs.LangProvider.GetLang(item.Name); - if (!string.IsNullOrEmpty(name) && name.ToLower().Contains(key)) - { - item.IsVisible = true; - item.QueriesText = _searchKey; - } - else - { - item.IsVisible = false; - item.QueriesText = string.Empty; - } + item.IsVisible = false; + item.QueriesText = string.Empty; } } } } + } - private void GroupItems(TabControl tabControl, DemoInfoModel demoInfo) + private void GroupItems(TabControl tabControl, DemoInfoModel demoInfo) + { + var listBox = VisualHelper.GetChild(tabControl); + if (listBox == null) return; + listBox.Items.GroupDescriptions?.Clear(); + + if (demoInfo.IsGroupEnabled) { - var listBox = VisualHelper.GetChild(tabControl); - if (listBox == null) return; - listBox.Items.GroupDescriptions?.Clear(); - - if (demoInfo.IsGroupEnabled) + Dispatcher.BeginInvoke(new Action(() => { - Dispatcher.BeginInvoke(new Action(() => - { - listBox.Items.GroupDescriptions?.Add(new PropertyGroupDescription("GroupName")); - }), DispatcherPriority.Background); - } + listBox.Items.GroupDescriptions?.Add(new PropertyGroupDescription("GroupName")); + }), DispatcherPriority.Background); } } -} +} \ No newline at end of file diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Main/MainContent.xaml.cs b/src/Shared/HandyControlDemo_Shared/UserControl/Main/MainContent.xaml.cs index 173ed9b6..d54fa484 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Main/MainContent.xaml.cs +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Main/MainContent.xaml.cs @@ -11,173 +11,172 @@ using HandyControlDemo.ViewModel; using ICSharpCode.AvalonEdit; -namespace HandyControlDemo.UserControl +namespace HandyControlDemo.UserControl; + +/// +/// 主内容 +/// +public partial class MainContent { - /// - /// 主内容 - /// - public partial class MainContent + private bool _isFull; + + private string _currentDemoKey; + + private bool _drawerCodeUsed; + + private Dictionary _textEditor; + + public MainContent() { - private bool _isFull; + InitializeComponent(); - private string _currentDemoKey; + Messenger.Default.Register(this, MessageToken.FullSwitch, FullSwitch); + Messenger.Default.Register(this, MessageToken.SkinUpdated, SkinUpdated); + } - private bool _drawerCodeUsed; - - private Dictionary _textEditor; - - public MainContent() + private void FullSwitch(bool isFull) + { + if (_isFull == isFull) { - InitializeComponent(); - - Messenger.Default.Register(this, MessageToken.FullSwitch, FullSwitch); - Messenger.Default.Register(this, MessageToken.SkinUpdated, SkinUpdated); + return; } - private void FullSwitch(bool isFull) + _isFull = isFull; + + if (_isFull) { - if (_isFull == isFull) - { - return; - } - - _isFull = isFull; - - if (_isFull) - { - BorderRootEffect.Show(); - BorderEffect.Collapse(); - BorderTitle.Collapse(); - GridMain.HorizontalAlignment = HorizontalAlignment.Stretch; - GridMain.VerticalAlignment = VerticalAlignment.Stretch; - PresenterMain.Margin = new Thickness(); - BorderRoot.CornerRadius = new CornerRadius(10); - BorderRoot.Style = ResourceHelper.GetResource