diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 19412f5b8..284094d96 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: with: dotnet-version: '8.0.x' include-prerelease: true - + - name: Build shell: pwsh run: | diff --git a/.gitignore b/.gitignore index 903f36f41..42c130db0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,9 @@ packages/ build/* !build/build.cake !build/build*.nuspec +!build/build.Lang.template !build/create_lang_nuspec_file.py +!build/create_nupkg_file.ps1 !build/build.ps1 !build/LICENSE !build/icon.png diff --git a/LICENSE b/LICENSE index 0f3d16f74..fce637b7b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018-2023 HandyOrg +Copyright (c) 2018-2024 HandyOrg Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README-cn.md b/README-cn.md index ed14e2205..8512aee05 100644 --- a/README-cn.md +++ b/README-cn.md @@ -25,7 +25,7 @@ myget-version - Github-build-status + Github-build-status Nuget @@ -92,6 +92,11 @@ HandyControl 项目已加入 [dotNET China](https://gitee.com/dotnetchina) 组 imba-tjd jhm-ciberman musashi-miyamoto +kingsznhone +asine +zsh2401 +fpprojecta +keytrap-x86 ## 赞助者 diff --git a/README.md b/README.md index 9b7ab7e98..34713d331 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,11 @@ This project is based on [HandyControl](https://github.com/handyOrg/HandyControl imba-tjd jhm-ciberman musashi-miyamoto +kingsznhone +asine +zsh2401 +fpprojecta +keytrap-x86 ## Backers diff --git a/build/LICENSE b/build/LICENSE index 0f3d16f74..fce637b7b 100644 --- a/build/LICENSE +++ b/build/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018-2023 HandyOrg +Copyright (c) 2018-2024 HandyOrg Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/build/build-for-myget.nuspec b/build/build-for-myget.nuspec index 24a3d76c7..95cf65c20 100644 --- a/build/build-for-myget.nuspec +++ b/build/build-for-myget.nuspec @@ -10,7 +10,7 @@ https://raw.githubusercontent.com/ghost1372/HandyControls/develop/LICENSE https://github.com/ghost1372/HandyControls Contains some simple and commonly used WPF controls based on HandyControl - Copyright 2018-2023 + Copyright 2018-2024 wpf wpf-ui style styles theme xaml control csharp relativepanel flipclock skin datagrid menu persian calendar gif togglebutton datagrid wpf-controls component cardview navigation dark-theme color-picker notification @@ -30,6 +30,7 @@ + @@ -231,6 +232,20 @@ + + + + + + + + + + + + + + diff --git a/build/build.Lang.ca-ES.nuspec b/build/build.Lang.ca-ES.nuspec index f7e395f2d..d0936ffe6 100644 --- a/build/build.Lang.ca-ES.nuspec +++ b/build/build.Lang.ca-ES.nuspec @@ -12,9 +12,9 @@ https://github.com/HandyOrg/HandyControl Contains some simple and commonly used WPF controls Changes are detailed at https://github.com/HandyOrg/HandyControl/releases - Copyright © HandyOrg 2018-2023 + Copyright © HandyOrg 2018-2024 WPF C# Control - + @@ -33,6 +33,7 @@ + @@ -51,6 +52,7 @@ + diff --git a/build/build.Lang.cs.nuspec b/build/build.Lang.cs.nuspec index 376d2e3d6..431aee9bb 100644 --- a/build/build.Lang.cs.nuspec +++ b/build/build.Lang.cs.nuspec @@ -12,9 +12,9 @@ https://github.com/HandyOrg/HandyControl Contains some simple and commonly used WPF controls Changes are detailed at https://github.com/HandyOrg/HandyControl/releases - Copyright © HandyOrg 2018-2023 + Copyright © HandyOrg 2018-2024 WPF C# Control - + @@ -33,6 +33,7 @@ + @@ -51,6 +52,7 @@ + diff --git a/build/build.Lang.en.nuspec b/build/build.Lang.en.nuspec index f9f3c221f..a6755b501 100644 --- a/build/build.Lang.en.nuspec +++ b/build/build.Lang.en.nuspec @@ -12,9 +12,9 @@ https://github.com/HandyOrg/HandyControl Contains some simple and commonly used WPF controls Changes are detailed at https://github.com/HandyOrg/HandyControl/releases - Copyright © HandyOrg 2018-2023 + Copyright © HandyOrg 2018-2024 WPF C# Control - + @@ -33,6 +33,7 @@ + @@ -51,6 +52,7 @@ + diff --git a/build/build.Lang.es.nuspec b/build/build.Lang.es.nuspec index ba7ee7f74..5cd6cba47 100644 --- a/build/build.Lang.es.nuspec +++ b/build/build.Lang.es.nuspec @@ -12,9 +12,9 @@ https://github.com/HandyOrg/HandyControl Contains some simple and commonly used WPF controls Changes are detailed at https://github.com/HandyOrg/HandyControl/releases - Copyright © HandyOrg 2018-2023 + Copyright © HandyOrg 2018-2024 WPF C# Control - + @@ -33,6 +33,7 @@ + @@ -51,6 +52,7 @@ + diff --git a/build/build.Lang.fa.nuspec b/build/build.Lang.fa.nuspec index d83818c9b..5165e6bfe 100644 --- a/build/build.Lang.fa.nuspec +++ b/build/build.Lang.fa.nuspec @@ -12,9 +12,9 @@ https://github.com/HandyOrg/HandyControl Contains some simple and commonly used WPF controls Changes are detailed at https://github.com/HandyOrg/HandyControl/releases - Copyright © HandyOrg 2018-2023 + Copyright © HandyOrg 2018-2024 WPF C# Control - + @@ -33,6 +33,7 @@ + @@ -51,6 +52,7 @@ + diff --git a/build/build.Lang.fr.nuspec b/build/build.Lang.fr.nuspec index a5f59c0ca..3ba6fcbdb 100644 --- a/build/build.Lang.fr.nuspec +++ b/build/build.Lang.fr.nuspec @@ -12,9 +12,9 @@ https://github.com/HandyOrg/HandyControl Contains some simple and commonly used WPF controls Changes are detailed at https://github.com/HandyOrg/HandyControl/releases - Copyright © HandyOrg 2018-2023 + Copyright © HandyOrg 2018-2024 WPF C# Control - + @@ -33,6 +33,7 @@ + @@ -51,6 +52,7 @@ + diff --git a/build/build.Lang.ja.nuspec b/build/build.Lang.ja.nuspec index c269e81bc..6e22161ee 100644 --- a/build/build.Lang.ja.nuspec +++ b/build/build.Lang.ja.nuspec @@ -12,9 +12,9 @@ https://github.com/HandyOrg/HandyControl Contains some simple and commonly used WPF controls Changes are detailed at https://github.com/HandyOrg/HandyControl/releases - Copyright © HandyOrg 2018-2023 + Copyright © HandyOrg 2018-2024 WPF C# Control - + @@ -33,6 +33,7 @@ + @@ -51,6 +52,7 @@ + diff --git a/build/build.Lang.ko-KR.nuspec b/build/build.Lang.ko-KR.nuspec index e2010d8e2..37fdd8de3 100644 --- a/build/build.Lang.ko-KR.nuspec +++ b/build/build.Lang.ko-KR.nuspec @@ -12,9 +12,9 @@ https://github.com/HandyOrg/HandyControl Contains some simple and commonly used WPF controls Changes are detailed at https://github.com/HandyOrg/HandyControl/releases - Copyright © HandyOrg 2018-2023 + Copyright © HandyOrg 2018-2024 WPF C# Control - + @@ -33,6 +33,7 @@ + @@ -51,6 +52,7 @@ + diff --git a/build/build.Lang.pl.nuspec b/build/build.Lang.pl.nuspec index 6066bceed..17c9e14b0 100644 --- a/build/build.Lang.pl.nuspec +++ b/build/build.Lang.pl.nuspec @@ -12,9 +12,9 @@ https://github.com/HandyOrg/HandyControl Contains some simple and commonly used WPF controls Changes are detailed at https://github.com/HandyOrg/HandyControl/releases - Copyright © HandyOrg 2018-2023 + Copyright © HandyOrg 2018-2024 WPF C# Control - + @@ -33,6 +33,7 @@ + @@ -51,6 +52,7 @@ + diff --git a/build/build.Lang.pt-BR.nuspec b/build/build.Lang.pt-BR.nuspec index 2cb0c441b..b1153d782 100644 --- a/build/build.Lang.pt-BR.nuspec +++ b/build/build.Lang.pt-BR.nuspec @@ -12,9 +12,9 @@ https://github.com/HandyOrg/HandyControl Contains some simple and commonly used WPF controls Changes are detailed at https://github.com/HandyOrg/HandyControl/releases - Copyright © HandyOrg 2018-2023 + Copyright © HandyOrg 2018-2024 WPF C# Control - + @@ -33,6 +33,7 @@ + @@ -51,6 +52,7 @@ + diff --git a/build/build.Lang.ru.nuspec b/build/build.Lang.ru.nuspec index d234ed623..5169a90ac 100644 --- a/build/build.Lang.ru.nuspec +++ b/build/build.Lang.ru.nuspec @@ -12,9 +12,9 @@ https://github.com/HandyOrg/HandyControl Contains some simple and commonly used WPF controls Changes are detailed at https://github.com/HandyOrg/HandyControl/releases - Copyright © HandyOrg 2018-2023 + Copyright © HandyOrg 2018-2024 WPF C# Control - + @@ -33,6 +33,7 @@ + @@ -51,6 +52,7 @@ + diff --git a/build/build.Lang.template.nuspec b/build/build.Lang.template similarity index 93% rename from build/build.Lang.template.nuspec rename to build/build.Lang.template index 15777b68a..4863ba700 100644 --- a/build/build.Lang.template.nuspec +++ b/build/build.Lang.template @@ -12,9 +12,9 @@ https://github.com/HandyOrg/HandyControl Contains some simple and commonly used WPF controls Changes are detailed at https://github.com/HandyOrg/HandyControl/releases - Copyright © HandyOrg 2018-2023 + Copyright © HandyOrg 2018-2024 WPF C# Control - + @@ -33,6 +33,7 @@ + @@ -51,6 +52,7 @@ + diff --git a/build/build.Lang.tr.nuspec b/build/build.Lang.tr.nuspec index 3c4847b7c..e22868cdb 100644 --- a/build/build.Lang.tr.nuspec +++ b/build/build.Lang.tr.nuspec @@ -12,9 +12,9 @@ https://github.com/HandyOrg/HandyControl Contains some simple and commonly used WPF controls Changes are detailed at https://github.com/HandyOrg/HandyControl/releases - Copyright © HandyOrg 2018-2023 + Copyright © HandyOrg 2018-2024 WPF C# Control - + @@ -33,6 +33,7 @@ + @@ -51,6 +52,7 @@ + diff --git a/build/build.cake b/build/build.cake index c9c534c31..599f985c1 100644 --- a/build/build.cake +++ b/build/build.cake @@ -35,7 +35,8 @@ Task("Build") "netcoreapp3.1", "net5.0-windows", "net6.0-windows", - "net7.0-windows" + "net7.0-windows", + "net8.0-windows" }; foreach (var framework in frameworkList) diff --git a/build/build.nuspec b/build/build.nuspec index bfc9e9d9b..153a7d241 100644 --- a/build/build.nuspec +++ b/build/build.nuspec @@ -12,9 +12,9 @@ https://github.com/HandyOrg/HandyControl Contains some simple and commonly used WPF controls Changes are detailed at https://github.com/HandyOrg/HandyControl/releases - Copyright © HandyOrg 2018-2023 + Copyright © HandyOrg 2018-2024 WPF C# Control - + @@ -33,6 +33,7 @@ + @@ -84,6 +85,10 @@ + + + + diff --git a/build/create_lang_nuspec_file.py b/build/create_lang_nuspec_file.py index d8c50ea06..91372f2e4 100644 --- a/build/create_lang_nuspec_file.py +++ b/build/create_lang_nuspec_file.py @@ -2,7 +2,7 @@ def main(): - with open('build.Lang.template.nuspec', 'r', encoding='utf-8') as template_file: + with open('build.Lang.template', 'r', encoding='utf-8') as template_file: template_content = template_file.read() resx_file_folder = Path('../src/Shared/HandyControl_Shared/Properties/Langs') diff --git a/build/create_nupkg_file.ps1 b/build/create_nupkg_file.ps1 new file mode 100644 index 000000000..d6029abb2 --- /dev/null +++ b/build/create_nupkg_file.ps1 @@ -0,0 +1,4 @@ +./tools/nuget pack build.nuspec -Symbols -SymbolPackageFormat snupkg +Get-ChildItem -Path ./build.Lang.*.nuspec | ForEach-Object { + ./tools/nuget pack $_ +} diff --git a/src/Avalonia/Directory.Build.props b/src/Avalonia/Directory.Build.props new file mode 100644 index 000000000..b7d1f090c --- /dev/null +++ b/src/Avalonia/Directory.Build.props @@ -0,0 +1,6 @@ + + + enable + 11.0.6 + + diff --git a/src/Avalonia/HandyControlDemo_Avalonia/App.axaml b/src/Avalonia/HandyControlDemo_Avalonia/App.axaml new file mode 100644 index 000000000..6ecedd565 --- /dev/null +++ b/src/Avalonia/HandyControlDemo_Avalonia/App.axaml @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/src/Avalonia/HandyControlDemo_Avalonia/App.axaml.cs b/src/Avalonia/HandyControlDemo_Avalonia/App.axaml.cs new file mode 100644 index 000000000..f48db2b30 --- /dev/null +++ b/src/Avalonia/HandyControlDemo_Avalonia/App.axaml.cs @@ -0,0 +1,28 @@ +using Avalonia; +using Avalonia.Controls.ApplicationLifetimes; +using Avalonia.Data.Core.Plugins; +using Avalonia.Markup.Xaml; + + +namespace HandyControlDemo; + +// ReSharper disable once PartialTypeWithSinglePart +public partial class App : Application +{ + public override void Initialize() + { + AvaloniaXamlLoader.Load(this); + } + + public override void OnFrameworkInitializationCompleted() + { + BindingPlugins.DataValidators.RemoveAt(0); + + if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) + { + desktop.MainWindow = new MainWindow(); + } + + base.OnFrameworkInitializationCompleted(); + } +} diff --git a/src/Avalonia/HandyControlDemo_Avalonia/HandyControlDemo_Avalonia.csproj b/src/Avalonia/HandyControlDemo_Avalonia/HandyControlDemo_Avalonia.csproj new file mode 100644 index 000000000..a3a2cc373 --- /dev/null +++ b/src/Avalonia/HandyControlDemo_Avalonia/HandyControlDemo_Avalonia.csproj @@ -0,0 +1,41 @@ + + + WinExe + + net7.0 + enable + true + app.manifest + HandyControlDemo + HandyControlDemo + + + + + + + + + + + + + + + + + + + + + + + + App.axaml + + + ButtonDemoCtrl.axaml + + + diff --git a/src/Avalonia/HandyControlDemo_Avalonia/MainWindow.axaml b/src/Avalonia/HandyControlDemo_Avalonia/MainWindow.axaml new file mode 100644 index 000000000..ddd9e5391 --- /dev/null +++ b/src/Avalonia/HandyControlDemo_Avalonia/MainWindow.axaml @@ -0,0 +1,15 @@ + + + diff --git a/src/Avalonia/HandyControlDemo_Avalonia/MainWindow.axaml.cs b/src/Avalonia/HandyControlDemo_Avalonia/MainWindow.axaml.cs new file mode 100644 index 000000000..8edecb99c --- /dev/null +++ b/src/Avalonia/HandyControlDemo_Avalonia/MainWindow.axaml.cs @@ -0,0 +1,11 @@ +using Avalonia.Controls; + +namespace HandyControlDemo; + +public partial class MainWindow : Window +{ + public MainWindow() + { + InitializeComponent(); + } +} diff --git a/src/Avalonia/HandyControlDemo_Avalonia/Program.cs b/src/Avalonia/HandyControlDemo_Avalonia/Program.cs new file mode 100644 index 000000000..3b0751f82 --- /dev/null +++ b/src/Avalonia/HandyControlDemo_Avalonia/Program.cs @@ -0,0 +1,16 @@ +using System; +using Avalonia; + +namespace HandyControlDemo; + +public class Program +{ + [STAThread] + public static void Main(string[] args) => BuildAvaloniaApp() + .StartWithClassicDesktopLifetime(args); + + public static AppBuilder BuildAvaloniaApp() + => AppBuilder.Configure() + .UsePlatformDetect() + .LogToTrace(); +} diff --git a/src/Avalonia/HandyControlDemo_Avalonia/Resources/Img/cloud.png b/src/Avalonia/HandyControlDemo_Avalonia/Resources/Img/cloud.png new file mode 100644 index 000000000..f8b36fb42 Binary files /dev/null and b/src/Avalonia/HandyControlDemo_Avalonia/Resources/Img/cloud.png differ diff --git a/src/Avalonia/HandyControlDemo_Avalonia/Resources/Img/icon.ico b/src/Avalonia/HandyControlDemo_Avalonia/Resources/Img/icon.ico new file mode 100644 index 000000000..719edf88b Binary files /dev/null and b/src/Avalonia/HandyControlDemo_Avalonia/Resources/Img/icon.ico differ diff --git a/src/Avalonia/HandyControlDemo_Avalonia/Resources/Themes/Basic/Basic.axaml b/src/Avalonia/HandyControlDemo_Avalonia/Resources/Themes/Basic/Basic.axaml new file mode 100644 index 000000000..9c7bb5c37 --- /dev/null +++ b/src/Avalonia/HandyControlDemo_Avalonia/Resources/Themes/Basic/Basic.axaml @@ -0,0 +1,6 @@ + + + + + diff --git a/src/Avalonia/HandyControlDemo_Avalonia/Resources/Themes/Basic/Brushes.axaml b/src/Avalonia/HandyControlDemo_Avalonia/Resources/Themes/Basic/Brushes.axaml new file mode 100644 index 000000000..e7d9b2b54 --- /dev/null +++ b/src/Avalonia/HandyControlDemo_Avalonia/Resources/Themes/Basic/Brushes.axaml @@ -0,0 +1,8 @@ + + + + + + + diff --git a/src/Avalonia/HandyControlDemo_Avalonia/Resources/Themes/Theme.axaml b/src/Avalonia/HandyControlDemo_Avalonia/Resources/Themes/Theme.axaml new file mode 100644 index 000000000..12c62a092 --- /dev/null +++ b/src/Avalonia/HandyControlDemo_Avalonia/Resources/Themes/Theme.axaml @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/src/Avalonia/HandyControlDemo_Avalonia/Views/Main/MainWindowContent.axaml b/src/Avalonia/HandyControlDemo_Avalonia/Views/Main/MainWindowContent.axaml new file mode 100644 index 000000000..7d3a9fe1c --- /dev/null +++ b/src/Avalonia/HandyControlDemo_Avalonia/Views/Main/MainWindowContent.axaml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + diff --git a/src/Avalonia/HandyControlDemo_Avalonia/Views/Main/MainWindowContent.axaml.cs b/src/Avalonia/HandyControlDemo_Avalonia/Views/Main/MainWindowContent.axaml.cs new file mode 100644 index 000000000..2eee6d7d5 --- /dev/null +++ b/src/Avalonia/HandyControlDemo_Avalonia/Views/Main/MainWindowContent.axaml.cs @@ -0,0 +1,11 @@ +using Avalonia.Controls; + +namespace HandyControlDemo.Views; + +public partial class MainWindowContent : UserControl +{ + public MainWindowContent() + { + InitializeComponent(); + } +} diff --git a/src/Avalonia/HandyControlDemo_Avalonia/Views/Styles/ButtonDemoCtrl.axaml b/src/Avalonia/HandyControlDemo_Avalonia/Views/Styles/ButtonDemoCtrl.axaml new file mode 100644 index 000000000..18c2736cc --- /dev/null +++ b/src/Avalonia/HandyControlDemo_Avalonia/Views/Styles/ButtonDemoCtrl.axaml @@ -0,0 +1,17 @@ + + +