diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..7f3996a7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: build + +on: + push: + branches: + - master + +jobs: + build: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Setup Nuget.exe + uses: nuget/setup-nuget@master + + - name: Restore Nuget packages + run: nuget restore src/HandyControl.sln + + - name: Setup .NET Core + uses: actions/setup-dotnet@master + + - name: Build Net_40 + run: dotnet build src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj -p:Configuration=Release + + - name: Build Net_45 + run: dotnet build src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj -p:Configuration=Release + + - name: Build Net_462 + run: dotnet build src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj -p:Configuration=Release + + - name: Build Net_47 + run: dotnet build src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj -p:Configuration=Release + + - name: Build Net_48 + run: dotnet build src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj -p:Configuration=Release + + - name: Build Core_30 + run: dotnet build src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj --configuration Release + + - name: Build Core_31 + run: dotnet build src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj --configuration Release diff --git a/Installers/VS2019/HandyControl_VS2019/source.extension.vsixmanifest b/Installers/VS2019/HandyControl_VS2019/source.extension.vsixmanifest index c25560c3..74e40f35 100644 --- a/Installers/VS2019/HandyControl_VS2019/source.extension.vsixmanifest +++ b/Installers/VS2019/HandyControl_VS2019/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + HandyControl for VS2019 This VSIX Project will help people initialize a HandyControl project. https://handyorg.github.io/handycontrol diff --git a/Installers/VS2019/WpfApp/ProjectTemplate.csproj b/Installers/VS2019/WpfApp/ProjectTemplate.csproj index cf36f37a..d6cec36e 100644 --- a/Installers/VS2019/WpfApp/ProjectTemplate.csproj +++ b/Installers/VS2019/WpfApp/ProjectTemplate.csproj @@ -34,8 +34,8 @@ 4 - - ..\packages\HandyControl.2.4.0\lib\net47\HandyControl.dll + + ..\packages\HandyControl.2.5.0.1\lib\net47\HandyControl.dll diff --git a/Installers/VS2019/WpfApp/Properties/AssemblyInfo.cs b/Installers/VS2019/WpfApp/Properties/AssemblyInfo.cs index 59f278ed..e2fda6dc 100644 --- a/Installers/VS2019/WpfApp/Properties/AssemblyInfo.cs +++ b/Installers/VS2019/WpfApp/Properties/AssemblyInfo.cs @@ -10,5 +10,5 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] -[assembly: AssemblyVersion("2.4.0")] -[assembly: AssemblyFileVersion("2.4.0")] +[assembly: AssemblyVersion("2.5.0")] +[assembly: AssemblyFileVersion("2.5.0")] diff --git a/Installers/VS2019/WpfApp/packages.config b/Installers/VS2019/WpfApp/packages.config index a1fd738f..9e25ff12 100644 --- a/Installers/VS2019/WpfApp/packages.config +++ b/Installers/VS2019/WpfApp/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Installers/VS2019/WpfCoreApp/ProjectTemplate.csproj b/Installers/VS2019/WpfCoreApp/ProjectTemplate.csproj index 18af215f..9b17e7cd 100644 --- a/Installers/VS2019/WpfCoreApp/ProjectTemplate.csproj +++ b/Installers/VS2019/WpfCoreApp/ProjectTemplate.csproj @@ -19,6 +19,6 @@ TRACE;Core - + \ No newline at end of file diff --git a/Installers/VS2019/WpfCoreApp/Properties/AssemblyInfo.cs b/Installers/VS2019/WpfCoreApp/Properties/AssemblyInfo.cs index c0e4b299..6ca08ca9 100644 --- a/Installers/VS2019/WpfCoreApp/Properties/AssemblyInfo.cs +++ b/Installers/VS2019/WpfCoreApp/Properties/AssemblyInfo.cs @@ -10,5 +10,5 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] -[assembly: AssemblyVersion("2.4.0")] -[assembly: AssemblyFileVersion("2.4.0")] +[assembly: AssemblyVersion("2.5.0")] +[assembly: AssemblyFileVersion("2.5.0")] diff --git a/README.md b/README.md index 2faaf251..4ffaaec8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![logo](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/icon.png) -![dotnet-version](https://img.shields.io/badge/.net-%3E%3D4.0-blue.svg) ![csharp-version](https://img.shields.io/badge/C%23-8.0-blue.svg) ![IDE-version](https://img.shields.io/badge/IDE-vs2019-blue.svg) [![nuget-version](https://img.shields.io/nuget/v/HandyControl.svg)](https://www.nuget.org/packages/HandyControl) [![build-status](https://ci.appveyor.com/api/projects/status/github/handyorg/handycontrol?svg=true)](https://ci.appveyor.com/project/handyorg/handycontrol) [![Join the chat at https://gitter.im/HandyControl/Lobby](https://badges.gitter.im/HandyControl/Lobby.svg)](https://gitter.im/HandyControl/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![wiki](https://img.shields.io/badge/wiki-Complete-brightgreen.svg)](https://github.com/ghost1372/HandyControl/wiki) [![Nuget](https://img.shields.io/nuget/dt/handycontrol)](https://www.nuget.org/packages/HandyControl) +![dotnet-version](https://img.shields.io/badge/.net-%3E%3D4.0-blue.svg) ![csharp-version](https://img.shields.io/badge/C%23-8.0-blue.svg) ![IDE-version](https://img.shields.io/badge/IDE-vs2019-blue.svg) [![nuget-version](https://img.shields.io/nuget/v/HandyControl.svg)](https://www.nuget.org/packages/HandyControl) [![appveyor-build-status](https://ci.appveyor.com/api/projects/status/github/handyorg/handycontrol?svg=true)](https://ci.appveyor.com/project/handyorg/handycontrol) ![Github-build-status](https://github.com/HandyOrg/HandyControl/workflows/build/badge.svg) [![Join the chat at https://gitter.im/HandyControl/Lobby](https://badges.gitter.im/HandyControl/Lobby.svg)](https://gitter.im/HandyControl/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![wiki](https://img.shields.io/badge/wiki-Complete-brightgreen.svg)](https://github.com/ghost1372/HandyControl/wiki) [![Nuget](https://img.shields.io/nuget/dt/handycontrol)](https://www.nuget.org/packages/HandyControl) # Welcome to HandyControl @@ -18,7 +18,7 @@ [https://handyorg.github.io/handycontrol/](https://handyorg.github.io/handycontrol/) ### 赞助 -如果您觉得HandyControl还不错,并且刚好有些闲钱,那么可以选择以下两种方式来赞助: +如果您觉得HandyControl还不错,并且刚好有些闲钱,那么可以选择以下两种方式来赞助(记得入群联系我们呀~~): * [以HandyControl的名义为慈善事业做贡献](http://www.chinacharityfederation.org/ConfirmDonation/0.html?zhijie=3) @@ -27,32 +27,42 @@ ## Contributors - - - - - - - - - - +ghost1372 +DingpingZhang +M0n7y5 +guanguanchuangyu +yanchao891012 +noctwolf +xianyun666 +afunc233 +DinoChan +MrZhangYuan +JinhuaChen-OMEC +seedtyx +KleinPan +yxhq +AiHaibara +walterlv +Luoyingliang ## Backers - - - - - - - - - - - - - + + + + + + + + + + + + + + + + ## Special thanks to diff --git a/build/build.cake b/build/build.cake index 7538862b..7f9bffa8 100644 --- a/build/build.cake +++ b/build/build.cake @@ -10,61 +10,63 @@ Task("Build") .IsDependentOn("Clean") .Does(() => { - var vsLatest = VSWhereLatest(); - var msBuildPath = vsLatest?.CombineWithFilePath("./MSBuild/Current/Bin/MSBuild.exe"); - NuGetRestore("../src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj"); + NuGetRestore("../src/HandyControl.sln"); - var settingsNet40 = new MSBuildSettings + var settingsNet40 = new DotNetCoreBuildSettings { Configuration = "Release", - ToolPath = msBuildPath, - }.WithProperty("OutputPath", MakeAbsolute(Directory("lib/net40")).FullPath); + OutputDirectory = "lib/net40" + }; - var settingsNet45 = new MSBuildSettings + var settingsNet45 = new DotNetCoreBuildSettings { - Configuration = "Release-Net45", - ToolPath = msBuildPath, - }.WithProperty("OutputPath", MakeAbsolute(Directory("lib/net45")).FullPath); + Configuration = "Release", + Framework = "net45", + OutputDirectory = "lib/net45" + }; - var settingsNet462 = new MSBuildSettings + var settingsNet462 = new DotNetCoreBuildSettings { - Configuration = "Release-Net462", - ToolPath = msBuildPath, - }.WithProperty("OutputPath", MakeAbsolute(Directory("lib/net462")).FullPath); + Configuration = "Release", + Framework = "net462", + OutputDirectory = "lib/net462" + }; - var settingsNet47 = new MSBuildSettings + var settingsNet47 = new DotNetCoreBuildSettings { - Configuration = "Release-Net47", - ToolPath = msBuildPath, - }.WithProperty("OutputPath", MakeAbsolute(Directory("lib/net47")).FullPath); + Configuration = "Release", + Framework = "net47", + OutputDirectory = "lib/net47" + }; - var settingsNet48 = new MSBuildSettings + var settingsNet48 = new DotNetCoreBuildSettings { - Configuration = "Release-Net48", - ToolPath = msBuildPath, - }.WithProperty("OutputPath", MakeAbsolute(Directory("lib/net48")).FullPath); + Configuration = "Release", + Framework = "net48", + OutputDirectory = "lib/net48" + }; var settingsCore30 = new DotNetCoreBuildSettings { + Configuration = "Release", Framework = "netcoreapp3.0", - Configuration = "Release-Core30", OutputDirectory = "lib/netcoreapp3.0" }; var settingsCore31 = new DotNetCoreBuildSettings { + Configuration = "Release", Framework = "netcoreapp3.1", - Configuration = "Release-Core31", OutputDirectory = "lib/netcoreapp3.1" }; - MSBuild("../src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj", settingsNet40); - MSBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet45); - MSBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet462); - MSBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet47); - MSBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet48); - DotNetCoreBuild("../src/Core_GE30/HandyControl_Core_GE30/HandyControl_Core_GE30.csproj", settingsCore30); - DotNetCoreBuild("../src/Core_GE30/HandyControl_Core_GE30/HandyControl_Core_GE30.csproj", settingsCore31); + DotNetCoreBuild("../src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj", settingsNet40); + DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet45); + DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet462); + DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet47); + DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet48); + DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsCore30); + DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsCore31); }); RunTarget(target); \ No newline at end of file diff --git a/build/build.nuspec b/build/build.nuspec index f48902dc..63028dbc 100644 --- a/build/build.nuspec +++ b/build/build.nuspec @@ -2,19 +2,19 @@ HandyControl - 2.4.0 + 2.5.0.2 HandyOrg HandyOrg HandyOrg - false + true + LICENSE + icon.png https://github.com/NaBian/HandyControl - https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/icon.png Contains some commonly used simple WPF controls Changes are detailed at https://github.com/HandyOrg/HandyControl/releases Copyright © HandyOrg 2018-2020 - WPF C# Control - + @@ -24,47 +24,77 @@ + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/source/handycontrol/extend_controls/animationPath/index.md b/doc/source/handycontrol/extend_controls/animationPath/index.md index ca12ad62..fec22308 100644 --- a/doc/source/handycontrol/extend_controls/animationPath/index.md +++ b/doc/source/handycontrol/extend_controls/animationPath/index.md @@ -1,5 +1,63 @@ --- -title: 建设中 +title: AnimationPath 动画路径 --- -建设中 \ No newline at end of file +`AnimationPath`动画路径,设定`Geometry `派生类型几何图形的数据,例如`PathGeometry `、`LineGeometry `等,实现固定的路径动画效果。 + +```xml +public class AnimationPath : Shape +``` + +# 属性 + +## Data 数据 + +动画路径需要显示的几何图形数据。 + +```xml +M512 0C229.12 0 0 229.12 0 512c0 226.56 146.56 417.92 350.08 485.76 25.6 4.48 35.2-10.88 35.2-24.32 0-12.16-0.64-52.48-0.64-95.36-128.64 23.68-161.92-31.36-172.16-60.16-5.76-14.72-30.72-60.16-52.48-72.32-17.92-9.6-43.52-33.28-0.64-33.92 40.32-0.64 69.12 37.12 78.72 52.48 46.08 77.44 119.68 55.68 149.12 42.24 4.48-33.28 17.92-55.68 32.64-68.48-113.92-12.8-232.96-56.96-232.96-252.8 0-55.68 19.84-101.76 52.48-137.6-5.12-12.8-23.04-65.28 5.12-135.68 0 0 42.88-13.44 140.8 52.48 40.96-11.52 84.48-17.28 128-17.28 43.52 0 87.04 5.76 128 17.28 97.92-66.56 140.8-52.48 140.8-52.48 28.16 70.4 10.24 122.88 5.12 135.68 32.64 35.84 52.48 81.28 52.48 137.6 0 196.48-119.68 240-233.6 252.8 18.56 16 34.56 46.72 34.56 94.72 0 68.48-0.64 123.52-0.64 140.8 0 13.44 9.6 29.44 35.2 24.32A512.832 512.832 0 0 0 1024 512c0-282.88-229.12-512-512-512z +``` +案例: +```xml + + + +``` + +效果: + +![Animation-Default](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/extend_controls/AnimationPath-Default.gif) + +## PathLength 路径长度 + +默认为0,设置属性为50,效果如下: + +![AnimationPath-PathLength](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/extend_controls/AnimationPath-PathLength.gif) + +## Duration 时间间隔 + +路径动画的执行时间间隔,此属性为必须设置项,否则动画路径效果无显示。 + +## IsPlaying 是否正在播放动画 + +判定当前动画播放状态,常作为控件内部行为控制判定标识,可通过该属性进行路径动画的暂停控制。 + +## RepeatBehavior 重复行为 + +设置动画重复行为,默认为`Forever`,可根据需要设置重复行为。 + +## 继承至Shape常用属性 + +| 属性名称 | 用途 | +| --------------- | -------- | +| Stretch | 拉伸属性 | +| StrokeThickness | 边线宽度 | + +# 相关事件 + +## Completed + +当动画完成时,触发此事件。 \ No newline at end of file diff --git a/doc/source/handycontrol/extend_controls/badge/index.md b/doc/source/handycontrol/extend_controls/badge/index.md index ca12ad62..fcf8bb57 100644 --- a/doc/source/handycontrol/extend_controls/badge/index.md +++ b/doc/source/handycontrol/extend_controls/badge/index.md @@ -1,5 +1,185 @@ --- -title: 建设中 +title: Badge 标记 --- -建设中 \ No newline at end of file +标记控件作为其他控件的特定状态内容标记,能够做到最小程度的侵入原有控件,可以看作是一种内容控件,内部`Content`就是对应需要显示标记的被修饰控件,继承关系如下: + +```c# +public class Badge : ContentControl +``` + +# 基础属性 + +| 属性名称 | 用途 | +| ----------- | ------------------------------------------------------------ | +| Text | 获取或设置标记显示内容 | +| Value | 获取或设置显示数值,支持数值动态变更 | +| Status | 获取或设置标记状态类型,Text(文本),Dot(圆点标记),Processing(动态标记)默认为文本显示 | +| Maximum | 获取或设置最大显示数值。数值显示时,最大显示数值 | +| BadgeMargin | 获取或设置标记相对于被修饰控件的外边距 | +| ShowBadge | 获取或设置是否显示标记,默认为True | + +`xaml`中,记得引入`handycontrol`的命名空间。 + +```xml +xmlns:hc="https://handyorg.github.io/handycontrol" +``` + +## `Text`和`Value` + +可能看到属性解释,会比较疑惑,`Text`和`Value`在效果和数值上是一样的,这有什么区别?在标记控件中,将文本和数值类型进行区分,数值类型能够进行动态的变更以及数据统计显示效果,当两者同时存在时,默认显示`Text`。 + +### 案例 + +```xml + + - diff --git a/src/Net_35/HandyControlDemo_Net_35/UserControl/Basic/Avatar.xaml.cs b/src/Net_35/HandyControlDemo_Net_35/UserControl/Basic/Avatar.xaml.cs deleted file mode 100644 index 88727b94..00000000 --- a/src/Net_35/HandyControlDemo_Net_35/UserControl/Basic/Avatar.xaml.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Diagnostics; -using System.Windows; -using System.Windows.Media.Imaging; - - -namespace HandyControlDemo.UserControl -{ - public partial class 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( - "UserName", typeof(string), typeof(Avatar), new PropertyMetadata(default(string))); - - public string UserName - { - 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); - } - - private void ButtonAvatar_OnClick(object sender, RoutedEventArgs e) => Process.Start(Link); - } -} \ No newline at end of file diff --git a/src/Net_35/HandyControlDemo_Net_35/UserControl/Controls/AnimationPathDemoCtl.xaml b/src/Net_35/HandyControlDemo_Net_35/UserControl/Controls/AnimationPathDemoCtl.xaml deleted file mode 100644 index c4531f33..00000000 --- a/src/Net_35/HandyControlDemo_Net_35/UserControl/Controls/AnimationPathDemoCtl.xaml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/src/Net_35/HandyControlDemo_Net_35/UserControl/Controls/AnimationPathDemoCtl.xaml.cs b/src/Net_35/HandyControlDemo_Net_35/UserControl/Controls/AnimationPathDemoCtl.xaml.cs deleted file mode 100644 index 0b63c95e..00000000 --- a/src/Net_35/HandyControlDemo_Net_35/UserControl/Controls/AnimationPathDemoCtl.xaml.cs +++ /dev/null @@ -1,11 +0,0 @@ - -namespace HandyControlDemo.UserControl -{ - public partial class AnimationPathDemoCtl - { - public AnimationPathDemoCtl() - { - InitializeComponent(); - } - } -} diff --git a/src/Net_35/HandyControlDemo_Net_35/UserControl/Controls/CarouselDemoCtl.xaml b/src/Net_35/HandyControlDemo_Net_35/UserControl/Controls/CarouselDemoCtl.xaml deleted file mode 100644 index c4b46bae..00000000 --- a/src/Net_35/HandyControlDemo_Net_35/UserControl/Controls/CarouselDemoCtl.xaml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - diff --git a/src/Net_35/HandyControlDemo_Net_35/UserControl/Controls/CarouselDemoCtl.xaml.cs b/src/Net_35/HandyControlDemo_Net_35/UserControl/Controls/CarouselDemoCtl.xaml.cs deleted file mode 100644 index 51545d68..00000000 --- a/src/Net_35/HandyControlDemo_Net_35/UserControl/Controls/CarouselDemoCtl.xaml.cs +++ /dev/null @@ -1,11 +0,0 @@ - -namespace HandyControlDemo.UserControl -{ - public partial class CarouselDemoCtl - { - public CarouselDemoCtl() - { - InitializeComponent(); - } - } -} diff --git a/src/Net_35/HandyControlDemo_Net_35/UserControl/Controls/CirclePanelDemoCtl.xaml b/src/Net_35/HandyControlDemo_Net_35/UserControl/Controls/CirclePanelDemoCtl.xaml deleted file mode 100644 index 0fe47f40..00000000 --- a/src/Net_35/HandyControlDemo_Net_35/UserControl/Controls/CirclePanelDemoCtl.xaml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Net_35/HandyControlDemo_Net_35/UserControl/Main/NoUserContent.xaml.cs b/src/Net_35/HandyControlDemo_Net_35/UserControl/Main/NoUserContent.xaml.cs deleted file mode 100644 index f765a014..00000000 --- a/src/Net_35/HandyControlDemo_Net_35/UserControl/Main/NoUserContent.xaml.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Diagnostics; -using System.Reflection; -using System.Windows; -using System.Windows.Controls; -using GalaSoft.MvvmLight.Messaging; -using HandyControl.Controls; -using HandyControl.Data; -using HandyControlDemo.Data; -using HandyControlDemo.Tools; -using HandyControlDemo.Window; - - -namespace HandyControlDemo.UserControl -{ - public partial class NoUserContent - { - public NoUserContent() - { - InitializeComponent(); - } - - private void ButtonLangs_OnClick(object sender, RoutedEventArgs e) - { - if (e.OriginalSource is Button button && button.Tag is string tag) - { - PopupConfig.IsOpen = false; - if (tag.Equals(GlobalData.Config.Lang)) return; - Growl.Ask(Properties.Langs.Lang.ChangeLangAsk, b => - { - if (!b) return true; - GlobalData.Config.Lang = tag; - GlobalData.Save(); - Process.Start(Assembly.GetExecutingAssembly().Location); - Environment.Exit(0); - return true; - }); - } - } - - private void ButtonConfig_OnClick(object sender, RoutedEventArgs e) => PopupConfig.IsOpen = true; - - private void ButtonSkins_OnClick(object sender, RoutedEventArgs e) - { - if (e.OriginalSource is Button button && button.Tag is SkinType tag) - { - PopupConfig.IsOpen = false; - if (tag.Equals(GlobalData.Config.Skin)) return; - GlobalData.Config.Skin = tag; - GlobalData.Save(); - ((App)Application.Current).UpdateSkin(tag); - } - } - - private void MenuItemLinks_OnClick(object sender, RoutedEventArgs e) - { - if (e.OriginalSource is MenuItem menuItem && menuItem.Tag is string tag) - { - Process.Start(tag); - } - } - - private void MenuItemQQGroup_OnClick(object sender, RoutedEventArgs e) - { - Messenger.Default.Send(null, MessageToken.ClearLeftSelected); - Messenger.Default.Send(true, MessageToken.FullSwitch); - Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{MessageToken.QQGroupView}"), MessageToken.LoadShowContent); - } - - private void MenuItemContributors_OnClick(object sender, RoutedEventArgs e) - { - Messenger.Default.Send(null, MessageToken.ClearLeftSelected); - Messenger.Default.Send(true, MessageToken.FullSwitch); - Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{MessageToken.ContributorsView}"), MessageToken.LoadShowContent); - } - - private void MenuAbout_OnClick(object sender, RoutedEventArgs e) - { - new AboutWindow - { - Owner = Application.Current.MainWindow - }.ShowDialog(); - } - } -} diff --git a/src/Net_35/HandyControlDemo_Net_35/UserControl/Main/QQGroupView.xaml b/src/Net_35/HandyControlDemo_Net_35/UserControl/Main/QQGroupView.xaml deleted file mode 100644 index eec1d7f3..00000000 --- a/src/Net_35/HandyControlDemo_Net_35/UserControl/Main/QQGroupView.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - diff --git a/src/Net_35/HandyControlDemo_Net_35/UserControl/Main/QQGroupView.xaml.cs b/src/Net_35/HandyControlDemo_Net_35/UserControl/Main/QQGroupView.xaml.cs deleted file mode 100644 index 8cce5d16..00000000 --- a/src/Net_35/HandyControlDemo_Net_35/UserControl/Main/QQGroupView.xaml.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace HandyControlDemo.UserControl -{ - public partial class QQGroupView - { - public QQGroupView() - { - InitializeComponent(); - } - } -} diff --git a/src/Net_35/HandyControlDemo_Net_35/UserControl/Styles/BorderDemoCtl.xaml b/src/Net_35/HandyControlDemo_Net_35/UserControl/Styles/BorderDemoCtl.xaml deleted file mode 100644 index 1f964c5e..00000000 --- a/src/Net_35/HandyControlDemo_Net_35/UserControl/Styles/BorderDemoCtl.xaml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Net_35/HandyControlDemo_Net_35/UserControl/Styles/BorderDemoCtl.xaml.cs b/src/Net_35/HandyControlDemo_Net_35/UserControl/Styles/BorderDemoCtl.xaml.cs deleted file mode 100644 index 101e7a91..00000000 --- a/src/Net_35/HandyControlDemo_Net_35/UserControl/Styles/BorderDemoCtl.xaml.cs +++ /dev/null @@ -1,11 +0,0 @@ - -namespace HandyControlDemo.UserControl -{ - public partial class BorderDemoCtl - { - public BorderDemoCtl() - { - InitializeComponent(); - } - } -} diff --git a/src/Net_35/HandyControlDemo_Net_35/UserControl/Styles/BrushDemoCtl.xaml b/src/Net_35/HandyControlDemo_Net_35/UserControl/Styles/BrushDemoCtl.xaml deleted file mode 100644 index b1bd9fa9..00000000 --- a/src/Net_35/HandyControlDemo_Net_35/UserControl/Styles/BrushDemoCtl.xaml +++ /dev/null @@ -1,40 +0,0 @@ - - - - diff --git a/src/Net_35/HandyControlDemo_Net_35/UserControl/Styles/BrushDemoCtl.xaml.cs b/src/Net_35/HandyControlDemo_Net_35/UserControl/Styles/BrushDemoCtl.xaml.cs deleted file mode 100644 index 2b757c25..00000000 --- a/src/Net_35/HandyControlDemo_Net_35/UserControl/Styles/BrushDemoCtl.xaml.cs +++ /dev/null @@ -1,11 +0,0 @@ - -namespace HandyControlDemo.UserControl -{ - public partial class BrushDemoCtl - { - public BrushDemoCtl() - { - InitializeComponent(); - } - } -} diff --git a/src/Net_35/HandyControlDemo_Net_35/UserControl/Styles/ButtonDemoCtl.xaml b/src/Net_35/HandyControlDemo_Net_35/UserControl/Styles/ButtonDemoCtl.xaml deleted file mode 100644 index dd61990e..00000000 --- a/src/Net_35/HandyControlDemo_Net_35/UserControl/Styles/ButtonDemoCtl.xaml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - -