添加项目文件。
This commit is contained in:
+141
@@ -0,0 +1,141 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.5.33530.505
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JinYuan.Helper", "JinYuan.Helper\JinYuan.Helper.csproj", "{258D0AB7-2B4F-4D8F-A3CD-7A8CB4A85360}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JinYuan.VirtualDataLibrary", "JinYuan.VirtualDataLibrary\JinYuan.VirtualDataLibrary.csproj", "{2AB7E380-7795-448A-933C-0F6A081B5E7E}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JinYuan.Models", "JinYuan.Models\JinYuan.Models.csproj", "{4C0BCB84-5CD7-4846-8363-C4C10D46E391}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JinYuan.ControlCenters", "JinYuan.ControlCenter\JinYuan.ControlCenters.csproj", "{1D0FA5A4-07F0-4621-B6BB-683AEC91E658}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JinYuan.DAL", "JinYuan.DAL\JinYuan.DAL.csproj", "{114AA012-29C9-418C-A2D6-3173C5341F51}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JinYuan.MES", "JinYuan.MES\JinYuan.MES.csproj", "{530B6426-08E7-461C-91DC-787F876620FC}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LargeSquareOne", "LargeSquareOne\LargeSquareOne.csproj", "{29E1F0D0-43DC-4077-A136-F25477E56881}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PLC", "PLC\PLC.csproj", "{486AECD0-C2BF-43C5-B7D7-88E565ADE4B7}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JinYuan.ControlLib", "JinYuan.ControlLib\JinYuan.ControlLib.csproj", "{1BB7ED33-D2CB-4CDD-AB39-F7F9AE948CA2}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Language", "Language\Language.csproj", "{292A5C9C-7A82-4D25-A885-DDCEDC93F03C}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOT.Services", "IOT.Services\IOT.Services.csproj", "{242400F4-9B01-4AEE-A6F7-05083757FCDD}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决方案项", "{9FA3D6BD-1EC1-3BA5-80CB-CE02773A58D5}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
数据库\gluingmachineoftabflatteningandwelding_a.sql = 数据库\gluingmachineoftabflatteningandwelding_a.sql
|
||||||
|
数据库\hbg_cupdataturnover.sql = 数据库\hbg_cupdataturnover.sql
|
||||||
|
TextFile1.txt = TextFile1.txt
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{258D0AB7-2B4F-4D8F-A3CD-7A8CB4A85360}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{258D0AB7-2B4F-4D8F-A3CD-7A8CB4A85360}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{258D0AB7-2B4F-4D8F-A3CD-7A8CB4A85360}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{258D0AB7-2B4F-4D8F-A3CD-7A8CB4A85360}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{258D0AB7-2B4F-4D8F-A3CD-7A8CB4A85360}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{258D0AB7-2B4F-4D8F-A3CD-7A8CB4A85360}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{258D0AB7-2B4F-4D8F-A3CD-7A8CB4A85360}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{258D0AB7-2B4F-4D8F-A3CD-7A8CB4A85360}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{2AB7E380-7795-448A-933C-0F6A081B5E7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{2AB7E380-7795-448A-933C-0F6A081B5E7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{2AB7E380-7795-448A-933C-0F6A081B5E7E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{2AB7E380-7795-448A-933C-0F6A081B5E7E}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{2AB7E380-7795-448A-933C-0F6A081B5E7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{2AB7E380-7795-448A-933C-0F6A081B5E7E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{2AB7E380-7795-448A-933C-0F6A081B5E7E}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{2AB7E380-7795-448A-933C-0F6A081B5E7E}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{4C0BCB84-5CD7-4846-8363-C4C10D46E391}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{4C0BCB84-5CD7-4846-8363-C4C10D46E391}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{4C0BCB84-5CD7-4846-8363-C4C10D46E391}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{4C0BCB84-5CD7-4846-8363-C4C10D46E391}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{4C0BCB84-5CD7-4846-8363-C4C10D46E391}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{4C0BCB84-5CD7-4846-8363-C4C10D46E391}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{4C0BCB84-5CD7-4846-8363-C4C10D46E391}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{4C0BCB84-5CD7-4846-8363-C4C10D46E391}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{1D0FA5A4-07F0-4621-B6BB-683AEC91E658}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1D0FA5A4-07F0-4621-B6BB-683AEC91E658}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1D0FA5A4-07F0-4621-B6BB-683AEC91E658}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{1D0FA5A4-07F0-4621-B6BB-683AEC91E658}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{1D0FA5A4-07F0-4621-B6BB-683AEC91E658}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{1D0FA5A4-07F0-4621-B6BB-683AEC91E658}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{1D0FA5A4-07F0-4621-B6BB-683AEC91E658}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{1D0FA5A4-07F0-4621-B6BB-683AEC91E658}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{114AA012-29C9-418C-A2D6-3173C5341F51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{114AA012-29C9-418C-A2D6-3173C5341F51}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{114AA012-29C9-418C-A2D6-3173C5341F51}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{114AA012-29C9-418C-A2D6-3173C5341F51}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{114AA012-29C9-418C-A2D6-3173C5341F51}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{114AA012-29C9-418C-A2D6-3173C5341F51}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{114AA012-29C9-418C-A2D6-3173C5341F51}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{114AA012-29C9-418C-A2D6-3173C5341F51}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{530B6426-08E7-461C-91DC-787F876620FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{530B6426-08E7-461C-91DC-787F876620FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{530B6426-08E7-461C-91DC-787F876620FC}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{530B6426-08E7-461C-91DC-787F876620FC}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{530B6426-08E7-461C-91DC-787F876620FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{530B6426-08E7-461C-91DC-787F876620FC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{530B6426-08E7-461C-91DC-787F876620FC}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{530B6426-08E7-461C-91DC-787F876620FC}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{29E1F0D0-43DC-4077-A136-F25477E56881}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{29E1F0D0-43DC-4077-A136-F25477E56881}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{29E1F0D0-43DC-4077-A136-F25477E56881}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{29E1F0D0-43DC-4077-A136-F25477E56881}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{29E1F0D0-43DC-4077-A136-F25477E56881}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{29E1F0D0-43DC-4077-A136-F25477E56881}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{29E1F0D0-43DC-4077-A136-F25477E56881}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{29E1F0D0-43DC-4077-A136-F25477E56881}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{486AECD0-C2BF-43C5-B7D7-88E565ADE4B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{486AECD0-C2BF-43C5-B7D7-88E565ADE4B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{486AECD0-C2BF-43C5-B7D7-88E565ADE4B7}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{486AECD0-C2BF-43C5-B7D7-88E565ADE4B7}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{486AECD0-C2BF-43C5-B7D7-88E565ADE4B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{486AECD0-C2BF-43C5-B7D7-88E565ADE4B7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{486AECD0-C2BF-43C5-B7D7-88E565ADE4B7}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{486AECD0-C2BF-43C5-B7D7-88E565ADE4B7}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{1BB7ED33-D2CB-4CDD-AB39-F7F9AE948CA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1BB7ED33-D2CB-4CDD-AB39-F7F9AE948CA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1BB7ED33-D2CB-4CDD-AB39-F7F9AE948CA2}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{1BB7ED33-D2CB-4CDD-AB39-F7F9AE948CA2}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{1BB7ED33-D2CB-4CDD-AB39-F7F9AE948CA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{1BB7ED33-D2CB-4CDD-AB39-F7F9AE948CA2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{1BB7ED33-D2CB-4CDD-AB39-F7F9AE948CA2}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{1BB7ED33-D2CB-4CDD-AB39-F7F9AE948CA2}.Release|x64.Build.0 = Release|x64
|
||||||
|
{292A5C9C-7A82-4D25-A885-DDCEDC93F03C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{292A5C9C-7A82-4D25-A885-DDCEDC93F03C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{292A5C9C-7A82-4D25-A885-DDCEDC93F03C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{292A5C9C-7A82-4D25-A885-DDCEDC93F03C}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{292A5C9C-7A82-4D25-A885-DDCEDC93F03C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{292A5C9C-7A82-4D25-A885-DDCEDC93F03C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{292A5C9C-7A82-4D25-A885-DDCEDC93F03C}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{292A5C9C-7A82-4D25-A885-DDCEDC93F03C}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{242400F4-9B01-4AEE-A6F7-05083757FCDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{242400F4-9B01-4AEE-A6F7-05083757FCDD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{242400F4-9B01-4AEE-A6F7-05083757FCDD}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{242400F4-9B01-4AEE-A6F7-05083757FCDD}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{242400F4-9B01-4AEE-A6F7-05083757FCDD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{242400F4-9B01-4AEE-A6F7-05083757FCDD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{242400F4-9B01-4AEE-A6F7-05083757FCDD}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{242400F4-9B01-4AEE-A6F7-05083757FCDD}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
RESX_AutoCreateNewLanguageFiles = False
|
||||||
|
RESX_SortFileContentOnSave = True
|
||||||
|
RESX_NeutralResourcesLanguage = zh-Hans
|
||||||
|
SolutionGuid = {E8421996-BAC4-4509-9C3E-BC424197F2D8}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
Binary file not shown.
@@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||||
|
</startup>
|
||||||
|
<appSettings>
|
||||||
|
<!--//日志配置 开启日志-->
|
||||||
|
<add key="EnableLogging" value="true" />
|
||||||
|
<!--//日志配置 日志存储周期 默认30天-->
|
||||||
|
<add key="LogRetentionDays" value="30" />
|
||||||
|
<!--//日志配置 日志存储路径 暂未使用,存储在跟目录-->
|
||||||
|
<add key="LogDirectory" value="D:\APILog\MQTTService" />
|
||||||
|
<!--//日志配置 按日存储-->
|
||||||
|
<add key="LogSplitStrategy" value="ByDay" />
|
||||||
|
<!--//日志配置 存储文件大小-->
|
||||||
|
<add key="MaxLogFileSizeBytes" value="10485760" />
|
||||||
|
<!--//PLC IP地址 192.168.1.50-->
|
||||||
|
<add key="PlcIpAddress" value="192.168.1.50" />
|
||||||
|
<!--//PLC 端口-->
|
||||||
|
<add key="PlcPort" value="9600" />
|
||||||
|
<!--//MQTT服务器IP地址 10.22.160.144-->
|
||||||
|
<add key="MQTTServerAddress" value="10.22.160.144" />
|
||||||
|
<!--//MQTT服务器端口-->
|
||||||
|
<add key="MQTTServerPort" value="1883" />
|
||||||
|
<!--//MQTT服务器发布ID-->
|
||||||
|
<add key="ClientId" value="601UPW01" />
|
||||||
|
<!--//MQTT服务发布主题PPM-->
|
||||||
|
<add key="Topic" value="EVE/60J/EQP/NEW_PPM/601UPW01" />
|
||||||
|
<!--PPM其他数据-->
|
||||||
|
<add key="Topic1" value="eve/60J/EQP/601UPW01"/>
|
||||||
|
<!--直角坐标机械臂-->
|
||||||
|
<add key="LRobotTopic" value="EVE/60J/LRobot/601PWM01_LUR01"/>
|
||||||
|
<!--关节机械臂-->
|
||||||
|
<add key="JRobotTopic" value="EVE/60J/JRobot/601PWM01_STR01"/>
|
||||||
|
<!--//参数设置 事业部-->
|
||||||
|
<add key="BU_id" value="EVE2BU" />
|
||||||
|
<!--//参数设置 地区-->
|
||||||
|
<add key="District_id" value="JM" />
|
||||||
|
<!--//参数设置 工厂-->
|
||||||
|
<add key="Factory_id" value="60J" />
|
||||||
|
<!--//参数设置 线体号-->
|
||||||
|
<add key="Production_line_id" value="MW-601" />
|
||||||
|
<!--//参数设置 设备编号-->
|
||||||
|
<add key="Device_name" value="601UPW01" />
|
||||||
|
<!--//线程循环间隔 ms单位-->
|
||||||
|
<add key="ThreadInterval" value="50" />
|
||||||
|
<add key="SwitchLog" value="True" />
|
||||||
|
<add key="ClientSettingsProvider.ServiceUri" value="" />
|
||||||
|
</appSettings>
|
||||||
|
<system.web>
|
||||||
|
<membership defaultProvider="ClientAuthenticationMembershipProvider">
|
||||||
|
<providers>
|
||||||
|
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
|
||||||
|
</providers>
|
||||||
|
</membership>
|
||||||
|
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
|
||||||
|
<providers>
|
||||||
|
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
|
||||||
|
</providers>
|
||||||
|
</roleManager>
|
||||||
|
</system.web>
|
||||||
|
</configuration>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,127 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{242400F4-9B01-4AEE-A6F7-05083757FCDD}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<RootNamespace>IOT.Services</RootNamespace>
|
||||||
|
<AssemblyName>IOT.Services</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
|
<PublishUrl>publish\</PublishUrl>
|
||||||
|
<Install>true</Install>
|
||||||
|
<InstallFrom>Disk</InstallFrom>
|
||||||
|
<UpdateEnabled>false</UpdateEnabled>
|
||||||
|
<UpdateMode>Foreground</UpdateMode>
|
||||||
|
<UpdateInterval>7</UpdateInterval>
|
||||||
|
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||||
|
<UpdatePeriodically>false</UpdatePeriodically>
|
||||||
|
<UpdateRequired>false</UpdateRequired>
|
||||||
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
|
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||||
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
|
<LangVersion>10.0</LangVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="DataConvertLib, Version=6.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>Lib\DataConvertLib.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>Lib\Newtonsoft.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="NLog, Version=6.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\NLog.6.0.2\lib\net46\NLog.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="PLCCommunication, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>Lib\PLCCommunication.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
|
<Reference Include="System.Configuration.Install" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Management" />
|
||||||
|
<Reference Include="System.Web" />
|
||||||
|
<Reference Include="System.Web.Extensions" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.ServiceProcess" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Logger.cs" />
|
||||||
|
<Compile Include="Models.cs" />
|
||||||
|
<Compile Include="MqttClientWrapper.cs" />
|
||||||
|
<Compile Include="MqttDataService.cs" />
|
||||||
|
<Compile Include="PLCDataReader.cs" />
|
||||||
|
<Compile Include="PLCWrapper.cs" />
|
||||||
|
<Compile Include="Service1.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Service1.Designer.cs">
|
||||||
|
<DependentUpon>Service1.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Program.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="StationDataComparer.cs" />
|
||||||
|
<Compile Include="XmlConfigReader.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="App.config" />
|
||||||
|
<None Include="NLog.config" />
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="Lib\DataConvertLib.dll" />
|
||||||
|
<Content Include="Lib\Newtonsoft.Json.dll" />
|
||||||
|
<Content Include="Lib\PLCCommunication.dll" />
|
||||||
|
<Content Include="Config.xml">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>Microsoft .NET Framework 4.8 %28x86 和 x64%29</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,135 @@
|
|||||||
|
using NLog;
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Timers;
|
||||||
|
|
||||||
|
|
||||||
|
public class Logger
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
private static readonly NLog.Logger loginfo = LogManager.GetLogger("loginfo");
|
||||||
|
private static readonly NLog.Logger logerror = LogManager.GetLogger("logerror");
|
||||||
|
private static readonly NLog.Logger logmqtt = LogManager.GetLogger("logmqtt");
|
||||||
|
|
||||||
|
private static readonly NLog.Logger logsInfo = LogManager.GetLogger("logsInfo");
|
||||||
|
private static readonly NLog.Logger logsMEStIME = LogManager.GetLogger("logsMEStIME");
|
||||||
|
private static readonly NLog.Logger logsSql = LogManager.GetLogger("logsSql");
|
||||||
|
private static readonly NLog.Logger logsSysErrorLog = LogManager.GetLogger("logsSysErrorLog");
|
||||||
|
private static readonly NLog.Logger logsSysErrorLogcn = LogManager.GetLogger("logsSysErrorLogcn");
|
||||||
|
private static readonly Timer cleanupTimer;
|
||||||
|
private const int MAX_DAYS = 7;
|
||||||
|
private const string LOG_BASE_PATH = "Log";
|
||||||
|
|
||||||
|
static Logger()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 创建一个每天执行一次的定时器
|
||||||
|
cleanupTimer = new Timer(24 * 60 * 60 * 1000); // 24小时
|
||||||
|
cleanupTimer.Elapsed += CleanupOldLogs;
|
||||||
|
cleanupTimer.Start();
|
||||||
|
|
||||||
|
// 启动时执行一次清理
|
||||||
|
CleanupOldLogs(null, null);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
WriteError("Failed to initialize logger cleanup timer", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void WriteInfo(string info)
|
||||||
|
{
|
||||||
|
if (loginfo.IsInfoEnabled)
|
||||||
|
{
|
||||||
|
loginfo.Info(info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void WriteMqtt(string info)
|
||||||
|
{
|
||||||
|
if (logmqtt.IsInfoEnabled)
|
||||||
|
{
|
||||||
|
logmqtt.Info(info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void WriteError(string error)
|
||||||
|
{
|
||||||
|
if (logerror.IsErrorEnabled)
|
||||||
|
{
|
||||||
|
logerror.Error(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void WriteError(string info, Exception ex)
|
||||||
|
{
|
||||||
|
if (logerror.IsErrorEnabled)
|
||||||
|
{
|
||||||
|
logerror.Error(info, ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void CleanupOldLogs(object sender, ElapsedEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!Directory.Exists(LOG_BASE_PATH))
|
||||||
|
return;
|
||||||
|
|
||||||
|
string[] logTypes = { "LogError", "LogInfo", "LogMqtt" };
|
||||||
|
DateTime cutoffDate = DateTime.Now.AddDays(-MAX_DAYS);
|
||||||
|
|
||||||
|
foreach (string logType in logTypes)
|
||||||
|
{
|
||||||
|
string logTypeDir = Path.Combine(LOG_BASE_PATH, logType);
|
||||||
|
if (!Directory.Exists(logTypeDir))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// 获取所有日期文件夹
|
||||||
|
string[] dateDirs = Directory.GetDirectories(logTypeDir);
|
||||||
|
foreach (string dateDir in dateDirs)
|
||||||
|
{
|
||||||
|
string dirName = Path.GetFileName(dateDir);
|
||||||
|
if (DateTime.TryParseExact(dirName, "yyyyMMdd", null,
|
||||||
|
System.Globalization.DateTimeStyles.None, out DateTime dirDate))
|
||||||
|
{
|
||||||
|
if (dirDate < cutoffDate)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Directory.Delete(dateDir, true);
|
||||||
|
WriteInfo($"Deleted old log directory: {dateDir}");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
WriteError($"Failed to delete log directory: {dateDir}", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
WriteError("Error during log cleanup", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提供手动清理方法
|
||||||
|
public static void ForceCleanupOldLogs()
|
||||||
|
{
|
||||||
|
CleanupOldLogs(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 在应用程序退出时调用此方法
|
||||||
|
public static void Shutdown()
|
||||||
|
{
|
||||||
|
if (cleanupTimer != null)
|
||||||
|
{
|
||||||
|
cleanupTimer.Stop();
|
||||||
|
cleanupTimer.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace WindowsService1
|
||||||
|
{
|
||||||
|
#region 1、系统内部
|
||||||
|
public enum AcquisitionType
|
||||||
|
{
|
||||||
|
PPM,
|
||||||
|
Axis,
|
||||||
|
Cylinder,
|
||||||
|
LRobot
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum PLCDataType
|
||||||
|
{
|
||||||
|
Short,
|
||||||
|
Float
|
||||||
|
}
|
||||||
|
|
||||||
|
public class StationData
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
public object MainValue { get; set; }
|
||||||
|
public DateTime Timestamp { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TypeConfig
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Address { get; set; }
|
||||||
|
public string DataType { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class CollectionGroupConfig
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string StartAddress { get; set; }
|
||||||
|
public int Length { get; set; }
|
||||||
|
public string DefaultDataType { get; set; }
|
||||||
|
public Dictionary<string, TypeConfig> Types { get; set; }
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 2、PPM点位
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 3、预测性点位
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 4、机械臂
|
||||||
|
//直角坐标机械臂
|
||||||
|
public class LRobot
|
||||||
|
{
|
||||||
|
public string bu_id { get; set; }
|
||||||
|
public string district_id { get; set; }
|
||||||
|
public string factory_id { get; set; }
|
||||||
|
public string production_line_id { get; set; }
|
||||||
|
public string production_processes_id { get; set; }
|
||||||
|
public string work_center_id { get; set; }
|
||||||
|
public string station_id { get; set; }
|
||||||
|
public string device_name { get; set; } = "601PWM01";
|
||||||
|
public string robot_name { get; set; }
|
||||||
|
public List<Taglist> taglist { get; set; }
|
||||||
|
}
|
||||||
|
public class Taglist
|
||||||
|
{
|
||||||
|
public string device_time { get; set; }
|
||||||
|
public Collection collections_items { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
public class Collection
|
||||||
|
{
|
||||||
|
public string robot_status { get; set; } = "1";
|
||||||
|
public string x_value { get; set; }
|
||||||
|
public string y_value { get; set; }
|
||||||
|
public string z_value { get; set; }
|
||||||
|
public string time_span { get; set; } = "2.5";
|
||||||
|
public string hand_status { get; set; } = "1";
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
@@ -0,0 +1,376 @@
|
|||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using PLCCommunication;
|
||||||
|
using PLCCommunication.LogNet;
|
||||||
|
using PLCCommunication.MQTT;
|
||||||
|
using System;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
|
namespace WindowsService1
|
||||||
|
{
|
||||||
|
public class MqttClientWrapper
|
||||||
|
{
|
||||||
|
private MqttClient mqttClient;
|
||||||
|
private bool mqttIsConnected;
|
||||||
|
private const int MaxReconnectAttempts = 5;
|
||||||
|
private const int ReconnectDelay = 5000; // 5 seconds
|
||||||
|
|
||||||
|
private MqttConnectionOptions options;
|
||||||
|
public event Action<string, string, string> OnMessageReceived;
|
||||||
|
public long ReceiveCount { get; private set; }
|
||||||
|
|
||||||
|
public PLCCommunication.LogNet.ILogNet LogNet = new LogNetDateTime("D:\\APILog\\Logs\\MQTTLogs", GenerateMode.ByEveryDay, 20);
|
||||||
|
|
||||||
|
public enum MessageFormat
|
||||||
|
{
|
||||||
|
Binary,
|
||||||
|
Text,
|
||||||
|
Xml,
|
||||||
|
Json
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public MqttClientWrapper(string ipAddress, int port, string clientId, MqttCredential credentials)
|
||||||
|
{
|
||||||
|
InitializeMqttOptions(ipAddress, port, clientId, credentials);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitializeMqttOptions(string ipAddress, int port, string clientId, MqttCredential credentials)
|
||||||
|
{
|
||||||
|
options = new MqttConnectionOptions
|
||||||
|
{
|
||||||
|
IpAddress = ipAddress,
|
||||||
|
Port = port,
|
||||||
|
ClientId = clientId,
|
||||||
|
Credentials = credentials,
|
||||||
|
UseRSAProvider = false,
|
||||||
|
CleanSession = false,
|
||||||
|
UseSSL = false,
|
||||||
|
SSLSecure = false,
|
||||||
|
CertificateFile = "",
|
||||||
|
KeepAlivePeriod = TimeSpan.FromSeconds(30),
|
||||||
|
KeepAliveSendInterval = TimeSpan.FromSeconds(10),
|
||||||
|
ConnectTimeout = 5,
|
||||||
|
WillMessage = null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task InitializeAndConnectAsync()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
mqttClient = new MqttClient(options);
|
||||||
|
Logger.WriteMqtt("MQTT 初始化成功");
|
||||||
|
|
||||||
|
await ConnectMqttAsync();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteError($"MQTT 初始化失败: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task ConnectMqttAsync()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
JYResult connect = await mqttClient.ConnectServerAsync();
|
||||||
|
if (connect.IsSuccess)
|
||||||
|
{
|
||||||
|
mqttIsConnected = true;
|
||||||
|
Logger.WriteMqtt("MQTT 连接服务器成功");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger.WriteError("MQTT 无法连接到服务器");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteError($"MQTT 无法连接到服务器: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public async Task SendMessageAsync(string source, string publishTopic, string type, JObject messageObj)
|
||||||
|
{
|
||||||
|
if (!mqttClient.IsConnected)
|
||||||
|
{
|
||||||
|
mqttIsConnected = false;
|
||||||
|
|
||||||
|
Logger.WriteMqtt("客户端未连接到服务器。正在尝试重新连接...");
|
||||||
|
|
||||||
|
await ReconnectWithRetry();
|
||||||
|
if (!mqttClient.IsConnected)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("无法与 MQTT 代理建立连接.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (messageObj != null)
|
||||||
|
{
|
||||||
|
string json = messageObj.ToString();
|
||||||
|
//string json = JsonConvert.SerializeObject(messageObj);
|
||||||
|
JYResult result = await mqttClient.PublishMessageAsync(new MqttApplicationMessage
|
||||||
|
{
|
||||||
|
Topic = publishTopic,
|
||||||
|
QualityOfServiceLevel = MqttQualityOfServiceLevel.AtMostOnce,
|
||||||
|
Payload = Encoding.UTF8.GetBytes(json),
|
||||||
|
Retain = false,
|
||||||
|
});
|
||||||
|
if (result.IsSuccess)
|
||||||
|
{
|
||||||
|
if (Service1.SwitchLog)
|
||||||
|
{
|
||||||
|
Logger.WriteMqtt($"线程 [{source}] 发送 [{type}] 消息到主题 [{publishTopic}]: {json}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger.WriteMqtt($"线程 [{source}] 发送 [{type}] 消息到主题 [{publishTopic}] 失败: {result.Message}");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteError($"发送消息错误: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public async Task SendMessageAsync(string source, string publishTopic, string type, string messageObj)
|
||||||
|
{
|
||||||
|
if (!mqttClient.IsConnected)
|
||||||
|
{
|
||||||
|
mqttIsConnected = false;
|
||||||
|
|
||||||
|
Logger.WriteMqtt("客户端未连接到服务器。正在尝试重新连接...");
|
||||||
|
|
||||||
|
|
||||||
|
await ReconnectWithRetry();
|
||||||
|
if (!mqttClient.IsConnected)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("无法与 MQTT 代理建立连接.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (messageObj != null)
|
||||||
|
{
|
||||||
|
JYResult result = await mqttClient.PublishMessageAsync(new MqttApplicationMessage
|
||||||
|
{
|
||||||
|
Topic = publishTopic,
|
||||||
|
QualityOfServiceLevel = MqttQualityOfServiceLevel.AtMostOnce,
|
||||||
|
Payload = Encoding.UTF8.GetBytes(messageObj),
|
||||||
|
Retain = false,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (result.IsSuccess)
|
||||||
|
{
|
||||||
|
if (Service1.SwitchLog)
|
||||||
|
{
|
||||||
|
Logger.WriteMqtt($"线程 [{source}] 发送 [{type}] 消息到主题 [{publishTopic}]: {messageObj}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger.WriteMqtt($"线程 [{source}] 发送 [{type}] 消息到主题 [{publishTopic}] 失败: {result.Message}");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteError($"发送消息错误: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void SubscribeMessage(string topic, MessageFormat format = MessageFormat.Text, bool truncateLongMessage = false)
|
||||||
|
{
|
||||||
|
if (!mqttIsConnected)
|
||||||
|
{
|
||||||
|
ConnectMqttAsync().Wait();
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
JYResult operateResult = mqttClient.SubscribeMessage(new string[] { topic });
|
||||||
|
if (!operateResult.IsSuccess)
|
||||||
|
{
|
||||||
|
Logger.WriteMqtt($"订阅消息失败: {operateResult.Message}");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
SubscribeTopic subscribeTopic = mqttClient.GetSubscribeTopic(topic);
|
||||||
|
if (subscribeTopic != null)
|
||||||
|
{
|
||||||
|
subscribeTopic.OnMqttMessageReceived += (sender, args) =>
|
||||||
|
{
|
||||||
|
HandleReceivedMessage(args.Topic, args.Payload, format, truncateLongMessage);
|
||||||
|
};
|
||||||
|
Logger.WriteMqtt($"成功订阅主题: {topic}");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger.WriteMqtt($"无法获取订阅主题 {topic}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteError($"订阅主题时出错 {topic}: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleReceivedMessage(string topic, byte[] payload, MessageFormat format, bool truncateLongMessage)
|
||||||
|
{
|
||||||
|
ReceiveCount++;
|
||||||
|
string text = string.Empty;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
switch (format)
|
||||||
|
{
|
||||||
|
case MessageFormat.Binary:
|
||||||
|
text = BitConverter.ToString(payload).Replace("-", " ");
|
||||||
|
break;
|
||||||
|
case MessageFormat.Text:
|
||||||
|
text = Encoding.UTF8.GetString(payload);
|
||||||
|
break;
|
||||||
|
case MessageFormat.Xml:
|
||||||
|
try
|
||||||
|
{
|
||||||
|
text = XElement.Parse(Encoding.UTF8.GetString(payload)).ToString();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
text = Encoding.UTF8.GetString(payload);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MessageFormat.Json:
|
||||||
|
try
|
||||||
|
{
|
||||||
|
text = JObject.Parse(Encoding.UTF8.GetString(payload)).ToString();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
text = Encoding.UTF8.GetString(payload);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//if (Service1.SwitchLog)
|
||||||
|
//{
|
||||||
|
// LogNet.WriteDebug($"收到主题 {topic}: {text}");
|
||||||
|
//}
|
||||||
|
//if (truncateLongMessage && text.Length > 200)
|
||||||
|
//{
|
||||||
|
// text = text.Substring(0, 200) + "...";
|
||||||
|
//}
|
||||||
|
|
||||||
|
string timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||||
|
OnMessageReceived?.Invoke(timestamp, topic, text);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteError($"处理收到的消息时出错: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UnsubscribeMessage(string topic)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
JYResult operateResult = mqttClient.UnSubscribeMessage(new string[] { topic });
|
||||||
|
if (operateResult.IsSuccess)
|
||||||
|
{
|
||||||
|
Logger.WriteMqtt($"成功取消订阅主题: {topic}");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger.WriteMqtt($"取消订阅主题失败 {topic}: {operateResult.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteError($"取消订阅主题时出错 {topic}: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重连
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
private async Task ReconnectWithRetry()
|
||||||
|
{
|
||||||
|
int attempts = 0;
|
||||||
|
while (!mqttClient.IsConnected && attempts < MaxReconnectAttempts)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await mqttClient.ConnectServerAsync();
|
||||||
|
Logger.WriteMqtt("重新连接成功.");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
attempts++;
|
||||||
|
Logger.WriteMqtt($"重新连接尝试 {attempts} 失败的: {ex.Message}");
|
||||||
|
await Task.Delay(ReconnectDelay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!mqttClient.IsConnected)
|
||||||
|
{
|
||||||
|
Logger.WriteMqtt("尝试次数达到上限后仍无法重新连接.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private async Task ReconnectAsync()
|
||||||
|
{
|
||||||
|
Logger.WriteMqtt("正在尝试重新连接...");
|
||||||
|
mqttIsConnected = false;
|
||||||
|
int retryCount = 0;
|
||||||
|
const int maxRetries = 5;
|
||||||
|
const int retryDelayMs = 5000;
|
||||||
|
|
||||||
|
while (!mqttIsConnected && retryCount < maxRetries)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await ConnectMqttAsync();
|
||||||
|
if (mqttIsConnected)
|
||||||
|
{
|
||||||
|
Logger.WriteMqtt("重新连接成功");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteMqtt($"重新连接尝试 {retryCount + 1} 失败的: {ex.Message}");
|
||||||
|
}
|
||||||
|
|
||||||
|
retryCount++;
|
||||||
|
await Task.Delay(retryDelayMs);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!mqttIsConnected)
|
||||||
|
{
|
||||||
|
Logger.WriteMqtt("多次尝试后仍无法重新连接");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public async Task Disconnect()
|
||||||
|
{
|
||||||
|
await mqttClient.ConnectCloseAsync();
|
||||||
|
mqttIsConnected = false;
|
||||||
|
Logger.WriteMqtt("与 MQTT服务端断开连接!!!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,730 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace WindowsService1
|
||||||
|
{
|
||||||
|
public class MqttDataService
|
||||||
|
{
|
||||||
|
|
||||||
|
public static string BU_id;
|
||||||
|
public static string District_id;
|
||||||
|
public static string Factory_id;
|
||||||
|
public static string Production_line_id;
|
||||||
|
public static string Device_name;
|
||||||
|
public static string Topic;
|
||||||
|
public static string Work_Center_id;
|
||||||
|
public class OperationData
|
||||||
|
{
|
||||||
|
public int Item_Value { get; set; }
|
||||||
|
public string Start_Time { get; set; }
|
||||||
|
public string End_Time { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class MqttMessage
|
||||||
|
{
|
||||||
|
public string bu_id { get; set; }
|
||||||
|
public string district_id { get; set; }
|
||||||
|
public string factory_id { get; set; }
|
||||||
|
public string production_line_id { get; set; }
|
||||||
|
public string production_processes_id { get; set; }
|
||||||
|
public string work_center_id { get; set; }
|
||||||
|
public string station_id { get; set; }
|
||||||
|
public string device_name { get; set; }
|
||||||
|
public List<TagList> taglist { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TagList
|
||||||
|
{
|
||||||
|
public string device_time { get; set; }
|
||||||
|
public Dictionary<string, OperationData> collection_items { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="source"></param>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
/// <param name="processedValues"></param>
|
||||||
|
/// <param name="_plcAddresses"></param>
|
||||||
|
/// <param name="_collectionGroups"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static MqttMessage CreateMqttMessage(string source, AcquisitionType type, List<StationData> processedValues,
|
||||||
|
Dictionary<AcquisitionType, Dictionary<string, string>> _plcAddresses,
|
||||||
|
Dictionary<AcquisitionType, CollectionGroupConfig> _collectionGroups)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Logger.WriteInfo($"开始创建 MQTT 消息, 类型: {type}, 数据点数量: {processedValues?.Count ?? 0}");
|
||||||
|
|
||||||
|
if (processedValues == null || processedValues.Count == 0)
|
||||||
|
{
|
||||||
|
Logger.WriteInfo("没有需要处理的数据,返回 null");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var addresses = _plcAddresses[type];
|
||||||
|
var config = _collectionGroups[type];
|
||||||
|
var collectionItems = new Dictionary<string, OperationData>();
|
||||||
|
|
||||||
|
// 获取当前时间作为设备时间
|
||||||
|
var currentTime = DateTime.Now;
|
||||||
|
var deviceTimeStr = currentTime.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||||
|
|
||||||
|
Logger.WriteInfo($"处理数据类型: {type}, 当前时间: {deviceTimeStr}");
|
||||||
|
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case AcquisitionType.PPM:
|
||||||
|
ProcessPPMData(processedValues, addresses, config, collectionItems);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case AcquisitionType.Axis:
|
||||||
|
case AcquisitionType.Cylinder:
|
||||||
|
ProcessFloatData(processedValues, addresses, config, currentTime, collectionItems);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
Logger.WriteError($"未知的数据类型: {type}");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (collectionItems.Count == 0)
|
||||||
|
{
|
||||||
|
Logger.WriteInfo("没有有效的采集项,返回 null");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
var message = new MqttMessage
|
||||||
|
{
|
||||||
|
bu_id = BU_id,
|
||||||
|
district_id = District_id,
|
||||||
|
factory_id = Factory_id,
|
||||||
|
production_line_id = Production_line_id,
|
||||||
|
production_processes_id = string.Empty,
|
||||||
|
work_center_id = Work_Center_id,
|
||||||
|
station_id = "1",
|
||||||
|
device_name = Device_name,
|
||||||
|
taglist = new List<TagList>
|
||||||
|
{
|
||||||
|
new TagList
|
||||||
|
{
|
||||||
|
device_time = deviceTimeStr,
|
||||||
|
collection_items = collectionItems
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 记录创建的消息内容
|
||||||
|
Logger.WriteInfo($"MQTT 消息创建完成: {JsonConvert.SerializeObject(message, Formatting.None)}");
|
||||||
|
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteError($"创建 MQTT 消息时发生错误: {ex.Message}");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PPM点位数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="processedValues"></param>
|
||||||
|
/// <param name="addresses"></param>
|
||||||
|
/// <param name="config"></param>
|
||||||
|
/// <param name="collectionItems"></param>
|
||||||
|
///
|
||||||
|
// 添加静态字段来存储上次发送的数据
|
||||||
|
private static Dictionary<string, OperationData> _lastSentData = new Dictionary<string, OperationData>();
|
||||||
|
|
||||||
|
public static void ProcessPPMData(List<StationData> processedValues, Dictionary<string, string> addresses, CollectionGroupConfig config, Dictionary<string, OperationData> collectionItems)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Logger.WriteInfo($"开始处理 PPM 数据,数据点数量: {processedValues.Count}");
|
||||||
|
|
||||||
|
// 创建临时字典存储当前所有数据点
|
||||||
|
var tempItems = new Dictionary<string, OperationData>();
|
||||||
|
|
||||||
|
foreach (var value in processedValues)
|
||||||
|
{
|
||||||
|
var addressPair = addresses.FirstOrDefault(x => x.Key == value.Name);
|
||||||
|
if (!string.IsNullOrEmpty(addressPair.Key))
|
||||||
|
{
|
||||||
|
int itemValue = Convert.ToInt32(ConvertToIntegerWithThreeDecimals(value.MainValue));
|
||||||
|
|
||||||
|
// 计算开始时间 (结束时间 - 时长)
|
||||||
|
var startTime = value.Timestamp.AddMilliseconds(-itemValue);
|
||||||
|
|
||||||
|
var operationData = new OperationData
|
||||||
|
{
|
||||||
|
Item_Value = itemValue,
|
||||||
|
Start_Time = startTime.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
End_Time = value.Timestamp.ToString("yyyy-MM-dd HH:mm:ss.fff")
|
||||||
|
};
|
||||||
|
|
||||||
|
// 检查数据是否发生变化
|
||||||
|
bool shouldAdd = true;
|
||||||
|
|
||||||
|
// 检查是否与上次发送的数据重复
|
||||||
|
if (_lastSentData.TryGetValue(addressPair.Key, out var lastData))
|
||||||
|
{
|
||||||
|
var currentEndTime = operationData.End_Time.ToString();
|
||||||
|
var lastEndTime = lastData.End_Time.ToString();
|
||||||
|
|
||||||
|
if (string.Equals(lastEndTime, currentEndTime, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
shouldAdd = false;
|
||||||
|
Logger.WriteInfo($"跳过重复数据点: {addressPair.Key}");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (shouldAdd)
|
||||||
|
{
|
||||||
|
tempItems[addressPair.Key] = operationData;
|
||||||
|
Logger.WriteInfo($"处理数据点: {addressPair.Key}, 值: {itemValue}, " +
|
||||||
|
$"开始时间: {startTime:yyyy-MM-dd HH:mm:ss.fff}, " +
|
||||||
|
$"结束时间: {operationData.End_Time}");
|
||||||
|
}
|
||||||
|
//if (shouldAdd)
|
||||||
|
//{
|
||||||
|
// // 检查是否与当前批次的其他数据有重复的结束时间
|
||||||
|
// var duplicateEndTimeItem = tempItems.FirstOrDefault(x =>
|
||||||
|
// string.Equals(x.Value.End_Time.ToString(), operationData.End_Time.ToString(), StringComparison.OrdinalIgnoreCase));
|
||||||
|
|
||||||
|
// if (duplicateEndTimeItem.Key != null)
|
||||||
|
// {
|
||||||
|
// Logger.WriteError($"检测到结束时间重复: {operationData.End_Time} 对应地址: {addressPair.Key}, " +
|
||||||
|
// $"与地址 {duplicateEndTimeItem.Key} 的数据重复");
|
||||||
|
|
||||||
|
// // 根据地址的字母顺序决定哪个需要调整时间,确保调整的一致性
|
||||||
|
// if (string.Compare(addressPair.Key, duplicateEndTimeItem.Key) > 0)
|
||||||
|
// {
|
||||||
|
// operationData.End_Time = value.Timestamp.AddMilliseconds(1).ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||||
|
// Logger.WriteInfo($"调整后的结束时间: {operationData.End_Time}");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// tempItems[addressPair.Key] = operationData;
|
||||||
|
// Logger.WriteInfo($"处理数据点: {addressPair.Key}, 值: {itemValue}, " +
|
||||||
|
// $"开始时间: {startTime:yyyy-MM-dd HH:mm:ss.fff}, " +
|
||||||
|
// $"结束时间: {operationData.End_Time}");
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger.WriteError($"未找到数据点 {value.Name} 对应的地址配置");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将处理后的数据添加到最终结果并更新上次发送的数据
|
||||||
|
foreach (var item in tempItems)
|
||||||
|
{
|
||||||
|
collectionItems[item.Key] = item.Value;
|
||||||
|
_lastSentData[item.Key] = item.Value; // 更新上次发送的数据
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.WriteInfo($"PPM 数据处理完成,处理后的数据点数量: {collectionItems.Count}");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteError($"处理 PPM 数据时出错: {ex.Message}");
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool IsDataEqual(OperationData data1, OperationData data2, string addressKey)
|
||||||
|
{
|
||||||
|
if (data1 == null || data2 == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
bool isEqual = data1.Item_Value == data2.Item_Value &&
|
||||||
|
data1.Start_Time == data2.Start_Time &&
|
||||||
|
data1.End_Time == data2.End_Time;
|
||||||
|
|
||||||
|
if (isEqual)
|
||||||
|
{
|
||||||
|
Logger.WriteInfo($"检测到重复数据 - 地址: {addressKey}, " +
|
||||||
|
$"值: {data1.Item_Value}, " +
|
||||||
|
$"开始时间: {data1.Start_Time}, " +
|
||||||
|
$"结束时间: {data1.End_Time}");
|
||||||
|
}
|
||||||
|
|
||||||
|
return isEqual;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 预测性点位
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="processedValues"></param>
|
||||||
|
/// <param name="addresses"></param>
|
||||||
|
/// <param name="config"></param>
|
||||||
|
/// <param name="endTime"></param>
|
||||||
|
/// <param name="collectionItems"></param>
|
||||||
|
public static void ProcessFloatData(List<StationData> processedValues, Dictionary<string, string> addresses, CollectionGroupConfig config, DateTime endTime, Dictionary<string, OperationData> collectionItems)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < processedValues.Count && i < config.Length; i++)
|
||||||
|
{
|
||||||
|
string address = $"D{int.Parse(config.StartAddress.Substring(1)) + i * 2}";
|
||||||
|
if (addresses.ContainsValue(address))
|
||||||
|
{
|
||||||
|
var key = addresses.FirstOrDefault(x => x.Value == address).Key;
|
||||||
|
int itemValue = Convert.ToInt32(ConvertToIntegerWithThreeDecimals(processedValues[i].MainValue));
|
||||||
|
|
||||||
|
// 计算开始时间 (结束时间 - 时长)
|
||||||
|
//var startTime = endTime.AddMilliseconds(-itemValue);
|
||||||
|
|
||||||
|
collectionItems[key] = new OperationData
|
||||||
|
{
|
||||||
|
Item_Value = (int)itemValue,
|
||||||
|
Start_Time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
End_Time = endTime.ToString("yyyy-MM-dd HH:mm:ss.fff")
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 机械臂数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="source"></param>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
/// <param name="processedValues"></param>
|
||||||
|
/// <param name="_plcAddresses"></param>
|
||||||
|
/// <param name="_collectionGroups"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static LRobot LRobotMessage(string source, AcquisitionType type, List<StationData> processedValues, Dictionary<AcquisitionType, Dictionary<string, string>> _plcAddresses,
|
||||||
|
Dictionary<AcquisitionType, CollectionGroupConfig> _collectionGroups)
|
||||||
|
{
|
||||||
|
if (processedValues == null || processedValues.Count == 0)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
var addresses = _plcAddresses[type];
|
||||||
|
var config = _collectionGroups[type];
|
||||||
|
return new LRobot()
|
||||||
|
{
|
||||||
|
bu_id = BU_id,
|
||||||
|
district_id = District_id,
|
||||||
|
factory_id = Factory_id,
|
||||||
|
production_line_id = Production_line_id,
|
||||||
|
production_processes_id = "",
|
||||||
|
work_center_id = "",
|
||||||
|
station_id = "",
|
||||||
|
device_name = "601PWM01",
|
||||||
|
robot_name = "LUR01",
|
||||||
|
taglist = new List<Taglist>
|
||||||
|
{
|
||||||
|
new Taglist//上料动子1
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[0].MainValue.ToString(),
|
||||||
|
y_value="0",
|
||||||
|
z_value=processedValues[1].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//上料动子2
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[2].MainValue.ToString(),
|
||||||
|
y_value="0",
|
||||||
|
z_value=processedValues[3].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//上料动子3
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[4].MainValue.ToString(),
|
||||||
|
y_value="0",
|
||||||
|
z_value=processedValues[5].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//上料动子4
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[6].MainValue.ToString(),
|
||||||
|
y_value="0",
|
||||||
|
z_value=processedValues[7].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//上料动子5
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[8].MainValue.ToString(),
|
||||||
|
y_value="0",
|
||||||
|
z_value=processedValues[9].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//上料动子6
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[10].MainValue.ToString(),
|
||||||
|
y_value="0",
|
||||||
|
z_value=processedValues[11].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//上料动子7
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[13].MainValue.ToString(),
|
||||||
|
y_value="0",
|
||||||
|
z_value=processedValues[14].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//上料动子8
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[16].MainValue.ToString(),
|
||||||
|
y_value="0",
|
||||||
|
z_value=processedValues[17].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//上料动子9
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[18].MainValue.ToString(),
|
||||||
|
y_value="0",
|
||||||
|
z_value=processedValues[19].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//焊机1
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[20].MainValue.ToString(),
|
||||||
|
y_value=processedValues[21].MainValue.ToString(),
|
||||||
|
z_value=processedValues[22].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//焊机2
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[23].MainValue.ToString(),
|
||||||
|
y_value=processedValues[24].MainValue.ToString(),
|
||||||
|
z_value=processedValues[25].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//焊机3
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[26].MainValue.ToString(),
|
||||||
|
y_value=processedValues[27].MainValue.ToString(),
|
||||||
|
z_value=processedValues[28].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//焊机4
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[29].MainValue.ToString(),
|
||||||
|
y_value=processedValues[30].MainValue.ToString(),
|
||||||
|
z_value=processedValues[31].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//焊机5
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[32].MainValue.ToString(),
|
||||||
|
y_value=processedValues[33].MainValue.ToString(),
|
||||||
|
z_value=processedValues[34].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//焊机6
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[35].MainValue.ToString(),
|
||||||
|
y_value=processedValues[36].MainValue.ToString(),
|
||||||
|
z_value=processedValues[37].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//焊机7
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[38].MainValue.ToString(),
|
||||||
|
y_value=processedValues[39].MainValue.ToString(),
|
||||||
|
z_value=processedValues[40].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//焊机8
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[41].MainValue.ToString(),
|
||||||
|
y_value=processedValues[42].MainValue.ToString(),
|
||||||
|
z_value=processedValues[43].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//焊机9
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[44].MainValue.ToString(),
|
||||||
|
y_value=processedValues[45].MainValue.ToString(),
|
||||||
|
z_value=processedValues[46].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//焊机10
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[47].MainValue.ToString(),
|
||||||
|
y_value=processedValues[48].MainValue.ToString(),
|
||||||
|
z_value=processedValues[49].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//焊机11
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[50].MainValue.ToString(),
|
||||||
|
y_value=processedValues[51].MainValue.ToString(),
|
||||||
|
z_value=processedValues[52].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//焊机12
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[53].MainValue.ToString(),
|
||||||
|
y_value=processedValues[54].MainValue.ToString(),
|
||||||
|
z_value=processedValues[55].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//下料动子1
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[56].MainValue.ToString(),
|
||||||
|
y_value="0",
|
||||||
|
z_value=processedValues[57].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//下料动子2
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[58].MainValue.ToString(),
|
||||||
|
y_value="0",
|
||||||
|
z_value=processedValues[59].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//下料动子3
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[61].MainValue.ToString(),
|
||||||
|
y_value="0",
|
||||||
|
z_value=processedValues[62].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//下料动子4
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[63].MainValue.ToString(),
|
||||||
|
y_value="0",
|
||||||
|
z_value=processedValues[64].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//下料动子5
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[65].MainValue.ToString(),
|
||||||
|
y_value="0",
|
||||||
|
z_value=processedValues[66].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
new Taglist//下料动子6
|
||||||
|
{
|
||||||
|
device_time=DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"),
|
||||||
|
collections_items=new Collection()
|
||||||
|
{
|
||||||
|
robot_status = "1",
|
||||||
|
x_value=processedValues[67].MainValue.ToString(),
|
||||||
|
y_value="0",
|
||||||
|
z_value=processedValues[68].MainValue.ToString(),
|
||||||
|
time_span="2.5",
|
||||||
|
hand_status="1",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 辅助方法
|
||||||
|
private static List<short> ConvertToShortList(object[] data)
|
||||||
|
{
|
||||||
|
return data.Select(x => Convert.ToInt16(x)).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<float> ConvertToFloatList(object[] data)
|
||||||
|
{
|
||||||
|
return data.Select(x => Convert.ToSingle(x)).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static object ConvertToIntegerWithThreeDecimals(object value)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (value == null) return 0;
|
||||||
|
|
||||||
|
if (value is float floatValue)
|
||||||
|
{
|
||||||
|
return (int)Math.Round(floatValue * 1000);
|
||||||
|
}
|
||||||
|
else if (value is double doubleValue)
|
||||||
|
{
|
||||||
|
return (int)Math.Round(doubleValue * 1000);
|
||||||
|
}
|
||||||
|
else if (value is decimal decimalValue)
|
||||||
|
{
|
||||||
|
return (int)Math.Round(decimalValue * 1000);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 尝试转换其他类型
|
||||||
|
float converted = Convert.ToSingle(value);
|
||||||
|
return (int)Math.Round(converted * 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteError($"转换值到整数时出错: {ex.Message}, 值: {value}");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<nlog
|
||||||
|
xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
|
||||||
|
autoReload="true"
|
||||||
|
throwExceptions="false"
|
||||||
|
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
|
||||||
|
<variable name="variable1" value="${newline}date: ${date}${newline}level: ${level}${newline}logger: ${logger}${newline}machinename: ${machinename}
|
||||||
|
${newline}clientip:${local-ip}${newline}message: ${message} ${newline}exception:${exception}
|
||||||
|
${newline}appdomain: ${appdomain}${newline}assembly-version: ${assembly-version}${newline}basedir: ${basedir}
|
||||||
|
${newline}callsite: ${callsite}${newline}callsite-linenumber: ${callsite-linenumber}${newline}counter: ${counter}${newline}nlogdir: ${nlogdir}
|
||||||
|
${newline}processid: ${processid}${newline}processname: ${processname}
|
||||||
|
${newline}traceid: ${aspnet-traceidentifier}
|
||||||
|
${newline}specialfolder: ${specialfolder}
|
||||||
|
${newline}stacktrace: ${stacktrace}${newline}-----------------------------------------------------------" />
|
||||||
|
<variable name="variable2" value="日志时间:${longdate}${newline}日志来源:${callsite}${newline}日志级别:${uppercase:${level}}${newline}消息内容:${message}${newline}异常信息:${exception}${newline}stacktrace: ${stacktrace}${newline}==============================================================${newline}" />
|
||||||
|
<variable name="variable3" value="${longdate}消息内容:${message}${newline}==============================================================${newline}" />
|
||||||
|
<variable name="variable_info" value="<HR COLOR=blue>${newline}日志时间:${longdate} <BR>${newline}日志级别:${level} <BR>${newline}日 志 类:log_info <BR>${newline}${message} <BR>${newline} <HR Size=1>" />
|
||||||
|
<variable name="variable_error" value="<HR COLOR=blue>${newline}日志时间:${longdate} <BR>${newline}日志级别:${level} <BR>${newline}日 志 类:log_error <BR>${newline}${message} <BR>${newline} <HR Size=1>" />
|
||||||
|
<variable name="variable_mqtt" value="<HR COLOR=blue>${newline}日志时间:${longdate} <BR>${newline}日志级别:${level} <BR>${newline}日 志 类:log_mqtt <BR>${newline}${message} <BR>${newline} <HR Size=1>" />
|
||||||
|
<variable name="variable_Infos" value="${longdate}消息内容:${message}${newline}==============================================================${newline}" />
|
||||||
|
<variable name="variable_MEStIME" value="${longdate}消息内容:${message}${newline}==============================================================${newline}" />
|
||||||
|
<variable name="variable_sql" value="${longdate}消息内容:${message}${newline}==============================================================${newline}" />
|
||||||
|
<variable name="variable_SysErrorLog" value="${longdate}消息内容:${message}${newline}==============================================================${newline}" />
|
||||||
|
<variable name="variable_SysErrorLogcn" value="${longdate}消息内容:${message}${newline}==============================================================${newline}" />
|
||||||
|
<!--
|
||||||
|
See https://github.com/nlog/nlog/wiki/Configuration-file
|
||||||
|
for information on customizing logging rules and outputs.
|
||||||
|
-->
|
||||||
|
<targets>
|
||||||
|
<!--
|
||||||
|
Write events to a file with the date in the filename. -->
|
||||||
|
<!--<target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
|
||||||
|
layout="${longdate} ${uppercase:${level}} ${message}" />-->
|
||||||
|
<target name="log_file" xsi:type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
|
||||||
|
<target xsi:type="File" fileName="${basedir}/logs/${shortdate}/${shortdate}.${level}.log"
|
||||||
|
layout="${variable2}" archiveAboveSize="2097152" archiveEvery="Day" />
|
||||||
|
</target>
|
||||||
|
<!--<target name="log_file" xsi:type="File" fileName="${basedir}/logs/${shortdate}.log" layout="${variable1}" />-->
|
||||||
|
<target name="log_info" xsi:type="File" fileName="${basedir}/Log/${shortdate}/LogInfo.${level}.html" layout="${variable_info}" archiveAboveSize="2097152" archiveEvery="Day"/>
|
||||||
|
<target name="log_error" xsi:type="File" fileName="${basedir}/Log/${shortdate}/LogError.${level}.html" layout="${variable_error}" archiveAboveSize="2097152" archiveEvery="Day"/>
|
||||||
|
<target name="log_mqtt" xsi:type="File" fileName="${basedir}/Log/${shortdate}/LogMqtt.${level}.html" layout="${variable_mqtt}" archiveAboveSize="2097152" archiveEvery="Day"/>
|
||||||
|
<target name="logs_Infos" xsi:type="File" fileName="${basedir}/Logs/Info/${shortdate}/${level}.log" layout="${variable_Infos}" archiveAboveSize="2097152" archiveEvery="Day"/>
|
||||||
|
<target name="logs_MEStIME" xsi:type="File" fileName="${basedir}/Logs/MESTime/${shortdate}/${level}.log" layout="${variable_MEStIME}" archiveAboveSize="2097152" archiveEvery="Day"/>
|
||||||
|
<target name="logs_Sql" xsi:type="File" fileName="${basedir}/Logs/SQL执行/${shortdate}/${level}.log" layout="${variable_sql}" archiveAboveSize="2097152" archiveEvery="Day"/>
|
||||||
|
<target name="logs_SysErrorLog" xsi:type="File" fileName="${basedir}/Logs/SysErrorLog/${shortdate}/${level}.log" layout="${variable_SysErrorLog}" archiveAboveSize="2097152" archiveEvery="Day"/>
|
||||||
|
<target name="logs_SysErrorLogcn" xsi:type="File" fileName="${basedir}/Logs/系统报错/${shortdate}/${level}.log" layout="${variable_SysErrorLogcn}" archiveAboveSize="2097152" archiveEvery="Day"/>
|
||||||
|
<target name="log_ReadPlcInt" xsi:type="File" fileName="${basedir}/hslLogs/${shortdate}/ReadPlcInt.${level}.log" layout="${Heartvariable}" archiveAboveSize="2097152" archiveEvery="Day"/>
|
||||||
|
</targets>
|
||||||
|
<rules>
|
||||||
|
<logger name="loginfo" minlevel="Info" writeTo="log_info" final="true"/>
|
||||||
|
<logger name="logerror" minlevel="Info" writeTo="log_error" final="true"/>
|
||||||
|
<logger name="logmqtt" minlevel="Info" writeTo="log_mqtt" final="true"/>
|
||||||
|
<logger name="logsInfo" minlevel="Info" writeTo="logs_Infos" final="true"/>
|
||||||
|
<logger name="logsMEStIME" minlevel="Info" writeTo="logs_MEStIME" final="true"/>
|
||||||
|
<logger name="logsSql" minlevel="Info" writeTo="logs_Sql" final="true"/>
|
||||||
|
<logger name="logsSysErrorLog" minlevel="Info" writeTo="logs_SysErrorLog" final="true"/>
|
||||||
|
<logger name="logsSysErrorLogcn" minlevel="Info" writeTo="logs_SysErrorLogcn" final="true"/>
|
||||||
|
<logger name="*" minlevel="Info" writeTo="log_info" final="true"/>
|
||||||
|
</rules>
|
||||||
|
</nlog>
|
||||||
@@ -0,0 +1,155 @@
|
|||||||
|
using JinYuan.DataConvertLib;
|
||||||
|
using PLCCommunication.PLCType.Omron;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace WindowsService1
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 定义每个数据读取请求的参数。
|
||||||
|
/// </summary>
|
||||||
|
public class PLCDataReadRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// PLC起始地址
|
||||||
|
/// </summary>
|
||||||
|
public string StartAddress { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 读取长度
|
||||||
|
/// </summary>
|
||||||
|
public ushort Length { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 读取区域名称
|
||||||
|
/// </summary>
|
||||||
|
public string StorageName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 读取数据类型
|
||||||
|
/// </summary>
|
||||||
|
public PLCDataType DataType { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 存储每次读取操作的结果。
|
||||||
|
/// </summary>
|
||||||
|
public class PLCDataResult
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 读取区域名称
|
||||||
|
/// </summary>
|
||||||
|
public string StorageName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 读取数据类型
|
||||||
|
/// </summary>
|
||||||
|
public PLCDataType DataType { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 数据
|
||||||
|
/// </summary>
|
||||||
|
public byte[] Data { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 是否读取成功
|
||||||
|
/// </summary>
|
||||||
|
public bool IsSuccess { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 读取失败的错误信息
|
||||||
|
/// </summary>
|
||||||
|
public string ErrorMessage { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class PLCDataReader
|
||||||
|
{
|
||||||
|
private readonly OmronFinsNet _plc;
|
||||||
|
|
||||||
|
|
||||||
|
public PLCDataReader(OmronFinsNet plc)
|
||||||
|
{
|
||||||
|
_plc = plc ?? throw new ArgumentNullException(nameof(plc));
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<PLCDataResult> ReadDataAsync(PLCDataReadRequest request)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var data = await _plc.ReadAsync(request.StartAddress, request.Length);
|
||||||
|
if (data.IsSuccess && data.Content.Length > 0)
|
||||||
|
{
|
||||||
|
Logger.WriteInfo($"成功读取PLC数据,起始地址:{request.StartAddress},长度:{request.Length},类型:{request.DataType}");
|
||||||
|
return new PLCDataResult
|
||||||
|
{
|
||||||
|
StorageName = request.StorageName,
|
||||||
|
DataType = request.DataType,
|
||||||
|
Data = data.Content,
|
||||||
|
IsSuccess = true
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger.WriteInfo($"读取PLC数据失败,起始地址:{request.StartAddress},长度:{request.Length},类型:{request.DataType}");
|
||||||
|
return new PLCDataResult
|
||||||
|
{
|
||||||
|
StorageName = request.StorageName,
|
||||||
|
DataType = request.DataType,
|
||||||
|
IsSuccess = false,
|
||||||
|
ErrorMessage = "读取PLC数据失败"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteError($"读取PLC数据时发生错误:{ex.Message}");
|
||||||
|
return new PLCDataResult
|
||||||
|
{
|
||||||
|
StorageName = request.StorageName,
|
||||||
|
DataType = request.DataType,
|
||||||
|
IsSuccess = false,
|
||||||
|
ErrorMessage = ex.Message
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private object[] ParseData(byte[] content, PLCDataType dataType)
|
||||||
|
{
|
||||||
|
switch (dataType)
|
||||||
|
{
|
||||||
|
case PLCDataType.Short:
|
||||||
|
return ParseShortData(content);
|
||||||
|
case PLCDataType.Float:
|
||||||
|
return ParseFloatData(content);
|
||||||
|
default:
|
||||||
|
throw new ArgumentException($"不支持的数据类型:{dataType}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private object[] ParseShortData(byte[] content)
|
||||||
|
{
|
||||||
|
int count = content.Length / 2;
|
||||||
|
return Enumerable.Range(0, count)
|
||||||
|
.Select(i => (object)ShortLib.GetShortFromByteArray(content, i * 2))
|
||||||
|
.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
private object[] ParseFloatData(byte[] content)
|
||||||
|
{
|
||||||
|
int count = content.Length / 4;
|
||||||
|
return Enumerable.Range(0, count)
|
||||||
|
.Select(i => (object)FloatLib.GetFloatFromByteArray(content, i * 4))
|
||||||
|
.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ConvertHelper
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 字节数组高低位转换
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Arrbyte"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static byte[] ByteReverse(this byte[] Arrbyte)
|
||||||
|
{
|
||||||
|
byte[] ArrByte = Arrbyte.Select((x, i) => new { x, i }).GroupBy(x => x.i / 2).SelectMany(x => new byte[] { x.Last().x, x.First().x }).ToArray();
|
||||||
|
return ArrByte;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
using PLCCommunication.PLCType.Omron;
|
||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace WindowsService1
|
||||||
|
{
|
||||||
|
public class PLCWrapper
|
||||||
|
{
|
||||||
|
private OmronFinsNet _plc;
|
||||||
|
public bool _plcIsConnected;
|
||||||
|
private readonly string _ipAddress;
|
||||||
|
private readonly int _port;
|
||||||
|
private readonly int _maxReconnectAttempts;
|
||||||
|
private readonly int _reconnectDelay;
|
||||||
|
public PLCDataReader _dataReader;
|
||||||
|
public PLCWrapper(string ipAddress, int port, int maxReconnectAttempts = 3, int reconnectDelay = 5000)
|
||||||
|
{
|
||||||
|
_ipAddress = ipAddress;
|
||||||
|
_port = port;
|
||||||
|
_maxReconnectAttempts = maxReconnectAttempts;
|
||||||
|
_reconnectDelay = reconnectDelay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> ConnectAsync()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_plc = new OmronFinsNet
|
||||||
|
{
|
||||||
|
IpAddress = _ipAddress,
|
||||||
|
Port = _port
|
||||||
|
};
|
||||||
|
var connectResult = await Task.Run(() => _plc.ConnectServer());
|
||||||
|
_plcIsConnected = connectResult.IsSuccess;
|
||||||
|
if (_plcIsConnected)
|
||||||
|
{
|
||||||
|
_dataReader = new PLCDataReader(GetPLCClient());
|
||||||
|
Logger.WriteInfo("PLC连接成功");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger.WriteInfo("PLC连接失败");
|
||||||
|
}
|
||||||
|
return _plcIsConnected;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.WriteError($"PLC连接失败: {ex.Message}");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Disconnect()
|
||||||
|
{
|
||||||
|
if (_plcIsConnected)
|
||||||
|
{
|
||||||
|
_plc.ConnectClose();
|
||||||
|
_plcIsConnected = false;
|
||||||
|
Logger.WriteInfo("与PLC断开连接");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public OmronFinsNet GetPLCClient()
|
||||||
|
{
|
||||||
|
if (!_plcIsConnected || _plc == null)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("PLC 未连接或未初始化。请先调用 ConnectAsync()。");
|
||||||
|
}
|
||||||
|
return _plc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> ReconnectAsync()
|
||||||
|
{
|
||||||
|
if (_plcIsConnected)
|
||||||
|
{
|
||||||
|
Logger.WriteInfo("PLC已连接,无需重连");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int attempt = 1; attempt <= _maxReconnectAttempts; attempt++)
|
||||||
|
{
|
||||||
|
Logger.WriteInfo($"尝试重新连接PLC,第 {attempt} 次尝试");
|
||||||
|
if (await ConnectAsync())
|
||||||
|
{
|
||||||
|
Logger.WriteInfo("PLC重新连接成功");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (attempt < _maxReconnectAttempts)
|
||||||
|
{
|
||||||
|
await Task.Delay(_reconnectDelay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.WriteError($"PLC重新连接失败,已尝试 {_maxReconnectAttempts} 次");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsConnected()
|
||||||
|
{
|
||||||
|
return _plcIsConnected;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using System.ServiceProcess;
|
||||||
|
|
||||||
|
namespace WindowsService1
|
||||||
|
{
|
||||||
|
internal static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 应用程序的主入口点。
|
||||||
|
/// </summary>
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
ServiceBase[] ServicesToRun;
|
||||||
|
ServicesToRun = new ServiceBase[]
|
||||||
|
{
|
||||||
|
new Service1()
|
||||||
|
};
|
||||||
|
ServiceBase.Run(ServicesToRun);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// 有关程序集的一般信息由以下
|
||||||
|
// 控制。更改这些特性值可修改
|
||||||
|
// 与程序集关联的信息。
|
||||||
|
[assembly: AssemblyTitle("WindowsService1")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("WindowsService1")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||||
|
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||||
|
//请将此类型的 ComVisible 特性设置为 true。
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||||
|
[assembly: Guid("242400f4-9b01-4aee-a6f7-05083757fcdd")]
|
||||||
|
|
||||||
|
// 程序集的版本信息由下列四个值组成:
|
||||||
|
//
|
||||||
|
// 主版本
|
||||||
|
// 次版本
|
||||||
|
// 生成号
|
||||||
|
// 修订号
|
||||||
|
//
|
||||||
|
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||||
|
//通过使用 "*",如下所示:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
Generated
+38
@@ -0,0 +1,38 @@
|
|||||||
|
namespace WindowsService1
|
||||||
|
{
|
||||||
|
partial class Service1
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
Logger.Shutdown();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.ServiceName = "Service1";
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,94 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace WindowsService1
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 判断工位耗时变化
|
||||||
|
/// </summary>
|
||||||
|
public class StationDataComparer : IEqualityComparer<StationData>
|
||||||
|
{
|
||||||
|
private const float FloatEpsilon = 0.000001f; // 可以调整精度
|
||||||
|
|
||||||
|
public bool Equals(StationData x, StationData y)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(x, y)) return true;
|
||||||
|
if (x is null || y is null) return false;
|
||||||
|
|
||||||
|
// 比较名称
|
||||||
|
if (x.Name != y.Name) return false;
|
||||||
|
|
||||||
|
// 比较主值
|
||||||
|
if (x.MainValue is float xFloat && y.MainValue is float yFloat)
|
||||||
|
{
|
||||||
|
if (Math.Abs(xFloat - yFloat) > FloatEpsilon) return false;
|
||||||
|
}
|
||||||
|
else if (x.MainValue is double xDouble && y.MainValue is double yDouble)
|
||||||
|
{
|
||||||
|
if (Math.Abs(xDouble - yDouble) > FloatEpsilon) return false;
|
||||||
|
}
|
||||||
|
else if (!Equals(x.MainValue, y.MainValue))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 比较时间戳(可以选择是否忽略毫秒)
|
||||||
|
return Math.Abs((x.Timestamp - y.Timestamp).TotalMilliseconds) < 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GetHashCode(StationData obj)
|
||||||
|
{
|
||||||
|
if (obj is null) return 0;
|
||||||
|
|
||||||
|
unchecked
|
||||||
|
{
|
||||||
|
int hash = 17;
|
||||||
|
hash = hash * 23 + (obj.Name?.GetHashCode() ?? 0);
|
||||||
|
|
||||||
|
// 对于浮点数,可以先转换为整数再计算哈希
|
||||||
|
if (obj.MainValue is float f)
|
||||||
|
{
|
||||||
|
hash = hash * 23 + ((int)(f * 1000000)).GetHashCode();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hash = hash * 23 + (obj.MainValue?.GetHashCode() ?? 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
hash = hash * 23 + obj.Timestamp.GetHashCode();
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 判断时间戳变化
|
||||||
|
/// </summary>
|
||||||
|
public class StationDataComparer2 : IEqualityComparer<StationData>
|
||||||
|
{
|
||||||
|
public bool Equals(StationData x, StationData y)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(x, y)) return true;
|
||||||
|
if (x is null || y is null) return false;
|
||||||
|
|
||||||
|
// 只比较名称和时间戳
|
||||||
|
if (x.Name != y.Name) return false;
|
||||||
|
|
||||||
|
// 比较时间戳,检查是否完全相同
|
||||||
|
return x.Timestamp == y.Timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GetHashCode(StationData obj)
|
||||||
|
{
|
||||||
|
if (obj is null) return 0;
|
||||||
|
|
||||||
|
unchecked
|
||||||
|
{
|
||||||
|
int hash = 17;
|
||||||
|
hash = hash * 23 + (obj.Name?.GetHashCode() ?? 0);
|
||||||
|
hash = hash * 23 + obj.Timestamp.GetHashCode();
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
|
namespace WindowsService1
|
||||||
|
{
|
||||||
|
public class XmlConfigReader
|
||||||
|
{
|
||||||
|
private Dictionary<string, Dictionary<string, Dictionary<string, string>>> deviceData;
|
||||||
|
|
||||||
|
public XmlConfigReader(string xmlContent)
|
||||||
|
{
|
||||||
|
XDocument doc = XDocument.Parse(xmlContent);
|
||||||
|
deviceData = ReadXmlToNestedDictionary(doc);
|
||||||
|
}
|
||||||
|
|
||||||
|
public XmlConfigReader(XDocument doc)
|
||||||
|
{
|
||||||
|
deviceData = ReadXmlToNestedDictionary(doc);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Dictionary<string, Dictionary<string, Dictionary<string, string>>> ReadXmlToNestedDictionary(XDocument doc)
|
||||||
|
{
|
||||||
|
var result = new Dictionary<string, Dictionary<string, Dictionary<string, string>>>();
|
||||||
|
var mainDevice = doc.Root.Element("Device");
|
||||||
|
string mainDeviceName = mainDevice.Attribute("name").Value;
|
||||||
|
result[mainDeviceName] = new Dictionary<string, Dictionary<string, string>>();
|
||||||
|
|
||||||
|
foreach (var subDevice in mainDevice.Elements("Device"))
|
||||||
|
{
|
||||||
|
string subDeviceName = subDevice.Attribute("name").Value;
|
||||||
|
result[mainDeviceName][subDeviceName] = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
foreach (var type in subDevice.Elements("Type"))
|
||||||
|
{
|
||||||
|
string typeName = type.Attribute("name").Value;
|
||||||
|
string typeValue = type.Value;
|
||||||
|
result[mainDeviceName][subDeviceName][typeName] = typeValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PrintStructure()
|
||||||
|
{
|
||||||
|
foreach (var mainDevice in deviceData)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"Main Device: {mainDevice.Key}");
|
||||||
|
foreach (var subDevice in mainDevice.Value)
|
||||||
|
{
|
||||||
|
Console.WriteLine($" Sub Device: {subDevice.Key}");
|
||||||
|
foreach (var type in subDevice.Value)
|
||||||
|
{
|
||||||
|
Console.WriteLine($" Type: {type.Key}, Value: {type.Value}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TryGetValue(string mainDeviceName, string subDeviceName, string typeName, out string value)
|
||||||
|
{
|
||||||
|
value = null;
|
||||||
|
return deviceData.TryGetValue(mainDeviceName, out var mainDevice) &&
|
||||||
|
mainDevice.TryGetValue(subDeviceName, out var subDevice) &&
|
||||||
|
subDevice.TryGetValue(typeName, out value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Dictionary<string, Dictionary<string, Dictionary<string, string>>> GetAllData()
|
||||||
|
{
|
||||||
|
return deviceData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
|
||||||
|
</configSections>
|
||||||
|
<log4net>
|
||||||
|
<!-- 错误日志类 -->
|
||||||
|
<logger name="logerror">
|
||||||
|
<level value="ALL" />
|
||||||
|
<appender-ref ref="ErrorAppender" />
|
||||||
|
</logger>
|
||||||
|
<!-- 信息日志类 -->
|
||||||
|
<logger name="loginfo">
|
||||||
|
<level value="ALL" />
|
||||||
|
<appender-ref ref="InfoAppender" />
|
||||||
|
</logger>
|
||||||
|
<!-- MQTT日志类 -->
|
||||||
|
<logger name="logmqtt">
|
||||||
|
<level value="ALL" />
|
||||||
|
<appender-ref ref="MqttAppender" />
|
||||||
|
</logger>
|
||||||
|
|
||||||
|
<!-- MQTT日志附加介质 -->
|
||||||
|
<appender name="MqttAppender" type="log4net.Appender.RollingFileAppender">
|
||||||
|
<param name="File" value="Log\\LogMqtt\\" />
|
||||||
|
<param name="AppendToFile" value="true" />
|
||||||
|
<param name="StaticLogFileName" value="false" />
|
||||||
|
<param name="RollingStyle" value="Composite" />
|
||||||
|
<param name="DatePattern" value="'\\\\' yyyyMMdd'\\\\log_'HH'.htm'" />
|
||||||
|
<param name="LockingModel" type="log4net.Appender.FileAppender+MinimalLock" />
|
||||||
|
<layout type="log4net.Layout.PatternLayout">
|
||||||
|
<param name="ConversionPattern" value="<HR COLOR=blue>%n日志时间:%d [%t] <BR>%n日志级别:%-5p <BR>%n日 志 类:%c [%x] <BR>%n%m <BR>%n <HR Size=1>" />
|
||||||
|
</layout>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 错误日志附加介质 -->
|
||||||
|
<appender name="ErrorAppender" type="log4net.Appender.RollingFileAppender">
|
||||||
|
<param name="File" value="Log\\LogError\\" />
|
||||||
|
<param name="AppendToFile" value="true" />
|
||||||
|
<param name="StaticLogFileName" value="false" />
|
||||||
|
<param name="RollingStyle" value="Composite" />
|
||||||
|
<param name="DatePattern" value="'\\\\' yyyyMMdd'\\\\log_'HH'.htm'" />
|
||||||
|
<param name="LockingModel" type="log4net.Appender.FileAppender+MinimalLock" />
|
||||||
|
<layout type="log4net.Layout.PatternLayout">
|
||||||
|
<param name="ConversionPattern" value="<HR COLOR=red>%n异常时间:%d [%t] <BR>%n异常级别:%-5p <BR>%n异 常 类:%c [%x] <BR>%n%m <BR>%n <HR Size=1>" />
|
||||||
|
</layout>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 信息日志附加介质 -->
|
||||||
|
<appender name="InfoAppender" type="log4net.Appender.RollingFileAppender">
|
||||||
|
<param name="File" value="Log\\LogInfo\\" />
|
||||||
|
<param name="AppendToFile" value="true" />
|
||||||
|
<param name="StaticLogFileName" value="false" />
|
||||||
|
<param name="RollingStyle" value="Composite" />
|
||||||
|
<param name="DatePattern" value="'\\\\' yyyyMMdd'\\\\log_'HH'.htm'" />
|
||||||
|
<param name="LockingModel" type="log4net.Appender.FileAppender+MinimalLock" />
|
||||||
|
<layout type="log4net.Layout.PatternLayout">
|
||||||
|
<param name="ConversionPattern" value="<HR COLOR=blue>%n日志时间:%d [%t] <BR>%n日志级别:%-5p <BR>%n日 志 类:%c [%x] <BR>%n%m <BR>%n <HR Size=1>" />
|
||||||
|
</layout>
|
||||||
|
</appender>
|
||||||
|
</log4net>
|
||||||
|
</configuration>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="NLog" version="6.0.2" targetFramework="net48" />
|
||||||
|
</packages>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,61 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using JinYuan.Helper;
|
||||||
|
using JinYuan.Models;
|
||||||
|
using JinYuan.VirtualDataLibrary;
|
||||||
|
using PLCCommunication.Common;
|
||||||
|
using PLCCommunication.Common.DataConvert;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlCenters
|
||||||
|
{
|
||||||
|
public partial class ControlCenter
|
||||||
|
{
|
||||||
|
public static string GetValueFromByteArray(byte[] bArray, string PLCGroupVariablekey, int offset = 0, Group pf = null)
|
||||||
|
{
|
||||||
|
return GetValueFromByteArray(bArray, getPLCVariable(PLCGroupVariablekey), offset, pf);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static PLCGroupVariable getPLCVariable(string key)
|
||||||
|
{
|
||||||
|
PLCGroupVariable pLCGroupVariable = new PLCGroupVariable();
|
||||||
|
CommonMethods.PLCVariable.TryGetValue(key, out pLCGroupVariable);
|
||||||
|
return pLCGroupVariable;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取MES返回结果
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="bArray"></param>
|
||||||
|
/// <param name="var"></param>
|
||||||
|
/// <param name="offset"></param>
|
||||||
|
/// <param name="pf"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string GetValueFromByteArray(byte[] bArray, PLCGroupVariable var, int offset = 0, Group pf = null)
|
||||||
|
{
|
||||||
|
string value = "0";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
switch (var.DataType)
|
||||||
|
{
|
||||||
|
case "Float":
|
||||||
|
value = FloatLib.GetFloatFromByteArray(bArray, var.ArrayStart * 2 + offset, DataFormat.CDAB).ToString("0.###");
|
||||||
|
break;
|
||||||
|
case "Short":
|
||||||
|
value = ShortLib.GetShortFromByteArray(bArray, var.ArrayStart * 2 + offset).ToString();
|
||||||
|
break;
|
||||||
|
case "Int":
|
||||||
|
value = IntLib.GetIntFromByteArray(bArray, var.ArrayStart * 2 + offset).ToString();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.Instance.WriteError($"数据解析异常, 原因: {ex}", "SysErrorLog");
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,744 @@
|
|||||||
|
|
||||||
|
using JinYuan.Helper;
|
||||||
|
using JinYuan.MES.Models;
|
||||||
|
using JinYuan.Models;
|
||||||
|
using JinYuan.VirtualDataLibrary;
|
||||||
|
using Language;
|
||||||
|
using PLCCommunication;
|
||||||
|
using PLCCommunication.Common;
|
||||||
|
using PLCCommunication.Modbus;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using static System.Windows.Forms.LinkLabel;
|
||||||
|
|
||||||
|
|
||||||
|
namespace JinYuan.ControlCenters
|
||||||
|
{
|
||||||
|
public partial class ControlCenter
|
||||||
|
{
|
||||||
|
#region 刷新12小时产能
|
||||||
|
|
||||||
|
public int GetHour()
|
||||||
|
{
|
||||||
|
DateTime now = DateTime.Now;
|
||||||
|
int nowHour = Convert.ToInt32($"{now.Hour}30");
|
||||||
|
int hour = 0;
|
||||||
|
if (CommonMethods.LastHour != nowHour)
|
||||||
|
{
|
||||||
|
hour = Convert.ToInt32($"{now.Hour - 1}30");
|
||||||
|
if (now.Hour == 0)
|
||||||
|
{
|
||||||
|
hour = 2330;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hour = Convert.ToInt32($"{now.Hour}30");
|
||||||
|
}
|
||||||
|
return hour;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void Refresh12HourProdQty()
|
||||||
|
{
|
||||||
|
List<Chart12HourData> chart12Hours = new List<Chart12HourData>();
|
||||||
|
DateTime dtTime = DateTime.Now;
|
||||||
|
string strDate = dtTime.ToString("yyyy-MM-dd");
|
||||||
|
string nextDate = dtTime.AddDays(1).ToString("yyyy-MM-dd");
|
||||||
|
int Hour = GetHour();
|
||||||
|
|
||||||
|
var listTotal = CommonMethods.db.QueryWhereList<Hourprod>(t =>
|
||||||
|
t.FDate == strDate || t.FDate == nextDate);// 查询两天的数据
|
||||||
|
|
||||||
|
if (listTotal != null && listTotal.Count > 0)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 24; i++) // 改为24小时
|
||||||
|
{
|
||||||
|
int currentHour = (i + 8) % 24; // 从8点开始
|
||||||
|
int nextHour = (currentHour + 1) % 24;
|
||||||
|
string currentDate = currentHour >= 8 ? strDate : nextDate;
|
||||||
|
|
||||||
|
var hour1 = listTotal.Where(p =>
|
||||||
|
p.FDate == currentDate &&
|
||||||
|
p.FHour == currentHour).FirstOrDefault();
|
||||||
|
|
||||||
|
int ProdALLQty = 0;
|
||||||
|
int ProdOKQty = 0;
|
||||||
|
int ProdNGQty = 0;
|
||||||
|
string strOkRatio = "0.00";
|
||||||
|
if (hour1 != null)
|
||||||
|
{
|
||||||
|
ProdALLQty = hour1.ProdIn;
|
||||||
|
ProdOKQty = hour1.ProdOut;
|
||||||
|
}
|
||||||
|
ProdNGQty = ProdALLQty - ProdOKQty;
|
||||||
|
if (ProdOKQty >= 0 && ProdALLQty > 0)
|
||||||
|
{
|
||||||
|
strOkRatio = (Math.Round(decimal.Parse(ProdOKQty.ToString()) / decimal.Parse(ProdALLQty.ToString()), 4)).ToString();
|
||||||
|
}
|
||||||
|
string displayTime = $"{currentHour:D2}:30~{nextHour:D2}:29";
|
||||||
|
|
||||||
|
chart12Hours.Add(new Chart12HourData()
|
||||||
|
{
|
||||||
|
DisplayTime = displayTime,
|
||||||
|
ProdIn = ProdALLQty,
|
||||||
|
ProdOut = ProdOKQty,
|
||||||
|
ProdNg = ProdNGQty,
|
||||||
|
OKRatio = strOkRatio
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 24; i++)
|
||||||
|
{
|
||||||
|
int currentHour = (i + 8) % 24;
|
||||||
|
int nextHour = (currentHour + 1) % 24;
|
||||||
|
|
||||||
|
Random rand = new Random();
|
||||||
|
int ranOK = rand.Next(1000, 3000);
|
||||||
|
int ranNG = rand.Next(400, 1200);
|
||||||
|
int total = ranOK + ranNG;
|
||||||
|
string displayTime = $"{currentHour:D2}:30~{nextHour:D2}:29";
|
||||||
|
string strOkRatio = (Math.Round(decimal.Parse(ranOK.ToString()) / decimal.Parse(total.ToString()), 4)).ToString();
|
||||||
|
chart12Hours.Add(new Chart12HourData()
|
||||||
|
{
|
||||||
|
DisplayTime = displayTime,
|
||||||
|
ProdIn = ranOK + ranNG,
|
||||||
|
ProdOut = ranOK,
|
||||||
|
ProdNg = ranNG,
|
||||||
|
OKRatio = strOkRatio // 保留2位小数,添加%
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (chart12Hours != null)
|
||||||
|
{
|
||||||
|
CommonMethods.Lst_Prod12HourData = chart12Hours;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 检测项不良
|
||||||
|
/// <summary>
|
||||||
|
/// 读取检测项不良
|
||||||
|
/// </summary>
|
||||||
|
private void GetDefectTypeQty()
|
||||||
|
{
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (CommonMethods.Lst_DefectTypeQty.Count <= 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
//CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "极性检测不良".Translated(), DataCount = 0 });
|
||||||
|
//CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "称重不良".Translated(), DataCount = 0 });
|
||||||
|
//CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "铜极耳剪切不良".Translated(), DataCount = 0 });
|
||||||
|
//CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "铝极耳剪切不良".Translated(), DataCount = 0 });
|
||||||
|
//CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "厚度不良", DataCount = 0 });
|
||||||
|
//CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "焊前CCD正极耳顶面不良", DataCount = 0 });
|
||||||
|
CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "扫码不良".Translated(), DataCount = 0 });
|
||||||
|
CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "MES不良".Translated(), DataCount = 0 });
|
||||||
|
CommonMethods.Lst_DefectTypeQty.Add(new ChartDataType { DataType = "其他不良".Translated(), DataCount = 0 });
|
||||||
|
}
|
||||||
|
else //读取PLC数据
|
||||||
|
{
|
||||||
|
var plcDevicesCopy = CommonMethods.plcDevices.ToList();
|
||||||
|
if (plcDevicesCopy.Count() > 0)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < plcDevicesCopy.Count(); i++)
|
||||||
|
{
|
||||||
|
var plcDevice = plcDevicesCopy[i];
|
||||||
|
if (plcDevice != null && plcDevice.IsConnected && plcDevice.Name == "PLC_1")
|
||||||
|
{
|
||||||
|
|
||||||
|
Task.Run(() =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
int ProdDRFIDNgQty = plcDevice.ReadInt16("D1000");//扫码不良
|
||||||
|
int ProdDXNgQty = plcDevice.ReadInt16("D1001");//MES不良
|
||||||
|
int ProdGRFIDNgQty = plcDevice.ReadInt16("D1002");//其他不良
|
||||||
|
|
||||||
|
CommonMethods.Lst_DefectTypeQty.Where(p => p.DataType == "扫码不良".Translated()).FirstOrDefault().DataCount = ProdDRFIDNgQty;
|
||||||
|
CommonMethods.Lst_DefectTypeQty.Where(p => p.DataType == "MES不良".Translated()).FirstOrDefault().DataCount = ProdDXNgQty;
|
||||||
|
CommonMethods.Lst_DefectTypeQty.Where(p => p.DataType == "其他不良".Translated()).FirstOrDefault().DataCount = ProdGRFIDNgQty;
|
||||||
|
//CommonMethods.Lst_DefectTypeQty.Where(p => p.DataType == "铝极耳剪切不良".Translated()).FirstOrDefault().DataCount = ProdYLZNgQty;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.Instance.WriteEX(ex);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.Instance.WriteEX(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 智能电表 ---默认D1300开始
|
||||||
|
public void GetEnergyData()
|
||||||
|
{
|
||||||
|
ModbusRtu busRtuClient = new ModbusRtu();
|
||||||
|
if (CommonMethods.plcDevices.Count() > 0)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < CommonMethods.plcDevices.Count(); i++)
|
||||||
|
{
|
||||||
|
if (CommonMethods.plcDevices[i].IsConnected && CommonMethods.plcDevices[i].Name == "PLC_1")
|
||||||
|
{
|
||||||
|
List<ElectricEnergy> listM = new List<ElectricEnergy>();
|
||||||
|
List<float> ListF = new List<float>();
|
||||||
|
List<string> listAddre = new List<string>()
|
||||||
|
{
|
||||||
|
"D1100","D1102","D1104","D1106","D1108","D1110","D1112","D1114","D1116","D1118","D1120","D1122","D1124","D1126"
|
||||||
|
};
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
ElectricEnergy m = new ElectricEnergy();
|
||||||
|
//for (int i = 0; i < listAddre.Count; i++)
|
||||||
|
//{
|
||||||
|
// ListF.Add(CommonMethods.plcDevices[0].ReadFloat(listAddre[i]));
|
||||||
|
//}
|
||||||
|
|
||||||
|
//m.AccumulatedElectricity = (Decimal)ListF[0]; //有功电能(累计电能)D1100
|
||||||
|
//m.PhaseVoltageA = (Decimal)ListF[1]; ; //A相电压 D1102
|
||||||
|
//m.PhaseVoltageB = (Decimal)ListF[2]; ;//B相电压 D1104
|
||||||
|
//m.PhaseVoltageC = (Decimal)ListF[3]; ;//C相电压 D1106
|
||||||
|
//m.PhaseCurrentA = (Decimal)ListF[4]; ; //电流IA D1108
|
||||||
|
//m.PhaseCurrentB = (Decimal)ListF[5]; ;//电流IB D1110
|
||||||
|
//m.PhaseCurrentC = (Decimal)ListF[6]; ;//电流IC D1112
|
||||||
|
//m.PhasePowerA = (Decimal)ListF[7]; ; //A相有功功率 D1114
|
||||||
|
//m.PhasePowerB = (Decimal)ListF[8]; ; //B相有功功率 D1116
|
||||||
|
//m.PhasePowerC = (Decimal)ListF[9]; ;//C相有功功率 D1118
|
||||||
|
//m.ActivePower = (Decimal)ListF[10]; ; //总有功功率 D1120
|
||||||
|
//m.PowerFactor = (Decimal)ListF[11]; ; //总功率因数 D1122
|
||||||
|
//m.pt = (Decimal)ListF[12]; ; //电压变比 D1124
|
||||||
|
//m.ct = (Decimal)ListF[13]; ; //电流变比 D1126
|
||||||
|
|
||||||
|
//listM.Add(m);
|
||||||
|
//CommonMethods.listElectricEnergy = listM;
|
||||||
|
//return;
|
||||||
|
|
||||||
|
busRtuClient.SerialPortInni(sp =>
|
||||||
|
{
|
||||||
|
sp.PortName = "COM1";
|
||||||
|
sp.BaudRate = 9600;
|
||||||
|
sp.DataBits = 8;
|
||||||
|
sp.StopBits = System.IO.Ports.StopBits.One;
|
||||||
|
sp.Parity = System.IO.Ports.Parity.None;
|
||||||
|
});
|
||||||
|
busRtuClient.DataFormat = (PLCCommunication.Common.DataFormat)DataFormat.CDAB;
|
||||||
|
busRtuClient.Open(); // 打开
|
||||||
|
if (busRtuClient.IsOpen())
|
||||||
|
{
|
||||||
|
// 读取数据
|
||||||
|
JYResult<byte[]> readResult = busRtuClient.Read("35", 30);
|
||||||
|
JYResult<byte[]> readResult1 = busRtuClient.Read("3", 2);
|
||||||
|
if (readResult.IsSuccess && readResult1.IsSuccess)
|
||||||
|
{
|
||||||
|
//DPT
|
||||||
|
Byte DptH = busRtuClient.ByteTransform.TransByte(readResult.Content, 0);//高8位
|
||||||
|
Byte DptL = busRtuClient.ByteTransform.TransByte(readResult.Content, 1);//低8位
|
||||||
|
//DPQ
|
||||||
|
Byte DpqH = busRtuClient.ByteTransform.TransByte(readResult.Content, 2);//高8位
|
||||||
|
Byte DpqL = busRtuClient.ByteTransform.TransByte(readResult.Content, 3);//低8位
|
||||||
|
|
||||||
|
//m = new ElectricEnergy();
|
||||||
|
Decimal q = busRtuClient.ByteTransform.TransUInt16(readResult.Content, 56);
|
||||||
|
Decimal w = busRtuClient.ByteTransform.TransUInt16(readResult.Content, 58);
|
||||||
|
|
||||||
|
m.pt = Convert.ToDecimal(busRtuClient.ByteTransform.TransInt16(readResult1.Content, 0)); //电压变比 D1124
|
||||||
|
m.ct = Convert.ToDecimal(busRtuClient.ByteTransform.TransInt16(readResult1.Content, 2)); //电流变比 D1126
|
||||||
|
Decimal Power = (q * 65536 + w) / 1000;
|
||||||
|
m.AccumulatedElectricity = Convert.ToDecimal(Power * m.pt * m.ct); //有功电能(累计电能)D1100
|
||||||
|
ListF.Add((float)m.AccumulatedElectricity.Value);
|
||||||
|
//电压
|
||||||
|
m.PhaseVoltageA = Convert.ToDecimal(busRtuClient.ByteTransform.TransUInt16(readResult.Content, 4) * Math.Pow(10, DptH - 4)); //A相电压 D1102
|
||||||
|
m.PhaseVoltageB = Convert.ToDecimal(busRtuClient.ByteTransform.TransUInt16(readResult.Content, 6) * Math.Pow(10, DptH - 4));//B相电压 D1104
|
||||||
|
m.PhaseVoltageC = Convert.ToDecimal(busRtuClient.ByteTransform.TransUInt16(readResult.Content, 8) * Math.Pow(10, DptH - 4));//C相电压 D1106
|
||||||
|
ListF.Add((float)m.PhaseVoltageA.Value);
|
||||||
|
ListF.Add((float)m.PhaseVoltageB.Value);
|
||||||
|
ListF.Add((float)m.PhaseVoltageC.Value);
|
||||||
|
|
||||||
|
//电流
|
||||||
|
m.PhaseCurrentA = Convert.ToDecimal(busRtuClient.ByteTransform.TransUInt16(readResult.Content, 16) * Math.Pow(10, DptL - 4)); //电流IA D1108
|
||||||
|
m.PhaseCurrentB = Convert.ToDecimal(busRtuClient.ByteTransform.TransUInt16(readResult.Content, 18) * Math.Pow(10, DptL - 4));//电流IB D1110
|
||||||
|
m.PhaseCurrentC = Convert.ToDecimal(busRtuClient.ByteTransform.TransUInt16(readResult.Content, 20) * Math.Pow(10, DptL - 4));//电流IC D1112
|
||||||
|
ListF.Add((float)m.PhaseCurrentA.Value);
|
||||||
|
ListF.Add((float)m.PhaseCurrentB.Value);
|
||||||
|
ListF.Add((float)m.PhaseCurrentC.Value);
|
||||||
|
|
||||||
|
//有功功率
|
||||||
|
m.PhasePowerA = Convert.ToDecimal(busRtuClient.ByteTransform.TransInt16(readResult.Content, 22) * Math.Pow(10, DpqH - 4)); //A相有功功率 D1114
|
||||||
|
m.PhasePowerB = Convert.ToDecimal(busRtuClient.ByteTransform.TransInt16(readResult.Content, 24) * Math.Pow(10, DpqH - 4)); //B相有功功率 D1116
|
||||||
|
m.PhasePowerC = Convert.ToDecimal(busRtuClient.ByteTransform.TransInt16(readResult.Content, 26) * Math.Pow(10, DpqH - 4));//C相有功功率 D1118
|
||||||
|
m.ActivePower = Convert.ToDecimal(busRtuClient.ByteTransform.TransInt16(readResult.Content, 28) * Math.Pow(10, DpqH - 4)); //总有功功率 D1120
|
||||||
|
ListF.Add((float)m.PhasePowerA.Value);
|
||||||
|
ListF.Add((float)m.PhasePowerB.Value);
|
||||||
|
ListF.Add((float)m.PhasePowerC.Value);
|
||||||
|
ListF.Add((float)m.ActivePower.Value);
|
||||||
|
m.PowerFactor = Convert.ToDecimal(busRtuClient.ByteTransform.TransInt16(readResult.Content, 44)) / 1000; //总功率因数 D1122
|
||||||
|
ListF.Add((float)m.PowerFactor.Value);
|
||||||
|
ListF.Add((float)m.pt.Value);
|
||||||
|
ListF.Add((float)m.ct.Value);
|
||||||
|
|
||||||
|
for (int j = 0; j < ListF.Count; j++)
|
||||||
|
{
|
||||||
|
CommonMethods.plcDevices[i].WriteFloat(listAddre[j], ListF[j]);
|
||||||
|
}
|
||||||
|
listM.Add(m);
|
||||||
|
CommonMethods.listElectricEnergy = listM;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TxtHelper.WriteTxt($@"D:\APILog\Logs\智能电表信息\{DateTime.Now.ToString("yyyy-MM-dd")}.txt", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "智能电表:读取数据失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TxtHelper.WriteTxt($@"D:\APILog\Logs\智能电表信息\{DateTime.Now.ToString("yyyy-MM-dd")}.txt", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "智能电表:串口打开失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TxtHelper.WriteTxt($@"D:\APILog\Logs\智能电表信息\{DateTime.Now.ToString("yyyy-MM-dd")}.txt", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + $"智能电表:{ex}");
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if (busRtuClient.IsOpen())
|
||||||
|
{
|
||||||
|
busRtuClient.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void GetEnergyDataFormPlc()
|
||||||
|
{
|
||||||
|
ModbusRtu busRtuClient = new ModbusRtu();
|
||||||
|
if (CommonMethods.plcDevices.Count() > 0)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < CommonMethods.plcDevices.Count(); i++)
|
||||||
|
{
|
||||||
|
if (CommonMethods.plcDevices[i].IsConnected && CommonMethods.plcDevices[i].Name == "PLC_1")
|
||||||
|
{
|
||||||
|
|
||||||
|
List<ElectricEnergy> listM = new List<ElectricEnergy>();
|
||||||
|
List<float> ListF = new List<float>();
|
||||||
|
List<string> listAddre = new List<string>()
|
||||||
|
{
|
||||||
|
"D1100","D1102","D1104","D1106","D1108","D1110","D1112","D1114","D1116","D1118","D1120","D1122","D1124","D1126"
|
||||||
|
};
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
ElectricEnergy m = new ElectricEnergy();
|
||||||
|
for (int j = 0; j < listAddre.Count; j++)
|
||||||
|
{
|
||||||
|
ListF.Add(CommonMethods.plcDevices[i].ReadFloat(listAddre[j]));
|
||||||
|
}
|
||||||
|
|
||||||
|
m.AccumulatedElectricity = (Decimal)ListF[0]; //有功电能(累计电能)D1100
|
||||||
|
m.PhaseVoltageA = (Decimal)ListF[1]; //A相电压 D1102
|
||||||
|
m.PhaseVoltageB = (Decimal)ListF[2]; //B相电压 D1104
|
||||||
|
m.PhaseVoltageC = (Decimal)ListF[3]; //C相电压 D1106
|
||||||
|
m.PhaseCurrentA = (Decimal)ListF[4]; //电流IA D1108
|
||||||
|
m.PhaseCurrentB = (Decimal)ListF[5]; //电流IB D1110
|
||||||
|
m.PhaseCurrentC = (Decimal)ListF[6]; //电流IC D1112
|
||||||
|
m.PhasePowerA = (Decimal)ListF[7]; //A相有功功率 D1114
|
||||||
|
m.PhasePowerB = (Decimal)ListF[8]; //B相有功功率 D1116
|
||||||
|
m.PhasePowerC = (Decimal)ListF[9]; //C相有功功率 D1118
|
||||||
|
m.ActivePower = (Decimal)ListF[10]; //总有功功率 D1120
|
||||||
|
m.PowerFactor = (Decimal)ListF[11]; //总功率因数 D1122
|
||||||
|
m.pt = (Decimal)ListF[12]; //电压变比 D1124
|
||||||
|
m.ct = (Decimal)ListF[13]; //电流变比 D1126
|
||||||
|
|
||||||
|
listM.Add(m);
|
||||||
|
CommonMethods.listElectricEnergy = listM;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TxtHelper.WriteTxt($@"D:\APILog\Logs\智能电表信息\{DateTime.Now.ToString("yyyy-MM-dd")}.txt", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + $"智能电表:{ex}");
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if (busRtuClient.IsOpen())
|
||||||
|
{
|
||||||
|
busRtuClient.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//if (CommonMethods.plcDevices.Count <= 0) { return; }
|
||||||
|
//if (CommonMethods.plcDevices[0] != null && CommonMethods.plcDevices[0].IsConnected && CommonMethods.energyMeter != null && CommonMethods.energyMeter.Connected)
|
||||||
|
//{
|
||||||
|
|
||||||
|
// List<ElectricEnergy> listM = new List<ElectricEnergy>();
|
||||||
|
// List<float> ListF = new List<float>();
|
||||||
|
// List<string> listAddre = new List<string>()
|
||||||
|
// {
|
||||||
|
// //"D1100","D1102","D1104","D1106","D1108","D1110","D1112","D1114","D1116","D1118","D1120","D1122","D1124","D1126"
|
||||||
|
// "D1300","D1302","D1304","D1306","D1308","D1310","D1312","D1314","D1316","D1318","D1320","D1322","D1324","D1326"
|
||||||
|
// };
|
||||||
|
// //00 00 00 00 00 06 报文头
|
||||||
|
// //01 04 00 00 00 3E 不需要校验位
|
||||||
|
// byte[] bytes = new byte[12];
|
||||||
|
// bytes[0] = Convert.ToByte(01 >> 8); // Slave id high byte//事务元标识符,高字节在前,低字节在后
|
||||||
|
// bytes[1] = Convert.ToByte(01);// Slave id low byte
|
||||||
|
// bytes[2] = 0x00;//协议标识符,高字节在前,低字节在后 (TCP 00)
|
||||||
|
// bytes[3] = 0x00;
|
||||||
|
// bytes[4] = 0x00;//后续字节长度,高字节在前,低字节在后
|
||||||
|
// bytes[5] = 0x06; // Message size
|
||||||
|
// bytes[6] = 0x01; // Slave address
|
||||||
|
// bytes[7] = 0x04;//功能码04H // Function code
|
||||||
|
// bytes[8] = Convert.ToByte((00 >> 8) & 0xFF); // Start address//寄存器起始地址高字节m_unBeginWord
|
||||||
|
// bytes[9] = Convert.ToByte(00 & 0xFF); // Start address//寄存器起始地址低字节m_unBeginWord
|
||||||
|
// bytes[10] = Convert.ToByte((88 >> 8) & 0xFF); // Number of data to read//寄存器数量高字节m_unWordsCount
|
||||||
|
// bytes[11] = Convert.ToByte(88 & 0xFF); // Number of data to read//寄存器数量低字节m_unWordsCount 0x58
|
||||||
|
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// CommonMethods.energyMeter.SendAndGetRes(bytes, ref listM);
|
||||||
|
// #region 读取×
|
||||||
|
// //for (int i = 0; i < listAddre.Count; i++)
|
||||||
|
// //{
|
||||||
|
// // float val = CommonMethods.plcDevices[0].ReadFloat(listAddre[i]);
|
||||||
|
// // ListF.Add(val);
|
||||||
|
// //}
|
||||||
|
|
||||||
|
// //ElectricEnergy m = new ElectricEnergy();
|
||||||
|
// //m.AccumulatedElectricity = Convert.ToDecimal(ListF[0]);
|
||||||
|
// //m.PhaseVoltageA = Convert.ToDecimal(ListF[1]);
|
||||||
|
// //m.PhaseVoltageB = Convert.ToDecimal(ListF[2]);
|
||||||
|
// //m.PhaseVoltageC = Convert.ToDecimal(ListF[3]);
|
||||||
|
// //m.PhaseCurrentA = Convert.ToDecimal(ListF[4]);
|
||||||
|
// //m.PhaseCurrentB = Convert.ToDecimal(ListF[5]);
|
||||||
|
// //m.PhaseCurrentC = Convert.ToDecimal(ListF[6]);
|
||||||
|
// //m.PhasePowerA = Convert.ToDecimal(ListF[7]);
|
||||||
|
// //m.PhasePowerB = Convert.ToDecimal(ListF[8]);
|
||||||
|
// //m.PhasePowerC = Convert.ToDecimal(ListF[9]);
|
||||||
|
// //m.ActivePower = Convert.ToDecimal(ListF[10]);
|
||||||
|
// //m.PowerFactor = Convert.ToDecimal(ListF[11]);
|
||||||
|
// //m.pt = Convert.ToDecimal(ListF[12]);
|
||||||
|
// //m.ct = Convert.ToDecimal(ListF[13]);
|
||||||
|
|
||||||
|
// //listM.Add(m);
|
||||||
|
// #endregion
|
||||||
|
// foreach (ElectricEnergy energy in listM)
|
||||||
|
// {
|
||||||
|
// CommonMethods.plcDevices[0].WriteFloat(listAddre[0], (float)energy.AccumulatedElectricity);
|
||||||
|
// CommonMethods.plcDevices[0].WriteFloat(listAddre[1], (float)energy.PhaseVoltageA);
|
||||||
|
// CommonMethods.plcDevices[0].WriteFloat(listAddre[2], (float)energy.PhaseVoltageB);
|
||||||
|
// CommonMethods.plcDevices[0].WriteFloat(listAddre[3], (float)energy.PhaseVoltageC);
|
||||||
|
// CommonMethods.plcDevices[0].WriteFloat(listAddre[4], (float)energy.PhaseCurrentA);
|
||||||
|
// CommonMethods.plcDevices[0].WriteFloat(listAddre[5], (float)energy.PhaseCurrentB);
|
||||||
|
// CommonMethods.plcDevices[0].WriteFloat(listAddre[6], (float)energy.PhaseCurrentC);
|
||||||
|
// CommonMethods.plcDevices[0].WriteFloat(listAddre[7], (float)energy.PhasePowerA);
|
||||||
|
// CommonMethods.plcDevices[0].WriteFloat(listAddre[8], (float)energy.PhasePowerB);
|
||||||
|
// CommonMethods.plcDevices[0].WriteFloat(listAddre[9], (float)energy.PhasePowerC);
|
||||||
|
|
||||||
|
// CommonMethods.plcDevices[0].WriteFloat(listAddre[10], (float)energy.ActivePower);
|
||||||
|
// CommonMethods.plcDevices[0].WriteFloat(listAddre[11], (float)energy.PowerFactor);
|
||||||
|
// CommonMethods.plcDevices[0].WriteFloat(listAddre[12], (float)energy.pt);
|
||||||
|
// CommonMethods.plcDevices[0].WriteFloat(listAddre[13], (float)energy.ct);
|
||||||
|
// }
|
||||||
|
// CommonMethods.listElectricEnergy = listM;
|
||||||
|
// }
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// TxtHelper.WriteTxt($@"D:\APILog\Logs\智能电表信息\{DateTime.Now.ToString("yyyy-MM-dd")}.txt", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + $"智能电表:{ex}");
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 能耗上传MES
|
||||||
|
/// </summary>
|
||||||
|
public async void UploadEquEnergy()
|
||||||
|
{
|
||||||
|
if (CommonMethods.listElectricEnergy.Count > 0)
|
||||||
|
{
|
||||||
|
if (CommonMethods.mesConfig.isUpMes)
|
||||||
|
{
|
||||||
|
string msg = string.Empty;
|
||||||
|
DateTime nowDate = DateTime.Now;
|
||||||
|
string filePath = string.Empty;
|
||||||
|
string fileName = string.Empty;
|
||||||
|
string fileTitle = string.Empty;
|
||||||
|
string fileContent = string.Empty;
|
||||||
|
List<WattrMeter> listP = new List<WattrMeter>();
|
||||||
|
int i = 0;
|
||||||
|
foreach (ElectricEnergy m in CommonMethods.listElectricEnergy)
|
||||||
|
{
|
||||||
|
WattrMeter param = new WattrMeter();
|
||||||
|
param.siteCode = CommonMethods.mesConfig.siteCode;
|
||||||
|
param.lineCode = CommonMethods.mesConfig.lineCode;
|
||||||
|
param.equipNum = CommonMethods.mesConfig.equipNum;
|
||||||
|
param.userName = CommonMethods.mesConfig.mesUserName;
|
||||||
|
param.electricMeterNum = CommonMethods.mesConfig.electricMeterNum[i];
|
||||||
|
param.recordDate = nowDate.ToString("yyyy-MM-dd HH:mm:ss");
|
||||||
|
param.accumulatedElectricity = (decimal)m.AccumulatedElectricity;
|
||||||
|
param.phaseVoltageA = (decimal)m.PhaseVoltageA;
|
||||||
|
param.phaseVoltageB = (decimal)m.PhaseVoltageB;
|
||||||
|
param.phaseVoltageC = (decimal)m.PhaseVoltageC;
|
||||||
|
param.phaseCurrentA = (decimal)m.PhaseCurrentA;
|
||||||
|
param.phaseCurrentB = (decimal)m.PhaseCurrentB;
|
||||||
|
param.phaseCurrentC = (decimal)m.PhaseCurrentC;
|
||||||
|
param.phasePowerA = (decimal)m.PhasePowerA;
|
||||||
|
param.phasePowerB = (decimal)m.PhasePowerB;
|
||||||
|
param.phasePowerC = (decimal)m.PhasePowerC;
|
||||||
|
param.activePower = (decimal)m.ActivePower;
|
||||||
|
param.powerFactor = (decimal)m.PowerFactor;
|
||||||
|
param.pt = (decimal)m.pt;
|
||||||
|
param.ct = (decimal)m.ct;
|
||||||
|
|
||||||
|
listP.Add(param);
|
||||||
|
i++;
|
||||||
|
|
||||||
|
// 写csv文件
|
||||||
|
string productName = string.Empty;
|
||||||
|
|
||||||
|
filePath = $@"{CommonMethods.strWattrMeterpath}\{nowDate.Year}\{nowDate.Month}";
|
||||||
|
fileName = $@"{nowDate.Day}.csv";
|
||||||
|
fileTitle = "工序名称,生产机台编号,拉线,型号,物料编号,操作人员,班次,电表编号,采集时间,有功电能(累计电能)KwH,A相电压 V,B相电压 V,C相电压 V,A相电流 A,B相电流 A,C相电流 A,A相功率 Kw,B相功率 Kw,C相功率 Kw,总有功功率 Kw,总功率因数 %,电压变比,电流变比";
|
||||||
|
fileContent = $"组盘工序,{CommonMethods.mesConfig.equipNum},{CommonMethods.mesConfig.lineCode},{productName},{CommonMethods.mesConfig.MaterialCode},{CommonMethods.mesConfig.mesUserName},{CommonMethods.strClass},{param.electricMeterNum},{nowDate.ToString("yyyy-MM-dd HH:mm:ss")}," +
|
||||||
|
$"{param.accumulatedElectricity},{param.phaseVoltageA},{param.phaseVoltageB},{param.phaseVoltageC},{param.phaseCurrentA},{param.phaseCurrentB},{param.phaseCurrentC}," +
|
||||||
|
$"{param.phasePowerA},{param.phasePowerB},{param.phasePowerC},{param.activePower},{param.powerFactor},{param.pt},{param.ct}";
|
||||||
|
CSVHelper<object>.WriterCSV(filePath, fileName, fileTitle, fileContent);
|
||||||
|
}
|
||||||
|
//上传MES
|
||||||
|
var (success, mesg) = await CommonMethods.hbgMes.UploadEquEnergyAsync(CommonMethods.mesConfig.EnergyConsumption, CommonMethods.mesConfig.equipNum, CommonMethods.mesConfig.siteCode, CommonMethods.mesConfig.lineCode,
|
||||||
|
CommonMethods.mesConfig.mesUserName, CommonMethods.mesConfig.electricMeterNum, listP).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static byte[] CalculateCRCTemp(ref byte[] messageArray, int dataLength)
|
||||||
|
{
|
||||||
|
byte usCRCHi = 0xFF;
|
||||||
|
byte usCRCLo = 0xFF;
|
||||||
|
byte[] returnResult = { 0x00, 0x00 };
|
||||||
|
int index = 0;
|
||||||
|
int messageIndex = 0;
|
||||||
|
while (dataLength > 0)
|
||||||
|
{
|
||||||
|
index = usCRCLo ^ messageArray[messageIndex];
|
||||||
|
usCRCLo = Convert.ToByte(usCRCHi ^ crcHi[index]);
|
||||||
|
usCRCHi = crcLo[index];
|
||||||
|
messageIndex++;
|
||||||
|
dataLength--;
|
||||||
|
}
|
||||||
|
//0th item is crcLo
|
||||||
|
returnResult[0] = usCRCLo;
|
||||||
|
//1st item is crcHi
|
||||||
|
returnResult[1] = usCRCHi;
|
||||||
|
//2nd item is the total CRC16.
|
||||||
|
//returnResult[2] = Convert.ToByte((usCRCHi << 8 | usCRCLo));
|
||||||
|
return returnResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
static byte[] crcHi =
|
||||||
|
{
|
||||||
|
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
|
||||||
|
0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
|
||||||
|
0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01,
|
||||||
|
0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41,
|
||||||
|
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81,
|
||||||
|
0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,
|
||||||
|
0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01,
|
||||||
|
0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40,
|
||||||
|
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
|
||||||
|
0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
|
||||||
|
0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01,
|
||||||
|
0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
|
||||||
|
0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
|
||||||
|
0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
|
||||||
|
0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01,
|
||||||
|
0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
|
||||||
|
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
|
||||||
|
0x40
|
||||||
|
};
|
||||||
|
|
||||||
|
static byte[] crcLo =
|
||||||
|
{
|
||||||
|
0x00, 0xC0, 0xC1, 0x01, 0xC3, 0x03, 0x02, 0xC2, 0xC6, 0x06, 0x07, 0xC7, 0x05, 0xC5, 0xC4,
|
||||||
|
0x04, 0xCC, 0x0C, 0x0D, 0xCD, 0x0F, 0xCF, 0xCE, 0x0E, 0x0A, 0xCA, 0xCB, 0x0B, 0xC9, 0x09,
|
||||||
|
0x08, 0xC8, 0xD8, 0x18, 0x19, 0xD9, 0x1B, 0xDB, 0xDA, 0x1A, 0x1E, 0xDE, 0xDF, 0x1F, 0xDD,
|
||||||
|
0x1D, 0x1C, 0xDC, 0x14, 0xD4, 0xD5, 0x15, 0xD7, 0x17, 0x16, 0xD6, 0xD2, 0x12, 0x13, 0xD3,
|
||||||
|
0x11, 0xD1, 0xD0, 0x10, 0xF0, 0x30, 0x31, 0xF1, 0x33, 0xF3, 0xF2, 0x32, 0x36, 0xF6, 0xF7,
|
||||||
|
0x37, 0xF5, 0x35, 0x34, 0xF4, 0x3C, 0xFC, 0xFD, 0x3D, 0xFF, 0x3F, 0x3E, 0xFE, 0xFA, 0x3A,
|
||||||
|
0x3B, 0xFB, 0x39, 0xF9, 0xF8, 0x38, 0x28, 0xE8, 0xE9, 0x29, 0xEB, 0x2B, 0x2A, 0xEA, 0xEE,
|
||||||
|
0x2E, 0x2F, 0xEF, 0x2D, 0xED, 0xEC, 0x2C, 0xE4, 0x24, 0x25, 0xE5, 0x27, 0xE7, 0xE6, 0x26,
|
||||||
|
0x22, 0xE2, 0xE3, 0x23, 0xE1, 0x21, 0x20, 0xE0, 0xA0, 0x60, 0x61, 0xA1, 0x63, 0xA3, 0xA2,
|
||||||
|
0x62, 0x66, 0xA6, 0xA7, 0x67, 0xA5, 0x65, 0x64, 0xA4, 0x6C, 0xAC, 0xAD, 0x6D, 0xAF, 0x6F,
|
||||||
|
0x6E, 0xAE, 0xAA, 0x6A, 0x6B, 0xAB, 0x69, 0xA9, 0xA8, 0x68, 0x78, 0xB8, 0xB9, 0x79, 0xBB,
|
||||||
|
0x7B, 0x7A, 0xBA, 0xBE, 0x7E, 0x7F, 0xBF, 0x7D, 0xBD, 0xBC, 0x7C, 0xB4, 0x74, 0x75, 0xB5,
|
||||||
|
0x77, 0xB7, 0xB6, 0x76, 0x72, 0xB2, 0xB3, 0x73, 0xB1, 0x71, 0x70, 0xB0, 0x50, 0x90, 0x91,
|
||||||
|
0x51, 0x93, 0x53, 0x52, 0x92, 0x96, 0x56, 0x57, 0x97, 0x55, 0x95, 0x94, 0x54, 0x9C, 0x5C,
|
||||||
|
0x5D, 0x9D, 0x5F, 0x9F, 0x9E, 0x5E, 0x5A, 0x9A, 0x9B, 0x5B, 0x99, 0x59, 0x58, 0x98, 0x88,
|
||||||
|
0x48, 0x49, 0x89, 0x4B, 0x8B, 0x8A, 0x4A, 0x4E, 0x8E, 0x8F, 0x4F, 0x8D, 0x4D, 0x4C, 0x8C,
|
||||||
|
0x44, 0x84, 0x85, 0x45, 0x87, 0x47, 0x46, 0x86, 0x82, 0x42, 0x43, 0x83, 0x41, 0x81, 0x80,
|
||||||
|
0x40
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 定期清理本地保存下料数据
|
||||||
|
/// <summary>
|
||||||
|
/// 定期清理本地保存下料数据
|
||||||
|
/// </summary>
|
||||||
|
public void DeleteFileOfLocal()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//string filePath = string.Format(@"{0}\Data\{1}", Application.StartupPath, DateTime.Now.AddDays(-365).Year);
|
||||||
|
string filePath = string.Format(@"{0}\{1}", @"D:\LocalData", DateTime.Now.AddYears(-1).Year);
|
||||||
|
if (Directory.Exists(filePath))
|
||||||
|
{
|
||||||
|
//判断是否有子文件夹,循环删除
|
||||||
|
for (int i = 1; i <= DateTime.Now.Month; i++)
|
||||||
|
{
|
||||||
|
string tempPath = string.Format(@"{0}\{1}", filePath, i);
|
||||||
|
if (Directory.Exists(tempPath))
|
||||||
|
{
|
||||||
|
LogCLear_DirOrFile("下料本地文件", DateTime.Now, tempPath, 365);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//没有子文件夹,删除目录
|
||||||
|
DirectoryInfo[] DirList = GetSubcatalog(filePath);//获取文件路径
|
||||||
|
if (DirList != null)//目录存在
|
||||||
|
{
|
||||||
|
if (DirList.Length == 0)
|
||||||
|
{
|
||||||
|
Directory.Delete(filePath, true);
|
||||||
|
Thread.Sleep(10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.Instance.WriteLog($"定期清理本地保存下料数据异常:{ex.ToString()}", "Info");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>清理指定目录下的文件夹或文件 </summary>
|
||||||
|
/// <param name="strName">清理文件注释</param>
|
||||||
|
/// <param name="CurrentTime">当前时间</param>
|
||||||
|
/// <param name="FilePath">文件目录</param>
|
||||||
|
/// <param name="RtnDayNums">保留天数</param>
|
||||||
|
public void LogCLear_DirOrFile(string strName, DateTime CurrentTime, string FilePath, uint RtnDayNums)
|
||||||
|
{
|
||||||
|
long time = 0;
|
||||||
|
Stopwatch stopWatch = new Stopwatch();
|
||||||
|
stopWatch.Start();
|
||||||
|
bool b_OK = true;
|
||||||
|
LogHelper.Instance.WriteLog($"清理{strName}开始", "Info");
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DirectoryInfo[] DirList = GetSubcatalog(FilePath);//获取文件路径
|
||||||
|
if (DirList != null)//目录不存在
|
||||||
|
{
|
||||||
|
if (DirList.Length != 0)//目录是否有子文件夹:如 文件夹“2021-10-31”
|
||||||
|
{
|
||||||
|
#region 删文件夹
|
||||||
|
foreach (var dirInfo in DirList)//循环删除文件夹
|
||||||
|
{
|
||||||
|
DateTime itemDateTime = dirInfo.CreationTime;//获取文件夹创建日期
|
||||||
|
if (CurrentTime.AddDays(-RtnDayNums) > itemDateTime)
|
||||||
|
{
|
||||||
|
if (dirInfo.Exists)
|
||||||
|
{
|
||||||
|
dirInfo.Delete(true);
|
||||||
|
Thread.Sleep(10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
else//目录下无子文件夹存在时,判断是否有文件
|
||||||
|
{
|
||||||
|
string[] fileList = null;
|
||||||
|
if (Directory.Exists(FilePath))
|
||||||
|
{
|
||||||
|
//获取文件列表
|
||||||
|
fileList = Directory.GetFiles(FilePath);
|
||||||
|
if (fileList != null)//目录不存在
|
||||||
|
{
|
||||||
|
if (fileList.Length != 0)//目录下是否存在文件
|
||||||
|
{
|
||||||
|
#region 删除文件
|
||||||
|
foreach (var filePath in fileList)//循环删除文件
|
||||||
|
{
|
||||||
|
DateTime itemDateTime = new FileInfo(filePath).LastWriteTime;//获取文件修改日期
|
||||||
|
if (CurrentTime.AddDays(-RtnDayNums) > itemDateTime)
|
||||||
|
{
|
||||||
|
if (File.Exists(filePath))
|
||||||
|
{
|
||||||
|
File.Delete(filePath);
|
||||||
|
Thread.Sleep(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#region 删除文件夹
|
||||||
|
Directory.Delete(FilePath, true);
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
b_OK = true;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
b_OK = false;
|
||||||
|
}
|
||||||
|
stopWatch.Stop();
|
||||||
|
time = stopWatch.ElapsedMilliseconds;
|
||||||
|
LogHelper.Instance.WriteLog($"{FilePath},清理结束,结果;{b_OK},耗时:{time}", "Info");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取指定目录中所有文件列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="directoryPath">指定目录的绝对路径</param>
|
||||||
|
public DirectoryInfo[] GetSubcatalog(string directoryPath)
|
||||||
|
{
|
||||||
|
DirectoryInfo dir = new DirectoryInfo(directoryPath);
|
||||||
|
//如果目录存在
|
||||||
|
if (dir.Exists)
|
||||||
|
{
|
||||||
|
//获取文件列表
|
||||||
|
DirectoryInfo[] dirs = dir.GetDirectories();
|
||||||
|
return dirs;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{1D0FA5A4-07F0-4621-B6BB-683AEC91E658}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>JinYuan.ControlCenters</RootNamespace>
|
||||||
|
<AssemblyName>JinYuan.ControlCenters</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
<LangVersion>8.0</LangVersion>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="MiniExcel, Version=1.36.1.0, Culture=neutral, PublicKeyToken=e7310002a53eac39, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\MiniExcel.1.36.1\lib\net45\MiniExcel.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="PLCCommunication, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\LargeSquareOne\Lib\PLCCommunication.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="SqlSugar, Version=5.1.4.94, Culture=neutral, PublicKeyToken=null">
|
||||||
|
<HintPath>..\Libs\SqlSugar.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Diagnostics.Tracing" />
|
||||||
|
<Reference Include="System.IO.Compression" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="ControlCenter_Ext.cs" />
|
||||||
|
<Compile Include="ControlCenter_Plc.cs" />
|
||||||
|
<Compile Include="iniConfigHelper\CreateIniFile.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="ControlCenter_Total.cs" />
|
||||||
|
<Compile Include="ControlCenter.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\JinYuan.DAL\JinYuan.DAL.csproj">
|
||||||
|
<Project>{114aa012-29c9-418c-a2d6-3173c5341f51}</Project>
|
||||||
|
<Name>JinYuan.DAL</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\JinYuan.Helper\JinYuan.Helper.csproj">
|
||||||
|
<Project>{258D0AB7-2B4F-4D8F-A3CD-7A8CB4A85360}</Project>
|
||||||
|
<Name>JinYuan.Helper</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\JinYuan.MES\JinYuan.MES.csproj">
|
||||||
|
<Project>{530B6426-08E7-461C-91DC-787F876620FC}</Project>
|
||||||
|
<Name>JinYuan.MES</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\JinYuan.Models\JinYuan.Models.csproj">
|
||||||
|
<Project>{4c0bcb84-5cd7-4846-8363-c4c10d46e391}</Project>
|
||||||
|
<Name>JinYuan.Models</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\JinYuan.VirtualDataLibrary\JinYuan.VirtualDataLibrary.csproj">
|
||||||
|
<Project>{2ab7e380-7795-448a-933c-0f6a081b5e7e}</Project>
|
||||||
|
<Name>JinYuan.VirtualDataLibrary</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\Language\Language.csproj">
|
||||||
|
<Project>{292A5C9C-7A82-4D25-A885-DDCEDC93F03C}</Project>
|
||||||
|
<Name>Language</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\PLC\PLC.csproj">
|
||||||
|
<Project>{486aecd0-c2bf-43c5-b7d7-88e565ade4b7}</Project>
|
||||||
|
<Name>PLC</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="app.config" />
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// 有关程序集的一般信息由以下
|
||||||
|
// 控制。更改这些特性值可修改
|
||||||
|
// 与程序集关联的信息。
|
||||||
|
[assembly: AssemblyTitle("JinYuan.ControlCenters")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("JinYuan.ControlCenters")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||||
|
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||||
|
//请将此类型的 ComVisible 特性设置为 true。
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||||
|
[assembly: Guid("1d0fa5a4-07f0-4621-b6bb-683aec91e658")]
|
||||||
|
|
||||||
|
// 程序集的版本信息由下列四个值组成:
|
||||||
|
//
|
||||||
|
// 主版本
|
||||||
|
// 次版本
|
||||||
|
// 生成号
|
||||||
|
// 修订号
|
||||||
|
//
|
||||||
|
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||||
|
//通过使用 "*",如下所示:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-9.1.0.0" newVersion="9.1.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Text.Encoding.CodePages" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Security.Cryptography.Xml" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.1" newVersion="6.0.0.1" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-3.23.4.0" newVersion="3.23.4.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="ZstdSharp" publicKeyToken="8d151af33a4ad5cf" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-0.7.2.0" newVersion="0.7.2.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Configuration.ConfigurationManager" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup></configuration>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
namespace iniConfigHelper
|
||||||
|
{
|
||||||
|
internal class CreateIniFile
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="MiniExcel" version="1.36.1" targetFramework="net48" />
|
||||||
|
</packages>
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
using AntdUI;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Controls
|
||||||
|
{
|
||||||
|
public class AlertManager
|
||||||
|
{
|
||||||
|
private readonly Alert alert;
|
||||||
|
private readonly Queue<(string message, TType type)> messageQueue = new Queue<(string, TType)>();
|
||||||
|
private readonly System.Windows.Forms.Timer throttleTimer;
|
||||||
|
private const int ThrottleInterval = 100; // 毫秒
|
||||||
|
|
||||||
|
public AlertManager(Alert alertControl)
|
||||||
|
{
|
||||||
|
alert = alertControl ?? throw new ArgumentNullException(nameof(alertControl));
|
||||||
|
|
||||||
|
throttleTimer = new System.Windows.Forms.Timer();
|
||||||
|
throttleTimer.Interval = ThrottleInterval;
|
||||||
|
throttleTimer.Tick += ThrottleTimer_Tick;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ShowAlert(string message, TType type = TType.Info)
|
||||||
|
{
|
||||||
|
messageQueue.Enqueue((message, type));
|
||||||
|
if (!throttleTimer.Enabled)
|
||||||
|
{
|
||||||
|
throttleTimer.Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ThrottleTimer_Tick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (messageQueue.Count > 0)
|
||||||
|
{
|
||||||
|
var (message, type) = messageQueue.Dequeue();
|
||||||
|
UpdateAlertUI(message, type);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throttleTimer.Stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateAlertUI(string message, TType type)
|
||||||
|
{
|
||||||
|
if (alert.InvokeRequired)
|
||||||
|
{
|
||||||
|
alert.BeginInvoke(new Action(() => UpdateAlertUI(message, type)));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
alert.Text = message;
|
||||||
|
alert.Icon = type;
|
||||||
|
alert.Invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
throttleTimer?.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+173
@@ -0,0 +1,173 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class ArrTotalQty
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ArrTotalQty));
|
||||||
|
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.lbl_Title6 = new JinYuan.ControlLib.TotalQty();
|
||||||
|
this.lbl_Title5 = new JinYuan.ControlLib.TotalQty();
|
||||||
|
this.lbl_Title4 = new JinYuan.ControlLib.TotalQty();
|
||||||
|
this.lbl_Title3 = new JinYuan.ControlLib.TotalQty();
|
||||||
|
this.lbl_Title2 = new JinYuan.ControlLib.TotalQty();
|
||||||
|
this.lbl_Title1 = new JinYuan.ControlLib.TotalQty();
|
||||||
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel1.ColumnCount = 6;
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.lbl_Title6, 5, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.lbl_Title5, 4, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.lbl_Title4, 3, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.lbl_Title3, 2, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.lbl_Title2, 1, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.lbl_Title1, 0, 0);
|
||||||
|
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
this.tableLayoutPanel1.RowCount = 1;
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.tableLayoutPanel1.Size = new System.Drawing.Size(300, 79);
|
||||||
|
this.tableLayoutPanel1.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// lbl_Title6
|
||||||
|
//
|
||||||
|
this.lbl_Title6.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.lbl_Title6.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("lbl_Title6.BackgroundImage")));
|
||||||
|
this.lbl_Title6.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
|
this.lbl_Title6.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.lbl_Title6.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.lbl_Title6.Location = new System.Drawing.Point(254, 5);
|
||||||
|
this.lbl_Title6.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.lbl_Title6.Name = "lbl_Title6";
|
||||||
|
this.lbl_Title6.Size = new System.Drawing.Size(42, 69);
|
||||||
|
this.lbl_Title6.TabIndex = 5;
|
||||||
|
this.lbl_Title6.TitleName = "0";
|
||||||
|
//
|
||||||
|
// lbl_Title5
|
||||||
|
//
|
||||||
|
this.lbl_Title5.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.lbl_Title5.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("lbl_Title5.BackgroundImage")));
|
||||||
|
this.lbl_Title5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
|
this.lbl_Title5.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.lbl_Title5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.lbl_Title5.Location = new System.Drawing.Point(204, 5);
|
||||||
|
this.lbl_Title5.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.lbl_Title5.Name = "lbl_Title5";
|
||||||
|
this.lbl_Title5.Size = new System.Drawing.Size(42, 69);
|
||||||
|
this.lbl_Title5.TabIndex = 4;
|
||||||
|
this.lbl_Title5.TitleName = "0";
|
||||||
|
//
|
||||||
|
// lbl_Title4
|
||||||
|
//
|
||||||
|
this.lbl_Title4.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.lbl_Title4.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("lbl_Title4.BackgroundImage")));
|
||||||
|
this.lbl_Title4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
|
this.lbl_Title4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.lbl_Title4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.lbl_Title4.Location = new System.Drawing.Point(154, 5);
|
||||||
|
this.lbl_Title4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.lbl_Title4.Name = "lbl_Title4";
|
||||||
|
this.lbl_Title4.Size = new System.Drawing.Size(42, 69);
|
||||||
|
this.lbl_Title4.TabIndex = 3;
|
||||||
|
this.lbl_Title4.TitleName = "0";
|
||||||
|
//
|
||||||
|
// lbl_Title3
|
||||||
|
//
|
||||||
|
this.lbl_Title3.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.lbl_Title3.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("lbl_Title3.BackgroundImage")));
|
||||||
|
this.lbl_Title3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
|
this.lbl_Title3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.lbl_Title3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.lbl_Title3.Location = new System.Drawing.Point(104, 5);
|
||||||
|
this.lbl_Title3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.lbl_Title3.Name = "lbl_Title3";
|
||||||
|
this.lbl_Title3.Size = new System.Drawing.Size(42, 69);
|
||||||
|
this.lbl_Title3.TabIndex = 2;
|
||||||
|
this.lbl_Title3.TitleName = "0";
|
||||||
|
//
|
||||||
|
// lbl_Title2
|
||||||
|
//
|
||||||
|
this.lbl_Title2.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.lbl_Title2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("lbl_Title2.BackgroundImage")));
|
||||||
|
this.lbl_Title2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
|
this.lbl_Title2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.lbl_Title2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.lbl_Title2.Location = new System.Drawing.Point(54, 5);
|
||||||
|
this.lbl_Title2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.lbl_Title2.Name = "lbl_Title2";
|
||||||
|
this.lbl_Title2.Size = new System.Drawing.Size(42, 69);
|
||||||
|
this.lbl_Title2.TabIndex = 1;
|
||||||
|
this.lbl_Title2.TitleName = "0";
|
||||||
|
//
|
||||||
|
// lbl_Title1
|
||||||
|
//
|
||||||
|
this.lbl_Title1.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.lbl_Title1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("lbl_Title1.BackgroundImage")));
|
||||||
|
this.lbl_Title1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
|
this.lbl_Title1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.lbl_Title1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.lbl_Title1.ForeColor = System.Drawing.Color.White;
|
||||||
|
this.lbl_Title1.Location = new System.Drawing.Point(4, 5);
|
||||||
|
this.lbl_Title1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.lbl_Title1.Name = "lbl_Title1";
|
||||||
|
this.lbl_Title1.Size = new System.Drawing.Size(42, 69);
|
||||||
|
this.lbl_Title1.TabIndex = 0;
|
||||||
|
this.lbl_Title1.TitleName = "0";
|
||||||
|
//
|
||||||
|
// ArrTotalQty
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.Controls.Add(this.tableLayoutPanel1);
|
||||||
|
this.Name = "ArrTotalQty";
|
||||||
|
this.Size = new System.Drawing.Size(300, 79);
|
||||||
|
this.tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private TotalQty lbl_Title1;
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private TotalQty lbl_Title6;
|
||||||
|
private TotalQty lbl_Title5;
|
||||||
|
private TotalQty lbl_Title4;
|
||||||
|
private TotalQty lbl_Title3;
|
||||||
|
private TotalQty lbl_Title2;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public partial class ArrTotalQty : UserControl
|
||||||
|
{
|
||||||
|
public ArrTotalQty()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
//设置控件样式,去除缓冲
|
||||||
|
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
this.SetStyle(ControlStyles.DoubleBuffer, true);
|
||||||
|
this.SetStyle(ControlStyles.ResizeRedraw, true);
|
||||||
|
this.SetStyle(ControlStyles.Selectable, true);
|
||||||
|
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
|
||||||
|
|
||||||
|
// UpData();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//#region 减少闪烁
|
||||||
|
//protected override CreateParams CreateParams
|
||||||
|
//{
|
||||||
|
// get
|
||||||
|
// {
|
||||||
|
// CreateParams cp = base.CreateParams;
|
||||||
|
// cp.ExStyle |= 0x02000000;
|
||||||
|
// return cp;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
private int _MaxValue = 999999;
|
||||||
|
|
||||||
|
|
||||||
|
private int totalValue = 0;
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置或显示数字值:(最大值999999)")]
|
||||||
|
|
||||||
|
|
||||||
|
public int TotalValue
|
||||||
|
{
|
||||||
|
get { return totalValue; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value > _MaxValue) return;
|
||||||
|
totalValue = value;
|
||||||
|
SetElectricEnergy(totalValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void SetElectricEnergy(int value)
|
||||||
|
{
|
||||||
|
if (totalValue.ToString().Length < 7)
|
||||||
|
{
|
||||||
|
bool isNumeric = Regex.IsMatch(totalValue.ToString(), @"^\d+$");
|
||||||
|
if (isNumeric)
|
||||||
|
{
|
||||||
|
List<int> numbers = new List<int>();
|
||||||
|
|
||||||
|
foreach (char c in totalValue.ToString())
|
||||||
|
{
|
||||||
|
if (char.IsDigit(c))
|
||||||
|
{
|
||||||
|
int number = int.Parse(c.ToString());
|
||||||
|
numbers.Add(number);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 1; i < numbers.Count + 1; i++)
|
||||||
|
{
|
||||||
|
switch (numbers.Count)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
this.lbl_Title1.TitleName = 0.ToString();
|
||||||
|
this.lbl_Title2.TitleName = 0.ToString();
|
||||||
|
this.lbl_Title3.TitleName = 0.ToString();
|
||||||
|
this.lbl_Title4.TitleName = 0.ToString();
|
||||||
|
this.lbl_Title5.TitleName = 0.ToString();
|
||||||
|
this.lbl_Title6.TitleName = numbers[0].ToString();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
this.lbl_Title1.TitleName = 0.ToString();
|
||||||
|
this.lbl_Title2.TitleName = 0.ToString();
|
||||||
|
this.lbl_Title3.TitleName = 0.ToString();
|
||||||
|
this.lbl_Title4.TitleName = 0.ToString();
|
||||||
|
this.lbl_Title5.TitleName = numbers[0].ToString();
|
||||||
|
this.lbl_Title6.TitleName = numbers[1].ToString();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
this.lbl_Title1.TitleName = 0.ToString();
|
||||||
|
this.lbl_Title2.TitleName = 0.ToString();
|
||||||
|
this.lbl_Title3.TitleName = 0.ToString();
|
||||||
|
this.lbl_Title4.TitleName = numbers[0].ToString();
|
||||||
|
this.lbl_Title5.TitleName = numbers[1].ToString();
|
||||||
|
this.lbl_Title6.TitleName = numbers[2].ToString();
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
this.lbl_Title1.TitleName = 0.ToString();
|
||||||
|
this.lbl_Title2.TitleName = 0.ToString();
|
||||||
|
this.lbl_Title3.TitleName = numbers[0].ToString();
|
||||||
|
this.lbl_Title4.TitleName = numbers[1].ToString();
|
||||||
|
this.lbl_Title5.TitleName = numbers[2].ToString();
|
||||||
|
this.lbl_Title6.TitleName = numbers[3].ToString();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
this.lbl_Title1.TitleName = 0.ToString();
|
||||||
|
this.lbl_Title2.TitleName = numbers[0].ToString();
|
||||||
|
this.lbl_Title3.TitleName = numbers[1].ToString();
|
||||||
|
this.lbl_Title4.TitleName = numbers[2].ToString();
|
||||||
|
this.lbl_Title5.TitleName = numbers[3].ToString();
|
||||||
|
this.lbl_Title6.TitleName = numbers[4].ToString();
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
this.lbl_Title1.TitleName = numbers[0].ToString();
|
||||||
|
this.lbl_Title2.TitleName = numbers[1].ToString();
|
||||||
|
this.lbl_Title3.TitleName = numbers[2].ToString();
|
||||||
|
this.lbl_Title4.TitleName = numbers[3].ToString();
|
||||||
|
this.lbl_Title5.TitleName = numbers[4].ToString();
|
||||||
|
this.lbl_Title6.TitleName = numbers[5].ToString();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,877 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="lbl_Title1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAADEAAABFCAYAAADjLw7LAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
|
||||||
|
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKNWlDQ1BzUkdCIElFQzYxOTY2LTIuMQAA
|
||||||
|
SMedlndUVNcWh8+9d3qhzTDSGXqTLjCA9C4gHQRRGGYGGMoAwwxNbIioQEQREQFFkKCAAaOhSKyIYiEo
|
||||||
|
qGAPSBBQYjCKqKhkRtZKfHl57+Xl98e939pn73P32XuftS4AJE8fLi8FlgIgmSfgB3o401eFR9Cx/QAG
|
||||||
|
eIABpgAwWempvkHuwUAkLzcXerrIC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/UXprNRrGiv3nsYG+6hZhbea
|
||||||
|
VXllcCqhmlN5qVklviu9prMKHBMsmsLKRGmslNoJJ7FiAeJ4JrM+nojrkcR6IZ+QzzeO83RHfnfUAdyA
|
||||||
|
M9XI10n1DgdjOIZxT2SdgAsKRLGsCPgikARIPZK4QCDzGM/JCc/xXDC2IW7JrMJ9IqvwnMQqBSmsCoQK
|
||||||
|
UtkwYRpIZ8NBBAGxCBQcSVvrb5Z9dGwq2lC7yWg/mVUilgIiITzj2SCP8Syf01oDYAOwFaM+HzqZwB11
|
||||||
|
O1P9DL7YIBE34IkGIkAyYkBCAZ6Q8kQwiBByJJN7TmDlgglcEM5ksGASZ08ICgsRTuaAZUvf+d9tx0wk
|
||||||
|
0G4CYiEOHy+Zk1nis4GUj/Ja81Md3qiNTjKdbFfgDOgiMPYSjCesgDNwAx5AgGAi4AN8gRhIgD8IQDJC
|
||||||
|
yicFguTHyAQo6F+h3y3H2kHt6SQRFJugPJSP8or4OnDmgSvgi7fxPAkbNhkX4IZAHsCTD4g+C2xShB+w
|
||||||
|
ydlDos9iv5/aENTeFotiE3TyKB8VTieU6qCa+Prsa/7fJOyxCTkjqCsgKXdrEkJoxSZoj7cdz+6j46md
|
||||||
|
rWBL0RTfUrQlp13xNuxr/k8lnkKAoHY4Axc7XAVJnBX6zLrhM6Ct3T467kkbikE8jvu8vPbY1+yeyDL/
|
||||||
|
BD5r4T4h7uvLAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="lbl_Title2.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAADEAAABFCAYAAADjLw7LAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
|
||||||
|
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKNWlDQ1BzUkdCIElFQzYxOTY2LTIuMQA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/5v5d+z9Uxlfe
|
||||||
|
qXKuaq1Wqt5RPXeAfWDwoOPBlhrlmqKa94e4h+7WetS212nXlR/GHM44/LQ+tL73a8bXjQ0KDUUNH4/w
|
||||||
|
jowcDTza02jV2Nik1FTSDDcLm6eORR67+Y3rN50thi21rbTWouPguPD4s2+jvx064X2i+yTjZMt3Wt9V
|
||||||
|
t1HaCtuh9uz2mY74jpHO8M6BUytOdXfZdrV9b/T9kdNqp6vOyJ4pOUs4m3924VzOudnzqeenL8RdGOuO
|
||||||
|
6n5wcdXF2z0BPf2XvC9duex++WKvU++5K3ZXTl+1uXrqGuNax3XL6+19Fn1tP1j80NZv2d9+w+pG503r
|
||||||
|
m10DywfODjoMXrjleuvyba/b1++svDMwFDJ0dzhyeOQu++7kvaR7L+9n3J9/sOkh+mHhI6lH5Y+VHtf9
|
||||||
|
qPdj64jlyJlR19G+J0FPHoyxxp7/lP7Th/H8p+Sn5ROqE42TZpOnp9ynbj5b/Wz8eerz+emCn6V/rn6h
|
||||||
|
++K7Xxx/6ZtZNTP+kv9y4dfiV/Kvjrxe9rp71n/28ZvkN/NzhW/l3x59x3jX+z7s/cR85gfsh4qPeh+7
|
||||||
|
Pnl/eriQvLDwG/eE8/s6uL5TAAAACXBIWXMAAAsMAAALDAE/QCLIAAARpklEQVRoQ9WaeVwT19rHh50k
|
||||||
|
bAmEBEjC5lp7l89t6y4ighu07rsgLiwuJIQAIYEEENms4tbba93aWtu6L9W64FK1ouLWuoIrgrWiVq2t
|
||||||
|
du/M/T2TRKPX9733837e2+AfXyfJzHme5ztzZs45g4ys8MIrYAwYCAZZwef6gTJz/Rtyc93rjgQ1vI5a
|
||||||
|
3viX+oouDA801cdKDec9SKIPMIJpFuqnys3n0+WmcylBpjOTwUTHcnYSSJGbzqdBaIq1zumQyIZEIiQE
|
||||||
|
TGDRpShZ4UXakSQ314+Vm86MDC44PTSk4ItBIfnH31DkH3vdkYTknxhItQQXnBoCqRE4waMhkygrupgq
|
||||||
|
NV8YG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pXcQY83uRrPOdxh4Tyu1nchVyteyB3xXsDVCudytZ6zucO0H8d+jjb70fYz
|
||||||
|
1zJurwvigN0uFWy1SyW7C1s+F9jhMhOgDpcyvh6qbZsz1Vn++2bUvdUlg41l3EexjPsIjnEbyeEztqM4
|
||||||
|
J7fRnCtwA+4eYzgPj0QwjhN4JLJCryRW5Dee9fabwPqIJrJ+whRWIkpl/UXprNRrGiv3nsYG+6hZhbea
|
||||||
|
VXllcCqhmlN5qVklviu9prMKHBMsmsLKRGmslNoJJ7FiAeJ4JrM+nojrkcR6IZ+QzzeO83RHfnfUAdyA
|
||||||
|
M9XI10n1DgdjOIZxT2SdgAsKRLGsCPgikARIPZK4QCDzGM/JCc/xXDC2IW7JrMJ9IqvwnMQqBSmsCoQK
|
||||||
|
UtkwYRpIZ8NBBAGxCBQcSVvrb5Z9dGwq2lC7yWg/mVUilgIiITzj2SCP8Syf01oDYAOwFaM+HzqZwB11
|
||||||
|
O1P9DL7YIBE34IkGIkAyYkBCAZ6Q8kQwiBByJJN7TmDlgglcEM5ksGASZ08ICgsRTuaAZUvf+d9tx0wk
|
||||||
|
0G4CYiEOHy+Zk1nis4GUj/Ja81Md3qiNTjKdbFfgDOgiMPYSjCesgDNwAx5AgGAi4AN8gRhIgD8IQDJC
|
||||||
|
yicFguTHyAQo6F+h3y3H2kHt6SQRFJugPJSP8or4OnDmgSvgi7fxPAkbNhkX4IZAHsCTD4g+C2xShB+w
|
||||||
|
ydlDos9iv5/aENTeFotiE3TyKB8VTieU6qCa+Prsa/7fJOyxCTkjqCsgKXdrEkJoxSZoj7cdz+6j46md
|
||||||
|
rWBL0RTfUrQlp13xNuxr/k8lnkKAoHY4Axc7XAVJnBX6zLrhM6Ct3T467kkbikE8jvu8vPbY1+yeyDL/
|
||||||
|
BD5r4T4h7uvLAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="lbl_Title3.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAADEAAABFCAYAAADjLw7LAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
|
||||||
|
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKNWlDQ1BzUkdCIElFQzYxOTY2LTIuMQAA
|
||||||
|
SMedlndUVNcWh8+9d3qhzTDSGXqTLjCA9C4gHQRRGGYGGMoAwwxNbIioQEQREQFFkKCAAaOhSKyIYiEo
|
||||||
|
qGAPSBBQYjCKqKhkRtZKfHl57+Xl98e939pn73P32XuftS4AJE8fLi8FlgIgmSfgB3o401eFR9Cx/QAG
|
||||||
|
eIABpgAwWempvkHuwUAkLzcXerrICfyL3gwBSPy+ZejpT6eD/0/SrFS+AADIX8TmbE46S8T5Ik7KFKSK
|
||||||
|
7TMipsYkihlGiZkvSlDEcmKOW+Sln30W2VHM7GQeW8TinFPZyWwx94h4e4aQI2LER8QFGVxOpohvi1gz
|
||||||
|
SZjMFfFbcWwyh5kOAIoktgs4rHgRm4iYxA8OdBHxcgBwpLgvOOYLFnCyBOJDuaSkZvO5cfECui5Lj25q
|
||||||
|
bc2ge3IykzgCgaE/k5XI5LPpLinJqUxeNgCLZ/4sGXFt6aIiW5paW1oamhmZflGo/7r4NyXu7SK9Cvjc
|
||||||
|
M4jW94ftr/xS6gBgzIpqs+sPW8x+ADq2AiB3/w+b5iEAJEV9a7/xxXlo4nmJFwhSbYyNMzMzjbgclpG4
|
||||||
|
oL/rfzr8DX3xPSPxdr+Xh+7KiWUKkwR0cd1YKUkpQj49PZXJ4tAN/zzE/zjwr/NYGsiJ5fA5PFFEqGjK
|
||||||
|
uLw4Ubt5bK6Am8Kjc3n/qYn/MOxPWpxrkSj1nwA1yghI3aAC5Oc+gKIQARJ5UNz13/vmgw8F4psXpjqx
|
||||||
|
OPefBf37rnCJ+JHOjfsc5xIYTGcJ+RmLa+JrCdCAACQ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vy13c+7oeqf1tRugDTEbujdqbMzfOL7JY9PRzYTNiZt/yDPJK817vSVs
|
||||||
|
S1e+cv6m/LGtHlubCyQK+AXD22y31WxHbedu799hvmP/jk+F7MJrRSZF5UUfilnF174y/ariq4WdsTv7
|
||||||
|
SyxLDu7C7OLtGtrtsPtoqXRpTunYHt897WX0ssKy13uj9l4tX1Zes4+wT7hvpMKnonO/5v5d+z9Uxlfe
|
||||||
|
qXKuaq1Wqt5RPXeAfWDwoOPBlhrlmqKa94e4h+7WetS212nXlR/GHM44/LQ+tL73a8bXjQ0KDUUNH4/w
|
||||||
|
jowcDTza02jV2Nik1FTSDDcLm6eORR67+Y3rN50thi21rbTWouPguPD4s2+jvx064X2i+yTjZMt3Wt9V
|
||||||
|
t1HaCtuh9uz2mY74jpHO8M6BUytOdXfZdrV9b/T9kdNqp6vOyJ4pOUs4m3924VzOudnzqeenL8RdGOuO
|
||||||
|
6n5wcdXF2z0BPf2XvC9duex++WKvU++5K3ZXTl+1uXrqGuNax3XL6+19Fn1tP1j80NZv2d9+w+pG503r
|
||||||
|
m10DywfODjoMXrjleuvyba/b1++svDMwFDJ0dzhyeOQu++7kvaR7L+9n3J9/sOkh+mHhI6lH5Y+VHtf9
|
||||||
|
qPdj64jlyJlR19G+J0FPHoyxxp7/lP7Th/H8p+Sn5ROqE42TZpOnp9ynbj5b/Wz8eerz+emCn6V/rn6h
|
||||||
|
++K7Xxx/6ZtZNTP+kv9y4dfiV/Kvjrxe9rp71n/28ZvkN/NzhW/l3x59x3jX+z7s/cR85gfsh4qPeh+7
|
||||||
|
Pnl/eriQvLDwG/eE8/s6uL5TAAAACXBIWXMAAAsMAAALDAE/QCLIAAARpklEQVRoQ9WaeVwT19rHh50k
|
||||||
|
bAmEBEjC5lp7l89t6y4ighu07rsgLiwuJIQAIYEEENms4tbba93aWtu6L9W64FK1ouLWuoIrgrWiVq2t
|
||||||
|
du/M/T2TRKPX9733837e2+AfXyfJzHme5ztzZs45g4ys8MIrYAwYCA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md
|
||||||
|
rWBL0RTfUrQlp13xNuxr/k8lnkKAoHY4Axc7XAVJnBX6zLrhM6Ct3T467kkbikE8jvu8vPbY1+yeyDL/
|
||||||
|
BD5r4T4h7uvLAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="lbl_Title4.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAADEAAABFCAYAAADjLw7LAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
|
||||||
|
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKNWlDQ1BzUkdCIElFQzYxOTY2LTIuMQAA
|
||||||
|
SMedlndUVNcWh8+9d3qhzTDSGXqTLjCA9C4gHQRRGGYGGMoAwwxNbIioQEQREQFFkKCAAaOhSKyIYiEo
|
||||||
|
qGAPSBBQYjCKqKhkRtZKfHl57+Xl98e939pn73P32XuftS4AJE8fLi8FlgIgmSfgB3o401eFR9Cx/QAG
|
||||||
|
eIABpgAwWempvkHuwUAkLzcXerrICfyL3gwBSPy+ZejpT6eD/0/SrFS+AADIX8TmbE46S8T5Ik7KFKSK
|
||||||
|
7TMipsYkihlGiZkvSlDEcmKOW+Sln30W2VHM7GQeW8TinFPZyWwx94h4e4aQI2LER8QFGVxOpohvi1gz
|
||||||
|
SZjMFfFbcWwyh5kOAIoktgs4rHgRm4iYxA8OdBHxcgBwpLgvOOYLFnCyBOJDuaSkZvO5cfECui5Lj25q
|
||||||
|
bc2ge3IykzgCgaE/k5XI5LPpLinJqUxeNgCLZ/4sGXFt6aIiW5paW1oamhmZflGo/7r4NyXu7SK9Cvjc
|
||||||
|
M4jW94ftr/xS6gBgzIpqs+sPW8x+ADq2AiB3/w+b5iEAJEV9a7/xxXlo4nmJFwhSbYyNMzMzjbgclpG4
|
||||||
|
oL/rfzr8DX3xPSPxdr+X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wG/eE8/s6uL5TAAAACXBIWXMAAAsMAAALDAE/QCLIAAARpklEQVRoQ9WaeVwT19rHh50k
|
||||||
|
bAmEBEjC5lp7l89t6y4ighu07rsgLiwuJIQAIYEEENms4tbba93aWtu6L9W64FK1ouLWuoIrgrWiVq2t
|
||||||
|
du/M/T2TRKPX9733837e2+AfXyfJzHme5ztzZs45g4ys8MIrYAwYCAZZwef6gTJz/Rtyc93rjgQ1vI5a
|
||||||
|
3viX+oouDA801cdKDec9SKIPMIJpFuqnys3n0+WmcylBpjOTwUTHcnYSSJGbzqdBaIq1zumQyIZEIiQE
|
||||||
|
TGDRpShZ4UXakSQ314+Vm86MDC44PTSk4ItBIfnH31DkH3vdkYTknxhItQQXnBoCqRE4waMhkygrupgq
|
||||||
|
NV8YGmCsFzDS4ss9ITFdZq4bG1RwZkRwwReDFcZjryuNtQOUxkP9Qg01fUMNB/s4ChVqUBqPDFAYjyaE
|
||||||
|
5J+EzOmh6CWjUXOKtPDSsICCCwImoPhKL3ShabhkI2A8WJF/NF5lQPF5n8eG5u2LCdfv7RWu3xPtGPZG
|
||||||
|
h+n39Q7NOxCLmvoq8mvjcWUG4WQPlxfWT4LE8AATSZRAwlw3lQzpCpBAmP5AbHjunugIfXVUq9zt3R3H
|
||||||
|
ju6ROdVREbm7e4bp9/cONR7sozQehcgXg4LM55MDii4N9zddhMTMht50I2PHQOpCuAJxJBCZs6NH6+yt
|
||||||
|
XdvoNndpo9vU2TFs7tI6e0uXVjnbu5NIaN7+3krj4f4K3KtB5rOJkBjhb74kZPwhga6USjvoHghDF4rI
|
||||||
|
rY7iBbI2dW6bta5ju6y1DqOtbkMniHSlk0pdm+5R9JiEIPOZxIDiSyPEhZeFjKS0MVZuPptCNw4O6BOB
|
||||||
|
ftgqZ0f3NrpPurSDQHvtqlfba1c7iFWvkghdlVbZ27pFoIeo0FOoSwWbTo/1n3FlpF/xVUiUNcZBIpWX
|
||||||
|
yDsIiT2Q2A6JTZ0R4DUK9FLmR684inba1a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MPYSjCesgDNwAx5AgGAi4AN8gRhIgD8IQDJC
|
||||||
|
yicFguTHyAQo6F+h3y3H2kHt6SQRFJugPJSP8or4OnDmgSvgi7fxPAkbNhkX4IZAHsCTD4g+C2xShB+w
|
||||||
|
ydlDos9iv5/aENTeFotiE3TyKB8VTieU6qCa+Prsa/7fJOyxCTkjqCsgKXdrEkJoxSZoj7cdz+6j46md
|
||||||
|
rWBL0RTfUrQlp13xNuxr/k8lnkKAoHY4Axc7XAVJnBX6zLrhM6Ct3T467kkbikE8jvu8vPbY1+yeyDL/
|
||||||
|
BD5r4T4h7uvLAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="lbl_Title5.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAADEAAABFCAYAAADjLw7LAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
|
||||||
|
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKNWlDQ1BzUkdCIElFQzYxOTY2LTIuMQAA
|
||||||
|
SMedlndUVNcWh8+9d3qhzTDSGXqTLjCA9C4gHQRRGGYGGMoAwwxNbIioQEQREQFFkKCAAaOhSKyIYiEo
|
||||||
|
qGAPSBBQYjCKqKhkRtZKfHl57+Xl98e939pn73P32XuftS4AJE8fLi8FlgIgmSfgB3o401eFR9Cx/QAG
|
||||||
|
eIABpgAwWempvkHuwUAkLzcXerrICfyL3gwBSPy+ZejpT6eD/0/SrFS+AADIX8TmbE46S8T5Ik7KFKSK
|
||||||
|
7TMipsYkihlGiZkvSlDEcmKOW+Sln30W2VHM7GQeW8TinFPZyWwx94h4e4aQI2LER8QFGVxOpohvi1gz
|
||||||
|
SZjMFfFbcWwyh5kOAIoktgs4rHgRm4iYxA8OdBHxcgBwpLgvOOYLFnCyBOJDuaSkZvO5cfECui5Lj25q
|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67UWslb2eEH/Lz89vg98tfxT/P/PgAT
|
||||||
|
4B9QFfA00DQwN7A3iBIUFdQU9CbYObgk+EGIbogwpDtUMjQytDF0Lsw1rDRsZJXxqvWrrocrhHPDOyOw
|
||||||
|
EaERDRGzq91W7109HmkRWRA5tEZnTdaaq2sV1iatPRMlGcWMOhmNjg6Lbor+wPRj1jFnY7xiqmNmWC6s
|
||||||
|
faznbEd2GXuKY8cp5UzE2sWWxk7G2cXtiZuKd4gvj5/munAruS8TPBNqEuYS/RKPJC4khSW1JuOSo5NP
|
||||||
|
8WR4ibyeFJWUrJSBVIPUgtSRNJu0vWkzfG9+QzqUvia9U0AV/Uz1CXWFW4WjGfYZVRlvM0MzT2ZJZ/Gy
|
||||||
|
+rL1s3dkT+S453y9DrWOta47Vy13c+7oeqf1tRugDTEbujdqbMzfOL7JY9PRzYTNiZt/yDPJK817vSVs
|
||||||
|
S1e+cv6m/LGtHlubCyQK+AXD22y31WxHbedu799hvmP/jk+F7MJrRSZF5UUfilnF174y/ariq4WdsTv7
|
||||||
|
SyxLDu7C7OLtGtrtsPtoqXRpTunYHt897WX0ssKy13uj9l4tX1Zes4+wT7hvpMKnonO/5v5d+z9Uxlfe
|
||||||
|
qXKuaq1Wqt5RPXeAfWDwoOPBlhrlmqKa94e4h+7WetS212nXlR/GHM44/LQ+tL73a8bXjQ0KDUUNH4/w
|
||||||
|
jowcDTza02jV2Nik1FTSDDcLm6eORR67+Y3rN50thi21rbTWouPguPD4s2+jvx064X2i+yTjZMt3Wt9V
|
||||||
|
t1HaCtuh9uz2mY74jpHO8M6BUytOdXfZdrV9b/T9kdNqp6vOyJ4pOUs4m3924VzOudnzqeenL8RdGOuO
|
||||||
|
6n5wcdXF2z0BPf2XvC9duex++WKvU++5K3ZXTl+1uXrqGuNax3XL6+19Fn1tP1j80NZv2d9+w+pG503r
|
||||||
|
m10DywfODjoMXrjleuvyba/b1++svDMwFDJ0dzhyeOQu++7kvaR7L+9n3J9/sOkh+mHhI6lH5Y+VHtf9
|
||||||
|
qPdj64jlyJlR19G+J0FPHoyxxp7/lP7Th/H8p+Sn5ROqE42TZpOnp9ynbj5b/Wz8eerz+emCn6V/rn6h
|
||||||
|
++K7Xxx/6ZtZNTP+kv9y4dfiV/Kvjrxe9rp71n/28ZvkN/NzhW/l3x59x3jX+z7s/cR85gfsh4qPeh+7
|
||||||
|
Pnl/eriQvLDwG/eE8/s6uL5TAAAACXBIWXMAAAsMAAALDAE/QCLIAAARpklEQVRoQ9WaeVwT19rHh50k
|
||||||
|
bAmEBEjC5lp7l89t6y4ighu07rsgLiwuJIQAIYEEENms4tbba93aWtu6L9W64FK1ouLWuoIrgrWiVq2t
|
||||||
|
du/M/T2TRKPX9733837e2+AfXyfJzHme5ztzZs45g4ys8MIrYAwYCAZZwef6gTJz/Rtyc93rjgQ1vI5a
|
||||||
|
3viX+oouDA801cdKDec9SKIPMIJpFuqnys3n0+WmcylBpjOTwUTHcnYSSJGbzqdBaIq1zumQyIZEIiQE
|
||||||
|
TGDRpShZ4UXakSQ314+Vm86MDC44PTSk4ItBIfnH31DkH3vdkYTknxhItQQXnBoCqRE4waMhkygrupgq
|
||||||
|
NV8YGmCsFzDS4ss9ITFdZq4bG1RwZkRwwReDFcZjryuNtQOUxkP9Qg01fUMNB/s4ChVqUBqPDFAYjyaE
|
||||||
|
5J+EzOmh6CWjUXOKtPDSsICCCwImoPhKL3ShabhkI2A8WJF/NF5lQPF5n8eG5u2LCdfv7RWu3xPtGPZG
|
||||||
|
h+n39Q7NOxCLmvoq8mvjcWUG4WQPlxfWT4LE8AATSZRAwlw3lQzpCpBAmP5AbHjunugIfXVUq9zt3R3H
|
||||||
|
ju6ROdVREbm7e4bp9/cONR7sozQehcgXg4LM55MDii4N9zddhMTMht50I2PHQOpCuAJxJBCZs6NH6+yt
|
||||||
|
XdvoNndpo9vU2TFs7tI6e0uXVjnbu5NIaN7+3krj4f4K3KtB5rOJkBjhb74kZPwhga6USjvoHghDF4rI
|
||||||
|
rY7i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CBQcSVvrb5Z9dGwq2lC7yWg/mVUilgIiITzj2SCP8Syf01oDYAOwFaM+HzqZwB11
|
||||||
|
O1P9DL7YIBE34IkGIkAyYkBCAZ6Q8kQwiBByJJN7TmDlgglcEM5ksGASZ08ICgsRTuaAZUvf+d9tx0wk
|
||||||
|
0G4CYiEOHy+Zk1nis4GUj/Ja81Md3qiNTjKdbFfgDOgiMPYSjCesgDNwAx5AgGAi4AN8gRhIgD8IQDJC
|
||||||
|
yicFguTHyAQo6F+h3y3H2kHt6SQRFJugPJSP8or4OnDmgSvgi7fxPAkbNhkX4IZAHsCTD4g+C2xShB+w
|
||||||
|
ydlDos9iv5/aENTeFotiE3TyKB8VTieU6qCa+Prsa/7fJOyxCTkjqCsgKXdrEkJoxSZoj7cdz+6j46md
|
||||||
|
rWBL0RTfUrQlp13xNuxr/k8lnkKAoHY4Axc7XAVJnBX6zLrhM6Ct3T467kkbikE8jvu8vPbY1+yeyDL/
|
||||||
|
BD5r4T4h7uvLAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="lbl_Title6.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAADEAAABFCAYAAADjLw7LAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
|
||||||
|
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKNWlDQ1BzUkdCIElFQzYxOTY2LTIuMQAA
|
||||||
|
SMedlndUVNcWh8+9d3qhzTDSGXqTLjCA9C4gHQRRGGYGGMoAwwxNbIioQEQREQFFkKCAAaOhSKyIYiEo
|
||||||
|
qGAPSBBQYjCKqKhkRtZKfHl57+Xl98e939pn73P32XuftS4AJE8fLi8FlgIgmSfgB3o401eFR9Cx/QAG
|
||||||
|
eIABpgAwWempvkHuwUAkLzcXerrICfyL3gwBSPy+ZejpT6eD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hbea
|
||||||
|
VXllcCqhmlN5qVklviu9prMKHBMsmsLKRGmslNoJJ7FiAeJ4JrM+nojrkcR6IZ+QzzeO83RHfnfUAdyA
|
||||||
|
M9XI10n1DgdjOIZxT2SdgAsKRLGsCPgikARIPZK4QCDzGM/JCc/xXDC2IW7JrMJ9IqvwnMQqBSmsCoQK
|
||||||
|
UtkwYRpIZ8NBBAGxCBQcSVvrb5Z9dGwq2lC7yWg/mVUilgIiITzj2SCP8Syf01oDYAOwFaM+HzqZwB11
|
||||||
|
O1P9DL7YIBE34IkGIkAyYkBCAZ6Q8kQwiBByJJN7TmDlgglcEM5ksGASZ08ICgsRTuaAZUvf+d9tx0wk
|
||||||
|
0G4CYiEOHy+Zk1nis4GUj/Ja81Md3qiNTjKdbFfgDOgiMPYSjCesgDNwAx5AgGAi4AN8gRhIgD8IQDJC
|
||||||
|
yicFguTHyAQo6F+h3y3H2kHt6SQRFJugPJSP8or4OnDmgSvgi7fxPAkbNhkX4IZAHsCTD4g+C2xShB+w
|
||||||
|
ydlDos9iv5/aENTeFotiE3TyKB8VTieU6qCa+Prsa/7fJOyxCTkjqCsgKXdrEkJoxSZoj7cdz+6j46md
|
||||||
|
rWBL0RTfUrQlp13xNuxr/k8lnkKAoHY4Axc7XAVJnBX6zLrhM6Ct3T467kkbikE8jvu8vPbY1+yeyDL/
|
||||||
|
BD5r4T4h7uvLAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
Generated
+263
@@ -0,0 +1,263 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class CPK
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.listView1 = new System.Windows.Forms.ListView();
|
||||||
|
this.项目1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
|
this.数值1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
|
this.项目2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
|
this.数值2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
|
this.项目3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
|
this.数值3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
|
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.lbl_Ca = new System.Windows.Forms.Label();
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.listView2 = new System.Windows.Forms.ListView();
|
||||||
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
|
this.tableLayoutPanel2.SuspendLayout();
|
||||||
|
this.tableLayoutPanel3.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// listView1
|
||||||
|
//
|
||||||
|
this.listView1.Activation = System.Windows.Forms.ItemActivation.OneClick;
|
||||||
|
this.listView1.AutoArrange = false;
|
||||||
|
this.listView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(6)))), ((int)(((byte)(30)))), ((int)(((byte)(78)))));
|
||||||
|
this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||||
|
this.项目1,
|
||||||
|
this.数值1,
|
||||||
|
this.项目2,
|
||||||
|
this.数值2,
|
||||||
|
this.项目3,
|
||||||
|
this.数值3});
|
||||||
|
this.listView1.ForeColor = System.Drawing.Color.White;
|
||||||
|
this.listView1.GridLines = true;
|
||||||
|
this.listView1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
|
||||||
|
this.listView1.HideSelection = false;
|
||||||
|
this.listView1.LabelWrap = false;
|
||||||
|
this.listView1.Location = new System.Drawing.Point(4, 5);
|
||||||
|
this.listView1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.listView1.Name = "listView1";
|
||||||
|
this.listView1.ShowItemToolTips = true;
|
||||||
|
this.listView1.Size = new System.Drawing.Size(518, 99);
|
||||||
|
this.listView1.TabIndex = 3;
|
||||||
|
this.listView1.UseCompatibleStateImageBehavior = false;
|
||||||
|
this.listView1.View = System.Windows.Forms.View.Details;
|
||||||
|
//
|
||||||
|
// 项目1
|
||||||
|
//
|
||||||
|
this.项目1.Text = "项目1";
|
||||||
|
this.项目1.Width = 90;
|
||||||
|
//
|
||||||
|
// 数值1
|
||||||
|
//
|
||||||
|
this.数值1.Text = "数值";
|
||||||
|
this.数值1.Width = 80;
|
||||||
|
//
|
||||||
|
// 项目2
|
||||||
|
//
|
||||||
|
this.项目2.Text = "项目2";
|
||||||
|
this.项目2.Width = 90;
|
||||||
|
//
|
||||||
|
// 数值2
|
||||||
|
//
|
||||||
|
this.数值2.Text = "数值";
|
||||||
|
this.数值2.Width = 75;
|
||||||
|
//
|
||||||
|
// 项目3
|
||||||
|
//
|
||||||
|
this.项目3.Text = "项目3";
|
||||||
|
this.项目3.Width = 100;
|
||||||
|
//
|
||||||
|
// 数值3
|
||||||
|
//
|
||||||
|
this.数值3.Text = "数值3";
|
||||||
|
this.数值3.Width = 80;
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel1.ColumnCount = 1;
|
||||||
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.listView1, 0, 0);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 2);
|
||||||
|
this.tableLayoutPanel1.Controls.Add(this.listView2, 0, 1);
|
||||||
|
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
this.tableLayoutPanel1.RowCount = 3;
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 109F));
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 229F));
|
||||||
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 364F));
|
||||||
|
this.tableLayoutPanel1.Size = new System.Drawing.Size(526, 415);
|
||||||
|
this.tableLayoutPanel1.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// tableLayoutPanel2
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel2.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
|
||||||
|
this.tableLayoutPanel2.ColumnCount = 3;
|
||||||
|
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 53.63881F));
|
||||||
|
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 46.36119F));
|
||||||
|
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 195F));
|
||||||
|
this.tableLayoutPanel2.Controls.Add(this.tableLayoutPanel5, 2, 0);
|
||||||
|
this.tableLayoutPanel2.Controls.Add(this.tableLayoutPanel3, 0, 0);
|
||||||
|
this.tableLayoutPanel2.Controls.Add(this.tableLayoutPanel4, 1, 0);
|
||||||
|
this.tableLayoutPanel2.Location = new System.Drawing.Point(4, 343);
|
||||||
|
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||||
|
this.tableLayoutPanel2.RowCount = 2;
|
||||||
|
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel2.Size = new System.Drawing.Size(518, 67);
|
||||||
|
this.tableLayoutPanel2.TabIndex = 5;
|
||||||
|
//
|
||||||
|
// tableLayoutPanel5
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel5.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
|
||||||
|
this.tableLayoutPanel5.ColumnCount = 2;
|
||||||
|
this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel5.Location = new System.Drawing.Point(325, 6);
|
||||||
|
this.tableLayoutPanel5.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.tableLayoutPanel5.Name = "tableLayoutPanel5";
|
||||||
|
this.tableLayoutPanel5.RowCount = 1;
|
||||||
|
this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel5.Size = new System.Drawing.Size(185, 22);
|
||||||
|
this.tableLayoutPanel5.TabIndex = 2;
|
||||||
|
//
|
||||||
|
// tableLayoutPanel3
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel3.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
|
||||||
|
this.tableLayoutPanel3.ColumnCount = 2;
|
||||||
|
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel3.Controls.Add(this.lbl_Ca, 1, 0);
|
||||||
|
this.tableLayoutPanel3.Controls.Add(this.label2, 0, 0);
|
||||||
|
this.tableLayoutPanel3.Location = new System.Drawing.Point(5, 6);
|
||||||
|
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
|
||||||
|
this.tableLayoutPanel3.RowCount = 1;
|
||||||
|
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel3.Size = new System.Drawing.Size(163, 22);
|
||||||
|
this.tableLayoutPanel3.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// lbl_Ca
|
||||||
|
//
|
||||||
|
this.lbl_Ca.AutoSize = true;
|
||||||
|
this.lbl_Ca.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.lbl_Ca.ForeColor = System.Drawing.Color.White;
|
||||||
|
this.lbl_Ca.Location = new System.Drawing.Point(86, 1);
|
||||||
|
this.lbl_Ca.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
this.lbl_Ca.Name = "lbl_Ca";
|
||||||
|
this.lbl_Ca.Size = new System.Drawing.Size(72, 20);
|
||||||
|
this.lbl_Ca.TabIndex = 0;
|
||||||
|
this.lbl_Ca.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.AutoSize = true;
|
||||||
|
this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.label2.ForeColor = System.Drawing.Color.White;
|
||||||
|
this.label2.Location = new System.Drawing.Point(4, 1);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(74, 20);
|
||||||
|
this.label2.TabIndex = 1;
|
||||||
|
this.label2.Text = "CA";
|
||||||
|
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// tableLayoutPanel4
|
||||||
|
//
|
||||||
|
this.tableLayoutPanel4.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
|
||||||
|
this.tableLayoutPanel4.ColumnCount = 2;
|
||||||
|
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel4.Location = new System.Drawing.Point(177, 6);
|
||||||
|
this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.tableLayoutPanel4.Name = "tableLayoutPanel4";
|
||||||
|
this.tableLayoutPanel4.RowCount = 1;
|
||||||
|
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLayoutPanel4.Size = new System.Drawing.Size(139, 22);
|
||||||
|
this.tableLayoutPanel4.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// listView2
|
||||||
|
//
|
||||||
|
this.listView2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(6)))), ((int)(((byte)(30)))), ((int)(((byte)(78)))));
|
||||||
|
this.listView2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
this.listView2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.listView2.ForeColor = System.Drawing.Color.White;
|
||||||
|
this.listView2.GridLines = true;
|
||||||
|
this.listView2.HideSelection = false;
|
||||||
|
this.listView2.Location = new System.Drawing.Point(3, 112);
|
||||||
|
this.listView2.Name = "listView2";
|
||||||
|
this.listView2.Size = new System.Drawing.Size(520, 223);
|
||||||
|
this.listView2.TabIndex = 6;
|
||||||
|
this.listView2.UseCompatibleStateImageBehavior = false;
|
||||||
|
this.listView2.View = System.Windows.Forms.View.Details;
|
||||||
|
//
|
||||||
|
// trw
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.Controls.Add(this.tableLayoutPanel1);
|
||||||
|
this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.Name = "trw";
|
||||||
|
this.Size = new System.Drawing.Size(526, 415);
|
||||||
|
this.tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.tableLayoutPanel2.ResumeLayout(false);
|
||||||
|
this.tableLayoutPanel3.ResumeLayout(false);
|
||||||
|
this.tableLayoutPanel3.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
private System.Windows.Forms.ListView listView1;
|
||||||
|
private System.Windows.Forms.ColumnHeader 项目1;
|
||||||
|
private System.Windows.Forms.ColumnHeader 数值1;
|
||||||
|
private System.Windows.Forms.ColumnHeader 项目2;
|
||||||
|
private System.Windows.Forms.ColumnHeader 数值2;
|
||||||
|
private System.Windows.Forms.ColumnHeader 项目3;
|
||||||
|
private System.Windows.Forms.ColumnHeader 数值3;
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel5;
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
|
||||||
|
private System.Windows.Forms.Label lbl_Ca;
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
private System.Windows.Forms.ListView listView2;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,285 @@
|
|||||||
|
using JinYuan.ControlLib.Models;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public partial class CPK : UserControl
|
||||||
|
{
|
||||||
|
public CPK()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
IntValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#region 减少闪烁
|
||||||
|
protected override CreateParams CreateParams
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
CreateParams cp = base.CreateParams;
|
||||||
|
cp.ExStyle |= 0x02000000;
|
||||||
|
return cp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
private int subgroupSize = 5;
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取子组大小值")]
|
||||||
|
public int SubgroupSize
|
||||||
|
{
|
||||||
|
get { return subgroupSize; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
subgroupSize = value;
|
||||||
|
listView1.Items[0].SubItems[3].Text = value.ToString();
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private double _uSLs = 0;
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取上规格值")]
|
||||||
|
public double USLs
|
||||||
|
{
|
||||||
|
get { return _uSLs; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_uSLs = value;
|
||||||
|
listView1.Items[2].SubItems[1].Text = value.ToString();
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private double _lSLs = 0;
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取下规格值")]
|
||||||
|
public double LSLs
|
||||||
|
{
|
||||||
|
get { return _lSLs; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_lSLs = value;
|
||||||
|
listView1.Items[2].SubItems[5].Text = value.ToString();
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private double _cpkPpkAcceptanceValue = 0;
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取目标值")]
|
||||||
|
public double CpkPpkAcceptanceValue
|
||||||
|
{
|
||||||
|
get { return _cpkPpkAcceptanceValue; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_cpkPpkAcceptanceValue = value;
|
||||||
|
listView1.Items[2].SubItems[3].Text = value.ToString();
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private CPKModel _cPKData = new CPKModel();
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("获取目标值")]
|
||||||
|
public CPKModel CPKData
|
||||||
|
{
|
||||||
|
get { return _cPKData; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value != null)
|
||||||
|
{
|
||||||
|
_cPKData = value;
|
||||||
|
//总样本数
|
||||||
|
listView1.Items[0].SubItems[1].Text = _cPKData.TotalNumber.ToString();
|
||||||
|
//平均值
|
||||||
|
listView1.Items[1].SubItems[1].Text = _cPKData.MeanVlaue.ToString();
|
||||||
|
//最大值
|
||||||
|
listView1.Items[1].SubItems[3].Text = _cPKData.MaxValue.ToString();
|
||||||
|
//最小值
|
||||||
|
listView1.Items[1].SubItems[5].Text = _cPKData.MinValue.ToString();
|
||||||
|
// 正的3倍标准差线
|
||||||
|
listView1.Items[3].SubItems[1].Text = _cPKData.Pos3Sigma.ToString();
|
||||||
|
// 负的3倍标准差线
|
||||||
|
listView1.Items[3].SubItems[3].Text = _cPKData.Neg3Sigma.ToString();
|
||||||
|
|
||||||
|
// 组内标准差值
|
||||||
|
listView2.Items[0].SubItems[1].Text = _cPKData.GroupSTDEV.ToString();
|
||||||
|
// 整体标准差值
|
||||||
|
listView2.Items[0].SubItems[2].Text = _cPKData.WholeSTDEV.ToString();
|
||||||
|
|
||||||
|
// 组内CPK值
|
||||||
|
listView2.Items[1].SubItems[1].Text = _cPKData.GroupCPK.ToString();
|
||||||
|
// 整体CPK值
|
||||||
|
listView2.Items[1].SubItems[2].Text = _cPKData.WholeCPK.ToString();
|
||||||
|
// 组内CP值
|
||||||
|
listView2.Items[2].SubItems[1].Text = _cPKData.GroupCP.ToString();
|
||||||
|
// 整体CP值
|
||||||
|
listView2.Items[2].SubItems[2].Text = _cPKData.WholeCP.ToString();
|
||||||
|
|
||||||
|
// 组内CPL值
|
||||||
|
listView2.Items[3].SubItems[1].Text = _cPKData.GroupCPL.ToString();
|
||||||
|
// 整体CPL值
|
||||||
|
listView2.Items[3].SubItems[2].Text = _cPKData.WholeCPL.ToString();
|
||||||
|
// 组内CPU值
|
||||||
|
listView2.Items[4].SubItems[1].Text = _cPKData.GroupCPU.ToString();
|
||||||
|
// 整体CPU值
|
||||||
|
listView2.Items[4].SubItems[2].Text = _cPKData.WholeCPU.ToString();
|
||||||
|
|
||||||
|
// 组内PPM<LSL值
|
||||||
|
listView2.Items[5].SubItems[1].Text = _cPKData.GroupPPM_LSL.ToString();
|
||||||
|
// 整体PPM<LSL值
|
||||||
|
listView2.Items[5].SubItems[2].Text = _cPKData.WholePPM_LSL.ToString();
|
||||||
|
|
||||||
|
// 组内PPM>USL值
|
||||||
|
listView2.Items[6].SubItems[1].Text = _cPKData.GroupPPM_USL.ToString();
|
||||||
|
// 整体PPM>USL值
|
||||||
|
listView2.Items[6].SubItems[2].Text = _cPKData.WholePPM_USL.ToString();
|
||||||
|
|
||||||
|
// 组内PPM Total值
|
||||||
|
listView2.Items[7].SubItems[1].Text = _cPKData.GroupPPM_Total.ToString();
|
||||||
|
// 整体PPMN Total值
|
||||||
|
listView2.Items[7].SubItems[2].Text = _cPKData.WholePPM_Total.ToString();
|
||||||
|
|
||||||
|
lbl_Ca.Text = _cPKData.CA.ToString();
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region 初始化
|
||||||
|
private void IntValue()
|
||||||
|
{
|
||||||
|
|
||||||
|
//listView2.OwnerDraw = true;
|
||||||
|
//listView2.DrawColumnHeader += ListView2_DrawColumnHeader;
|
||||||
|
|
||||||
|
listView1.Columns.Clear();
|
||||||
|
listView2.Columns.Clear();
|
||||||
|
|
||||||
|
// 假设ListView控件的名称为listView1
|
||||||
|
// 添加列头
|
||||||
|
listView1.Columns.Add("项目1", 80);
|
||||||
|
listView1.Columns.Add("数值1", 90);
|
||||||
|
listView1.Columns.Add("项目2", 80);
|
||||||
|
listView1.Columns.Add("数值2", 90);
|
||||||
|
listView1.Columns.Add("项目3", 80);
|
||||||
|
listView1.Columns.Add("数值3", 95);
|
||||||
|
|
||||||
|
// 创建一个ListViewItem对象,并将数据添加到指定单元格 0
|
||||||
|
ListViewItem item1_1 = new ListViewItem("总样本数");
|
||||||
|
item1_1.SubItems.Add("0");
|
||||||
|
item1_1.SubItems.Add("子组大小");
|
||||||
|
item1_1.SubItems.Add("0");
|
||||||
|
item1_1.SubItems.Add("图标类型");
|
||||||
|
item1_1.SubItems.Add("XR");
|
||||||
|
listView1.Items.Add(item1_1); // 添加完整的ListViewItem对象到ListView控件中的指定行索引
|
||||||
|
|
||||||
|
|
||||||
|
// 如果需要添加多行数据,可以类似地重复上述步骤
|
||||||
|
ListViewItem item1_2 = new ListViewItem("平均值"); //1
|
||||||
|
item1_2.SubItems.Add("0");
|
||||||
|
item1_2.SubItems.Add("最大值");
|
||||||
|
item1_2.SubItems.Add("0");
|
||||||
|
item1_2.SubItems.Add("最小值");
|
||||||
|
item1_2.SubItems.Add("0");
|
||||||
|
listView1.Items.Add(item1_2);
|
||||||
|
|
||||||
|
ListViewItem item1_3 = new ListViewItem("上规格"); //2
|
||||||
|
item1_3.SubItems.Add("0");
|
||||||
|
item1_3.SubItems.Add("目标值");
|
||||||
|
item1_3.SubItems.Add("0");
|
||||||
|
item1_3.SubItems.Add("下规格");
|
||||||
|
item1_3.SubItems.Add("0");
|
||||||
|
listView1.Items.Add(item1_3);
|
||||||
|
|
||||||
|
ListViewItem item1_4 = new ListViewItem("+3Sigma"); //3
|
||||||
|
item1_4.SubItems.Add("0");
|
||||||
|
item1_4.SubItems.Add("-3Sigma");
|
||||||
|
item1_4.SubItems.Add("0");
|
||||||
|
listView1.Items.Add(item1_4);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 假设ListView控件的名称为listView1
|
||||||
|
// 添加列头
|
||||||
|
listView2.Columns.Add("", 150);
|
||||||
|
listView2.Columns.Add("组内", 120);
|
||||||
|
listView2.Columns.Add("整体", 120);
|
||||||
|
listView2.Columns.Add("实测", 128);
|
||||||
|
|
||||||
|
// 创建一个ListViewItem对象,并将数据添加到指定单元格
|
||||||
|
ListViewItem item2_1 = new ListViewItem("STDEV"); //0
|
||||||
|
item2_1.SubItems.Add("0");
|
||||||
|
item2_1.SubItems.Add("0");
|
||||||
|
item2_1.SubItems.Add("");
|
||||||
|
listView2.Items.Add(item2_1); // 添加完整的ListViewItem对象到ListView控件中的指定行索引
|
||||||
|
|
||||||
|
ListViewItem item2_2 = new ListViewItem("CPK"); //1
|
||||||
|
item2_2.SubItems.Add("0");
|
||||||
|
item2_2.SubItems.Add("0");
|
||||||
|
item2_2.SubItems.Add("");
|
||||||
|
listView2.Items.Add(item2_2);
|
||||||
|
ListViewItem item2_3 = new ListViewItem("CP");//2
|
||||||
|
item2_3.SubItems.Add("0");
|
||||||
|
item2_3.SubItems.Add("0");
|
||||||
|
item2_3.SubItems.Add("");
|
||||||
|
listView2.Items.Add(item2_3);
|
||||||
|
ListViewItem item2_4 = new ListViewItem("CPL");//3
|
||||||
|
item2_4.SubItems.Add("0");
|
||||||
|
item2_4.SubItems.Add("0");
|
||||||
|
item2_4.SubItems.Add("");
|
||||||
|
listView2.Items.Add(item2_4);
|
||||||
|
ListViewItem item2_5 = new ListViewItem("CPU");//4
|
||||||
|
item2_5.SubItems.Add("0");
|
||||||
|
item2_5.SubItems.Add("0");
|
||||||
|
item2_5.SubItems.Add("");
|
||||||
|
listView2.Items.Add(item2_5);
|
||||||
|
ListViewItem item2_6 = new ListViewItem("PPM<LSL");//5
|
||||||
|
item2_6.SubItems.Add("0");
|
||||||
|
item2_6.SubItems.Add("0");
|
||||||
|
item2_6.SubItems.Add("0");
|
||||||
|
listView2.Items.Add(item2_6);
|
||||||
|
ListViewItem item2_7 = new ListViewItem("PPM>USL");//6
|
||||||
|
item2_7.SubItems.Add("0");
|
||||||
|
item2_7.SubItems.Add("0");
|
||||||
|
item2_7.SubItems.Add("0");
|
||||||
|
listView2.Items.Add(item2_7);
|
||||||
|
ListViewItem item2_8 = new ListViewItem("PPM Total");//7
|
||||||
|
item2_8.SubItems.Add("0");
|
||||||
|
item2_8.SubItems.Add("0");
|
||||||
|
item2_8.SubItems.Add("0");
|
||||||
|
listView2.Items.Add(item2_8);
|
||||||
|
|
||||||
|
lbl_Ca.Text = "0";
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public void ListView2_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
|
||||||
|
{
|
||||||
|
e.DrawBackground();
|
||||||
|
|
||||||
|
// 设置自定义的列标题栏背景颜色
|
||||||
|
e.Graphics.FillRectangle(Brushes.AliceBlue, e.Bounds);
|
||||||
|
|
||||||
|
// 绘制列标题栏的文本
|
||||||
|
e.DrawText();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class CheckBoxExt
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public partial class CheckBoxExt : CheckBox
|
||||||
|
{
|
||||||
|
public CheckBoxExt()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
_format.LineAlignment = StringAlignment.Center;
|
||||||
|
_format.Alignment = StringAlignment.Center;
|
||||||
|
|
||||||
|
|
||||||
|
//设置控件样式,去除缓冲
|
||||||
|
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
this.SetStyle(ControlStyles.DoubleBuffer, true);
|
||||||
|
this.SetStyle(ControlStyles.ResizeRedraw, true);
|
||||||
|
this.SetStyle(ControlStyles.Selectable, true);
|
||||||
|
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private StringFormat _format = new StringFormat();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private int defultCheckButtonWidth = 20;
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置或显示标题名称")]
|
||||||
|
public int DefultCheckButtonWidth
|
||||||
|
{
|
||||||
|
get { return defultCheckButtonWidth; }
|
||||||
|
set { defultCheckButtonWidth = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
private Color checkColor = Color.FromArgb(3, 25, 66);
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置或显示选中颜色")]
|
||||||
|
public Color CheckColor
|
||||||
|
{
|
||||||
|
get { return checkColor; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
checkColor = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Color checkBackColor = Color.White;
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置或显示选中框背景颜色")]
|
||||||
|
public Color CheckBackColor
|
||||||
|
{
|
||||||
|
get { return checkBackColor; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
checkBackColor = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnPaint(e);
|
||||||
|
base.OnPaintBackground(e);
|
||||||
|
|
||||||
|
Graphics g = e.Graphics;
|
||||||
|
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
||||||
|
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
|
||||||
|
|
||||||
|
Rectangle checkRec;
|
||||||
|
Rectangle textRec;
|
||||||
|
|
||||||
|
CalculatorRec(out checkRec, out textRec);
|
||||||
|
|
||||||
|
SolidBrush solidBrush = new SolidBrush(CheckBackColor);
|
||||||
|
g.FillRectangle(solidBrush, checkRec);
|
||||||
|
|
||||||
|
Pen pen = new Pen(Color.LightGray);
|
||||||
|
g.DrawRectangle(pen, checkRec);
|
||||||
|
|
||||||
|
if (this.CheckState == CheckState.Checked)
|
||||||
|
{
|
||||||
|
//画勾选
|
||||||
|
DrawCheckFlag(g, checkRec, checkColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
//绘制文本
|
||||||
|
g.DrawString(this.Text, this.Font, new SolidBrush(this.ForeColor), textRec, this._format);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 计算矩形
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="checkRec"></param>
|
||||||
|
/// <param name="textRec"></param>
|
||||||
|
private void CalculatorRec(out Rectangle checkRec, out Rectangle textRec)
|
||||||
|
{
|
||||||
|
checkRec = new Rectangle(3, (this.Height - defultCheckButtonWidth) / 2, defultCheckButtonWidth,
|
||||||
|
defultCheckButtonWidth);
|
||||||
|
|
||||||
|
textRec = new Rectangle(checkRec.Right + 3, 0, Width - checkRec.Right - 6, this.Height);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 画勾选
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="g"></param>
|
||||||
|
/// <param name="rectangle"></param>
|
||||||
|
/// <param name="color"></param>
|
||||||
|
private void DrawCheckFlag(Graphics g, Rectangle rectangle, Color color)
|
||||||
|
{
|
||||||
|
PointF[] pointFs = new PointF[3];
|
||||||
|
|
||||||
|
pointFs[0] = new PointF(rectangle.X + rectangle.Width / 4.5f, rectangle.Y + rectangle.Height / 2.5f);
|
||||||
|
pointFs[1] = new PointF(rectangle.X + rectangle.Width / 2.5F, rectangle.Bottom - rectangle.Height / 3.0f);
|
||||||
|
pointFs[2] = new PointF(rectangle.Right - rectangle.Width / 4.0f, rectangle.Y + rectangle.Height / 4.5f);
|
||||||
|
|
||||||
|
Pen pen = new Pen(color, 2.0f);
|
||||||
|
g.DrawLines(pen, pointFs);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class CircleProgramBar
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,220 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public partial class CircleProgramBar : Control
|
||||||
|
{
|
||||||
|
public CircleProgramBar()
|
||||||
|
{
|
||||||
|
|
||||||
|
//设置控件样式,去除缓冲
|
||||||
|
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
this.SetStyle(ControlStyles.DoubleBuffer, true);
|
||||||
|
this.SetStyle(ControlStyles.ResizeRedraw, true);
|
||||||
|
this.SetStyle(ControlStyles.Selectable, true);
|
||||||
|
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
|
||||||
|
|
||||||
|
InitControl();
|
||||||
|
this.SizeChanged += delegate
|
||||||
|
{
|
||||||
|
this.Invalidate(); //重绘控件
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 减少闪烁
|
||||||
|
protected override CreateParams CreateParams
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
CreateParams cp = base.CreateParams;
|
||||||
|
cp.ExStyle |= 0x02000000;
|
||||||
|
return cp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 初始化控件参数
|
||||||
|
/// </summary>
|
||||||
|
private void InitControl()
|
||||||
|
{
|
||||||
|
this.Width = 200;
|
||||||
|
this.Height = 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Color bgColor = Color.FromArgb(224, 224, 224);
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置或显示背景边框颜色")]
|
||||||
|
public Color BgColor
|
||||||
|
{
|
||||||
|
get { return this.bgColor; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.bgColor = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Color sectorColor = Color.FromArgb(109, 179, 63);
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置或显示扇形颜色")]
|
||||||
|
public Color SectorColor
|
||||||
|
{
|
||||||
|
get { return this.sectorColor; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.sectorColor = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int borderWidth = 5;
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置或显示边框宽度")]
|
||||||
|
public int BorderWidth
|
||||||
|
{
|
||||||
|
get { return this.borderWidth; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.borderWidth = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int maxValue = 100;
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置或显示进度最大值")]
|
||||||
|
public int MaxValue
|
||||||
|
{
|
||||||
|
get { return this.maxValue; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.maxValue = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private bool isShowDataType = false;
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置显示数值是小数还是整数")]
|
||||||
|
public bool IsShowDataType
|
||||||
|
{
|
||||||
|
get { return this.isShowDataType; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.isShowDataType = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private int intValue = 0;
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置或显示整数进度值")]
|
||||||
|
public int IntValue
|
||||||
|
{
|
||||||
|
get { return this.intValue; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value > this.maxValue)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.intValue = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int floatValue = 0;
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置或显示小数进度值")]
|
||||||
|
public int FloatValue
|
||||||
|
{
|
||||||
|
get { return this.floatValue; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value > this.maxValue)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.floatValue = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private bool setShowsign = false;
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置或显示百分号,显示百分号需要设置MaxValue值为100")]
|
||||||
|
public bool SetShowsign
|
||||||
|
{
|
||||||
|
get { return this.setShowsign; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (this.maxValue > 100)
|
||||||
|
{
|
||||||
|
this.maxValue = 100;
|
||||||
|
}
|
||||||
|
this.setShowsign = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//对Control进行绘制
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnPaint(e);
|
||||||
|
|
||||||
|
if (this.Width < borderWidth * 4 || this.Height < borderWidth * 4)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var g = e.Graphics;
|
||||||
|
g.SmoothingMode = SmoothingMode.AntiAlias;//消除锯齿,也就是抗锯齿什么鬼东西
|
||||||
|
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||||
|
g.CompositingQuality = CompositingQuality.HighQuality;
|
||||||
|
|
||||||
|
|
||||||
|
RectangleF bg_rectangle = new RectangleF(0 + borderWidth, 0 + borderWidth, Width - borderWidth * 2, Height - borderWidth * 2); //控件整体坐标
|
||||||
|
|
||||||
|
g.DrawEllipse(new Pen(bgColor, borderWidth), bg_rectangle); //画背景圆
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Rectangle rl = new Rectangle(0 + borderWidth * 2, 0 + borderWidth * 2, this.Width - borderWidth * 4, this.Height - borderWidth * 4);
|
||||||
|
|
||||||
|
decimal topAngle = (isShowDataType ? this.floatValue : this.intValue * 1.0M / this.maxValue) * 360M;//计算进度条划过的度数
|
||||||
|
g.FillPie(new SolidBrush(sectorColor), rl, 0, (float)topAngle); //填充扇形
|
||||||
|
|
||||||
|
if (this.setShowsign)
|
||||||
|
{
|
||||||
|
SizeF proValSize = g.MeasureString(isShowDataType ? this.floatValue.ToString() : this.intValue.ToString() + "%", this.Font);//计算文字的范围
|
||||||
|
|
||||||
|
g.DrawString(isShowDataType ? this.floatValue.ToString() : this.intValue.ToString() + "%", this.Font, new SolidBrush(this.ForeColor),
|
||||||
|
|
||||||
|
bg_rectangle.X + bg_rectangle.Width / 2 - proValSize.Width / 2, bg_rectangle.Y + bg_rectangle.Height / 2 - proValSize.Height / 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SizeF proValSize = g.MeasureString(isShowDataType ? this.floatValue.ToString() : this.intValue.ToString(), this.Font);//计算文字的范围
|
||||||
|
|
||||||
|
g.DrawString(isShowDataType ? this.floatValue.ToString() : this.intValue.ToString(), this.Font, new SolidBrush(this.ForeColor),
|
||||||
|
bg_rectangle.X + bg_rectangle.Width / 2 - proValSize.Width / 2, bg_rectangle.Y + bg_rectangle.Height / 2 - proValSize.Height / 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class ControlBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
//protected override void Dispose(bool disposing)
|
||||||
|
//{
|
||||||
|
// if (disposing && (components != null))
|
||||||
|
// {
|
||||||
|
// components.Dispose();
|
||||||
|
// }
|
||||||
|
// base.Dispose(disposing);
|
||||||
|
//}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,306 @@
|
|||||||
|
using JinYuan.ControlLib.UCHelper;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public partial class ControlBase : UserControl
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The is radius
|
||||||
|
/// </summary>
|
||||||
|
private bool _isRadius = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The corner radius
|
||||||
|
/// </summary>
|
||||||
|
private int _cornerRadius = 24;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The is show rect
|
||||||
|
/// </summary>
|
||||||
|
private bool _isShowRect = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The rect color
|
||||||
|
/// </summary>
|
||||||
|
private Color _rectColor = Color.FromArgb(220, 220, 220);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The rect width
|
||||||
|
/// </summary>
|
||||||
|
private int _rectWidth = 1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The fill color
|
||||||
|
/// </summary>
|
||||||
|
private Color _fillColor = Color.Transparent;
|
||||||
|
|
||||||
|
// 缓存绘图对象,避免重复创建(线程安全:UI线程单例)
|
||||||
|
private SolidBrush _fillBrush;
|
||||||
|
private Pen _rectPen;
|
||||||
|
private bool _isRegionDirty = true; // 标记区域是否需要重新计算
|
||||||
|
|
||||||
|
#region 公共属性(替换Refresh为Invalidate)
|
||||||
|
[Description("是否圆角"), Category("自定义")]
|
||||||
|
public virtual bool IsRadius
|
||||||
|
{
|
||||||
|
get => _isRadius;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (_isRadius == value) return;
|
||||||
|
_isRadius = value;
|
||||||
|
_isRegionDirty = true;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 圆角角度
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The coner radius.</value>
|
||||||
|
[Description("圆角角度"), Category("自定义")]
|
||||||
|
public virtual int ConerRadius
|
||||||
|
{
|
||||||
|
get => _cornerRadius;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
value = Math.Max(value, 1);
|
||||||
|
if (_cornerRadius == value) return;
|
||||||
|
_cornerRadius = value;
|
||||||
|
_isRegionDirty = true;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否显示边框
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if this instance is show rect; otherwise, <c>false</c>.</value>
|
||||||
|
[Description("是否显示边框"), Category("自定义")]
|
||||||
|
public virtual bool IsShowRect
|
||||||
|
{
|
||||||
|
get => _isShowRect;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (_isShowRect == value) return;
|
||||||
|
_isShowRect = value;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 边框颜色
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The color of the rect.</value>
|
||||||
|
[Description("边框颜色"), Category("自定义")]
|
||||||
|
public virtual Color RectColor
|
||||||
|
{
|
||||||
|
get => _rectColor;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (_rectColor == value) return;
|
||||||
|
_rectColor = value;
|
||||||
|
// 重置画笔,下次使用时创建
|
||||||
|
_rectPen?.Dispose();
|
||||||
|
_rectPen = null;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 边框宽度
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The width of the rect.</value>
|
||||||
|
[Description("边框宽度"), Category("自定义")]
|
||||||
|
public virtual int RectWidth
|
||||||
|
{
|
||||||
|
get => _rectWidth;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (_rectWidth == value) return;
|
||||||
|
_rectWidth = value;
|
||||||
|
// 重置画笔,下次使用时创建
|
||||||
|
_rectPen?.Dispose();
|
||||||
|
_rectPen = null;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 当使用边框时填充颜色,当值为背景色或透明色或空值则不填充
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The color of the fill.</value>
|
||||||
|
[Description("当使用边框时填充颜色,当值为背景色或透明色或空值则不填充"), Category("自定义")]
|
||||||
|
public virtual Color FillColor
|
||||||
|
{
|
||||||
|
get => _fillColor;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (_fillColor == value) return;
|
||||||
|
_fillColor = value;
|
||||||
|
// 重置画刷,下次使用时创建
|
||||||
|
_fillBrush?.Dispose();
|
||||||
|
_fillBrush = null;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="UCControlBase" /> class.
|
||||||
|
/// </summary>
|
||||||
|
public ControlBase()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
// 优化双缓冲设置
|
||||||
|
SetStyle(ControlStyles.AllPaintingInWmPaint |
|
||||||
|
ControlStyles.DoubleBuffer |
|
||||||
|
ControlStyles.ResizeRedraw |
|
||||||
|
ControlStyles.Selectable |
|
||||||
|
ControlStyles.SupportsTransparentBackColor |
|
||||||
|
ControlStyles.UserPaint |
|
||||||
|
ControlStyles.OptimizedDoubleBuffer, true);
|
||||||
|
UpdateStyles(); // 应用样式设置
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 核心优化:重写OnPaint
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
if (!Visible) return;
|
||||||
|
|
||||||
|
// 1. 仅在区域脏时更新Region
|
||||||
|
if (_isRegionDirty)
|
||||||
|
{
|
||||||
|
UpdateWindowRegion();
|
||||||
|
_isRegionDirty = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 优化绘图质量
|
||||||
|
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
|
||||||
|
e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||||
|
e.Graphics.CompositingQuality = CompositingQuality.HighQuality;
|
||||||
|
e.Graphics.Clear(BackColor); // 统一背景清除,避免闪烁
|
||||||
|
|
||||||
|
// 3. 绘制逻辑:仅在需要时创建GraphicsPath
|
||||||
|
if (_isShowRect || (_fillColor != Color.Empty && _fillColor != Color.Transparent && _fillColor != BackColor))
|
||||||
|
{
|
||||||
|
using (var graphicsPath = CreateRoundedRectPath(ClientRectangle))
|
||||||
|
{
|
||||||
|
// 绘制填充
|
||||||
|
if (_fillColor != Color.Empty && _fillColor != Color.Transparent && _fillColor != BackColor)
|
||||||
|
{
|
||||||
|
if (_fillBrush == null)
|
||||||
|
{
|
||||||
|
_fillBrush = new SolidBrush(_fillColor);
|
||||||
|
}
|
||||||
|
e.Graphics.FillPath(_fillBrush, graphicsPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绘制边框
|
||||||
|
if (_isShowRect)
|
||||||
|
{
|
||||||
|
if (_rectPen == null)
|
||||||
|
{
|
||||||
|
_rectPen = new Pen(_rectColor, Math.Max(1, _rectWidth)); // 避免宽度为0
|
||||||
|
}
|
||||||
|
e.Graphics.DrawPath(_rectPen, graphicsPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
base.OnPaint(e);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 辅助方法(优化逻辑+释放资源)
|
||||||
|
/// <summary>
|
||||||
|
/// 仅在区域脏时更新WindowRegion
|
||||||
|
/// </summary>
|
||||||
|
private void UpdateWindowRegion()
|
||||||
|
{
|
||||||
|
if (_isRadius)
|
||||||
|
{
|
||||||
|
using (var path = CreateRoundedRectPath(new Rectangle(-1, -1, Width + 1, Height)))
|
||||||
|
{
|
||||||
|
Region = new Region(path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 恢复矩形区域
|
||||||
|
using (var path = new GraphicsPath())
|
||||||
|
{
|
||||||
|
path.AddRectangle(ClientRectangle);
|
||||||
|
Region = new Region(path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建圆角路径
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rect">绘制矩形</param>
|
||||||
|
/// <returns>GraphicsPath</returns>
|
||||||
|
private GraphicsPath CreateRoundedRectPath(Rectangle rect)
|
||||||
|
{
|
||||||
|
var path = new GraphicsPath();
|
||||||
|
if (_isRadius && _cornerRadius > 0)
|
||||||
|
{
|
||||||
|
// 优化圆角计算:避免偏移错误
|
||||||
|
int radius = Math.Min(_cornerRadius, Math.Min(rect.Width, rect.Height) / 2);
|
||||||
|
path.AddArc(rect.X, rect.Y, radius, radius, 180f, 90f);
|
||||||
|
path.AddArc(rect.Right - radius, rect.Y, radius, radius, 270f, 90f);
|
||||||
|
path.AddArc(rect.Right - radius, rect.Bottom - radius, radius, radius, 0f, 90f);
|
||||||
|
path.AddArc(rect.X, rect.Bottom - radius, radius, radius, 90f, 90f);
|
||||||
|
path.CloseFigure();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
path.AddRectangle(rect);
|
||||||
|
}
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 释放非托管资源
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">是否手动释放</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing)
|
||||||
|
{
|
||||||
|
// 释放绘图对象
|
||||||
|
_fillBrush?.Dispose();
|
||||||
|
_rectPen?.Dispose();
|
||||||
|
components?.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 控件大小变化时标记区域脏
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">尺寸参数</param>
|
||||||
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnSizeChanged(e);
|
||||||
|
_isRegionDirty = true;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 屏蔽不必要的消息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="m">Windows消息</param>
|
||||||
|
protected override void WndProc(ref Message m)
|
||||||
|
{
|
||||||
|
if (m.Msg != 20)
|
||||||
|
{
|
||||||
|
base.WndProc(ref m);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class CustomComboBox
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,280 @@
|
|||||||
|
using AntdUI;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public partial class CustomComboBox : ComboBox
|
||||||
|
{
|
||||||
|
private Color darkBackColor = Color.FromArgb(30, 30, 30);
|
||||||
|
private Color lightBackColor = Color.White;
|
||||||
|
private Color darkForeColor = Color.White;
|
||||||
|
private Color lightForeColor = Color.Black;
|
||||||
|
private Color darkBorderColor = Color.FromArgb(64, 64, 64);
|
||||||
|
private Color lightBorderColor = Color.FromArgb(217, 217, 217);
|
||||||
|
private Color darkArrowColor = Color.White;
|
||||||
|
private Color lightArrowColor = Color.Black;
|
||||||
|
private Color darkWatermarkColor = Color.Gray;
|
||||||
|
private Color lightWatermarkColor = Color.LightGray;
|
||||||
|
|
||||||
|
private string watermarkText = string.Empty;
|
||||||
|
[Category("行为")]
|
||||||
|
public string WatermarkText
|
||||||
|
{
|
||||||
|
get { return watermarkText; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
watermarkText = value;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int cornerRadius = 5; // 新增:控制圆角半径的字段
|
||||||
|
|
||||||
|
[Category("外观")]
|
||||||
|
[DefaultValue(5)]
|
||||||
|
public int CornerRadius
|
||||||
|
{
|
||||||
|
get { return cornerRadius; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (cornerRadius != value)
|
||||||
|
{
|
||||||
|
cornerRadius = value;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomComboBox()
|
||||||
|
{
|
||||||
|
SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
|
||||||
|
DrawMode = DrawMode.OwnerDrawFixed;
|
||||||
|
DropDownStyle = ComboBoxStyle.DropDownList;
|
||||||
|
UpdateTheme(Config.IsDark);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void UpdateTheme(bool isDark)
|
||||||
|
{
|
||||||
|
BackColor = isDark ? darkBackColor : lightBackColor;
|
||||||
|
ForeColor = isDark ? darkForeColor : lightForeColor;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
using (var path = CreateRoundedRectangle(new Rectangle(0, 0, Width - 1, Height - 1), cornerRadius))
|
||||||
|
{
|
||||||
|
var g = e.Graphics;
|
||||||
|
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||||
|
|
||||||
|
var rect = new Rectangle(0, 0, Width - 1, Height - 1);
|
||||||
|
var borderColor = Config.IsDark ? darkBorderColor : lightBorderColor;
|
||||||
|
var arrowColor = Config.IsDark ? darkArrowColor : lightArrowColor;
|
||||||
|
|
||||||
|
// Draw background
|
||||||
|
using (var brush = new SolidBrush(BackColor))
|
||||||
|
{
|
||||||
|
g.FillPath(brush, path);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw border
|
||||||
|
using (var pen = new Pen(borderColor))
|
||||||
|
{
|
||||||
|
g.DrawPath(pen, path);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw text or watermark
|
||||||
|
var textRect = new Rectangle(cornerRadius, 2, Width - 20 - cornerRadius, Height - 4);
|
||||||
|
var flags = TextFormatFlags.VerticalCenter | TextFormatFlags.Left;
|
||||||
|
if (SelectedItem != null)
|
||||||
|
{
|
||||||
|
string displayText = GetCustomItemText(SelectedItem);
|
||||||
|
using (var brush = new SolidBrush(ForeColor))
|
||||||
|
{
|
||||||
|
TextRenderer.DrawText(g, displayText, Font, textRect, ForeColor, flags);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!string.IsNullOrEmpty(watermarkText))
|
||||||
|
{
|
||||||
|
var watermarkColor = Config.IsDark ? darkWatermarkColor : lightWatermarkColor;
|
||||||
|
TextRenderer.DrawText(g, watermarkText, Font, textRect, watermarkColor, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw arrow
|
||||||
|
var arrowSize = 8;
|
||||||
|
var arrowRect = new Rectangle(Width - arrowSize - 8 - cornerRadius, (Height - arrowSize) / 2, arrowSize, arrowSize);
|
||||||
|
using (var brush = new SolidBrush(arrowColor))
|
||||||
|
{
|
||||||
|
Point[] arrow = {
|
||||||
|
new Point(arrowRect.Left, arrowRect.Top),
|
||||||
|
new Point(arrowRect.Right, arrowRect.Top),
|
||||||
|
new Point(arrowRect.Left + arrowRect.Width / 2, arrowRect.Bottom)
|
||||||
|
};
|
||||||
|
g.FillPolygon(brush, arrow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnDrawItem(DrawItemEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Index < 0) return;
|
||||||
|
|
||||||
|
// 设置下拉项的背景色
|
||||||
|
Color backColor;
|
||||||
|
Color textColor;
|
||||||
|
|
||||||
|
if ((e.State & DrawItemState.Selected) == DrawItemState.Selected)
|
||||||
|
{
|
||||||
|
// 选中项的颜色
|
||||||
|
backColor = Config.IsDark ? Color.FromArgb(45, 45, 45) : Color.FromArgb(230, 230, 230);
|
||||||
|
textColor = Config.IsDark ? darkForeColor : lightForeColor;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 未选中项的颜色
|
||||||
|
backColor = Config.IsDark ? darkBackColor : lightBackColor;
|
||||||
|
textColor = Config.IsDark ? darkForeColor : lightForeColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 使用新的背景色绘制背景
|
||||||
|
using (var backBrush = new SolidBrush(backColor))
|
||||||
|
{
|
||||||
|
e.Graphics.FillRectangle(backBrush, e.Bounds);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绘制文本
|
||||||
|
if (e.Index >= 0)
|
||||||
|
{
|
||||||
|
string itemText = GetCustomItemText(Items[e.Index]);
|
||||||
|
|
||||||
|
// 设置文本边距
|
||||||
|
Rectangle textBounds = new Rectangle(
|
||||||
|
e.Bounds.X + 5, // 左边距
|
||||||
|
e.Bounds.Y,
|
||||||
|
e.Bounds.Width - 10, // 右边距
|
||||||
|
e.Bounds.Height
|
||||||
|
);
|
||||||
|
|
||||||
|
// 使用TextRenderer绘制文本以获得更好的文本渲染效果
|
||||||
|
TextRenderer.DrawText(
|
||||||
|
e.Graphics,
|
||||||
|
itemText,
|
||||||
|
Font,
|
||||||
|
textBounds,
|
||||||
|
textColor,
|
||||||
|
TextFormatFlags.VerticalCenter | TextFormatFlags.Left
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果有焦点,绘制焦点矩形
|
||||||
|
if ((e.State & DrawItemState.Focus) == DrawItemState.Focus)
|
||||||
|
{
|
||||||
|
using (Pen focusPen = new Pen(Config.IsDark ? Color.FromArgb(70, 70, 70) : Color.FromArgb(180, 180, 180)))
|
||||||
|
{
|
||||||
|
e.Graphics.DrawRectangle(focusPen, new Rectangle(e.Bounds.X, e.Bounds.Y, e.Bounds.Width - 1, e.Bounds.Height - 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加这个方法来处理下拉列表的外观
|
||||||
|
protected override void WndProc(ref System.Windows.Forms.Message m)
|
||||||
|
{
|
||||||
|
if (m.Msg == 0x204E) // WM_CTLCOLORLISTBOX
|
||||||
|
{
|
||||||
|
// 获取下拉列表的句柄
|
||||||
|
var hDC = m.WParam;
|
||||||
|
var hListBox = m.LParam;
|
||||||
|
|
||||||
|
using (Graphics g = Graphics.FromHdc(hDC))
|
||||||
|
{
|
||||||
|
// 设置下拉列表的背景色
|
||||||
|
using (SolidBrush backBrush = new SolidBrush(Config.IsDark ? darkBackColor : lightBackColor))
|
||||||
|
{
|
||||||
|
g.FillRectangle(backBrush, this.DropDownRectangle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
base.WndProc(ref m);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取下拉列表的矩形区域
|
||||||
|
private Rectangle DropDownRectangle
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return new Rectangle(0, 0, DropDownWidth, ItemHeight * Math.Max(Items.Count, 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetCustomItemText(object item)
|
||||||
|
{
|
||||||
|
if (item == null)
|
||||||
|
return string.Empty;
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(DisplayMember))
|
||||||
|
return item.ToString();
|
||||||
|
|
||||||
|
PropertyDescriptor descriptor = TypeDescriptor.GetProperties(item).Find(DisplayMember, true);
|
||||||
|
if (descriptor != null)
|
||||||
|
return descriptor.GetValue(item)?.ToString() ?? string.Empty;
|
||||||
|
|
||||||
|
return item.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public object GetSelectedValue()
|
||||||
|
{
|
||||||
|
if (SelectedItem == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(ValueMember))
|
||||||
|
return SelectedItem;
|
||||||
|
|
||||||
|
PropertyDescriptor descriptor = TypeDescriptor.GetProperties(SelectedItem).Find(ValueMember, true);
|
||||||
|
if (descriptor != null)
|
||||||
|
return descriptor.GetValue(SelectedItem);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private GraphicsPath CreateRoundedRectangle(Rectangle bounds, int radius)
|
||||||
|
{
|
||||||
|
int diameter = radius * 2;
|
||||||
|
Size size = new Size(diameter, diameter);
|
||||||
|
Rectangle arc = new Rectangle(bounds.Location, size);
|
||||||
|
GraphicsPath path = new GraphicsPath();
|
||||||
|
|
||||||
|
if (radius == 0)
|
||||||
|
{
|
||||||
|
path.AddRectangle(bounds);
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 左上角
|
||||||
|
path.AddArc(arc, 180, 90);
|
||||||
|
|
||||||
|
// 右上角
|
||||||
|
arc.X = bounds.Right - diameter;
|
||||||
|
path.AddArc(arc, 270, 90);
|
||||||
|
|
||||||
|
// 右下角
|
||||||
|
arc.Y = bounds.Bottom - diameter;
|
||||||
|
path.AddArc(arc, 0, 90);
|
||||||
|
|
||||||
|
// 左下角
|
||||||
|
arc.X = bounds.Left;
|
||||||
|
path.AddArc(arc, 90, 90);
|
||||||
|
|
||||||
|
path.CloseFigure();
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,233 @@
|
|||||||
|
using AntdUI;
|
||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public class CustomDataGridView : DataGridView
|
||||||
|
{
|
||||||
|
private Color darkBackgroundColor = Color.FromArgb(18, 18, 18);
|
||||||
|
private Color lightBackgroundColor = Color.White;
|
||||||
|
private Color darkForeColor = Color.White;
|
||||||
|
private Color lightForeColor = Color.Black;
|
||||||
|
private Color darkHeaderBackColor = Color.FromArgb(30, 30, 30);
|
||||||
|
private Color lightHeaderBackColor = Color.FromArgb(240, 240, 240);
|
||||||
|
private Color darkSelectedCellColor = Color.FromArgb(64, 64, 64);
|
||||||
|
private Color lightSelectedCellColor = Color.FromArgb(200, 200, 200);
|
||||||
|
private Color darkSelectedColumnColor = Color.FromArgb(45, 45, 45);
|
||||||
|
private Color lightSelectedColumnColor = Color.FromArgb(220, 220, 220);
|
||||||
|
private Color darkButtonColor = Color.FromArgb(64, 64, 64);
|
||||||
|
private Color lightButtonColor = Color.FromArgb(240, 240, 240);
|
||||||
|
private Color darkComboBoxColor = Color.FromArgb(45, 45, 45);
|
||||||
|
private Color lightComboBoxColor = Color.FromArgb(250, 250, 250);
|
||||||
|
|
||||||
|
public CustomDataGridView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
this.SetStyle(ControlStyles.DoubleBuffer, true);
|
||||||
|
this.SetStyle(ControlStyles.ResizeRedraw, true);
|
||||||
|
this.SetStyle(ControlStyles.Selectable, true);
|
||||||
|
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
|
||||||
|
this.SetStyle(ControlStyles.UserPaint, true);
|
||||||
|
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
||||||
|
UpdateTheme(Config.IsDark);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.RowHeadersVisible = true;
|
||||||
|
this.AllowUserToAddRows = false;
|
||||||
|
this.AllowUserToDeleteRows = false;
|
||||||
|
this.AllowUserToResizeRows = false;
|
||||||
|
this.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
this.MultiSelect = false;
|
||||||
|
this.CellBorderStyle = DataGridViewCellBorderStyle.SingleHorizontal;
|
||||||
|
this.BorderStyle = BorderStyle.None;
|
||||||
|
this.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
|
||||||
|
this.EnableHeadersVisualStyles = false;
|
||||||
|
|
||||||
|
this.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||||
|
this.ColumnHeadersDefaultCellStyle.Font = new Font(this.Font.FontFamily, this.Font.Size, FontStyle.Bold);
|
||||||
|
this.ColumnHeadersHeight = 30;
|
||||||
|
|
||||||
|
this.RowHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||||
|
this.RowHeadersWidth = 50;
|
||||||
|
|
||||||
|
// 设置默认的行高
|
||||||
|
this.RowTemplate.Height = 28;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateTheme(bool isDark)
|
||||||
|
{
|
||||||
|
// 基础颜色
|
||||||
|
this.BackgroundColor = isDark ? darkBackgroundColor : lightBackgroundColor;
|
||||||
|
this.ForeColor = isDark ? darkForeColor : lightForeColor;
|
||||||
|
this.GridColor = isDark ? Color.DimGray : Color.LightGray;
|
||||||
|
|
||||||
|
// 列头样式
|
||||||
|
this.ColumnHeadersDefaultCellStyle.BackColor = isDark ? darkHeaderBackColor : lightHeaderBackColor;
|
||||||
|
this.ColumnHeadersDefaultCellStyle.ForeColor = isDark ? darkForeColor : lightForeColor;
|
||||||
|
this.ColumnHeadersDefaultCellStyle.SelectionBackColor = isDark ? darkSelectedColumnColor : lightSelectedColumnColor;
|
||||||
|
this.ColumnHeadersDefaultCellStyle.SelectionForeColor = isDark ? darkForeColor : lightForeColor;
|
||||||
|
|
||||||
|
// 行头样式
|
||||||
|
this.RowHeadersDefaultCellStyle.BackColor = isDark ? darkHeaderBackColor : lightHeaderBackColor;
|
||||||
|
this.RowHeadersDefaultCellStyle.ForeColor = isDark ? darkForeColor : lightForeColor;
|
||||||
|
this.RowHeadersDefaultCellStyle.SelectionBackColor = isDark ? darkSelectedCellColor : lightSelectedCellColor;
|
||||||
|
this.RowHeadersDefaultCellStyle.SelectionForeColor = isDark ? darkForeColor : lightForeColor;
|
||||||
|
|
||||||
|
// 默认单元格样式
|
||||||
|
this.DefaultCellStyle.BackColor = this.BackgroundColor;
|
||||||
|
this.DefaultCellStyle.ForeColor = this.ForeColor;
|
||||||
|
this.DefaultCellStyle.SelectionBackColor = isDark ? darkSelectedCellColor : lightSelectedCellColor;
|
||||||
|
this.DefaultCellStyle.SelectionForeColor = isDark ? darkForeColor : lightForeColor;
|
||||||
|
|
||||||
|
// 更新所有列的样式
|
||||||
|
foreach (DataGridViewColumn column in this.Columns)
|
||||||
|
{
|
||||||
|
if (column is DataGridViewComboBoxColumn comboBoxColumn)
|
||||||
|
{
|
||||||
|
// ComboBox列样式
|
||||||
|
comboBoxColumn.DefaultCellStyle.BackColor = isDark ? darkComboBoxColor : lightComboBoxColor;
|
||||||
|
comboBoxColumn.DefaultCellStyle.ForeColor = isDark ? darkForeColor : lightForeColor;
|
||||||
|
comboBoxColumn.DefaultCellStyle.SelectionBackColor = isDark ? darkSelectedCellColor : lightSelectedCellColor;
|
||||||
|
comboBoxColumn.DefaultCellStyle.SelectionForeColor = isDark ? darkForeColor : lightForeColor;
|
||||||
|
comboBoxColumn.FlatStyle = FlatStyle.Flat;
|
||||||
|
}
|
||||||
|
else if (column is DataGridViewButtonColumn buttonColumn)
|
||||||
|
{
|
||||||
|
// Button列样式
|
||||||
|
DataGridViewCellStyle buttonStyle = new DataGridViewCellStyle();
|
||||||
|
buttonStyle.BackColor = isDark ? darkButtonColor : lightButtonColor;
|
||||||
|
buttonStyle.ForeColor = isDark ? darkForeColor : lightForeColor;
|
||||||
|
buttonStyle.SelectionBackColor = isDark ? darkSelectedCellColor : lightSelectedCellColor;
|
||||||
|
buttonStyle.SelectionForeColor = isDark ? darkForeColor : lightForeColor;
|
||||||
|
buttonStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||||
|
buttonColumn.DefaultCellStyle = buttonStyle;
|
||||||
|
buttonColumn.FlatStyle = FlatStyle.Flat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnCellPainting(DataGridViewCellPaintingEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.RowIndex == -1 && e.ColumnIndex >= 0)
|
||||||
|
{
|
||||||
|
// 绘制列头
|
||||||
|
e.PaintBackground(e.CellBounds, true);
|
||||||
|
Rectangle newRect = new Rectangle(e.CellBounds.X + 2, e.CellBounds.Y + 2,
|
||||||
|
e.CellBounds.Width - 4, e.CellBounds.Height - 4);
|
||||||
|
|
||||||
|
using (var brush = new SolidBrush(e.CellStyle.ForeColor))
|
||||||
|
{
|
||||||
|
e.Graphics.DrawString(e.Value?.ToString(), this.ColumnHeadersDefaultCellStyle.Font,
|
||||||
|
brush, newRect, new StringFormat
|
||||||
|
{
|
||||||
|
Alignment = StringAlignment.Center,
|
||||||
|
LineAlignment = StringAlignment.Center
|
||||||
|
});
|
||||||
|
}
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
else if (e.RowIndex >= 0 && e.ColumnIndex == -1)
|
||||||
|
{
|
||||||
|
// 绘制行头(行号)
|
||||||
|
e.PaintBackground(e.CellBounds, true);
|
||||||
|
Rectangle newRect = new Rectangle(e.CellBounds.X + 2, e.CellBounds.Y + 2,
|
||||||
|
e.CellBounds.Width - 4, e.CellBounds.Height - 4);
|
||||||
|
|
||||||
|
string rowNumber = (e.RowIndex + 1).ToString();
|
||||||
|
|
||||||
|
// 判断当前行是否被选中
|
||||||
|
bool isSelected = this.Rows[e.RowIndex].Selected;
|
||||||
|
Color textColor;
|
||||||
|
|
||||||
|
if (isSelected)
|
||||||
|
{
|
||||||
|
// 如果行被选中,使用选中状态的前景色
|
||||||
|
textColor = this.RowHeadersDefaultCellStyle.SelectionForeColor;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 如果行未被选中,使用普通状态的前景色
|
||||||
|
textColor = Config.IsDark ? darkForeColor : lightForeColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
using (var brush = new SolidBrush(textColor))
|
||||||
|
{
|
||||||
|
e.Graphics.DrawString(rowNumber, this.RowHeadersDefaultCellStyle.Font,
|
||||||
|
brush, newRect, new StringFormat
|
||||||
|
{
|
||||||
|
Alignment = StringAlignment.Center,
|
||||||
|
LineAlignment = StringAlignment.Center
|
||||||
|
});
|
||||||
|
}
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
else if (e.ColumnIndex >= 0 && e.RowIndex >= 0)
|
||||||
|
{
|
||||||
|
// 处理按钮列的绘制
|
||||||
|
if (this.Columns[e.ColumnIndex] is DataGridViewButtonColumn)
|
||||||
|
{
|
||||||
|
e.PaintBackground(e.CellBounds, true);
|
||||||
|
Rectangle buttonBounds = new Rectangle(e.CellBounds.X + 2, e.CellBounds.Y + 2,
|
||||||
|
e.CellBounds.Width - 4, e.CellBounds.Height - 4);
|
||||||
|
|
||||||
|
using (var buttonBrush = new SolidBrush(e.CellStyle.BackColor))
|
||||||
|
using (var textBrush = new SolidBrush(e.CellStyle.ForeColor))
|
||||||
|
{
|
||||||
|
// 绘制按钮背景
|
||||||
|
e.Graphics.FillRectangle(buttonBrush, buttonBounds);
|
||||||
|
|
||||||
|
// 绘制按钮文本
|
||||||
|
string buttonText = e.Value?.ToString() ?? string.Empty;
|
||||||
|
e.Graphics.DrawString(buttonText, this.Font, textBrush,
|
||||||
|
buttonBounds, new StringFormat
|
||||||
|
{
|
||||||
|
Alignment = StringAlignment.Center,
|
||||||
|
LineAlignment = StringAlignment.Center
|
||||||
|
});
|
||||||
|
}
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
base.OnCellPainting(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
base.OnCellPainting(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnPaint(e);
|
||||||
|
|
||||||
|
// 绘制列头底部边框
|
||||||
|
using (var pen = new Pen(Config.IsDark ? Color.DimGray : Color.LightGray))
|
||||||
|
{
|
||||||
|
e.Graphics.DrawLine(pen, 0, this.ColumnHeadersHeight, this.Width, this.ColumnHeadersHeight);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnColumnHeadersHeightChanged(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnColumnHeadersHeightChanged(e);
|
||||||
|
this.ColumnHeadersHeight = 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnDataBindingComplete(DataGridViewBindingCompleteEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnDataBindingComplete(e);
|
||||||
|
|
||||||
|
// 重新应用主题样式
|
||||||
|
UpdateTheme(Config.IsDark);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class CustomGroupBox
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,137 @@
|
|||||||
|
using AntdUI;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public partial class CustomGroupBox : GroupBox
|
||||||
|
{
|
||||||
|
private Color darkBorderColor = Color.FromArgb(64, 64, 64);
|
||||||
|
private Color lightBorderColor = Color.FromArgb(217, 217, 217);
|
||||||
|
private Color darkForeColor = Color.White;
|
||||||
|
private Color lightForeColor = Color.Black;
|
||||||
|
private const int TextPadding = 4;
|
||||||
|
|
||||||
|
public Color BorderColor { get; set; } = Color.Gray;
|
||||||
|
|
||||||
|
|
||||||
|
private float _borderWidth = 1f;
|
||||||
|
private float _cornerRadius = 5f;
|
||||||
|
|
||||||
|
[Category("Appearance")]
|
||||||
|
[DefaultValue(1f)]
|
||||||
|
public float BorderWidth
|
||||||
|
{
|
||||||
|
get => _borderWidth;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_borderWidth = value;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Category("Appearance")]
|
||||||
|
[DefaultValue(5f)]
|
||||||
|
public float CornerRadius
|
||||||
|
{
|
||||||
|
get => _cornerRadius;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_cornerRadius = value;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomGroupBox()
|
||||||
|
{
|
||||||
|
SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
|
||||||
|
UpdateTheme(Config.IsDark);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void UpdateTheme(bool isDark)
|
||||||
|
{
|
||||||
|
ForeColor = isDark ? darkForeColor : lightForeColor;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
var g = e.Graphics;
|
||||||
|
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||||
|
|
||||||
|
var borderColor = Config.IsDark ? darkBorderColor : lightBorderColor;
|
||||||
|
var textSize = g.MeasureString(Text, Font);
|
||||||
|
var textWidth = (int)Math.Ceiling(textSize.Width) + TextPadding * 2;
|
||||||
|
var textHeight = (int)Math.Ceiling(textSize.Height);
|
||||||
|
|
||||||
|
var textRect = new Rectangle(TextPadding, 0, textWidth, textHeight);
|
||||||
|
var borderRect = new Rectangle((int)(_borderWidth / 2), textHeight / 2,
|
||||||
|
Width - 1 - (int)_borderWidth, Height - textHeight / 2 - 1 - (int)_borderWidth);
|
||||||
|
|
||||||
|
//绘制边框颜色
|
||||||
|
using (var pen = new Pen(BorderColor, BorderWidth))
|
||||||
|
{
|
||||||
|
e.Graphics.DrawRectangle(pen, 0, 0, Width - BorderWidth, Height - BorderWidth);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绘制背景
|
||||||
|
using (var brush = new SolidBrush(BackColor))
|
||||||
|
{
|
||||||
|
g.FillRectangle(brush, ClientRectangle);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建圆角矩形路径
|
||||||
|
using (var path = GetRoundedRectanglePath(borderRect, _cornerRadius))
|
||||||
|
{
|
||||||
|
// 绘制边框
|
||||||
|
using (var pen = new Pen(borderColor, _borderWidth))
|
||||||
|
{
|
||||||
|
g.DrawPath(pen, path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绘制标题文本背景
|
||||||
|
using (var brush = new SolidBrush(BackColor))
|
||||||
|
{
|
||||||
|
g.FillRectangle(brush, textRect);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绘制标题文本
|
||||||
|
using (var brush = new SolidBrush(ForeColor))
|
||||||
|
{
|
||||||
|
g.DrawString(Text, Font, brush, textRect, new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private GraphicsPath GetRoundedRectanglePath(Rectangle rect, float radius)
|
||||||
|
{
|
||||||
|
GraphicsPath path = new GraphicsPath();
|
||||||
|
float diameter = radius * 2;
|
||||||
|
RectangleF arcRect = new RectangleF(rect.Location, new SizeF(diameter, diameter));
|
||||||
|
|
||||||
|
// 左上角
|
||||||
|
path.AddArc(arcRect, 180, 90);
|
||||||
|
|
||||||
|
// 顶边
|
||||||
|
arcRect.X = rect.Right - diameter;
|
||||||
|
path.AddArc(arcRect, 270, 90);
|
||||||
|
|
||||||
|
// 右边
|
||||||
|
arcRect.Y = rect.Bottom - diameter;
|
||||||
|
path.AddArc(arcRect, 0, 90);
|
||||||
|
|
||||||
|
// 底边
|
||||||
|
arcRect.X = rect.Left;
|
||||||
|
path.AddArc(arcRect, 90, 90);
|
||||||
|
|
||||||
|
path.CloseFigure();
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class CustomRichTextBox
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
HandleCreated -= CustomRichTextBox_HandleCreated;
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,442 @@
|
|||||||
|
using AntdUI;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
|
||||||
|
public partial class CustomRichTextBox : RichTextBox
|
||||||
|
{
|
||||||
|
private Color darkBackColor = Color.Black;
|
||||||
|
private Color lightBackColor = Color.White;
|
||||||
|
private Color darkForeColor = Color.White;
|
||||||
|
private Color lightForeColor = Color.Black;
|
||||||
|
private Color darkBorderColor = Color.FromArgb(64, 64, 64);
|
||||||
|
private Color lightBorderColor = Color.FromArgb(217, 217, 217);
|
||||||
|
private bool isDarkTheme;
|
||||||
|
private const int BatchSize = 5000;
|
||||||
|
private bool isUpdatingTheme = false;
|
||||||
|
private bool isInitialized = false;
|
||||||
|
|
||||||
|
public CustomRichTextBox()
|
||||||
|
{
|
||||||
|
BorderStyle = BorderStyle.None;
|
||||||
|
SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
|
||||||
|
// 在句柄创建后初始化主题
|
||||||
|
HandleCreated += CustomRichTextBox_HandleCreated;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CustomRichTextBox_HandleCreated(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!isInitialized)
|
||||||
|
{
|
||||||
|
isInitialized = true;
|
||||||
|
InitializeThemeAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void InitializeThemeAsync()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await UpdateThemeAsync(Config.IsDark).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Debug.WriteLine($"Theme initialization failed: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task UpdateThemeAsync(bool isDark)
|
||||||
|
{
|
||||||
|
if (isDarkTheme == isDark || isUpdatingTheme || !IsHandleCreated) return;
|
||||||
|
|
||||||
|
isUpdatingTheme = true;
|
||||||
|
isDarkTheme = isDark;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (InvokeRequired)
|
||||||
|
{
|
||||||
|
await Task.Run(() =>
|
||||||
|
{
|
||||||
|
Invoke((MethodInvoker)(() => UpdateThemeInternal()));
|
||||||
|
}).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UpdateThemeInternal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Debug.WriteLine($"Theme update failed: {ex.Message}");
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
isUpdatingTheme = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateThemeInternal()
|
||||||
|
{
|
||||||
|
if (!IsHandleCreated) return;
|
||||||
|
|
||||||
|
BackColor = isDarkTheme ? darkBackColor : lightBackColor;
|
||||||
|
ForeColor = isDarkTheme ? darkForeColor : lightForeColor;
|
||||||
|
|
||||||
|
SuspendLayout();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
int visibleStart = GetCharIndexFromPosition(new Point(0, 0));
|
||||||
|
int visibleEnd = GetCharIndexFromPosition(new Point(ClientSize.Width, ClientSize.Height));
|
||||||
|
|
||||||
|
// Update visible text first
|
||||||
|
UpdateTextColors(visibleStart, visibleEnd - visibleStart);
|
||||||
|
|
||||||
|
// Then update the rest in batches
|
||||||
|
for (int i = 0; i < TextLength; i += BatchSize)
|
||||||
|
{
|
||||||
|
if (i >= visibleStart && i < visibleEnd) continue;
|
||||||
|
int length = Math.Min(BatchSize, TextLength - i);
|
||||||
|
UpdateTextColors(i, length);
|
||||||
|
if (i % (BatchSize * 10) == 0) Application.DoEvents();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
ResumeLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateTextColors(int start, int length)
|
||||||
|
{
|
||||||
|
if (start < 0 || length <= 0 || start + length > TextLength) return;
|
||||||
|
|
||||||
|
Select(start, length);
|
||||||
|
SelectionColor = ForeColor;
|
||||||
|
SelectionBackColor = BackColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnPaint(e);
|
||||||
|
using (var pen = new Pen(isDarkTheme ? darkBorderColor : lightBorderColor))
|
||||||
|
{
|
||||||
|
e.Graphics.DrawRectangle(pen, 0, 0, Width - 1, Height - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnTextChanged(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnTextChanged(e);
|
||||||
|
|
||||||
|
if (!isUpdatingTheme && TextLength > 0 && IsHandleCreated)
|
||||||
|
{
|
||||||
|
int start = TextLength - 1;
|
||||||
|
int length = 1;
|
||||||
|
if (start < 0) start = 0;
|
||||||
|
if (start + length > TextLength) length = TextLength - start;
|
||||||
|
|
||||||
|
UpdateTextColors(start, length);
|
||||||
|
SelectionLength = 0;
|
||||||
|
SelectionStart = TextLength;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("Appearance")]
|
||||||
|
[DefaultValue(typeof(Color), "30, 30, 30")]
|
||||||
|
public Color DarkBackColor
|
||||||
|
{
|
||||||
|
get => darkBackColor;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (darkBackColor != value)
|
||||||
|
{
|
||||||
|
darkBackColor = value;
|
||||||
|
if (isDarkTheme && IsHandleCreated) SafeRefreshTheme();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("Appearance")]
|
||||||
|
[DefaultValue(typeof(Color), "White")]
|
||||||
|
public Color LightBackColor
|
||||||
|
{
|
||||||
|
get => lightBackColor;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (lightBackColor != value)
|
||||||
|
{
|
||||||
|
lightBackColor = value;
|
||||||
|
if (!isDarkTheme && IsHandleCreated) SafeRefreshTheme();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("Appearance")]
|
||||||
|
[DefaultValue(typeof(Color), "White")]
|
||||||
|
public Color DarkForeColor
|
||||||
|
{
|
||||||
|
get => darkForeColor;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (darkForeColor != value)
|
||||||
|
{
|
||||||
|
darkForeColor = value;
|
||||||
|
if (isDarkTheme && IsHandleCreated) SafeRefreshTheme();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("Appearance")]
|
||||||
|
[DefaultValue(typeof(Color), "Black")]
|
||||||
|
public Color LightForeColor
|
||||||
|
{
|
||||||
|
get => lightForeColor;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (lightForeColor != value)
|
||||||
|
{
|
||||||
|
lightForeColor = value;
|
||||||
|
if (!isDarkTheme && IsHandleCreated) SafeRefreshTheme();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("Appearance")]
|
||||||
|
[DefaultValue(typeof(Color), "64, 64, 64")]
|
||||||
|
public Color DarkBorderColor
|
||||||
|
{
|
||||||
|
get => darkBorderColor;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (darkBorderColor != value)
|
||||||
|
{
|
||||||
|
darkBorderColor = value;
|
||||||
|
if (isDarkTheme && IsHandleCreated) Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("Appearance")]
|
||||||
|
[DefaultValue(typeof(Color), "217, 217, 217")]
|
||||||
|
public Color LightBorderColor
|
||||||
|
{
|
||||||
|
get => lightBorderColor;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (lightBorderColor != value)
|
||||||
|
{
|
||||||
|
lightBorderColor = value;
|
||||||
|
if (!isDarkTheme && IsHandleCreated) Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void SafeRefreshTheme()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await RefreshThemeAsync().ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Debug.WriteLine($"Theme refresh failed: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task RefreshThemeAsync()
|
||||||
|
{
|
||||||
|
if (!IsHandleCreated) return;
|
||||||
|
await UpdateThemeAsync(isDarkTheme).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//public partial class CustomRichTextBox : RichTextBox
|
||||||
|
//{
|
||||||
|
// private Color darkBackColor = Color.Black;
|
||||||
|
// private Color lightBackColor = Color.White;
|
||||||
|
// private Color darkForeColor = Color.White;
|
||||||
|
// private Color lightForeColor = Color.Black;
|
||||||
|
// private Color darkBorderColor = Color.FromArgb(64, 64, 64);
|
||||||
|
// private Color lightBorderColor = Color.FromArgb(217, 217, 217);
|
||||||
|
// private bool isDarkTheme;
|
||||||
|
|
||||||
|
// private const int BatchSize = 5000; // 每批处理的字符数
|
||||||
|
// private bool isUpdatingTheme = false;
|
||||||
|
|
||||||
|
// public CustomRichTextBox()
|
||||||
|
// {
|
||||||
|
// BorderStyle = BorderStyle.None;
|
||||||
|
// SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
|
||||||
|
// InitializeThemeAsync();
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// private async void InitializeThemeAsync()
|
||||||
|
// {
|
||||||
|
// await UpdateThemeAsync(Config.IsDark);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public async Task UpdateThemeAsync(bool isDark)
|
||||||
|
// {
|
||||||
|
// if (isDarkTheme == isDark || isUpdatingTheme) return;
|
||||||
|
|
||||||
|
// isUpdatingTheme = true;
|
||||||
|
// isDarkTheme = isDark;
|
||||||
|
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// await Task.Run(async () =>
|
||||||
|
// {
|
||||||
|
// await InvokeAsync(() =>
|
||||||
|
// {
|
||||||
|
// BackColor = isDark ? darkBackColor : lightBackColor;
|
||||||
|
// ForeColor = isDark ? darkForeColor : lightForeColor;
|
||||||
|
|
||||||
|
// SuspendLayout();
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// int visibleStart = GetCharIndexFromPosition(new Point(0, 0));
|
||||||
|
// int visibleEnd = GetCharIndexFromPosition(new Point(ClientSize.Width, ClientSize.Height));
|
||||||
|
|
||||||
|
// // Update visible text first
|
||||||
|
// UpdateTextColors(visibleStart, visibleEnd - visibleStart);
|
||||||
|
|
||||||
|
// // Then update the rest in batches
|
||||||
|
// for (int i = 0; i < TextLength; i += BatchSize)
|
||||||
|
// {
|
||||||
|
// if (i >= visibleStart && i < visibleEnd) continue; // Skip already updated visible part
|
||||||
|
// int length = Math.Min(BatchSize, TextLength - i);
|
||||||
|
// UpdateTextColors(i, length);
|
||||||
|
// if (i % (BatchSize * 10) == 0) Application.DoEvents();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// finally
|
||||||
|
// {
|
||||||
|
// ResumeLayout();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Invalidate();
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// finally
|
||||||
|
// {
|
||||||
|
// isUpdatingTheme = false;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// private void UpdateTextColors(int start, int length)
|
||||||
|
// {
|
||||||
|
// Select(start, length);
|
||||||
|
// SelectionColor = ForeColor;
|
||||||
|
// SelectionBackColor = BackColor;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// protected override void OnPaint(PaintEventArgs e)
|
||||||
|
// {
|
||||||
|
// base.OnPaint(e);
|
||||||
|
// using (var pen = new Pen(isDarkTheme ? darkBorderColor : lightBorderColor))
|
||||||
|
// {
|
||||||
|
// e.Graphics.DrawRectangle(pen, 0, 0, Width - 1, Height - 1);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// protected override void OnTextChanged(EventArgs e)
|
||||||
|
// {
|
||||||
|
// base.OnTextChanged(e);
|
||||||
|
|
||||||
|
// if (!isUpdatingTheme && TextLength > 0)
|
||||||
|
// {
|
||||||
|
// int start = TextLength - 1;
|
||||||
|
// int length = 1;
|
||||||
|
// if (start < 0) start = 0;
|
||||||
|
// if (start + length > TextLength) length = TextLength - start;
|
||||||
|
|
||||||
|
// UpdateTextColors(start, length);
|
||||||
|
// SelectionLength = 0;
|
||||||
|
// SelectionStart = TextLength;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// [Browsable(true)]
|
||||||
|
// [Category("Appearance")]
|
||||||
|
// [DefaultValue(typeof(Color), "30, 30, 30")]
|
||||||
|
// public Color DarkBackColor
|
||||||
|
// {
|
||||||
|
// get => darkBackColor;
|
||||||
|
// set { darkBackColor = value; if (isDarkTheme) RefreshThemeAsync(); }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// [Browsable(true)]
|
||||||
|
// [Category("Appearance")]
|
||||||
|
// [DefaultValue(typeof(Color), "White")]
|
||||||
|
// public Color LightBackColor
|
||||||
|
// {
|
||||||
|
// get => lightBackColor;
|
||||||
|
// set { lightBackColor = value; if (!isDarkTheme) RefreshThemeAsync(); }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// [Browsable(true)]
|
||||||
|
// [Category("Appearance")]
|
||||||
|
// [DefaultValue(typeof(Color), "White")]
|
||||||
|
// public Color DarkForeColor
|
||||||
|
// {
|
||||||
|
// get => darkForeColor;
|
||||||
|
// set { darkForeColor = value; if (isDarkTheme) RefreshThemeAsync(); }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// [Browsable(true)]
|
||||||
|
// [Category("Appearance")]
|
||||||
|
// [DefaultValue(typeof(Color), "Black")]
|
||||||
|
// public Color LightForeColor
|
||||||
|
// {
|
||||||
|
// get => lightForeColor;
|
||||||
|
// set { lightForeColor = value; if (!isDarkTheme) RefreshThemeAsync(); }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// [Browsable(true)]
|
||||||
|
// [Category("Appearance")]
|
||||||
|
// [DefaultValue(typeof(Color), "64, 64, 64")]
|
||||||
|
// public Color DarkBorderColor
|
||||||
|
// {
|
||||||
|
// get => darkBorderColor;
|
||||||
|
// set { darkBorderColor = value; if (isDarkTheme) Invalidate(); }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// [Browsable(true)]
|
||||||
|
// [Category("Appearance")]
|
||||||
|
// [DefaultValue(typeof(Color), "217, 217, 217")]
|
||||||
|
// public Color LightBorderColor
|
||||||
|
// {
|
||||||
|
// get => lightBorderColor;
|
||||||
|
// set { lightBorderColor = value; if (!isDarkTheme) Invalidate(); }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// public async Task RefreshThemeAsync()
|
||||||
|
// {
|
||||||
|
// await UpdateThemeAsync(isDarkTheme);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// private Task InvokeAsync(Action action)
|
||||||
|
// {
|
||||||
|
// return Task.Factory.FromAsync(BeginInvoke(action), EndInvoke);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-09-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="DataGridViewCellEntity.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class DataGridViewCellEntity.
|
||||||
|
/// </summary>
|
||||||
|
public class DataGridViewCellEntity
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the title.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The title.</value>
|
||||||
|
public string Title { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the width.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The width.</value>
|
||||||
|
public int Width { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the type of the width.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The type of the width.</value>
|
||||||
|
public System.Windows.Forms.SizeType WidthType { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-09-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="DataGridViewCellEventArgs.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class DataGridViewEventArgs.
|
||||||
|
/// Implements the <see cref="System.EventArgs" />
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="System.EventArgs" />
|
||||||
|
public class DataGridViewEventArgs : EventArgs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the cell control.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The cell control.</value>
|
||||||
|
public Control CellControl { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the index of the cell.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The index of the cell.</value>
|
||||||
|
public int CellIndex { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the index of the row.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The index of the row.</value>
|
||||||
|
public int RowIndex { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-09-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="DataGridViewCellEventHandler.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Delegate DataGridViewEventHandler
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">The sender.</param>
|
||||||
|
/// <param name="e">The <see cref="DataGridViewEventArgs" /> instance containing the event data.</param>
|
||||||
|
[Serializable]
|
||||||
|
[ComVisible(true)]
|
||||||
|
public delegate void DataGridViewEventHandler(object sender, DataGridViewEventArgs e);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Delegate DataGridViewRowCustomEventHandler
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">The sender.</param>
|
||||||
|
/// <param name="e">The <see cref="DataGridViewRowCustomEventArgs" /> instance containing the event data.</param>
|
||||||
|
[Serializable]
|
||||||
|
[ComVisible(true)]
|
||||||
|
public delegate void DataGridViewRowCustomEventHandler(object sender, DataGridViewRowCustomEventArgs e);
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-09-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="DataGridViewColumnEntity.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class DataGridViewColumnEntity.
|
||||||
|
/// </summary>
|
||||||
|
public class DataGridViewColumnEntity
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the head text.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The head text.</value>
|
||||||
|
public string HeadText { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the width.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The width.</value>
|
||||||
|
public int Width { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the type of the width.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The type of the width.</value>
|
||||||
|
public System.Windows.Forms.SizeType WidthType { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the data field.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The data field.</value>
|
||||||
|
public string DataField { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the format.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The format.</value>
|
||||||
|
public Func<object, string> Format { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// The text align
|
||||||
|
/// </summary>
|
||||||
|
private ContentAlignment _TextAlign = ContentAlignment.MiddleCenter;
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the text align.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The text align.</value>
|
||||||
|
public ContentAlignment TextAlign { get { return _TextAlign; } set { _TextAlign = value; } }
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义的单元格控件,一个实现IDataGridViewCustomCell的Control
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The custom cell.</value>
|
||||||
|
private Type customCellType = null;
|
||||||
|
public Type CustomCellType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return customCellType;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (!typeof(IDataGridViewCustomCell).IsAssignableFrom(value) || !value.IsSubclassOf(typeof(System.Windows.Forms.Control)))
|
||||||
|
throw new Exception("行控件没有实现IDataGridViewCustomCell接口");
|
||||||
|
customCellType = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-27-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="DataGridViewRowCustomEventArgs.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class DataGridViewRowCustomEventArgs.
|
||||||
|
/// Implements the <see cref="System.EventArgs" />
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="System.EventArgs" />
|
||||||
|
public class DataGridViewRowCustomEventArgs : EventArgs
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the name of the event.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name of the event.</value>
|
||||||
|
public string EventName { get; set; }
|
||||||
|
|
||||||
|
public object Data { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public interface IDataGridViewCustomCell
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定行关联的数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj">The object.</param>
|
||||||
|
void SetBindSource(object obj);
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义事件传递,用于单元格向行中传递此事件
|
||||||
|
/// </summary>
|
||||||
|
event DataGridViewRowCustomEventHandler RowCustomEvent;
|
||||||
|
/// <summary>
|
||||||
|
/// 关联数据源
|
||||||
|
/// </summary>
|
||||||
|
object DataSource { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-09-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="IDataGridViewRow.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interface IDataGridViewRow
|
||||||
|
/// </summary>
|
||||||
|
public interface IDataGridViewRow
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Occurs when [row custom event].
|
||||||
|
/// </summary>
|
||||||
|
event DataGridViewRowCustomEventHandler RowCustomEvent;
|
||||||
|
/// <summary>
|
||||||
|
/// CheckBox选中事件
|
||||||
|
/// </summary>
|
||||||
|
event DataGridViewEventHandler CheckBoxChangeEvent;
|
||||||
|
/// <summary>
|
||||||
|
/// 点击单元格事件
|
||||||
|
/// </summary>
|
||||||
|
event DataGridViewEventHandler CellClick;
|
||||||
|
/// <summary>
|
||||||
|
/// 数据源改变事件
|
||||||
|
/// </summary>
|
||||||
|
event DataGridViewEventHandler SourceChanged;
|
||||||
|
/// <summary>
|
||||||
|
/// 列参数,用于创建列数和宽度
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The columns.</value>
|
||||||
|
List<DataGridViewColumnEntity> Columns { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value indicating whether this instance is show CheckBox.
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if this instance is show CheckBox; otherwise, <c>false</c>.</value>
|
||||||
|
bool IsShowCheckBox { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 是否选中
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if this instance is checked; otherwise, <c>false</c>.</value>
|
||||||
|
bool IsChecked { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据源
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The data source.</value>
|
||||||
|
object DataSource { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 添加单元格元素,仅做添加控件操作,不做数据绑定,数据绑定使用BindingCells
|
||||||
|
/// </summary>
|
||||||
|
void ReloadCells();
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定数据到Cell
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>返回true则表示已处理过,否则将进行默认绑定(通常只针对有Text值的控件)</returns>
|
||||||
|
void BindingCellData();
|
||||||
|
/// <summary>
|
||||||
|
/// 设置选中状态,通常为设置颜色即可
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="blnSelected">是否选中</param>
|
||||||
|
void SetSelect(bool blnSelected);
|
||||||
|
/// <summary>
|
||||||
|
/// 行高
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The height of the row.</value>
|
||||||
|
int RowHeight { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 行号
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The Index of the row.</value>
|
||||||
|
int RowIndex { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-09-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="UCDataGridView.Designer.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class UCDataGridView.
|
||||||
|
/// Implements the <see cref="System.Windows.Forms.UserControl" />
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="System.Windows.Forms.UserControl" />
|
||||||
|
partial class UCDataGridView
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.panHead = new System.Windows.Forms.Panel();
|
||||||
|
this.panColumns = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.panHeadLeft = new System.Windows.Forms.Panel();
|
||||||
|
this.panRow = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
|
this.ucSplitLine_H1 = new JinYuan.ControlLib.UCSplitLine_H();
|
||||||
|
this.panHead.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// panHead
|
||||||
|
//
|
||||||
|
this.panHead.Controls.Add(this.panColumns);
|
||||||
|
this.panHead.Controls.Add(this.panHeadLeft);
|
||||||
|
this.panHead.Controls.Add(this.ucSplitLine_H1);
|
||||||
|
this.panHead.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.panHead.Name = "panHead";
|
||||||
|
this.panHead.Size = new System.Drawing.Size(1061, 40);
|
||||||
|
this.panHead.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// panColumns
|
||||||
|
//
|
||||||
|
this.panColumns.ColumnCount = 1;
|
||||||
|
this.panColumns.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.panColumns.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panColumns.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.panColumns.Name = "panColumns";
|
||||||
|
this.panColumns.RowCount = 1;
|
||||||
|
this.panColumns.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.panColumns.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||||
|
this.panColumns.Size = new System.Drawing.Size(1061, 39);
|
||||||
|
this.panColumns.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// panHeadLeft
|
||||||
|
//
|
||||||
|
this.panHeadLeft.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
|
this.panHeadLeft.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.panHeadLeft.Name = "panHeadLeft";
|
||||||
|
this.panHeadLeft.Size = new System.Drawing.Size(0, 39);
|
||||||
|
this.panHeadLeft.TabIndex = 2;
|
||||||
|
//
|
||||||
|
// panRow
|
||||||
|
//
|
||||||
|
this.panRow.AutoScroll = true;
|
||||||
|
this.panRow.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panRow.Location = new System.Drawing.Point(0, 40);
|
||||||
|
this.panRow.Name = "panRow";
|
||||||
|
this.panRow.Size = new System.Drawing.Size(317, 225);
|
||||||
|
this.panRow.TabIndex = 1;
|
||||||
|
this.panRow.Scroll += new System.Windows.Forms.ScrollEventHandler(this.panRow_Scroll);
|
||||||
|
//
|
||||||
|
// ucSplitLine_H1
|
||||||
|
//
|
||||||
|
this.ucSplitLine_H1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(232)))), ((int)(((byte)(232)))));
|
||||||
|
this.ucSplitLine_H1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||||
|
this.ucSplitLine_H1.Location = new System.Drawing.Point(0, 39);
|
||||||
|
this.ucSplitLine_H1.Name = "ucSplitLine_H1";
|
||||||
|
this.ucSplitLine_H1.Size = new System.Drawing.Size(1061, 1);
|
||||||
|
this.ucSplitLine_H1.TabIndex = 0;
|
||||||
|
this.ucSplitLine_H1.TabStop = false;
|
||||||
|
//
|
||||||
|
// UCDataGridView
|
||||||
|
//
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
|
this.BackColor = System.Drawing.Color.White;
|
||||||
|
this.Controls.Add(this.panRow);
|
||||||
|
this.Controls.Add(this.panHead);
|
||||||
|
this.Name = "UCDataGridView";
|
||||||
|
this.Padding = new System.Windows.Forms.Padding(0, 40, 0, 0);
|
||||||
|
this.Size = new System.Drawing.Size(317, 265);
|
||||||
|
this.Scroll += new System.Windows.Forms.ScrollEventHandler(this.UCDataGridView_Scroll);
|
||||||
|
this.SizeChanged += new System.EventHandler(this.UCDataGridView_SizeChanged);
|
||||||
|
this.panHead.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The pan head
|
||||||
|
/// </summary>
|
||||||
|
private System.Windows.Forms.Panel panHead;
|
||||||
|
/// <summary>
|
||||||
|
/// The pan columns
|
||||||
|
/// </summary>
|
||||||
|
private System.Windows.Forms.TableLayoutPanel panColumns;
|
||||||
|
/// <summary>
|
||||||
|
/// The uc split line h1
|
||||||
|
/// </summary>
|
||||||
|
private UCSplitLine_H ucSplitLine_H1;
|
||||||
|
/// <summary>
|
||||||
|
/// The pan head left
|
||||||
|
/// </summary>
|
||||||
|
private System.Windows.Forms.Panel panHeadLeft;
|
||||||
|
private System.Windows.Forms.FlowLayoutPanel panRow;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,815 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-09-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="UCDataGridView.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
using JinYuan.ControlLib.UCHelper;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class UCDataGridView.
|
||||||
|
/// Implements the <see cref="System.Windows.Forms.UserControl" />
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="System.Windows.Forms.UserControl" />
|
||||||
|
public partial class UCDataGridView : UserControl
|
||||||
|
{
|
||||||
|
#region 属性
|
||||||
|
/// <summary>
|
||||||
|
/// The m head pading left
|
||||||
|
/// </summary>
|
||||||
|
private int m_headPadingLeft = 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the head pading left.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The head pading left.</value>
|
||||||
|
[Description("标题左侧间距"), Category("自定义")]
|
||||||
|
public int HeadPadingLeft
|
||||||
|
{
|
||||||
|
get { return m_headPadingLeft; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
m_headPadingLeft = value;
|
||||||
|
this.panHeadLeft.Width = m_headPadingLeft;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The m head font
|
||||||
|
/// </summary>
|
||||||
|
private Font m_headFont = new Font("微软雅黑", 12F);
|
||||||
|
/// <summary>
|
||||||
|
/// 标题字体
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The head font.</value>
|
||||||
|
[Description("标题字体"), Category("自定义")]
|
||||||
|
public Font HeadFont
|
||||||
|
{
|
||||||
|
get { return m_headFont; }
|
||||||
|
set { m_headFont = value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// The m head text color
|
||||||
|
/// </summary>
|
||||||
|
private Color m_headTextColor = Color.Black;
|
||||||
|
/// <summary>
|
||||||
|
/// 标题字体颜色
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The color of the head text.</value>
|
||||||
|
[Description("标题文字颜色"), Category("自定义")]
|
||||||
|
public Color HeadTextColor
|
||||||
|
{
|
||||||
|
get { return m_headTextColor; }
|
||||||
|
set { m_headTextColor = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The m is show head
|
||||||
|
/// </summary>
|
||||||
|
private bool m_isShowHead = true;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否显示标题
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if this instance is show head; otherwise, <c>false</c>.</value>
|
||||||
|
[Description("是否显示标题"), Category("自定义")]
|
||||||
|
public bool IsShowHead
|
||||||
|
{
|
||||||
|
get { return m_isShowHead; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (m_isShowHead != value)
|
||||||
|
{
|
||||||
|
m_isShowHead = value;
|
||||||
|
panHead.Visible = value;
|
||||||
|
if (value)
|
||||||
|
{
|
||||||
|
this.panRow.Location = new Point(0, panHead.Height);
|
||||||
|
this.panRow.Height = this.panRow.Height - panHead.Height;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.panRow.Location = new Point(0, 0);
|
||||||
|
this.panRow.Height = this.panRow.Height + panHead.Height;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// The m head height
|
||||||
|
/// </summary>
|
||||||
|
private int m_headHeight = 40;
|
||||||
|
/// <summary>
|
||||||
|
/// 标题高度
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The height of the head.</value>
|
||||||
|
[Description("标题高度"), Category("自定义")]
|
||||||
|
public int HeadHeight
|
||||||
|
{
|
||||||
|
get { return m_headHeight; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
m_headHeight = value;
|
||||||
|
panHead.Height = value;
|
||||||
|
this.Padding = new Padding(0, value, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The m is show CheckBox
|
||||||
|
/// </summary>
|
||||||
|
private bool m_isShowCheckBox = false;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否显示复选框
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if this instance is show CheckBox; otherwise, <c>false</c>.</value>
|
||||||
|
[Description("是否显示选择框"), Category("自定义")]
|
||||||
|
public bool IsShowCheckBox
|
||||||
|
{
|
||||||
|
get { return m_isShowCheckBox; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value != m_isShowCheckBox)
|
||||||
|
{
|
||||||
|
m_isShowCheckBox = value;
|
||||||
|
LoadColumns();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The m row height
|
||||||
|
/// </summary>
|
||||||
|
private int m_rowHeight = 40;
|
||||||
|
/// <summary>
|
||||||
|
/// 行高
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The height of the row.</value>
|
||||||
|
[Description("数据行高"), Category("自定义")]
|
||||||
|
public int RowHeight
|
||||||
|
{
|
||||||
|
get { return m_rowHeight; }
|
||||||
|
set { m_rowHeight = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the show count.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The show count.</value>
|
||||||
|
[Description("当前高度可显示行个数"), Category("自定义")]
|
||||||
|
public int ShowCount
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.panRow.Height / (m_rowHeight);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The m columns
|
||||||
|
/// </summary>
|
||||||
|
private List<DataGridViewColumnEntity> m_columns = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 列
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The columns.</value>
|
||||||
|
[Description("列"), Category("自定义")]
|
||||||
|
public List<DataGridViewColumnEntity> Columns
|
||||||
|
{
|
||||||
|
get { return m_columns; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
m_columns = value;
|
||||||
|
LoadColumns();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The m data source
|
||||||
|
/// </summary>
|
||||||
|
private object m_dataSource = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 数据源,支持列表或table,如果使用翻页控件,请使用翻页控件的DataSource
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The data source.</value>
|
||||||
|
/// <exception cref="Exception">数据源不是有效的数据类型,请使用Datatable或列表</exception>
|
||||||
|
/// <exception cref="System.Exception">数据源不是有效的数据类型,请使用Datatable或列表</exception>
|
||||||
|
[Description("数据源,支持列表或table,如果使用翻页控件,请使用翻页控件的DataSource"), Category("自定义")]
|
||||||
|
public object DataSource
|
||||||
|
{
|
||||||
|
get { return m_dataSource; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value != null)
|
||||||
|
{
|
||||||
|
if (!(value is DataTable) && (!typeof(IList).IsAssignableFrom(value.GetType())))
|
||||||
|
{
|
||||||
|
throw new Exception("数据源不是有效的数据类型,请使用Datatable或列表");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m_dataSource = value;
|
||||||
|
if (m_columns != null && m_columns.Count > 0)
|
||||||
|
{
|
||||||
|
ReloadSource();
|
||||||
|
}
|
||||||
|
if (BindingSourceEvent != null)
|
||||||
|
{
|
||||||
|
BindingSourceEvent(this, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the rows.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The rows.</value>
|
||||||
|
public List<IDataGridViewRow> Rows { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The m row type
|
||||||
|
/// </summary>
|
||||||
|
private Type m_rowType = typeof(UCDataGridViewRow);
|
||||||
|
/// <summary>
|
||||||
|
/// 行元素类型,默认UCDataGridViewItem
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The type of the row.</value>
|
||||||
|
/// <exception cref="Exception">行控件没有实现IDataGridViewRow接口</exception>
|
||||||
|
/// <exception cref="System.Exception">行控件没有实现IDataGridViewRow接口</exception>
|
||||||
|
[Description("行控件类型,默认UCDataGridViewRow,如果不满足请自定义行控件实现接口IDataGridViewRow"), Category("自定义")]
|
||||||
|
public Type RowType
|
||||||
|
{
|
||||||
|
get { return m_rowType; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value == null)
|
||||||
|
return;
|
||||||
|
if (!typeof(IDataGridViewRow).IsAssignableFrom(value) || !value.IsSubclassOf(typeof(Control)))
|
||||||
|
throw new Exception("行控件没有实现IDataGridViewRow接口");
|
||||||
|
m_rowType = value;
|
||||||
|
if (m_columns != null && m_columns.Count > 0)
|
||||||
|
ReloadSource();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The m select row
|
||||||
|
/// </summary>
|
||||||
|
IDataGridViewRow m_selectRow = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 选中的节点
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The select row.</value>
|
||||||
|
[Description("选中行"), Category("自定义")]
|
||||||
|
public IDataGridViewRow SelectRow
|
||||||
|
{
|
||||||
|
get { return m_selectRow; }
|
||||||
|
private set { m_selectRow = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 选中的行,如果显示CheckBox,则以CheckBox选中为准
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The select rows.</value>
|
||||||
|
[Description("选中的行,如果显示CheckBox,则以CheckBox选中为准"), Category("自定义")]
|
||||||
|
public List<IDataGridViewRow> SelectRows
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return GetSelectRows();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the select rows.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>List<IDataGridViewRow>.</returns>
|
||||||
|
private List<IDataGridViewRow> GetSelectRows()
|
||||||
|
{
|
||||||
|
List<IDataGridViewRow> lst = new List<IDataGridViewRow>();
|
||||||
|
if (m_isShowCheckBox)
|
||||||
|
{
|
||||||
|
if (Rows != null && Rows.Count > 0)
|
||||||
|
lst.AddRange(Rows.FindAll(p => p.IsChecked));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (m_selectRow != null)
|
||||||
|
lst.AddRange(new List<IDataGridViewRow>() { m_selectRow });
|
||||||
|
}
|
||||||
|
if (Rows != null && Rows.Count > 0 && m_rowType == typeof(UCDataGridViewTreeRow))
|
||||||
|
{
|
||||||
|
foreach (UCDataGridViewTreeRow row in Rows)
|
||||||
|
{
|
||||||
|
lst.AddRange(FindTreeRowSelected(row));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return lst;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<IDataGridViewRow> FindTreeRowSelected(UCDataGridViewTreeRow row)
|
||||||
|
{
|
||||||
|
List<IDataGridViewRow> lst = new List<IDataGridViewRow>();
|
||||||
|
var _lst = row.ChildrenRows.FindAll(p => p.IsChecked);
|
||||||
|
lst.AddRange(_lst);
|
||||||
|
foreach (UCDataGridViewTreeRow _row in row.ChildrenRows)
|
||||||
|
{
|
||||||
|
lst.AddRange(FindTreeRowSelected(_row));
|
||||||
|
}
|
||||||
|
return lst;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Finds the child grid.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="c">The c.</param>
|
||||||
|
/// <returns>UCDataGridView.</returns>
|
||||||
|
private UCDataGridView FindChildGrid(Control c)
|
||||||
|
{
|
||||||
|
foreach (Control item in c.Controls)
|
||||||
|
{
|
||||||
|
if (item is UCDataGridView)
|
||||||
|
return item as UCDataGridView;
|
||||||
|
else if (item.Controls.Count > 0)
|
||||||
|
{
|
||||||
|
var grid = FindChildGrid(item);
|
||||||
|
if (grid != null)
|
||||||
|
return grid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
[Bindable(false)]
|
||||||
|
[Browsable(false)]
|
||||||
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||||
|
public override bool AutoScroll
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return base.AutoScroll;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
base.AutoScroll = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#region 事件
|
||||||
|
/// <summary>
|
||||||
|
/// The head CheckBox change event
|
||||||
|
/// </summary>
|
||||||
|
[Description("选中标题选择框事件"), Category("自定义")]
|
||||||
|
public EventHandler HeadCheckBoxChangeEvent;
|
||||||
|
/// <summary>
|
||||||
|
/// The head column click event
|
||||||
|
/// </summary>
|
||||||
|
[Description("标题点击事件"), Category("自定义")]
|
||||||
|
public EventHandler HeadColumnClickEvent;
|
||||||
|
/// <summary>
|
||||||
|
/// Occurs when [item click].
|
||||||
|
/// </summary>
|
||||||
|
[Description("项点击事件"), Category("自定义")]
|
||||||
|
public event DataGridViewEventHandler ItemClick;
|
||||||
|
/// <summary>
|
||||||
|
/// Occurs when [source changed].
|
||||||
|
/// </summary>
|
||||||
|
[Description("行数据源改变事件"), Category("自定义")]
|
||||||
|
public event DataGridViewEventHandler RowSourceChangedEvent;
|
||||||
|
/// <summary>
|
||||||
|
/// Occurs when [row custom event].
|
||||||
|
/// </summary>
|
||||||
|
[Description("预留的自定义的事件,比如你需要在行上放置删改等按钮时,可以通过此事件传递出来"), Category("自定义")]
|
||||||
|
public event DataGridViewRowCustomEventHandler RowCustomEvent;
|
||||||
|
[Description("绑定数据源后事件"), Category("自定义")]
|
||||||
|
public event EventHandler BindingSourceEvent;
|
||||||
|
#endregion
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="UCDataGridView" /> class.
|
||||||
|
/// </summary>
|
||||||
|
public UCDataGridView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 私有方法
|
||||||
|
#region 加载column
|
||||||
|
/// <summary>
|
||||||
|
/// 功能描述:加载column
|
||||||
|
/// 作 者:HZH
|
||||||
|
/// 创建日期:2019-08-08 17:51:50
|
||||||
|
/// 任务编号:POS
|
||||||
|
/// </summary>
|
||||||
|
private void LoadColumns()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (DesignMode)
|
||||||
|
{ return; }
|
||||||
|
|
||||||
|
ControlHelper.FreezeControl(this.panHead, true);
|
||||||
|
|
||||||
|
this.panRow.Controls.Clear();
|
||||||
|
this.panColumns.Controls.Clear();
|
||||||
|
this.panColumns.ColumnStyles.Clear();
|
||||||
|
|
||||||
|
|
||||||
|
if (m_columns != null && m_columns.Count() > 0)
|
||||||
|
{
|
||||||
|
int _width = 0;
|
||||||
|
m_columns.ForEach(p =>
|
||||||
|
{
|
||||||
|
if (p.WidthType == SizeType.Absolute)
|
||||||
|
{
|
||||||
|
_width += p.Width;
|
||||||
|
}
|
||||||
|
else if (p.WidthType == SizeType.Percent)
|
||||||
|
{
|
||||||
|
_width += (int)((p.Width / 100f) * this.Width);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (m_isShowCheckBox)
|
||||||
|
_width += 30;
|
||||||
|
if (_width > this.Width)
|
||||||
|
{
|
||||||
|
//this.panRow.Width = _width;
|
||||||
|
this.panHead.Width = _width;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (m_columns.Any(p => p.WidthType == SizeType.AutoSize))
|
||||||
|
{
|
||||||
|
//this.panRow.Width = this.Width;
|
||||||
|
this.panHead.Width = this.Width;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//this.panRow.Width = _width;
|
||||||
|
this.panHead.Width = _width;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m_columns.FindAll(p => p.WidthType == SizeType.Absolute);
|
||||||
|
m_columns.FindAll(p => p.WidthType == SizeType.Percent);
|
||||||
|
int intColumnsCount = m_columns.Count();
|
||||||
|
if (m_isShowCheckBox)
|
||||||
|
{
|
||||||
|
intColumnsCount++;
|
||||||
|
}
|
||||||
|
this.panColumns.ColumnCount = intColumnsCount;
|
||||||
|
for (int i = 0; i < intColumnsCount; i++)
|
||||||
|
{
|
||||||
|
Control c = null;
|
||||||
|
if (i == 0 && m_isShowCheckBox)
|
||||||
|
{
|
||||||
|
this.panColumns.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(SizeType.Absolute, 30F));
|
||||||
|
|
||||||
|
UCCheckBox box = new UCCheckBox();
|
||||||
|
box.TextValue = "";
|
||||||
|
box.Size = new Size(30, 30);
|
||||||
|
box.CheckedChangeEvent += (a, b) =>
|
||||||
|
{
|
||||||
|
Rows.ForEach(p => p.IsChecked = box.Checked);
|
||||||
|
if (HeadCheckBoxChangeEvent != null)
|
||||||
|
{
|
||||||
|
HeadCheckBoxChangeEvent(a, b);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
c = box;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var item = m_columns[i - (m_isShowCheckBox ? 1 : 0)];
|
||||||
|
this.panColumns.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(item.WidthType, item.Width));
|
||||||
|
Label lbl = new Label();
|
||||||
|
lbl.Name = "dgvColumns_" + i;
|
||||||
|
lbl.Text = item.HeadText;
|
||||||
|
lbl.Font = m_headFont;
|
||||||
|
lbl.ForeColor = m_headTextColor;
|
||||||
|
lbl.TextAlign = ContentAlignment.MiddleCenter;
|
||||||
|
lbl.AutoSize = false;
|
||||||
|
lbl.Dock = DockStyle.Fill;
|
||||||
|
lbl.MouseDown += (a, b) =>
|
||||||
|
{
|
||||||
|
if (HeadColumnClickEvent != null)
|
||||||
|
{
|
||||||
|
HeadColumnClickEvent(a, b);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
c = lbl;
|
||||||
|
}
|
||||||
|
this.panColumns.Controls.Add(c, i, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
ControlHelper.FreezeControl(this.panHead, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region 公共函数
|
||||||
|
/// <summary>
|
||||||
|
/// 刷新数据
|
||||||
|
/// </summary>
|
||||||
|
public void ReloadSource()
|
||||||
|
{
|
||||||
|
if (DesignMode)
|
||||||
|
{ return; }
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ControlHelper.FreezeControl(this, true);
|
||||||
|
panHead.Location = new Point(0, 0);
|
||||||
|
Rows = new List<IDataGridViewRow>();
|
||||||
|
if (m_columns == null || m_columns.Count <= 0)
|
||||||
|
return;
|
||||||
|
if (m_dataSource != null)
|
||||||
|
{
|
||||||
|
int intIndex = 0;
|
||||||
|
|
||||||
|
int intSourceCount = 0;
|
||||||
|
if (m_dataSource is DataTable)
|
||||||
|
{
|
||||||
|
intSourceCount = (m_dataSource as DataTable).Rows.Count;
|
||||||
|
}
|
||||||
|
else if (typeof(IList).IsAssignableFrom(m_dataSource.GetType()))
|
||||||
|
{
|
||||||
|
intSourceCount = (m_dataSource as IList).Count;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (Control item in this.panRow.Controls)
|
||||||
|
{
|
||||||
|
if (intIndex >= intSourceCount)
|
||||||
|
{
|
||||||
|
item.Visible = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var row = (item as IDataGridViewRow);
|
||||||
|
row.IsShowCheckBox = m_isShowCheckBox;
|
||||||
|
if (m_dataSource is DataTable)
|
||||||
|
{
|
||||||
|
row.DataSource = (m_dataSource as DataTable).Rows[intIndex];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
row.DataSource = (m_dataSource as IList)[intIndex];
|
||||||
|
}
|
||||||
|
row.BindingCellData();
|
||||||
|
if (row.RowHeight != m_rowHeight)
|
||||||
|
row.RowHeight = m_rowHeight;
|
||||||
|
item.Visible = true;
|
||||||
|
item.Width = panHead.Width;
|
||||||
|
|
||||||
|
Rows.Add(row);
|
||||||
|
row.RowIndex = Rows.IndexOf(row);
|
||||||
|
}
|
||||||
|
intIndex++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (intIndex < intSourceCount)
|
||||||
|
{
|
||||||
|
for (int i = intIndex; i < intSourceCount; i++)
|
||||||
|
{
|
||||||
|
IDataGridViewRow row = (IDataGridViewRow)Activator.CreateInstance(m_rowType);
|
||||||
|
if (m_dataSource is DataTable)
|
||||||
|
{
|
||||||
|
row.DataSource = (m_dataSource as DataTable).Rows[i];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
row.DataSource = (m_dataSource as IList)[i];
|
||||||
|
}
|
||||||
|
row.Columns = m_columns;
|
||||||
|
List<Control> lstCells = new List<Control>();
|
||||||
|
row.IsShowCheckBox = m_isShowCheckBox;
|
||||||
|
row.ReloadCells();
|
||||||
|
row.BindingCellData();
|
||||||
|
|
||||||
|
Control rowControl = (row as Control);
|
||||||
|
rowControl.Width = panHead.Width;
|
||||||
|
row.RowHeight = m_rowHeight;
|
||||||
|
row.CellClick += (a, b) => { this.FindForm().ActiveControl = this; rowControl.Focus(); SetSelectRow(rowControl, b); };
|
||||||
|
row.CheckBoxChangeEvent += (a, b) => { SetSelectRow(rowControl, b); };
|
||||||
|
row.RowCustomEvent += (a, b) => { if (RowCustomEvent != null) { RowCustomEvent(a, b); } };
|
||||||
|
row.SourceChanged += RowSourceChanged;
|
||||||
|
Rows.Add(row);
|
||||||
|
row.RowIndex = Rows.IndexOf(row);
|
||||||
|
this.panRow.Controls.Add(rowControl);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//this.panRow.Height = intSourceCount * RowHeight;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (Control item in this.panRow.Controls)
|
||||||
|
{
|
||||||
|
item.Visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
ControlHelper.FreezeControl(this, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 快捷键
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="msg">通过引用传递的 <see cref="T:System.Windows.Forms.Message" />,它表示要处理的窗口消息。</param>
|
||||||
|
/// <param name="keyData"><see cref="T:System.Windows.Forms.Keys" /> 值之一,它表示要处理的键。</param>
|
||||||
|
/// <returns>如果字符已由控件处理,则为 true;否则为 false。</returns>
|
||||||
|
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
|
||||||
|
{
|
||||||
|
if (keyData == Keys.Up)
|
||||||
|
{
|
||||||
|
Previous();
|
||||||
|
}
|
||||||
|
else if (keyData == Keys.Down)
|
||||||
|
{
|
||||||
|
Next();
|
||||||
|
}
|
||||||
|
else if (keyData == Keys.Home)
|
||||||
|
{
|
||||||
|
First();
|
||||||
|
}
|
||||||
|
else if (keyData == Keys.End)
|
||||||
|
{
|
||||||
|
End();
|
||||||
|
}
|
||||||
|
return base.ProcessCmdKey(ref msg, keyData);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 选中第一个
|
||||||
|
/// </summary>
|
||||||
|
public void First()
|
||||||
|
{
|
||||||
|
if (Rows == null || Rows.Count <= 0)
|
||||||
|
return;
|
||||||
|
Control c = null;
|
||||||
|
c = (Rows[0] as Control);
|
||||||
|
SetSelectRow(c, new DataGridViewEventArgs() { RowIndex = 0 });
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 选中上一个
|
||||||
|
/// </summary>
|
||||||
|
public void Previous()
|
||||||
|
{
|
||||||
|
if (Rows == null || Rows.Count <= 0)
|
||||||
|
return;
|
||||||
|
Control c = null;
|
||||||
|
|
||||||
|
int index = Rows.IndexOf(m_selectRow);
|
||||||
|
if (index - 1 >= 0)
|
||||||
|
{
|
||||||
|
c = (Rows[index - 1] as Control);
|
||||||
|
SetSelectRow(c, new DataGridViewEventArgs() { RowIndex = index - 1 });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 选中下一个
|
||||||
|
/// </summary>
|
||||||
|
public void Next()
|
||||||
|
{
|
||||||
|
if (Rows == null || Rows.Count <= 0)
|
||||||
|
return;
|
||||||
|
Control c = null;
|
||||||
|
|
||||||
|
int index = Rows.IndexOf(m_selectRow);
|
||||||
|
if (index + 1 < Rows.Count)
|
||||||
|
{
|
||||||
|
c = (Rows[index + 1] as Control);
|
||||||
|
SetSelectRow(c, new DataGridViewEventArgs() { RowIndex = index + 1 });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 选中最后一个
|
||||||
|
/// </summary>
|
||||||
|
public void End()
|
||||||
|
{
|
||||||
|
if (Rows == null || Rows.Count <= 0)
|
||||||
|
return;
|
||||||
|
Control c = null;
|
||||||
|
c = (Rows[Rows.Count - 1] as Control);
|
||||||
|
SetSelectRow(c, new DataGridViewEventArgs() { RowIndex = Rows.Count - 1 });
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 事件
|
||||||
|
/// <summary>
|
||||||
|
/// Rows the source changed.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">The sender.</param>
|
||||||
|
/// <param name="e">The <see cref="DataGridViewEventArgs" /> instance containing the event data.</param>
|
||||||
|
void RowSourceChanged(object sender, DataGridViewEventArgs e)
|
||||||
|
{
|
||||||
|
if (RowSourceChangedEvent != null)
|
||||||
|
RowSourceChangedEvent(sender, e);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the select row.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="item">The item.</param>
|
||||||
|
/// <param name="e">The <see cref="DataGridViewEventArgs" /> instance containing the event data.</param>
|
||||||
|
private void SetSelectRow(Control item, DataGridViewEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ControlHelper.FreezeControl(this, true);
|
||||||
|
if (item == null)
|
||||||
|
return;
|
||||||
|
if (item.Visible == false)
|
||||||
|
return;
|
||||||
|
this.FindForm().ActiveControl = this;
|
||||||
|
this.FindForm().ActiveControl = item;
|
||||||
|
if (m_selectRow != item)
|
||||||
|
{
|
||||||
|
if (m_selectRow != null)
|
||||||
|
{
|
||||||
|
m_selectRow.SetSelect(false);
|
||||||
|
}
|
||||||
|
m_selectRow = item as IDataGridViewRow;
|
||||||
|
m_selectRow.SetSelect(true);
|
||||||
|
|
||||||
|
if (this.panRow.Controls.Count > 0)
|
||||||
|
{
|
||||||
|
if (item.Location.Y < 0)
|
||||||
|
{
|
||||||
|
this.panRow.AutoScrollPosition = new Point(0, Math.Abs(this.panRow.Controls[this.panRow.Controls.Count - 1].Location.Y) + item.Location.Y);
|
||||||
|
}
|
||||||
|
else if (item.Location.Y + m_rowHeight > this.panRow.Height)
|
||||||
|
{
|
||||||
|
this.panRow.AutoScrollPosition = new Point(0, Math.Abs(this.panRow.AutoScrollPosition.Y) + item.Location.Y - this.panRow.Height + m_rowHeight);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (ItemClick != null)
|
||||||
|
{
|
||||||
|
ItemClick(item, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
ControlHelper.FreezeControl(this, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private void UCDataGridView_SizeChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//LoadColumns();
|
||||||
|
//ReloadSource();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UCDataGridView_Scroll(object sender, ScrollEventArgs e)
|
||||||
|
{
|
||||||
|
//if (e.ScrollOrientation == ScrollOrientation.VerticalScroll)
|
||||||
|
//{
|
||||||
|
// panHead.Location = new Point(0, this.VerticalScroll.Value + this.panRow.Location.Y - panHead.Height - 2);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void panRow_Scroll(object sender, ScrollEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.ScrollOrientation == ScrollOrientation.HorizontalScroll && this.panRow.Controls.Count > 0)
|
||||||
|
{
|
||||||
|
Console.WriteLine(this.panRow.HorizontalScroll.Value);
|
||||||
|
Console.WriteLine(this.panRow.Controls[0].Location.X);
|
||||||
|
panHead.Location = new Point(this.panRow.HorizontalScroll.Value * -1, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-09-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="UCDataGridViewRow.Designer.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class UCDataGridViewRow.
|
||||||
|
/// Implements the <see cref="System.Windows.Forms.UserControl" />
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="System.Windows.Forms.UserControl" />
|
||||||
|
partial class UCDataGridViewRow
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.ucSplitLine_H1 = new JinYuan.ControlLib.UCSplitLine_H();
|
||||||
|
this.panCells = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// ucSplitLine_H1
|
||||||
|
//
|
||||||
|
this.ucSplitLine_H1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(232)))), ((int)(((byte)(232)))));
|
||||||
|
this.ucSplitLine_H1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||||
|
this.ucSplitLine_H1.Location = new System.Drawing.Point(0, 55);
|
||||||
|
this.ucSplitLine_H1.Name = "ucSplitLine_H1";
|
||||||
|
this.ucSplitLine_H1.Size = new System.Drawing.Size(661, 1);
|
||||||
|
this.ucSplitLine_H1.TabIndex = 0;
|
||||||
|
this.ucSplitLine_H1.TabStop = false;
|
||||||
|
//
|
||||||
|
// panCells
|
||||||
|
//
|
||||||
|
this.panCells.ColumnCount = 1;
|
||||||
|
this.panCells.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.panCells.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||||
|
this.panCells.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panCells.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.panCells.Name = "panCells";
|
||||||
|
this.panCells.RowCount = 1;
|
||||||
|
this.panCells.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.panCells.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||||
|
this.panCells.Size = new System.Drawing.Size(661, 55);
|
||||||
|
this.panCells.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// UCDataGridViewItem
|
||||||
|
//
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
|
this.BackColor = System.Drawing.Color.White;
|
||||||
|
this.Controls.Add(this.panCells);
|
||||||
|
this.Controls.Add(this.ucSplitLine_H1);
|
||||||
|
this.Name = "UCDataGridViewItem";
|
||||||
|
this.Size = new System.Drawing.Size(661, 56);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The uc split line h1
|
||||||
|
/// </summary>
|
||||||
|
private UCSplitLine_H ucSplitLine_H1;
|
||||||
|
/// <summary>
|
||||||
|
/// The pan cells
|
||||||
|
/// </summary>
|
||||||
|
private System.Windows.Forms.TableLayoutPanel panCells;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,332 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-09-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="UCDataGridViewRow.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
using JinYuan.ControlLib.UCHelper;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class UCDataGridViewRow.
|
||||||
|
/// Implements the <see cref="System.Windows.Forms.UserControl" />
|
||||||
|
/// Implements the <see cref="JinYuan.ControlLib.Controls.IDataGridViewRow" />
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="System.Windows.Forms.UserControl" />
|
||||||
|
/// <seealso cref="JinYuan.ControlLib.Controls.IDataGridViewRow" />
|
||||||
|
[ToolboxItem(false)]
|
||||||
|
public partial class UCDataGridViewRow : UserControl, IDataGridViewRow
|
||||||
|
{
|
||||||
|
|
||||||
|
#region 属性
|
||||||
|
/// <summary>
|
||||||
|
/// CheckBox选中事件
|
||||||
|
/// </summary>
|
||||||
|
public event DataGridViewEventHandler CheckBoxChangeEvent;
|
||||||
|
/// <summary>
|
||||||
|
/// Occurs when [row custom event].
|
||||||
|
/// </summary>
|
||||||
|
public event DataGridViewRowCustomEventHandler RowCustomEvent;
|
||||||
|
/// <summary>
|
||||||
|
/// 点击单元格事件
|
||||||
|
/// </summary>
|
||||||
|
public event DataGridViewEventHandler CellClick;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据源改变事件
|
||||||
|
/// </summary>
|
||||||
|
public event DataGridViewEventHandler SourceChanged;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 列参数,用于创建列数和宽度
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The columns.</value>
|
||||||
|
public List<DataGridViewColumnEntity> Columns
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据源
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The data source.</value>
|
||||||
|
public object DataSource
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 行号
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The Index of the row.</value>
|
||||||
|
public int RowIndex { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value indicating whether this instance is show CheckBox.
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if this instance is show CheckBox; otherwise, <c>false</c>.</value>
|
||||||
|
public bool IsShowCheckBox
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// The m is checked
|
||||||
|
/// </summary>
|
||||||
|
private bool m_isChecked;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否选中
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if this instance is checked; otherwise, <c>false</c>.</value>
|
||||||
|
public bool IsChecked
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return m_isChecked;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (m_isChecked != value)
|
||||||
|
{
|
||||||
|
m_isChecked = value;
|
||||||
|
(this.panCells.Controls.Find("check", false)[0] as UCCheckBox).Checked = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// The m row height
|
||||||
|
/// </summary>
|
||||||
|
int m_rowHeight = 40;
|
||||||
|
/// <summary>
|
||||||
|
/// 行高
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The height of the row.</value>
|
||||||
|
public int RowHeight
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return m_rowHeight;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
m_rowHeight = value;
|
||||||
|
this.Height = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="UCDataGridViewRow" /> class.
|
||||||
|
/// </summary>
|
||||||
|
public UCDataGridViewRow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定数据到Cell
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>返回true则表示已处理过,否则将进行默认绑定(通常只针对有Text值的控件)</returns>
|
||||||
|
public void BindingCellData()
|
||||||
|
{
|
||||||
|
if (DataSource != null)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < Columns.Count; i++)
|
||||||
|
{
|
||||||
|
DataGridViewColumnEntity com = Columns[i];
|
||||||
|
var cs = this.panCells.Controls.Find("lbl_" + com.DataField, false);
|
||||||
|
if (cs != null && cs.Length > 0)
|
||||||
|
{
|
||||||
|
if (DataSource is DataRow)
|
||||||
|
{
|
||||||
|
DataRow row = DataSource as DataRow;
|
||||||
|
if (com.Format != null)
|
||||||
|
{
|
||||||
|
cs[0].Text = com.Format(row[com.DataField]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cs[0].Text = row[com.DataField].ToStringExt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var pro = DataSource.GetType().GetProperty(com.DataField);
|
||||||
|
|
||||||
|
if (pro != null)
|
||||||
|
{
|
||||||
|
var value = pro.GetValue(DataSource, null);
|
||||||
|
if (com.Format != null)
|
||||||
|
{
|
||||||
|
cs[0].Text = com.Format(value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cs[0].Text = value.ToStringExt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach (Control item in this.panCells.Controls)
|
||||||
|
{
|
||||||
|
if (item is IDataGridViewCustomCell)
|
||||||
|
{
|
||||||
|
IDataGridViewCustomCell cell = item as IDataGridViewCustomCell;
|
||||||
|
cell.RowCustomEvent += cell_RowCustomEvent;
|
||||||
|
cell.SetBindSource(DataSource);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void cell_RowCustomEvent(object sender, DataGridViewRowCustomEventArgs e)
|
||||||
|
{
|
||||||
|
if (RowCustomEvent != null)
|
||||||
|
{
|
||||||
|
RowCustomEvent(sender, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the MouseDown event of the Item control.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">The source of the event.</param>
|
||||||
|
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
|
||||||
|
void Item_MouseDown(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
if (CellClick != null)
|
||||||
|
{
|
||||||
|
CellClick(this, new DataGridViewEventArgs()
|
||||||
|
{
|
||||||
|
CellControl = this,
|
||||||
|
CellIndex = (sender as Control).Tag.ToInt(),
|
||||||
|
RowIndex = this.RowIndex
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设置选中状态,通常为设置颜色即可
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="blnSelected">是否选中</param>
|
||||||
|
public void SetSelect(bool blnSelected)
|
||||||
|
{
|
||||||
|
if (blnSelected)
|
||||||
|
{
|
||||||
|
this.BackColor = Color.FromArgb(255, 247, 245);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.BackColor = Color.Transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Reloads the cells.
|
||||||
|
/// </summary>
|
||||||
|
public void ReloadCells()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ControlHelper.FreezeControl(this, true);
|
||||||
|
this.panCells.Controls.Clear();
|
||||||
|
this.panCells.ColumnStyles.Clear();
|
||||||
|
|
||||||
|
int intColumnsCount = Columns.Count();
|
||||||
|
if (Columns != null && intColumnsCount > 0)
|
||||||
|
{
|
||||||
|
if (IsShowCheckBox)
|
||||||
|
{
|
||||||
|
intColumnsCount++;
|
||||||
|
}
|
||||||
|
this.panCells.ColumnCount = intColumnsCount;
|
||||||
|
for (int i = 0; i < intColumnsCount; i++)
|
||||||
|
{
|
||||||
|
Control c = null;
|
||||||
|
if (i == 0 && IsShowCheckBox)
|
||||||
|
{
|
||||||
|
this.panCells.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(SizeType.Absolute, 30F));
|
||||||
|
|
||||||
|
UCCheckBox box = new UCCheckBox();
|
||||||
|
box.Name = "check";
|
||||||
|
box.TextValue = "";
|
||||||
|
box.Size = new Size(30, 30);
|
||||||
|
box.Dock = DockStyle.Fill;
|
||||||
|
box.CheckedChangeEvent += (a, b) =>
|
||||||
|
{
|
||||||
|
IsChecked = box.Checked;
|
||||||
|
if (CheckBoxChangeEvent != null)
|
||||||
|
{
|
||||||
|
CheckBoxChangeEvent(a, new DataGridViewEventArgs()
|
||||||
|
{
|
||||||
|
RowIndex = this.RowIndex,
|
||||||
|
CellControl = box,
|
||||||
|
CellIndex = 0
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
c = box;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var item = Columns[i - (IsShowCheckBox ? 1 : 0)];
|
||||||
|
this.panCells.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(item.WidthType, item.Width));
|
||||||
|
|
||||||
|
if (item.CustomCellType == null)
|
||||||
|
{
|
||||||
|
Label lbl = new Label();
|
||||||
|
lbl.Tag = i - (IsShowCheckBox ? 1 : 0);
|
||||||
|
lbl.Name = "lbl_" + item.DataField;
|
||||||
|
lbl.Font = new Font("微软雅黑", 12);
|
||||||
|
lbl.ForeColor = Color.Black;
|
||||||
|
lbl.AutoSize = false;
|
||||||
|
lbl.Dock = DockStyle.Fill;
|
||||||
|
lbl.TextAlign = item.TextAlign;
|
||||||
|
lbl.MouseDown += (a, b) =>
|
||||||
|
{
|
||||||
|
Item_MouseDown(a, b);
|
||||||
|
};
|
||||||
|
c = lbl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Control cc = (Control)Activator.CreateInstance(item.CustomCellType);
|
||||||
|
cc.Dock = DockStyle.Fill;
|
||||||
|
c = cc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.panCells.Controls.Add(c, i, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
ControlHelper.FreezeControl(this, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-23-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="UCDataGridViewTreeRow.Designer.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class UCDataGridViewTreeRow.
|
||||||
|
/// Implements the <see cref="System.Windows.Forms.UserControl" />
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="System.Windows.Forms.UserControl" />
|
||||||
|
partial class UCDataGridViewTreeRow
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.panCells = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.panLeft = new System.Windows.Forms.Panel();
|
||||||
|
this.panMain = new System.Windows.Forms.Panel();
|
||||||
|
this.ucSplitLine_H1 = new JinYuan.ControlLib.UCSplitLine_H();
|
||||||
|
this.ucSplitLine_V1 = new JinYuan.ControlLib.UCSplitLine_V();
|
||||||
|
this.panMain.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// panCells
|
||||||
|
//
|
||||||
|
this.panCells.ColumnCount = 1;
|
||||||
|
this.panCells.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.panCells.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||||
|
this.panCells.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panCells.Location = new System.Drawing.Point(24, 0);
|
||||||
|
this.panCells.Name = "panCells";
|
||||||
|
this.panCells.RowCount = 1;
|
||||||
|
this.panCells.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.panCells.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 55F));
|
||||||
|
this.panCells.Size = new System.Drawing.Size(636, 64);
|
||||||
|
this.panCells.TabIndex = 2;
|
||||||
|
//
|
||||||
|
// panLeft
|
||||||
|
//
|
||||||
|
this.panLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||||
|
this.panLeft.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
|
this.panLeft.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.panLeft.Name = "panLeft";
|
||||||
|
this.panLeft.Size = new System.Drawing.Size(24, 64);
|
||||||
|
this.panLeft.TabIndex = 0;
|
||||||
|
this.panLeft.Tag = "0";
|
||||||
|
this.panLeft.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panLeft_MouseDown);
|
||||||
|
//
|
||||||
|
// panMain
|
||||||
|
//
|
||||||
|
this.panMain.Controls.Add(this.panCells);
|
||||||
|
this.panMain.Controls.Add(this.panLeft);
|
||||||
|
this.panMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.panMain.Location = new System.Drawing.Point(1, 0);
|
||||||
|
this.panMain.Name = "panMain";
|
||||||
|
this.panMain.Size = new System.Drawing.Size(660, 64);
|
||||||
|
this.panMain.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// ucSplitLine_H1
|
||||||
|
//
|
||||||
|
this.ucSplitLine_H1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(232)))), ((int)(((byte)(232)))));
|
||||||
|
this.ucSplitLine_H1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||||
|
this.ucSplitLine_H1.Location = new System.Drawing.Point(1, 64);
|
||||||
|
this.ucSplitLine_H1.Name = "ucSplitLine_H1";
|
||||||
|
this.ucSplitLine_H1.Size = new System.Drawing.Size(660, 1);
|
||||||
|
this.ucSplitLine_H1.TabIndex = 1;
|
||||||
|
this.ucSplitLine_H1.TabStop = false;
|
||||||
|
//
|
||||||
|
// ucSplitLine_V1
|
||||||
|
//
|
||||||
|
this.ucSplitLine_V1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(232)))), ((int)(((byte)(232)))));
|
||||||
|
this.ucSplitLine_V1.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
|
this.ucSplitLine_V1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.ucSplitLine_V1.Name = "ucSplitLine_V1";
|
||||||
|
this.ucSplitLine_V1.Size = new System.Drawing.Size(1, 65);
|
||||||
|
this.ucSplitLine_V1.TabIndex = 0;
|
||||||
|
this.ucSplitLine_V1.TabStop = false;
|
||||||
|
this.ucSplitLine_V1.Visible = false;
|
||||||
|
//
|
||||||
|
// UCDataGridViewTreeRow
|
||||||
|
//
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
|
this.BackColor = System.Drawing.Color.White;
|
||||||
|
this.Controls.Add(this.panMain);
|
||||||
|
this.Controls.Add(this.ucSplitLine_H1);
|
||||||
|
this.Controls.Add(this.ucSplitLine_V1);
|
||||||
|
this.Name = "UCDataGridViewTreeRow";
|
||||||
|
this.Size = new System.Drawing.Size(661, 65);
|
||||||
|
this.panMain.ResumeLayout(false);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The pan cells
|
||||||
|
/// </summary>
|
||||||
|
private System.Windows.Forms.TableLayoutPanel panCells;
|
||||||
|
/// <summary>
|
||||||
|
/// The uc split line h1
|
||||||
|
/// </summary>
|
||||||
|
private UCSplitLine_H ucSplitLine_H1;
|
||||||
|
/// <summary>
|
||||||
|
/// The pan left
|
||||||
|
/// </summary>
|
||||||
|
private System.Windows.Forms.Panel panLeft;
|
||||||
|
/// <summary>
|
||||||
|
/// The pan main
|
||||||
|
/// </summary>
|
||||||
|
private System.Windows.Forms.Panel panMain;
|
||||||
|
private UCSplitLine_V ucSplitLine_V1;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,475 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-23-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="UCDataGridViewTreeRow.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
using JinYuan.ControlLib.UCHelper;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class UCDataGridViewTreeRow.
|
||||||
|
/// Implements the <see cref="System.Windows.Forms.UserControl" />
|
||||||
|
/// Implements the <see cref="JinYuan.ControlLib.Controls.IDataGridViewRow" />
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="System.Windows.Forms.UserControl" />
|
||||||
|
/// <seealso cref="JinYuan.ControlLib.Controls.IDataGridViewRow" />
|
||||||
|
[ToolboxItem(false)]
|
||||||
|
public partial class UCDataGridViewTreeRow : UserControl, IDataGridViewRow
|
||||||
|
{
|
||||||
|
#region 属性
|
||||||
|
/// <summary>
|
||||||
|
/// CheckBox选中事件
|
||||||
|
/// </summary>
|
||||||
|
public event DataGridViewEventHandler CheckBoxChangeEvent;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 点击单元格事件
|
||||||
|
/// </summary>
|
||||||
|
public event DataGridViewEventHandler CellClick;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据源改变事件
|
||||||
|
/// </summary>
|
||||||
|
public event DataGridViewEventHandler SourceChanged;
|
||||||
|
/// <summary>
|
||||||
|
/// Occurs when [row custom event].
|
||||||
|
/// </summary>
|
||||||
|
public event DataGridViewRowCustomEventHandler RowCustomEvent;
|
||||||
|
/// <summary>
|
||||||
|
/// 列参数,用于创建列数和宽度
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The columns.</value>
|
||||||
|
public List<DataGridViewColumnEntity> Columns
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据源
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The data source.</value>
|
||||||
|
public object DataSource
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int rowLevel = 0;
|
||||||
|
/// <summary>
|
||||||
|
/// 折叠的第几层,用于缩进
|
||||||
|
/// </summary>
|
||||||
|
public int RowLevel
|
||||||
|
{
|
||||||
|
get { return rowLevel; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
rowLevel = value;
|
||||||
|
this.Padding = new Padding(this.panLeft.Width / 2 * value, this.Padding.Top, this.panLeft.Right, this.Padding.Bottom);
|
||||||
|
this.ucSplitLine_V1.Visible = value > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 行号,树状图目前没有给予行号
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The Index of the row.</value>
|
||||||
|
public int RowIndex { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value indicating whether this instance is show CheckBox.
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if this instance is show CheckBox; otherwise, <c>false</c>.</value>
|
||||||
|
public bool IsShowCheckBox
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// The m is checked
|
||||||
|
/// </summary>
|
||||||
|
private bool m_isChecked;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否选中
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if this instance is checked; otherwise, <c>false</c>.</value>
|
||||||
|
public bool IsChecked
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return m_isChecked;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (m_isChecked != value)
|
||||||
|
{
|
||||||
|
m_isChecked = value;
|
||||||
|
(this.panCells.Controls.Find("check", false)[0] as UCCheckBox).Checked = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The m row height
|
||||||
|
/// </summary>
|
||||||
|
int m_rowHeight = 40;
|
||||||
|
/// <summary>
|
||||||
|
/// 行高
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The height of the row.</value>
|
||||||
|
public int RowHeight
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return m_rowHeight;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
m_rowHeight = value;
|
||||||
|
this.Height = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private List<UCDataGridViewTreeRow> childrenRows = new List<UCDataGridViewTreeRow>();
|
||||||
|
|
||||||
|
public List<UCDataGridViewTreeRow> ChildrenRows
|
||||||
|
{
|
||||||
|
get { return childrenRows; }
|
||||||
|
set { childrenRows = value; }
|
||||||
|
}
|
||||||
|
private bool? isOpened = false;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否打开状态
|
||||||
|
/// </summary>
|
||||||
|
public bool? IsOpened
|
||||||
|
{
|
||||||
|
get { return isOpened; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
isOpened = value;
|
||||||
|
if (value.HasValue)
|
||||||
|
{
|
||||||
|
panLeft.Enabled = true;
|
||||||
|
if (value.Value)
|
||||||
|
{
|
||||||
|
panLeft.BackgroundImage = Properties.Resources.caret_down;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
panLeft.BackgroundImage = Properties.Resources.caret_right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
panLeft.BackgroundImage = null;
|
||||||
|
panLeft.Enabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="UCDataGridViewTreeRow" /> class.
|
||||||
|
/// </summary>
|
||||||
|
public UCDataGridViewTreeRow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 绑定数据到Cell
|
||||||
|
/// </summary>
|
||||||
|
public void BindingCellData()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < Columns.Count; i++)
|
||||||
|
{
|
||||||
|
DataGridViewColumnEntity com = Columns[i];
|
||||||
|
var cs = this.panCells.Controls.Find("lbl_" + com.DataField, false);
|
||||||
|
if (cs != null && cs.Length > 0)
|
||||||
|
{
|
||||||
|
var pro = DataSource.GetType().GetProperty(com.DataField);
|
||||||
|
if (pro != null)
|
||||||
|
{
|
||||||
|
var value = pro.GetValue(DataSource, null);
|
||||||
|
if (com.Format != null)
|
||||||
|
{
|
||||||
|
cs[0].Text = com.Format(value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cs[0].Text = value.ToStringExt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach (Control item in this.panCells.Controls)
|
||||||
|
{
|
||||||
|
if (item is IDataGridViewCustomCell)
|
||||||
|
{
|
||||||
|
IDataGridViewCustomCell cell = item as IDataGridViewCustomCell;
|
||||||
|
cell.RowCustomEvent += cell_RowCustomEvent;
|
||||||
|
cell.SetBindSource(DataSource);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
IsOpened = false;
|
||||||
|
var proChildrens = DataSource.GetType().GetProperty("Childrens");
|
||||||
|
if (proChildrens != null)
|
||||||
|
{
|
||||||
|
var value = proChildrens.GetValue(DataSource, null);
|
||||||
|
if (value != null)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IsOpened = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IsOpened = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void cell_RowCustomEvent(object sender, DataGridViewRowCustomEventArgs e)
|
||||||
|
{
|
||||||
|
if (RowCustomEvent != null)
|
||||||
|
RowCustomEvent(sender, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the MouseDown event of the Item control.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">The source of the event.</param>
|
||||||
|
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
|
||||||
|
void Item_MouseDown(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
if (CellClick != null)
|
||||||
|
{
|
||||||
|
CellClick(this, new DataGridViewEventArgs()
|
||||||
|
{
|
||||||
|
CellControl = this,
|
||||||
|
CellIndex = (sender as Control).Tag.ToInt()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设置选中状态,通常为设置颜色即可
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="blnSelected">是否选中</param>
|
||||||
|
public void SetSelect(bool blnSelected)
|
||||||
|
{
|
||||||
|
if (blnSelected)
|
||||||
|
{
|
||||||
|
this.panMain.BackColor = Color.FromArgb(255, 247, 245);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.panMain.BackColor = Color.Transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加单元格元素,仅做添加控件操作,不做数据绑定,数据绑定使用BindingCells
|
||||||
|
/// </summary>
|
||||||
|
public void ReloadCells()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ControlHelper.FreezeControl(this, true);
|
||||||
|
this.panCells.Controls.Clear();
|
||||||
|
this.panCells.ColumnStyles.Clear();
|
||||||
|
|
||||||
|
int intColumnsCount = Columns.Count();
|
||||||
|
if (Columns != null && intColumnsCount > 0)
|
||||||
|
{
|
||||||
|
if (IsShowCheckBox)
|
||||||
|
{
|
||||||
|
intColumnsCount++;
|
||||||
|
}
|
||||||
|
this.panCells.ColumnCount = intColumnsCount;
|
||||||
|
bool blnFirst = true;
|
||||||
|
for (int i = 0; i < intColumnsCount; i++)
|
||||||
|
{
|
||||||
|
Control c = null;
|
||||||
|
if (i == 0 && IsShowCheckBox)
|
||||||
|
{
|
||||||
|
this.panCells.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(SizeType.Absolute, 30F));
|
||||||
|
|
||||||
|
UCCheckBox box = new UCCheckBox();
|
||||||
|
box.Name = "check";
|
||||||
|
box.TextValue = "";
|
||||||
|
box.Size = new Size(30, 30);
|
||||||
|
box.Dock = DockStyle.Fill;
|
||||||
|
box.CheckedChangeEvent += box_CheckedChangeEvent;
|
||||||
|
c = box;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var item = Columns[i - (IsShowCheckBox ? 1 : 0)];
|
||||||
|
var w = item.Width - (blnFirst ? (this.panLeft.Width / 2 * rowLevel) : 0);
|
||||||
|
if (w < 5)
|
||||||
|
w = 5;
|
||||||
|
this.panCells.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(item.WidthType, w));
|
||||||
|
blnFirst = false;
|
||||||
|
if (item.CustomCellType == null)
|
||||||
|
{
|
||||||
|
Label lbl = new Label();
|
||||||
|
lbl.Tag = i - (IsShowCheckBox ? 1 : 0);
|
||||||
|
lbl.Name = "lbl_" + item.DataField;
|
||||||
|
lbl.Font = new Font("微软雅黑", 12);
|
||||||
|
lbl.ForeColor = Color.Black;
|
||||||
|
lbl.AutoSize = false;
|
||||||
|
lbl.Dock = DockStyle.Fill;
|
||||||
|
lbl.TextAlign = item.TextAlign;
|
||||||
|
lbl.MouseDown += (a, b) =>
|
||||||
|
{
|
||||||
|
Item_MouseDown(a, b);
|
||||||
|
};
|
||||||
|
c = lbl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Control cc = (Control)Activator.CreateInstance(item.CustomCellType);
|
||||||
|
cc.Dock = DockStyle.Fill;
|
||||||
|
c = cc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.panCells.Controls.Add(c, i, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
ControlHelper.FreezeControl(this, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void box_CheckedChangeEvent(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
IsChecked = ((UCCheckBox)sender).Checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the MouseDown event of the panLeft control.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">The source of the event.</param>
|
||||||
|
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
|
||||||
|
private void panLeft_MouseDown(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!IsOpened.HasValue)
|
||||||
|
return;
|
||||||
|
ControlHelper.FreezeControl(this.FindForm(), true);
|
||||||
|
if (!IsOpened.Value)
|
||||||
|
{
|
||||||
|
|
||||||
|
IsOpened = !IsOpened;
|
||||||
|
if (childrenRows.Count > 0)
|
||||||
|
{
|
||||||
|
childrenRows.ForEach(p =>
|
||||||
|
{
|
||||||
|
p.IsChecked = IsChecked;
|
||||||
|
p.Visible = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var proChildrens = DataSource.GetType().GetProperty("Childrens");
|
||||||
|
if (proChildrens != null)
|
||||||
|
{
|
||||||
|
var value = proChildrens.GetValue(DataSource, null);
|
||||||
|
int intSourceCount = 0;
|
||||||
|
if (value is DataTable)
|
||||||
|
{
|
||||||
|
intSourceCount = (value as DataTable).Rows.Count;
|
||||||
|
}
|
||||||
|
else if (typeof(IList).IsAssignableFrom(value.GetType()))
|
||||||
|
{
|
||||||
|
intSourceCount = (value as IList).Count;
|
||||||
|
}
|
||||||
|
for (int i = intSourceCount - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
UCDataGridViewTreeRow row = new UCDataGridViewTreeRow();
|
||||||
|
if (value is DataTable)
|
||||||
|
{
|
||||||
|
row.DataSource = (value as DataTable).Rows[i];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
row.DataSource = (value as IList)[i];
|
||||||
|
}
|
||||||
|
row.RowLevel = RowLevel + 1;
|
||||||
|
row.Columns = Columns;
|
||||||
|
row.IsShowCheckBox = IsShowCheckBox;
|
||||||
|
row.ReloadCells();
|
||||||
|
row.BindingCellData();
|
||||||
|
|
||||||
|
Control rowControl = (row as Control);
|
||||||
|
row.RowHeight = m_rowHeight;
|
||||||
|
rowControl.Width = this.Width;
|
||||||
|
//rowControl.Dock = DockStyle.Top;
|
||||||
|
row.CellClick += (a, b) => { CellClick(rowControl, b); };
|
||||||
|
row.CheckBoxChangeEvent += (a, b) => { CheckBoxChangeEvent(rowControl, b); };
|
||||||
|
row.RowCustomEvent += (a, b) => { if (RowCustomEvent != null) { RowCustomEvent(a, b); } };
|
||||||
|
row.SourceChanged += SourceChanged;
|
||||||
|
ChildrenRows.Add(row);
|
||||||
|
row.RowIndex = ChildrenRows.IndexOf(row);
|
||||||
|
|
||||||
|
this.Parent.Controls.Add(rowControl);
|
||||||
|
var index = this.Parent.Controls.GetChildIndex(this);
|
||||||
|
this.Parent.Controls.SetChildIndex(row, index + 1);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HideChildrenRows(this);
|
||||||
|
this.Height = m_rowHeight;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
ControlHelper.FreezeControl(this.FindForm(), false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HideChildrenRows(UCDataGridViewTreeRow row)
|
||||||
|
{
|
||||||
|
if (row.ChildrenRows.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var item in row.ChildrenRows)
|
||||||
|
{
|
||||||
|
HideChildrenRows(item);
|
||||||
|
item.Hide();
|
||||||
|
}
|
||||||
|
row.IsOpened = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
Generated
+48
@@ -0,0 +1,48 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class DialPlate
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// DialPlate
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(28)))), ((int)(((byte)(68)))));
|
||||||
|
this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.Name = "DialPlate";
|
||||||
|
this.Size = new System.Drawing.Size(329, 202);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,341 @@
|
|||||||
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public partial class DialPlate : UserControl
|
||||||
|
{
|
||||||
|
public DialPlate()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
//设置控件样式,去除缓冲
|
||||||
|
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
this.SetStyle(ControlStyles.DoubleBuffer, true);
|
||||||
|
this.SetStyle(ControlStyles.ResizeRedraw, true);
|
||||||
|
this.SetStyle(ControlStyles.Selectable, true);
|
||||||
|
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
|
||||||
|
|
||||||
|
stringFormat.Alignment = StringAlignment.Center;
|
||||||
|
stringFormat.LineAlignment = StringAlignment.Center;
|
||||||
|
}
|
||||||
|
|
||||||
|
private StringFormat stringFormat = new StringFormat();
|
||||||
|
|
||||||
|
#region 外环设计
|
||||||
|
private Color alarmColor = Color.FromArgb(36, 184, 196);
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取报警颜色")]
|
||||||
|
public Color AlarmColor
|
||||||
|
{
|
||||||
|
get { return alarmColor; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
alarmColor = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Color rightColor = Color.FromArgb(187, 187, 187);
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取圆环整体颜色")]
|
||||||
|
public Color RightColor
|
||||||
|
{
|
||||||
|
get { return rightColor; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
rightColor = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private float alarmAngle = 120.0f;
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取报警角度")]
|
||||||
|
public float AlarmAngle
|
||||||
|
{
|
||||||
|
get { return alarmAngle; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
alarmAngle = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int outThickness = 8;
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取外环宽度")]
|
||||||
|
public int OutThickness
|
||||||
|
{
|
||||||
|
get { return outThickness; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
outThickness = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 内环设计
|
||||||
|
private float tempScale = 0.8f;
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取温度环比列,默认小于1.0f")]
|
||||||
|
public float TempScale
|
||||||
|
{
|
||||||
|
get { return tempScale; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value > 1.0f) return;
|
||||||
|
tempScale = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Color tempColor = Color.FromArgb(36, 184, 196);
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取温度环颜色")]
|
||||||
|
public Color TempColor
|
||||||
|
{
|
||||||
|
get { return tempColor; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
tempColor = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private float humidityScale = 0.4f;
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取湿度环比列,默认小于1.0f")]
|
||||||
|
public float HumidityScale
|
||||||
|
{
|
||||||
|
get { return humidityScale; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value > 1.0f) return;
|
||||||
|
humidityScale = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Color humidityColor = Color.FromArgb(36, 184, 196);
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取湿度环颜色")]
|
||||||
|
public Color HumidityColor
|
||||||
|
{
|
||||||
|
get { return humidityColor; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
humidityColor = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int inThickness = 16;
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取内环宽度")]
|
||||||
|
public int InThickness
|
||||||
|
{
|
||||||
|
get { return inThickness; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
inThickness = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 刻度环设计
|
||||||
|
private float textScale = 0.6f;
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取刻度环比列,默认小于1.0f")]
|
||||||
|
public float MyProperty
|
||||||
|
{
|
||||||
|
get { return textScale; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value > 1.0f) return;
|
||||||
|
textScale = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private float rangeMin = 0.0f;
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取刻度量程低限")]
|
||||||
|
public float RangeMin
|
||||||
|
{
|
||||||
|
get { return rangeMin; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value > rangeMax) return;
|
||||||
|
rangeMin = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private float rangeMax = 90.0f;
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取刻度量程高限")]
|
||||||
|
public float RangeMax
|
||||||
|
{
|
||||||
|
get { return rangeMax; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < rangeMin) return;
|
||||||
|
rangeMax = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 实时显示
|
||||||
|
private float temp = 10.0f;
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取温度实时值")]
|
||||||
|
public float Temp
|
||||||
|
{
|
||||||
|
get { return temp; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < rangeMin)
|
||||||
|
value = rangeMin;
|
||||||
|
if (value > rangeMax)
|
||||||
|
value = rangeMax;
|
||||||
|
temp = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private float humidity = 10.0f;
|
||||||
|
[Browsable(true)]
|
||||||
|
[Category("自定义属性")]
|
||||||
|
[Description("设置或获取湿度实时值")]
|
||||||
|
public float Humidity
|
||||||
|
{
|
||||||
|
get { return humidity; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < rangeMin)
|
||||||
|
value = rangeMin;
|
||||||
|
if (value > rangeMax)
|
||||||
|
value = rangeMax;
|
||||||
|
humidity = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnPaint(e);
|
||||||
|
|
||||||
|
//获取画布并设置
|
||||||
|
Graphics g = e.Graphics;
|
||||||
|
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
||||||
|
g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
|
||||||
|
|
||||||
|
//异常情况处理
|
||||||
|
if (this.Width <= 20 || this.Height <= 20) return;
|
||||||
|
|
||||||
|
if (this.Height < this.Width / 2) return;
|
||||||
|
|
||||||
|
//画外环
|
||||||
|
Pen pen = new Pen(alarmColor, OutThickness);
|
||||||
|
|
||||||
|
g.DrawArc(pen, new RectangleF(10, 10, this.Width - 20, this.Width - 20), 180, alarmAngle);
|
||||||
|
|
||||||
|
pen = new Pen(rightColor, OutThickness);
|
||||||
|
|
||||||
|
g.DrawArc(pen, new RectangleF(10, 10, this.Width - 20, this.Width - 20), 180 + alarmAngle, 180 - alarmAngle);
|
||||||
|
|
||||||
|
//转移坐标系
|
||||||
|
g.TranslateTransform(this.Width * 0.5f, this.Width * 0.5f);
|
||||||
|
|
||||||
|
//旋转坐标系
|
||||||
|
g.RotateTransform(-90);
|
||||||
|
|
||||||
|
SolidBrush solidBrush;
|
||||||
|
for (int i = 0; i < 7; i++)
|
||||||
|
{
|
||||||
|
if (30 * i <= alarmAngle)
|
||||||
|
{
|
||||||
|
solidBrush = new SolidBrush(alarmColor);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
solidBrush = new SolidBrush(rightColor);
|
||||||
|
}
|
||||||
|
float x = -0.3f;
|
||||||
|
float width = 6.0f;
|
||||||
|
float height = outThickness + 4;
|
||||||
|
float y = (this.Width * 0.5f - 10 + height * 0.5f) * (-1.0f);
|
||||||
|
g.FillRectangle(solidBrush, new RectangleF(x, y, width, height));
|
||||||
|
|
||||||
|
g.RotateTransform(30);
|
||||||
|
}
|
||||||
|
|
||||||
|
//坐标系旋转回去
|
||||||
|
g.RotateTransform(-210);
|
||||||
|
g.RotateTransform(90);
|
||||||
|
|
||||||
|
////绘制刻度
|
||||||
|
float rangeAvg = ((rangeMax - rangeMin) % 6 == 0) ? Convert.ToSingle((rangeMax - rangeMin) / 6) : Convert.ToSingle(((rangeMax - rangeMin) / 6).ToString("f1"));
|
||||||
|
|
||||||
|
for (int i = 0; i < 7; i++)
|
||||||
|
{
|
||||||
|
float angle = -180.0f + i * 30.0f;
|
||||||
|
|
||||||
|
float pointX = Convert.ToSingle(this.Width * textScale * 0.5f * Math.Cos(angle * Math.PI / 180.0f));
|
||||||
|
float pointY = Convert.ToSingle(this.Width * textScale * 0.5f * Math.Sin(angle * Math.PI / 180.0f));
|
||||||
|
|
||||||
|
string text = (rangeMin + rangeAvg * i).ToString();
|
||||||
|
|
||||||
|
SizeF size = g.MeasureString(text, this.Font);
|
||||||
|
|
||||||
|
RectangleF rectangle = new RectangleF(pointX - size.Width * 0.5f, pointY, size.Width, size.Height);
|
||||||
|
|
||||||
|
g.DrawString(text, this.Font, new SolidBrush(this.ForeColor), rectangle, stringFormat);
|
||||||
|
}
|
||||||
|
|
||||||
|
////绘制实际温度湿度环
|
||||||
|
//pen = new Pen(tempColor, inThickness);
|
||||||
|
|
||||||
|
//float sweepAngle = (temp - rangeMin) / (rangeMax - rangeMin) * 180.0f;
|
||||||
|
|
||||||
|
//float xx = this.Width * tempScale * 0.5f * (-1.0f);
|
||||||
|
//float yy = this.Width * tempScale * 0.5f * (-1.0f);
|
||||||
|
|
||||||
|
//g.DrawArc(pen, new RectangleF(xx, yy, this.Width * tempScale, this.Width * tempScale), 180.0f, sweepAngle);
|
||||||
|
|
||||||
|
|
||||||
|
//pen = new Pen(humidityColor, inThickness);
|
||||||
|
|
||||||
|
//sweepAngle = (humidity - rangeMin) / (rangeMax - rangeMin) * 180.0f;
|
||||||
|
|
||||||
|
//xx = this.Width * humidityScale * 0.5f * (-1.0f);
|
||||||
|
//yy = this.Width * humidityScale * 0.5f * (-1.0f);
|
||||||
|
|
||||||
|
//g.DrawArc(pen, new RectangleF(xx, yy, this.Width * humidityScale, this.Width * humidityScale), 180.0f, sweepAngle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class FanShapedSchedule
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public partial class FanShapedSchedule : UserControl
|
||||||
|
{
|
||||||
|
public FanShapedSchedule()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//最大值
|
||||||
|
private float maxValue = 100;
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置最大值")]
|
||||||
|
public float MaxValue
|
||||||
|
{
|
||||||
|
get { return maxValue; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
maxValue = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//实际值
|
||||||
|
private float actureValue = 60;
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置实际值")]
|
||||||
|
public float ActureValue
|
||||||
|
{
|
||||||
|
get { return actureValue; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
actureValue = value;
|
||||||
|
this.Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//文字显示值
|
||||||
|
private float PercentVal = 0;
|
||||||
|
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnPaint(e);
|
||||||
|
|
||||||
|
// 获取画布
|
||||||
|
Graphics graphics = e.Graphics;
|
||||||
|
|
||||||
|
//消除锯齿
|
||||||
|
graphics.SmoothingMode = SmoothingMode.AntiAlias;
|
||||||
|
//文字显示效果
|
||||||
|
graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
|
||||||
|
//插补模式
|
||||||
|
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||||
|
//图片呈现质量
|
||||||
|
graphics.CompositingQuality = CompositingQuality.HighQuality;
|
||||||
|
|
||||||
|
|
||||||
|
// 绘制底圆
|
||||||
|
SolidBrush brush1 = new SolidBrush(Color.FromArgb(93, 107, 153));
|
||||||
|
Rectangle rectangle1 = new Rectangle(1, 1, this.Width - 2, this.Height - 2);
|
||||||
|
graphics.FillEllipse(brush1, rectangle1);
|
||||||
|
|
||||||
|
//绘制扇形
|
||||||
|
Rectangle rectangle2 = new Rectangle(1, 1, this.Width - 2, this.Height - 2);
|
||||||
|
LinearGradientBrush brush2 = new LinearGradientBrush(rectangle2, Color.Blue, Color.Red, 150.0f, true);
|
||||||
|
this.PercentVal = (ActureValue / MaxValue) * 100;
|
||||||
|
graphics.FillPie(brush2, rectangle2, -90, (ActureValue / MaxValue) * 360f);
|
||||||
|
|
||||||
|
//绘制上圆
|
||||||
|
SolidBrush solidBrushElipse = new SolidBrush(this.BackColor);
|
||||||
|
Rectangle rectangle3 = new Rectangle(15, 15, this.Width - 30, this.Height - 30);
|
||||||
|
graphics.FillEllipse(solidBrushElipse, rectangle3);
|
||||||
|
|
||||||
|
//绘制文字
|
||||||
|
Font font = new Font("微软雅黑", 15);
|
||||||
|
PointF point = new PointF(((float)this.Width) / 2.0f - 27, ((float)this.Height) / 2.0f - 10);
|
||||||
|
graphics.DrawString(this.PercentVal.ToString("0.0") + "%", font, Brushes.Coral, point);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class FlatComboBox
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,171 @@
|
|||||||
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public partial class FlatComboBox : ComboBox
|
||||||
|
{
|
||||||
|
private Color borderColor = Color.Gray;
|
||||||
|
[DefaultValue(typeof(Color), "Gray")]
|
||||||
|
public Color BorderColor
|
||||||
|
{
|
||||||
|
get { return borderColor; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (borderColor != value)
|
||||||
|
{
|
||||||
|
borderColor = value;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private Color buttonColor = Color.LightGray;
|
||||||
|
[DefaultValue(typeof(Color), "LightGray")]
|
||||||
|
public Color ButtonColor
|
||||||
|
{
|
||||||
|
get { return buttonColor; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (buttonColor != value)
|
||||||
|
{
|
||||||
|
buttonColor = value;
|
||||||
|
Invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected override void WndProc(ref Message m)
|
||||||
|
{
|
||||||
|
if (m.Msg == WM_PAINT && DropDownStyle != ComboBoxStyle.Simple)
|
||||||
|
{
|
||||||
|
var clientRect = ClientRectangle;
|
||||||
|
var dropDownButtonWidth = SystemInformation.HorizontalScrollBarArrowWidth;
|
||||||
|
var outerBorder = new Rectangle(clientRect.Location,
|
||||||
|
new Size(clientRect.Width - 1, clientRect.Height - 1));
|
||||||
|
var innerBorder = new Rectangle(outerBorder.X + 1, outerBorder.Y + 1,
|
||||||
|
outerBorder.Width - dropDownButtonWidth - 2, outerBorder.Height - 2);
|
||||||
|
var innerInnerBorder = new Rectangle(innerBorder.X + 1, innerBorder.Y + 1,
|
||||||
|
innerBorder.Width - 2, innerBorder.Height - 2);
|
||||||
|
var dropDownRect = new Rectangle(innerBorder.Right + 1, innerBorder.Y,
|
||||||
|
dropDownButtonWidth, innerBorder.Height + 1);
|
||||||
|
if (RightToLeft == RightToLeft.Yes)
|
||||||
|
{
|
||||||
|
innerBorder.X = clientRect.Width - innerBorder.Right;
|
||||||
|
innerInnerBorder.X = clientRect.Width - innerInnerBorder.Right;
|
||||||
|
dropDownRect.X = clientRect.Width - dropDownRect.Right;
|
||||||
|
dropDownRect.Width += 1;
|
||||||
|
}
|
||||||
|
var innerBorderColor = Enabled ? BackColor : SystemColors.Control;
|
||||||
|
var outerBorderColor = Enabled ? BorderColor : SystemColors.ControlDark;
|
||||||
|
var buttonColor = Enabled ? ButtonColor : SystemColors.Control;
|
||||||
|
var middle = new Point(dropDownRect.Left + dropDownRect.Width / 2,
|
||||||
|
dropDownRect.Top + dropDownRect.Height / 2);
|
||||||
|
var arrow = new Point[]
|
||||||
|
{
|
||||||
|
new Point(middle.X - 3, middle.Y - 2),
|
||||||
|
new Point(middle.X + 4, middle.Y - 2),
|
||||||
|
new Point(middle.X, middle.Y + 2)
|
||||||
|
};
|
||||||
|
var ps = new PAINTSTRUCT();
|
||||||
|
bool shoulEndPaint = false;
|
||||||
|
IntPtr dc;
|
||||||
|
if (m.WParam == IntPtr.Zero)
|
||||||
|
{
|
||||||
|
dc = BeginPaint(Handle, ref ps);
|
||||||
|
m.WParam = dc;
|
||||||
|
shoulEndPaint = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dc = m.WParam;
|
||||||
|
}
|
||||||
|
var rgn = CreateRectRgn(innerInnerBorder.Left, innerInnerBorder.Top,
|
||||||
|
innerInnerBorder.Right, innerInnerBorder.Bottom);
|
||||||
|
SelectClipRgn(dc, rgn);
|
||||||
|
DefWndProc(ref m);
|
||||||
|
DeleteObject(rgn);
|
||||||
|
rgn = CreateRectRgn(clientRect.Left, clientRect.Top,
|
||||||
|
clientRect.Right, clientRect.Bottom);
|
||||||
|
SelectClipRgn(dc, rgn);
|
||||||
|
using (var g = Graphics.FromHdc(dc))
|
||||||
|
{
|
||||||
|
using (var b = new SolidBrush(buttonColor))
|
||||||
|
{
|
||||||
|
g.FillRectangle(b, dropDownRect);
|
||||||
|
}
|
||||||
|
using (var b = new SolidBrush(outerBorderColor))
|
||||||
|
{
|
||||||
|
g.FillPolygon(b, arrow);
|
||||||
|
}
|
||||||
|
using (var p = new Pen(innerBorderColor))
|
||||||
|
{
|
||||||
|
g.DrawRectangle(p, innerBorder);
|
||||||
|
g.DrawRectangle(p, innerInnerBorder);
|
||||||
|
}
|
||||||
|
using (var p = new Pen(outerBorderColor))
|
||||||
|
{
|
||||||
|
g.DrawRectangle(p, outerBorder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (shoulEndPaint)
|
||||||
|
EndPaint(Handle, ref ps);
|
||||||
|
DeleteObject(rgn);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
base.WndProc(ref m);
|
||||||
|
}
|
||||||
|
|
||||||
|
private const int WM_PAINT = 0xF;
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct RECT
|
||||||
|
{
|
||||||
|
public int L, T, R, B;
|
||||||
|
}
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
public struct PAINTSTRUCT
|
||||||
|
{
|
||||||
|
public IntPtr hdc;
|
||||||
|
public bool fErase;
|
||||||
|
public int rcPaint_left;
|
||||||
|
public int rcPaint_top;
|
||||||
|
public int rcPaint_right;
|
||||||
|
public int rcPaint_bottom;
|
||||||
|
public bool fRestore;
|
||||||
|
public bool fIncUpdate;
|
||||||
|
public int reserved1;
|
||||||
|
public int reserved2;
|
||||||
|
public int reserved3;
|
||||||
|
public int reserved4;
|
||||||
|
public int reserved5;
|
||||||
|
public int reserved6;
|
||||||
|
public int reserved7;
|
||||||
|
public int reserved8;
|
||||||
|
}
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
private static extern IntPtr BeginPaint(IntPtr hWnd,
|
||||||
|
[In, Out] ref PAINTSTRUCT lpPaint);
|
||||||
|
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
private static extern bool EndPaint(IntPtr hWnd, ref PAINTSTRUCT lpPaint);
|
||||||
|
|
||||||
|
[DllImport("gdi32.dll")]
|
||||||
|
public static extern int SelectClipRgn(IntPtr hDC, IntPtr hRgn);
|
||||||
|
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
public static extern int GetUpdateRgn(IntPtr hwnd, IntPtr hrgn, bool fErase);
|
||||||
|
public enum RegionFlags
|
||||||
|
{
|
||||||
|
ERROR = 0,
|
||||||
|
NULLREGION = 1,
|
||||||
|
SIMPLEREGION = 2,
|
||||||
|
COMPLEXREGION = 3,
|
||||||
|
}
|
||||||
|
[DllImport("gdi32.dll")]
|
||||||
|
internal static extern bool DeleteObject(IntPtr hObject);
|
||||||
|
|
||||||
|
[DllImport("gdi32.dll")]
|
||||||
|
private static extern IntPtr CreateRectRgn(int x1, int y1, int x2, int y2);
|
||||||
|
}
|
||||||
|
}
|
||||||
+74
@@ -0,0 +1,74 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-08-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="FrmBase.Designer.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
namespace JinYuan.ControlLib.Forms
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class FrmBase.
|
||||||
|
/// Implements the <see cref="System.Windows.Forms.Form" />
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="System.Windows.Forms.Form" />
|
||||||
|
partial class FrmBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmBase));
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// FrmBase
|
||||||
|
//
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
|
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(247)))), ((int)(((byte)(247)))));
|
||||||
|
this.ClientSize = new System.Drawing.Size(331, 371);
|
||||||
|
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(66)))), ((int)(((byte)(66)))));
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
|
this.Name = "FrmBase";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "FrmBase";
|
||||||
|
this.Load += new System.EventHandler(this.FrmBase_Load);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,622 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-08-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="FrmBase.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
using JinYuan.ControlLib.UCHelper;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib.Forms
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class FrmBase.
|
||||||
|
/// Implements the <see cref="System.Windows.Forms.Form" />
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="System.Windows.Forms.Form" />
|
||||||
|
[Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design", typeof(System.ComponentModel.Design.IDesigner))]
|
||||||
|
public partial class FrmBase : Form
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the hot keys.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The hot keys.</value>
|
||||||
|
[Description("定义的热键列表"), Category("自定义")]
|
||||||
|
public Dictionary<int, string> HotKeys { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Delegate HotKeyEventHandler
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="strHotKey">The string hot key.</param>
|
||||||
|
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||||
|
public delegate bool HotKeyEventHandler(string strHotKey);
|
||||||
|
/// <summary>
|
||||||
|
/// 热键事件
|
||||||
|
/// </summary>
|
||||||
|
[Description("热键事件"), Category("自定义")]
|
||||||
|
public event HotKeyEventHandler HotKeyDown;
|
||||||
|
#region 字段属性
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 失去焦点关闭
|
||||||
|
/// </summary>
|
||||||
|
bool _isLoseFocusClose = false;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否重绘边框样式
|
||||||
|
/// </summary>
|
||||||
|
private bool _redraw = false;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否显示圆角
|
||||||
|
/// </summary>
|
||||||
|
private bool _isShowRegion = false;
|
||||||
|
/// <summary>
|
||||||
|
/// 边圆角大小
|
||||||
|
/// </summary>
|
||||||
|
private int _regionRadius = 10;
|
||||||
|
/// <summary>
|
||||||
|
/// 边框颜色
|
||||||
|
/// </summary>
|
||||||
|
private Color _borderStyleColor;
|
||||||
|
/// <summary>
|
||||||
|
/// 边框宽度
|
||||||
|
/// </summary>
|
||||||
|
private int _borderStyleSize;
|
||||||
|
/// <summary>
|
||||||
|
/// 边框样式
|
||||||
|
/// </summary>
|
||||||
|
private ButtonBorderStyle _borderStyleType;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否显示模态
|
||||||
|
/// </summary>
|
||||||
|
private bool _isShowMaskDialog = false;
|
||||||
|
/// <summary>
|
||||||
|
/// 蒙版窗体
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if this instance is show mask dialog; otherwise, <c>false</c>.</value>
|
||||||
|
[Description("是否显示蒙版窗体")]
|
||||||
|
public bool IsShowMaskDialog
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._isShowMaskDialog;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this._isShowMaskDialog = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 边框宽度
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The size of the border style.</value>
|
||||||
|
[Description("边框宽度")]
|
||||||
|
public int BorderStyleSize
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._borderStyleSize;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this._borderStyleSize = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 边框颜色
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The color of the border style.</value>
|
||||||
|
[Description("边框颜色")]
|
||||||
|
public Color BorderStyleColor
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._borderStyleColor;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this._borderStyleColor = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 边框样式
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The type of the border style.</value>
|
||||||
|
[Description("边框样式")]
|
||||||
|
public ButtonBorderStyle BorderStyleType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._borderStyleType;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this._borderStyleType = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 边框圆角
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The region radius.</value>
|
||||||
|
[Description("边框圆角")]
|
||||||
|
public int RegionRadius
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._regionRadius;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this._regionRadius = Math.Max(value, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 是否显示自定义绘制内容
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if this instance is show region; otherwise, <c>false</c>.</value>
|
||||||
|
[Description("是否显示自定义绘制内容")]
|
||||||
|
public bool IsShowRegion
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._isShowRegion;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this._isShowRegion = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 是否显示重绘边框
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if redraw; otherwise, <c>false</c>.</value>
|
||||||
|
[Description("是否显示重绘边框")]
|
||||||
|
public bool Redraw
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._redraw;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this._redraw = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The is full size
|
||||||
|
/// </summary>
|
||||||
|
private bool _isFullSize = true;
|
||||||
|
/// <summary>
|
||||||
|
/// 是否全屏
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if this instance is full size; otherwise, <c>false</c>.</value>
|
||||||
|
[Description("是否全屏")]
|
||||||
|
public virtual bool IsFullSize
|
||||||
|
{
|
||||||
|
get { return _isFullSize; }
|
||||||
|
set { _isFullSize = value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 失去焦点自动关闭
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if this instance is lose focus close; otherwise, <c>false</c>.</value>
|
||||||
|
[Description("失去焦点自动关闭")]
|
||||||
|
public bool IsLoseFocusClose
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._isLoseFocusClose;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this._isLoseFocusClose = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a value indicating whether this instance is desing mode.
|
||||||
|
/// </summary>
|
||||||
|
/// <value><c>true</c> if this instance is desing mode; otherwise, <c>false</c>.</value>
|
||||||
|
private bool IsDesingMode
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
bool ReturnFlag = false;
|
||||||
|
if (LicenseManager.UsageMode == LicenseUsageMode.Designtime)
|
||||||
|
ReturnFlag = true;
|
||||||
|
else if (System.Diagnostics.Process.GetCurrentProcess().ProcessName == "devenv")
|
||||||
|
ReturnFlag = true;
|
||||||
|
return ReturnFlag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 初始化
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="FrmBase" /> class.
|
||||||
|
/// </summary>
|
||||||
|
public FrmBase()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
base.SetStyle(ControlStyles.UserPaint, true);
|
||||||
|
base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
base.SetStyle(ControlStyles.DoubleBuffer, true);
|
||||||
|
//base.HandleCreated += new EventHandler(this.FrmBase_HandleCreated);
|
||||||
|
//base.HandleDestroyed += new EventHandler(this.FrmBase_HandleDestroyed);
|
||||||
|
this.KeyDown += FrmBase_KeyDown;
|
||||||
|
this.FormClosing += FrmBase_FormClosing;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the FormClosing event of the FrmBase control.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">The source of the event.</param>
|
||||||
|
/// <param name="e">The <see cref="FormClosingEventArgs" /> instance containing the event data.</param>
|
||||||
|
void FrmBase_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
|
{
|
||||||
|
if (_isLoseFocusClose)
|
||||||
|
{
|
||||||
|
MouseHook.OnMouseActivity -= hook_OnMouseActivity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the Load event of the FrmBase control.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">The source of the event.</param>
|
||||||
|
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
|
||||||
|
private void FrmBase_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsDesingMode)
|
||||||
|
{
|
||||||
|
if (_isFullSize)
|
||||||
|
SetFullSize();
|
||||||
|
}
|
||||||
|
if (_isLoseFocusClose)
|
||||||
|
{
|
||||||
|
MouseHook.OnMouseActivity += hook_OnMouseActivity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 方法区
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the OnMouseActivity event of the hook control.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">The source of the event.</param>
|
||||||
|
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
|
||||||
|
void hook_OnMouseActivity(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (this._isLoseFocusClose && e.Clicks > 0)
|
||||||
|
{
|
||||||
|
if (e.Button == System.Windows.Forms.MouseButtons.Left || e.Button == System.Windows.Forms.MouseButtons.Right)
|
||||||
|
{
|
||||||
|
if (!this.IsDisposed)
|
||||||
|
{
|
||||||
|
if (!this.ClientRectangle.Contains(this.PointToClient(e.Location)))
|
||||||
|
{
|
||||||
|
base.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 全屏
|
||||||
|
/// </summary>
|
||||||
|
public void SetFullSize()
|
||||||
|
{
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||||
|
|
||||||
|
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Does the escape.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual void DoEsc()
|
||||||
|
{
|
||||||
|
base.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Does the enter.
|
||||||
|
/// </summary>
|
||||||
|
protected virtual void DoEnter()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设置重绘区域
|
||||||
|
/// </summary>
|
||||||
|
public void SetWindowRegion()
|
||||||
|
{
|
||||||
|
GraphicsPath path = new GraphicsPath();
|
||||||
|
Rectangle rect = new Rectangle(-1, -1, base.Width + 1, base.Height);
|
||||||
|
path = this.GetRoundedRectPath(rect, this._regionRadius);
|
||||||
|
base.Region = new Region(path);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 获取重绘区域
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rect">The rect.</param>
|
||||||
|
/// <param name="radius">The radius.</param>
|
||||||
|
/// <returns>GraphicsPath.</returns>
|
||||||
|
private GraphicsPath GetRoundedRectPath(Rectangle rect, int radius)
|
||||||
|
{
|
||||||
|
Rectangle rect2 = new Rectangle(rect.Location, new Size(radius, radius));
|
||||||
|
GraphicsPath graphicsPath = new GraphicsPath();
|
||||||
|
graphicsPath.AddArc(rect2, 180f, 90f);
|
||||||
|
rect2.X = rect.Right - radius;
|
||||||
|
graphicsPath.AddArc(rect2, 270f, 90f);
|
||||||
|
rect2.Y = rect.Bottom - radius;
|
||||||
|
rect2.Width += 1;
|
||||||
|
rect2.Height += 1;
|
||||||
|
graphicsPath.AddArc(rect2, 360f, 90f);
|
||||||
|
rect2.X = rect.Left;
|
||||||
|
graphicsPath.AddArc(rect2, 90f, 90f);
|
||||||
|
graphicsPath.CloseFigure();
|
||||||
|
return graphicsPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 将窗体显示为具有指定所有者的模式对话框。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="owner">任何实现 <see cref="T:System.Windows.Forms.IWin32Window" />(表示将拥有模式对话框的顶级窗口)的对象。</param>
|
||||||
|
/// <returns><see cref="T:System.Windows.Forms.DialogResult" /> 值之一。</returns>
|
||||||
|
/// <PermissionSet>
|
||||||
|
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||||
|
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||||
|
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
|
||||||
|
/// <IPermission class="System.Security.Permissions.UIPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||||
|
/// <IPermission class="System.Diagnostics.PerformanceCounterPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||||
|
/// </PermissionSet>
|
||||||
|
public new DialogResult ShowDialog(IWin32Window owner)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (this._isShowMaskDialog && owner != null)
|
||||||
|
{
|
||||||
|
var frmOwner = (Control)owner;
|
||||||
|
FrmTransparent _frmTransparent = new FrmTransparent();
|
||||||
|
_frmTransparent.Width = frmOwner.Width;
|
||||||
|
_frmTransparent.Height = frmOwner.Height;
|
||||||
|
Point location = frmOwner.PointToScreen(new Point(0, 0));
|
||||||
|
_frmTransparent.Location = location;
|
||||||
|
_frmTransparent.frmchild = this;
|
||||||
|
_frmTransparent.IsShowMaskDialog = false;
|
||||||
|
return _frmTransparent.ShowDialog(owner);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return base.ShowDialog(owner);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (NullReferenceException)
|
||||||
|
{
|
||||||
|
return System.Windows.Forms.DialogResult.None;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 将窗体显示为模式对话框,并将当前活动窗口设置为它的所有者。
|
||||||
|
/// </summary>
|
||||||
|
/// <returns><see cref="T:System.Windows.Forms.DialogResult" /> 值之一。</returns>
|
||||||
|
/// <PermissionSet>
|
||||||
|
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||||
|
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||||
|
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
|
||||||
|
/// <IPermission class="System.Security.Permissions.UIPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||||
|
/// <IPermission class="System.Diagnostics.PerformanceCounterPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
|
||||||
|
/// </PermissionSet>
|
||||||
|
public new DialogResult ShowDialog()
|
||||||
|
{
|
||||||
|
return base.ShowDialog();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 事件区
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 关闭时发生
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">一个包含事件数据的 <see cref="T:System.EventArgs" />。</param>
|
||||||
|
protected override void OnClosed(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnClosed(e);
|
||||||
|
if (base.Owner != null && base.Owner is FrmTransparent)
|
||||||
|
{
|
||||||
|
(base.Owner as FrmTransparent).Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 快捷键
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="msg">通过引用传递的 <see cref="T:System.Windows.Forms.Message" />,它表示要处理的 Win32 消息。</param>
|
||||||
|
/// <param name="keyData"><see cref="T:System.Windows.Forms.Keys" /> 值之一,它表示要处理的键。</param>
|
||||||
|
/// <returns>如果控件处理并使用击键,则为 true;否则为 false,以允许进一步处理。</returns>
|
||||||
|
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
|
||||||
|
{
|
||||||
|
int num = 256;
|
||||||
|
int num2 = 260;
|
||||||
|
bool result;
|
||||||
|
if (msg.Msg == num | msg.Msg == num2)
|
||||||
|
{
|
||||||
|
if (keyData == (Keys)262259)
|
||||||
|
{
|
||||||
|
result = true;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
if (keyData != Keys.Enter)
|
||||||
|
{
|
||||||
|
if (keyData == Keys.Escape)
|
||||||
|
{
|
||||||
|
this.DoEsc();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.DoEnter();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = false;
|
||||||
|
if (result)
|
||||||
|
return result;
|
||||||
|
else
|
||||||
|
return base.ProcessCmdKey(ref msg, keyData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the KeyDown event of the FrmBase control.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">The source of the event.</param>
|
||||||
|
/// <param name="e">The <see cref="KeyEventArgs" /> instance containing the event data.</param>
|
||||||
|
protected void FrmBase_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (HotKeyDown != null && HotKeys != null)
|
||||||
|
{
|
||||||
|
bool blnCtrl = false;
|
||||||
|
bool blnAlt = false;
|
||||||
|
bool blnShift = false;
|
||||||
|
if (e.Control)
|
||||||
|
blnCtrl = true;
|
||||||
|
if (e.Alt)
|
||||||
|
blnAlt = true;
|
||||||
|
if (e.Shift)
|
||||||
|
blnShift = true;
|
||||||
|
if (HotKeys.ContainsKey(e.KeyValue))
|
||||||
|
{
|
||||||
|
string strKey = string.Empty;
|
||||||
|
if (blnCtrl)
|
||||||
|
{
|
||||||
|
strKey += "Ctrl+";
|
||||||
|
}
|
||||||
|
if (blnAlt)
|
||||||
|
{
|
||||||
|
strKey += "Alt+";
|
||||||
|
}
|
||||||
|
if (blnShift)
|
||||||
|
{
|
||||||
|
strKey += "Shift+";
|
||||||
|
}
|
||||||
|
strKey += HotKeys[e.KeyValue];
|
||||||
|
|
||||||
|
if (HotKeyDown(strKey))
|
||||||
|
{
|
||||||
|
e.Handled = true;
|
||||||
|
e.SuppressKeyPress = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重绘事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">包含事件数据的 <see cref="T:System.Windows.Forms.PaintEventArgs" />。</param>
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
if (this._isShowRegion)
|
||||||
|
{
|
||||||
|
this.SetWindowRegion();
|
||||||
|
}
|
||||||
|
base.OnPaint(e);
|
||||||
|
if (this._redraw)
|
||||||
|
{
|
||||||
|
ControlPaint.DrawBorder(e.Graphics, base.ClientRectangle, this._borderStyleColor, this._borderStyleSize, this._borderStyleType, this._borderStyleColor, this._borderStyleSize, this._borderStyleType, this._borderStyleColor, this._borderStyleSize, this._borderStyleType, this._borderStyleColor, this._borderStyleSize, this._borderStyleType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 窗体拖动 English:Form drag
|
||||||
|
/// <summary>
|
||||||
|
/// Releases the capture.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
public static extern bool ReleaseCapture();
|
||||||
|
/// <summary>
|
||||||
|
/// Sends the message.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="hwnd">The HWND.</param>
|
||||||
|
/// <param name="wMsg">The w MSG.</param>
|
||||||
|
/// <param name="wParam">The w parameter.</param>
|
||||||
|
/// <param name="lParam">The l parameter.</param>
|
||||||
|
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The wm syscommand
|
||||||
|
/// </summary>
|
||||||
|
public const int WM_SYSCOMMAND = 0x0112;
|
||||||
|
/// <summary>
|
||||||
|
/// The sc move
|
||||||
|
/// </summary>
|
||||||
|
public const int SC_MOVE = 0xF010;
|
||||||
|
/// <summary>
|
||||||
|
/// The htcaption
|
||||||
|
/// </summary>
|
||||||
|
public const int HTCAPTION = 0x0002;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 通过Windows的API控制窗体的拖动
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="hwnd">The HWND.</param>
|
||||||
|
public static void MouseDown(IntPtr hwnd)
|
||||||
|
{
|
||||||
|
ReleaseCapture();
|
||||||
|
SendMessage(hwnd, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 在构造函数中调用设置窗体移动
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cs">The cs.</param>
|
||||||
|
protected void InitFormMove(params Control[] cs)
|
||||||
|
{
|
||||||
|
foreach (Control c in cs)
|
||||||
|
{
|
||||||
|
if (c != null && !c.IsDisposed)
|
||||||
|
c.MouseDown += c_MouseDown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the MouseDown event of the c control.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">The source of the event.</param>
|
||||||
|
/// <param name="e">The <see cref="MouseEventArgs" /> instance containing the event data.</param>
|
||||||
|
void c_MouseDown(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
MouseDown(this.Handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
+73
@@ -0,0 +1,73 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-08-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="FrmTransparent.Designer.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
namespace JinYuan.ControlLib.Forms
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class FrmTransparent.
|
||||||
|
/// Implements the <see cref="JinYuan.ControlLib.Forms.FrmBase" />
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="JinYuan.ControlLib.Forms.FrmBase" />
|
||||||
|
partial class FrmTransparent
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmTransparent));
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// FrmTransparent
|
||||||
|
//
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
|
this.BackColor = System.Drawing.Color.Black;
|
||||||
|
this.ClientSize = new System.Drawing.Size(284, 262);
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.Name = "FrmTransparent";
|
||||||
|
this.Opacity = 0.5D;
|
||||||
|
this.ShowIcon = false;
|
||||||
|
this.ShowInTaskbar = false;
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
|
this.Text = "FrmTransparent";
|
||||||
|
this.Load += new System.EventHandler(this.FrmTransparent_Load);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-08-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="FrmTransparent.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib.Forms
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class FrmTransparent.
|
||||||
|
/// Implements the <see cref="JinYuan.ControlLib.Forms.FrmBase" />
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="JinYuan.ControlLib.Forms.FrmBase" />
|
||||||
|
public partial class FrmTransparent : FrmBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The wm activate
|
||||||
|
/// </summary>
|
||||||
|
private const int WM_ACTIVATE = 6;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The wm activateapp
|
||||||
|
/// </summary>
|
||||||
|
private const int WM_ACTIVATEAPP = 28;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The wm ncactivate
|
||||||
|
/// </summary>
|
||||||
|
private const int WM_NCACTIVATE = 134;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The wa inactive
|
||||||
|
/// </summary>
|
||||||
|
private const int WA_INACTIVE = 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The wm mouseactivate
|
||||||
|
/// </summary>
|
||||||
|
private const int WM_MOUSEACTIVATE = 33;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The ma noactivate
|
||||||
|
/// </summary>
|
||||||
|
private const int MA_NOACTIVATE = 3;
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the create parameters.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The create parameters.</value>
|
||||||
|
protected override CreateParams CreateParams
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
CreateParams cp = base.CreateParams;
|
||||||
|
cp.ExStyle |= 0x02000000; // Turn on WS_EX_COMPOSITED
|
||||||
|
return cp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the frmchild.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The frmchild.</value>
|
||||||
|
public FrmBase frmchild
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="FrmTransparent" /> class.
|
||||||
|
/// </summary>
|
||||||
|
public FrmTransparent()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
this.SetStyle(ControlStyles.DoubleBuffer, true);
|
||||||
|
this.SetStyle(ControlStyles.ResizeRedraw, true);
|
||||||
|
this.SetStyle(ControlStyles.Selectable, true);
|
||||||
|
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
|
||||||
|
this.SetStyle(ControlStyles.UserPaint, true);
|
||||||
|
|
||||||
|
MethodInfo method = base.GetType().GetMethod("SetStyle", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod);
|
||||||
|
method.Invoke(this, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, new object[]
|
||||||
|
{
|
||||||
|
ControlStyles.Selectable,
|
||||||
|
false
|
||||||
|
}, Application.CurrentCulture);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 引发 <see cref="E:System.Windows.Forms.Form.Load" /> 事件。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="e">一个包含事件数据的 <see cref="T:System.EventArgs" />。</param>
|
||||||
|
protected override void OnLoad(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnLoad(e);
|
||||||
|
base.ShowInTaskbar = false;
|
||||||
|
base.ShowIcon = true;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the active window.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="handle">The handle.</param>
|
||||||
|
/// <returns>IntPtr.</returns>
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
private static extern IntPtr SetActiveWindow(IntPtr handle);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// WNDs the proc.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="m">要处理的 Windows <see cref="T:System.Windows.Forms.Message" />。</param>
|
||||||
|
protected override void WndProc(ref Message m)
|
||||||
|
{
|
||||||
|
if (m.Msg == 33)
|
||||||
|
{
|
||||||
|
m.Result = new IntPtr(3);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (m.Msg == 134)
|
||||||
|
{
|
||||||
|
if (((int)m.WParam & 65535) != 0)
|
||||||
|
{
|
||||||
|
if (m.LParam != IntPtr.Zero)
|
||||||
|
{
|
||||||
|
FrmTransparent.SetActiveWindow(m.LParam);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FrmTransparent.SetActiveWindow(IntPtr.Zero);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (m.Msg == 2000)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
base.WndProc(ref m);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the Load event of the FrmTransparent control.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">The source of the event.</param>
|
||||||
|
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
|
||||||
|
private void FrmTransparent_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (frmchild != null)
|
||||||
|
{
|
||||||
|
frmchild.IsShowMaskDialog = false;
|
||||||
|
var dia = frmchild.ShowDialog(this);
|
||||||
|
this.DialogResult = dia;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
+162
@@ -0,0 +1,162 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-08-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="FrmWaiting.Designer.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
namespace JinYuan.ControlLib.Forms
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class FrmWaiting.
|
||||||
|
/// Implements the <see cref="JinYuan.ControlLib.Forms.FrmBase" />
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="JinYuan.ControlLib.Forms.FrmBase" />
|
||||||
|
partial class FrmWaiting
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.components = new System.ComponentModel.Container();
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmWaiting));
|
||||||
|
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||||
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
|
this.timer2 = new System.Windows.Forms.Timer(this.components);
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// imageList1
|
||||||
|
//
|
||||||
|
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
|
||||||
|
this.imageList1.TransparentColor = System.Drawing.Color.White;
|
||||||
|
this.imageList1.Images.SetKeyName(0, "0.png");
|
||||||
|
this.imageList1.Images.SetKeyName(1, "1.png");
|
||||||
|
this.imageList1.Images.SetKeyName(2, "2.png");
|
||||||
|
this.imageList1.Images.SetKeyName(3, "3.png");
|
||||||
|
this.imageList1.Images.SetKeyName(4, "4.png");
|
||||||
|
this.imageList1.Images.SetKeyName(5, "5.png");
|
||||||
|
this.imageList1.Images.SetKeyName(6, "6.png");
|
||||||
|
this.imageList1.Images.SetKeyName(7, "7.png");
|
||||||
|
this.imageList1.Images.SetKeyName(8, "8.png");
|
||||||
|
this.imageList1.Images.SetKeyName(9, "9.png");
|
||||||
|
this.imageList1.Images.SetKeyName(10, "10.png");
|
||||||
|
this.imageList1.Images.SetKeyName(11, "11.png");
|
||||||
|
this.imageList1.Images.SetKeyName(12, "12.png");
|
||||||
|
this.imageList1.Images.SetKeyName(13, "13.png");
|
||||||
|
this.imageList1.Images.SetKeyName(14, "14.png");
|
||||||
|
this.imageList1.Images.SetKeyName(15, "15.png");
|
||||||
|
this.imageList1.Images.SetKeyName(16, "16.png");
|
||||||
|
this.imageList1.Images.SetKeyName(17, "17.png");
|
||||||
|
this.imageList1.Images.SetKeyName(18, "18.png");
|
||||||
|
this.imageList1.Images.SetKeyName(19, "19.png");
|
||||||
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
|
this.label1.Image = global::JinYuan.ControlLib.Properties.Resources.loading;
|
||||||
|
this.label1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(276, 196);
|
||||||
|
this.label1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// timer1
|
||||||
|
//
|
||||||
|
this.timer1.Interval = 20;
|
||||||
|
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||||
|
//
|
||||||
|
// label2
|
||||||
|
//
|
||||||
|
this.label2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
|
this.label2.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||||
|
this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||||
|
this.label2.Location = new System.Drawing.Point(0, 196);
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.Size = new System.Drawing.Size(276, 30);
|
||||||
|
this.label2.TabIndex = 1;
|
||||||
|
this.label2.Text = "处理正在进行中,请稍候...";
|
||||||
|
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
|
// timer2
|
||||||
|
//
|
||||||
|
this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
|
||||||
|
//
|
||||||
|
// FrmWaiting
|
||||||
|
//
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
|
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(247)))), ((int)(((byte)(247)))));
|
||||||
|
this.ClientSize = new System.Drawing.Size(276, 244);
|
||||||
|
this.Controls.Add(this.label2);
|
||||||
|
this.Controls.Add(this.label1);
|
||||||
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
|
this.IsFullSize = false;
|
||||||
|
this.Name = "FrmWaiting";
|
||||||
|
this.Opacity = 0D;
|
||||||
|
this.RegionRadius = 20;
|
||||||
|
this.ShowIcon = false;
|
||||||
|
this.ShowInTaskbar = false;
|
||||||
|
this.Text = "";
|
||||||
|
this.TopMost = true;
|
||||||
|
this.TransparencyKey = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(247)))), ((int)(((byte)(247)))));
|
||||||
|
this.VisibleChanged += new System.EventHandler(this.FrmWaiting_VisibleChanged);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The image list1
|
||||||
|
/// </summary>
|
||||||
|
private System.Windows.Forms.ImageList imageList1;
|
||||||
|
/// <summary>
|
||||||
|
/// The label1
|
||||||
|
/// </summary>
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
|
/// <summary>
|
||||||
|
/// The timer1
|
||||||
|
/// </summary>
|
||||||
|
private System.Windows.Forms.Timer timer1;
|
||||||
|
/// <summary>
|
||||||
|
/// The label2
|
||||||
|
/// </summary>
|
||||||
|
private System.Windows.Forms.Label label2;
|
||||||
|
/// <summary>
|
||||||
|
/// The timer2
|
||||||
|
/// </summary>
|
||||||
|
private System.Windows.Forms.Timer timer2;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
// ***********************************************************************
|
||||||
|
// Assembly : JinYuan.ControlLib
|
||||||
|
// Created : 08-08-2019
|
||||||
|
//
|
||||||
|
// ***********************************************************************
|
||||||
|
// <copyright file="FrmWaiting.cs">
|
||||||
|
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||||
|
// </copyright>
|
||||||
|
//
|
||||||
|
// Blog: https://www.cnblogs.com/bfyx
|
||||||
|
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||||
|
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||||
|
//
|
||||||
|
// If you use this code, please keep this note.
|
||||||
|
// ***********************************************************************
|
||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib.Forms
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Class FrmWaiting.
|
||||||
|
/// Implements the <see cref="JinYuan.ControlLib.Forms.FrmBase" />
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="JinYuan.ControlLib.Forms.FrmBase" />
|
||||||
|
public partial class FrmWaiting : FrmBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the MSG.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The MSG.</value>
|
||||||
|
public string Msg { get { return label2.Text; } set { label2.Text = value; } }
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="FrmWaiting" /> class.
|
||||||
|
/// </summary>
|
||||||
|
public FrmWaiting()
|
||||||
|
{
|
||||||
|
base.SetStyle(ControlStyles.UserPaint, true);
|
||||||
|
base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
base.SetStyle(ControlStyles.DoubleBuffer, true);
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the Tick event of the timer1 control.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">The source of the event.</param>
|
||||||
|
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
|
||||||
|
private void timer1_Tick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (this.label1.ImageIndex == this.imageList1.Images.Count - 1)
|
||||||
|
this.label1.ImageIndex = 0;
|
||||||
|
else
|
||||||
|
this.label1.ImageIndex++;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the VisibleChanged event of the FrmWaiting control.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">The source of the event.</param>
|
||||||
|
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
|
||||||
|
private void FrmWaiting_VisibleChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//this.timer1.Enabled = this.Visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Does the escape.
|
||||||
|
/// </summary>
|
||||||
|
protected override void DoEsc()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the Tick event of the timer2 control.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender">The source of the event.</param>
|
||||||
|
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
|
||||||
|
private void timer2_Tick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
base.Opacity = 1.0;
|
||||||
|
this.timer2.Enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shows the form.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="intSleep">The int sleep.</param>
|
||||||
|
public void ShowForm(int intSleep = 1)
|
||||||
|
{
|
||||||
|
base.Opacity = 0.0;
|
||||||
|
if (intSleep <= 0)
|
||||||
|
{
|
||||||
|
intSleep = 1;
|
||||||
|
}
|
||||||
|
base.Show();
|
||||||
|
this.timer2.Interval = intSleep;
|
||||||
|
this.timer2.Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
+36
@@ -0,0 +1,36 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class GroupBoxEX
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public partial class GroupBoxEX : GroupBox
|
||||||
|
{
|
||||||
|
|
||||||
|
private Color mBorderColor = Color.FromArgb(1, 146, 235);
|
||||||
|
|
||||||
|
[Browsable(true), Description("边框颜色"), Category("自定义分组")]
|
||||||
|
public Color BorderColor
|
||||||
|
{
|
||||||
|
get { return mBorderColor; }
|
||||||
|
set { mBorderColor = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public GroupBoxEX()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 重写
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
var vSize = e.Graphics.MeasureString(this.Text, this.Font);
|
||||||
|
|
||||||
|
e.Graphics.Clear(this.BackColor);
|
||||||
|
e.Graphics.DrawString(this.Text, this.Font, new SolidBrush(this.ForeColor), 10, 1);
|
||||||
|
Pen vPen = new Pen(this.mBorderColor); // 用属性颜色来画边框颜色
|
||||||
|
e.Graphics.DrawLine(vPen, 1, vSize.Height / 2, 8, vSize.Height / 2);
|
||||||
|
e.Graphics.DrawLine(vPen, vSize.Width + 8, vSize.Height / 2, this.Width - 2, vSize.Height / 2);
|
||||||
|
e.Graphics.DrawLine(vPen, 1, vSize.Height / 2, 1, this.Height - 2);
|
||||||
|
e.Graphics.DrawLine(vPen, 1, this.Height - 2, this.Width - 2, this.Height - 2);
|
||||||
|
e.Graphics.DrawLine(vPen, this.Width - 2, vSize.Height / 2, this.Width - 2, this.Height - 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,718 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{1BB7ED33-D2CB-4CDD-AB39-F7F9AE948CA2}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>JinYuan.ControlLib</RootNamespace>
|
||||||
|
<AssemblyName>JinYuan.ControlLib</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<LangVersion>7.3</LangVersion>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||||
|
<OutputPath>bin\x64\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<LangVersion>7.3</LangVersion>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="SeeSharpTools.JY.GUI, Version=1.4.4.533, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\SeeSharpTools.JY.GUI.1.4.4.533\lib\net40\SeeSharpTools.JY.GUI.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="AntdUI, Version=1.8.4.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\AntdUI.1.8.4\lib\net48\AntdUI.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="HML.ComplexityPropertys, Version=8.0.0.6, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>Lib\HML.ComplexityPropertys.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="HML, Version=8.0.0.6, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\Libs\HML.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="PresentationCore" />
|
||||||
|
<Reference Include="PresentationFramework" />
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Design" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Drawing.Design" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xaml" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="WindowsBase" />
|
||||||
|
<Reference Include="WindowsFormsIntegration" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="AlertManager.cs" />
|
||||||
|
<Compile Include="ArrTotalQty.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ArrTotalQty.Designer.cs">
|
||||||
|
<DependentUpon>ArrTotalQty.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CheckBoxExt.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CheckBoxExt.Designer.cs">
|
||||||
|
<DependentUpon>CheckBoxExt.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CircleProgramBar.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CircleProgramBar.Designer.cs">
|
||||||
|
<DependentUpon>CircleProgramBar.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ControlBase.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ControlBase.Designer.cs">
|
||||||
|
<DependentUpon>ControlBase.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CustomComboBox.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CustomComboBox.Designer.cs">
|
||||||
|
<DependentUpon>CustomComboBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CustomDataGridView.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CustomGroupBox.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CustomGroupBox.Designer.cs">
|
||||||
|
<DependentUpon>CustomGroupBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CustomRichTextBox.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CustomRichTextBox.Designer.cs">
|
||||||
|
<DependentUpon>CustomRichTextBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DataGridView\DataGridViewCellEntity.cs" />
|
||||||
|
<Compile Include="DataGridView\DataGridViewCellEventArgs.cs" />
|
||||||
|
<Compile Include="DataGridView\DataGridViewCellEventHandler.cs" />
|
||||||
|
<Compile Include="DataGridView\DataGridViewColumnEntity.cs" />
|
||||||
|
<Compile Include="DataGridView\DataGridViewRowCustomEventArgs.cs" />
|
||||||
|
<Compile Include="DataGridView\IDataGridViewCustomCell.cs" />
|
||||||
|
<Compile Include="DataGridView\IDataGridViewRow.cs" />
|
||||||
|
<Compile Include="DataGridView\UCDataGridView.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DataGridView\UCDataGridView.Designer.cs">
|
||||||
|
<DependentUpon>UCDataGridView.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DataGridView\UCDataGridViewRow.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DataGridView\UCDataGridViewRow.Designer.cs">
|
||||||
|
<DependentUpon>UCDataGridViewRow.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DataGridView\UCDataGridViewTreeRow.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DataGridView\UCDataGridViewTreeRow.Designer.cs">
|
||||||
|
<DependentUpon>UCDataGridViewTreeRow.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DialPlate.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DialPlate.Designer.cs">
|
||||||
|
<DependentUpon>DialPlate.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="FlatComboBox.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="FlatComboBox.Designer.cs">
|
||||||
|
<DependentUpon>FlatComboBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\FrmBase.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\FrmBase.Designer.cs">
|
||||||
|
<DependentUpon>FrmBase.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\FrmTransparent.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\FrmTransparent.Designer.cs">
|
||||||
|
<DependentUpon>FrmTransparent.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\FrmWaiting.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\FrmWaiting.Designer.cs">
|
||||||
|
<DependentUpon>FrmWaiting.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="GroupBoxEX.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="GroupBoxEX.Designer.cs">
|
||||||
|
<DependentUpon>GroupBoxEX.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="LightweightGridPanel.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="LightweightGridPanel.Designer.cs">
|
||||||
|
<DependentUpon>LightweightGridPanel.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ListViewEx.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ListViewEx.Designer.cs">
|
||||||
|
<DependentUpon>ListViewEx.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="LogListBox.cs" />
|
||||||
|
<Compile Include="LogListBox.Designer.cs">
|
||||||
|
<DependentUpon>LogListBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="LongTitle.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="LongTitle.Designer.cs">
|
||||||
|
<DependentUpon>LongTitle.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="LongTitleStyle2.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="LongTitleStyle2.Designer.cs">
|
||||||
|
<DependentUpon>LongTitleStyle2.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Models\CPKModel.cs" />
|
||||||
|
<Compile Include="StatusExt.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="StatusExt.Designer.cs">
|
||||||
|
<DependentUpon>StatusExt.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TButton.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TButton.Designer.cs">
|
||||||
|
<DependentUpon>TButton.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TitleButton.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TitleButton.Designer.cs">
|
||||||
|
<DependentUpon>TitleButton.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SidebarNavigation.cs" />
|
||||||
|
<Compile Include="SidebarNavigation.Designer.cs">
|
||||||
|
<DependentUpon>SidebarNavigation.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCCheckBox.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCCheckBox.Designer.cs">
|
||||||
|
<DependentUpon>UCCheckBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCHelper\Ext.cs" />
|
||||||
|
<Compile Include="UCHelper\MouseHook.cs" />
|
||||||
|
<Compile Include="NaviButton2.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="NaviButton2.Designer.cs">
|
||||||
|
<DependentUpon>NaviButton2.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="NaviButton.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="NaviButton.Designer.cs">
|
||||||
|
<DependentUpon>NaviButton.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="NumKeyboard.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="NumKeyboard.Designer.cs">
|
||||||
|
<DependentUpon>NumKeyboard.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="PanelEnhanced.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="PanelEnhanced.Designer.cs">
|
||||||
|
<DependentUpon>PanelEnhanced.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="PanelExt.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="PanelExt.Designer.cs">
|
||||||
|
<DependentUpon>PanelExt.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ScrollBar\ScrollbarComponent.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ScrollBar\ScrollbarControlDesigner.cs" />
|
||||||
|
<Compile Include="ScrollBar\UCHScrollbar.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ScrollBar\UCVScrollbar.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SimpleLed.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SimpleLed.Designer.cs">
|
||||||
|
<DependentUpon>SimpleLed.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TextSet2.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TextSet2.Designer.cs">
|
||||||
|
<DependentUpon>TextSet2.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TextSet.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TextSet.Designer.cs">
|
||||||
|
<DependentUpon>TextSet.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Title.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Title.Designer.cs">
|
||||||
|
<DependentUpon>Title.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="FanShapedSchedule.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="FanShapedSchedule.Designer.cs">
|
||||||
|
<DependentUpon>FanShapedSchedule.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ProcessEllipse.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ProcessEllipse.Designer.cs">
|
||||||
|
<DependentUpon>ProcessEllipse.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TitleTime.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TitleTime.Designer.cs">
|
||||||
|
<DependentUpon>TitleTime.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Toggle.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Toggle.Designer.cs">
|
||||||
|
<DependentUpon>Toggle.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TotalQty.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="TotalQty.Designer.cs">
|
||||||
|
<DependentUpon>TotalQty.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CPK.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CPK.Designer.cs">
|
||||||
|
<DependentUpon>CPK.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCBlower.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCBlower.Designer.cs">
|
||||||
|
<DependentUpon>UCBlower.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCControlBase.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCControlBase.Designer.cs">
|
||||||
|
<DependentUpon>UCControlBase.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCElectricityMeterH.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCElectricityMeterH.Designer.cs">
|
||||||
|
<DependentUpon>UCElectricityMeterH.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCElectricityMeterV.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCElectricityMeterV.Designer.cs">
|
||||||
|
<DependentUpon>UCElectricityMeterV.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCFengSu.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCFengSu.Designer.cs">
|
||||||
|
<DependentUpon>UCFengSu.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCHelper\ControlHelper.cs" />
|
||||||
|
<Compile Include="UCHelper\DpiControl.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCHelper\DpiHelper.cs" />
|
||||||
|
<Compile Include="UCHelper\IDpiControl.cs" />
|
||||||
|
<Compile Include="UCHelper\MainThreadAnimationControl.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCHelper\NativeMethods.cs" />
|
||||||
|
<Compile Include="UCHelper\PropertyOrderPair.cs" />
|
||||||
|
<Compile Include="UCHelper\WindowsHook.cs" />
|
||||||
|
<Compile Include="UCLed.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCLed.Designer.cs">
|
||||||
|
<DependentUpon>UCLed.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCLedAvatar.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCLedAvatar.Designer.cs">
|
||||||
|
<DependentUpon>UCLedAvatar.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ucPanel_400_200.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ucPanel_400_200.Designer.cs">
|
||||||
|
<DependentUpon>ucPanel_400_200.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ucPanel_900_450.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ucPanel_900_450.Designer.cs">
|
||||||
|
<DependentUpon>ucPanel_900_450.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCHelper\PropertyOrderAttribute.cs" />
|
||||||
|
<Compile Include="UCHelper\PropertyOrderConverter.cs" />
|
||||||
|
<Compile Include="UCRollText.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCRollText.Designer.cs">
|
||||||
|
<DependentUpon>UCRollText.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCSplitLine_H.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCSplitLine_H.Designer.cs">
|
||||||
|
<DependentUpon>UCSplitLine_H.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCSplitLine_V.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UCSplitLine_V.Designer.cs">
|
||||||
|
<DependentUpon>UCSplitLine_V.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UpDownLabel.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UpDownLabel.Designer.cs">
|
||||||
|
<DependentUpon>UpDownLabel.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UserStateChangedEvent.cs" />
|
||||||
|
<Compile Include="UserStateMonitor.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Wave.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Wave.Designer.cs">
|
||||||
|
<DependentUpon>Wave.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="WaveProcess.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="WaveProcess.Designer.cs">
|
||||||
|
<DependentUpon>WaveProcess.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="WithBgBox.cs">
|
||||||
|
<SubType>UserControl</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="WithBgBox.Designer.cs">
|
||||||
|
<DependentUpon>WithBgBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="ArrTotalQty.resx">
|
||||||
|
<DependentUpon>ArrTotalQty.cs</DependentUpon>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="DataGridView\UCDataGridView.resx">
|
||||||
|
<DependentUpon>UCDataGridView.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="DataGridView\UCDataGridViewRow.resx">
|
||||||
|
<DependentUpon>UCDataGridViewRow.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="DataGridView\UCDataGridViewTreeRow.resx">
|
||||||
|
<DependentUpon>UCDataGridViewTreeRow.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="DialPlate.resx">
|
||||||
|
<DependentUpon>DialPlate.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Forms\FrmBase.resx">
|
||||||
|
<DependentUpon>FrmBase.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Forms\FrmTransparent.resx">
|
||||||
|
<DependentUpon>FrmTransparent.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Forms\FrmWaiting.resx">
|
||||||
|
<DependentUpon>FrmWaiting.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="LongTitle.resx">
|
||||||
|
<DependentUpon>LongTitle.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="LongTitleStyle2.resx">
|
||||||
|
<DependentUpon>LongTitleStyle2.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="StatusExt.resx">
|
||||||
|
<DependentUpon>StatusExt.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="TButton.resx">
|
||||||
|
<DependentUpon>TButton.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="TitleButton.resx">
|
||||||
|
<DependentUpon>TitleButton.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="NaviButton2.resx">
|
||||||
|
<DependentUpon>NaviButton2.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="NaviButton.resx">
|
||||||
|
<DependentUpon>NaviButton.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="NumKeyboard.resx">
|
||||||
|
<DependentUpon>NumKeyboard.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="ProcessEllipse.resx">
|
||||||
|
<DependentUpon>ProcessEllipse.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="ScrollBar\UCVScrollbar.resx">
|
||||||
|
<DependentUpon>UCVScrollbar.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="SidebarNavigation.resx">
|
||||||
|
<DependentUpon>SidebarNavigation.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="SimpleLed.resx">
|
||||||
|
<DependentUpon>SimpleLed.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="TextSet2.resx">
|
||||||
|
<DependentUpon>TextSet2.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="TextSet.resx">
|
||||||
|
<DependentUpon>TextSet.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Title.resx">
|
||||||
|
<DependentUpon>Title.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="TitleTime.resx">
|
||||||
|
<DependentUpon>TitleTime.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Toggle.resx">
|
||||||
|
<DependentUpon>Toggle.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="TotalQty.resx">
|
||||||
|
<DependentUpon>TotalQty.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="CPK.resx">
|
||||||
|
<DependentUpon>CPK.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="UCBlower.resx">
|
||||||
|
<DependentUpon>UCBlower.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="UCCheckBox.resx">
|
||||||
|
<DependentUpon>UCCheckBox.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="UCElectricityMeterH.resx">
|
||||||
|
<DependentUpon>UCElectricityMeterH.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="UCElectricityMeterV.resx">
|
||||||
|
<DependentUpon>UCElectricityMeterV.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="UCFengSu.resx">
|
||||||
|
<DependentUpon>UCFengSu.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="ucPanel_400_200.resx">
|
||||||
|
<DependentUpon>ucPanel_400_200.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="ucPanel_900_450.resx">
|
||||||
|
<DependentUpon>ucPanel_900_450.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="UCSplitLine_H.resx">
|
||||||
|
<DependentUpon>UCSplitLine_H.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="UCSplitLine_V.resx">
|
||||||
|
<DependentUpon>UCSplitLine_V.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="UpDownLabel.resx">
|
||||||
|
<DependentUpon>UpDownLabel.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="WaveProcess.resx">
|
||||||
|
<DependentUpon>WaveProcess.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="WithBgBox.resx">
|
||||||
|
<DependentUpon>WithBgBox.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="app.config" />
|
||||||
|
<None Include="packages.config" />
|
||||||
|
<None Include="Resources\RightUnSelected.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\LeftSelected.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\LeftUnSelected.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\RightSelected.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\Title.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\6.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\蓝色.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\bg2.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\标题_03.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\2bg.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\4.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\标题_03右.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\标题_04.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\开机时间.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\运行时间.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\常规按钮.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\LeftUnSelected2.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\RightUnSelected3.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\LeftSelected3.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\LeftUnSelected3.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\RightSelected3.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\TotalQty.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\数字指标.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\big_arrow_l.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\big_box.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\big_box_l.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\big_box_s.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\big_box_super.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\big_arrow.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\组 178 拷贝.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\星球地球科技蓝色转动动图压缩86.9.gif" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\Green.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\Red.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\61.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\JinYuan.Models\JinYuan.Models.csproj">
|
||||||
|
<Project>{4c0bcb84-5cd7-4846-8363-c4c10d46e391}</Project>
|
||||||
|
<Name>JinYuan.Models</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\loading.gif" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\caret-down.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\caret-right.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class LightweightGridPanel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
//this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,150 @@
|
|||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public partial class LightweightGridPanel : Panel
|
||||||
|
{
|
||||||
|
public int Rows { get; set; }
|
||||||
|
public int Columns { get; set; }
|
||||||
|
public int CellSize { get; set; }
|
||||||
|
public int HeaderHeight { get; set; }
|
||||||
|
public int RowHeaderWidth { get; set; }
|
||||||
|
public int BorderWidth { get; set; } = 1;
|
||||||
|
|
||||||
|
private bool _styleSet = false;
|
||||||
|
|
||||||
|
public LightweightGridPanel(int rows, int cols, int cellSize, int headerHeight, int rowHeaderWidth)
|
||||||
|
{
|
||||||
|
Rows = rows;
|
||||||
|
Columns = cols;
|
||||||
|
CellSize = cellSize;
|
||||||
|
HeaderHeight = headerHeight;
|
||||||
|
RowHeaderWidth = rowHeaderWidth;
|
||||||
|
|
||||||
|
DoubleBuffered = true;
|
||||||
|
SetControlStyles();
|
||||||
|
UpdateStyles();
|
||||||
|
|
||||||
|
CalculateAndSetSize();
|
||||||
|
|
||||||
|
BackColor = Color.FromArgb(28, 40, 55);
|
||||||
|
BorderStyle = BorderStyle.FixedSingle;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 尺寸计算
|
||||||
|
/// </summary>
|
||||||
|
private void CalculateAndSetSize()
|
||||||
|
{
|
||||||
|
// 总宽度 = 行号列宽度 + 列数*单元格尺寸 + (列数+1)*边框宽度
|
||||||
|
int totalWidth = RowHeaderWidth + (Columns * CellSize) + (Columns + 1) * BorderWidth;
|
||||||
|
// 总高度 = 表头高度 + 行数*单元格尺寸 + (行数+1)*边框宽度
|
||||||
|
int totalHeight = HeaderHeight + (Rows * CellSize) + (Rows + 1) * BorderWidth;
|
||||||
|
|
||||||
|
// 关键:设置最小/最大尺寸,同时允许手动调整(避免固定死导致适配问题)
|
||||||
|
MinimumSize = new Size(totalWidth, totalHeight);
|
||||||
|
Size = MinimumSize;
|
||||||
|
MaximumSize = new Size(totalWidth + 100, totalHeight + 100); // 留余量
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetControlStyles()
|
||||||
|
{
|
||||||
|
if (_styleSet) return;
|
||||||
|
|
||||||
|
// 仅保留必要的双缓冲样式,关闭ResizeRedraw
|
||||||
|
SetStyle(ControlStyles.OptimizedDoubleBuffer |
|
||||||
|
ControlStyles.AllPaintingInWmPaint |
|
||||||
|
ControlStyles.UserPaint, true);
|
||||||
|
SetStyle(ControlStyles.ResizeRedraw, false);
|
||||||
|
|
||||||
|
_styleSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 控件位置/尺寸计算,确保在可视区域内
|
||||||
|
/// </summary>
|
||||||
|
public void AddControl(Control ctrl, int row, int col)
|
||||||
|
{
|
||||||
|
if (ctrl == null) return;
|
||||||
|
|
||||||
|
int x = 0, y = 0;
|
||||||
|
int ctrlWidth = 0, ctrlHeight = 0;
|
||||||
|
|
||||||
|
// 左上角角落(行\列)
|
||||||
|
if (row == 0 && col == 0)
|
||||||
|
{
|
||||||
|
x = BorderWidth;
|
||||||
|
y = BorderWidth;
|
||||||
|
ctrlWidth = RowHeaderWidth - BorderWidth * 2;
|
||||||
|
ctrlHeight = HeaderHeight - BorderWidth * 2;
|
||||||
|
}
|
||||||
|
// 表头列(列号)
|
||||||
|
else if (row == 0)
|
||||||
|
{
|
||||||
|
x = RowHeaderWidth + (col - 1) * (CellSize + BorderWidth) + BorderWidth;
|
||||||
|
y = BorderWidth;
|
||||||
|
ctrlWidth = CellSize - BorderWidth * 2;
|
||||||
|
ctrlHeight = HeaderHeight - BorderWidth * 2;
|
||||||
|
}
|
||||||
|
// 行号列
|
||||||
|
else if (col == 0)
|
||||||
|
{
|
||||||
|
x = BorderWidth;
|
||||||
|
y = HeaderHeight + (row - 1) * (CellSize + BorderWidth) + BorderWidth;
|
||||||
|
ctrlWidth = RowHeaderWidth - BorderWidth * 2;
|
||||||
|
ctrlHeight = CellSize - BorderWidth * 2;
|
||||||
|
}
|
||||||
|
// 电池控件(数据区)
|
||||||
|
else
|
||||||
|
{
|
||||||
|
x = RowHeaderWidth + (col - 1) * CellSize + (col) * BorderWidth;
|
||||||
|
y = HeaderHeight + (row - 1) * CellSize + (row) * BorderWidth;
|
||||||
|
ctrlWidth = CellSize - BorderWidth * 2;
|
||||||
|
ctrlHeight = CellSize - BorderWidth * 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 强制设置控件尺寸(避免尺寸为0)
|
||||||
|
ctrl.Size = new Size(Math.Max(10, ctrlWidth), Math.Max(10, ctrlHeight));
|
||||||
|
ctrl.Location = new Point(x, y);
|
||||||
|
ctrl.Margin = new Padding(0);
|
||||||
|
ctrl.Padding = new Padding(0);
|
||||||
|
ctrl.Dock = DockStyle.None;
|
||||||
|
ctrl.Visible = true;
|
||||||
|
|
||||||
|
// 确保子控件在最上层绘制
|
||||||
|
ctrl.BringToFront();
|
||||||
|
Controls.Add(ctrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 重写SetStyle,直接调用基类
|
||||||
|
protected new void SetStyle(ControlStyles flags, bool value)
|
||||||
|
{
|
||||||
|
base.SetStyle(flags, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnSizeChanged(EventArgs e)
|
||||||
|
{
|
||||||
|
base.OnSizeChanged(e);
|
||||||
|
|
||||||
|
// 确保控件重新布局
|
||||||
|
if (Controls.Count > 0)
|
||||||
|
{
|
||||||
|
Invalidate(); // 触发重绘
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加网格线抗锯齿
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
|
||||||
|
e.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
|
||||||
|
|
||||||
|
base.OnPaint(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class ListViewEx
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public partial class ListViewEx : ListView
|
||||||
|
{
|
||||||
|
|
||||||
|
StringFormat sf = new StringFormat { Alignment = StringAlignment.Near, LineAlignment = StringAlignment.Center };//字体水平位置居左,垂直居中
|
||||||
|
|
||||||
|
public ListViewEx()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.OwnerDraw = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListViewEx(IContainer container)
|
||||||
|
{
|
||||||
|
container.Add(this);
|
||||||
|
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private Brush bgColor = Brushes.DodgerBlue;
|
||||||
|
[CategoryAttribute("自定义")]
|
||||||
|
[DescriptionAttribute("背景颜色")]
|
||||||
|
public Brush BgColor
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
bgColor = value;
|
||||||
|
}
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return bgColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Brush fontColor = Brushes.White;
|
||||||
|
[CategoryAttribute("自定义")]
|
||||||
|
[DescriptionAttribute("字体颜色")]
|
||||||
|
public Brush FontColor
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
fontColor = value;
|
||||||
|
}
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return fontColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected override void OnDrawColumnHeader(DrawListViewColumnHeaderEventArgs e)
|
||||||
|
{
|
||||||
|
//e.DrawBackground();
|
||||||
|
e.Graphics.FillRectangle(BgColor, e.Bounds); //设置背景颜色
|
||||||
|
Font font = new Font("微软雅黑", 12, FontStyle.Bold); //设置字体大小
|
||||||
|
e.Graphics.DrawString(e.Header.Text, font, FontColor, e.Bounds, sf); //设置字体颜色
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnDrawItem(DrawListViewItemEventArgs e)
|
||||||
|
{
|
||||||
|
e.DrawDefault = true; //采用系统默认方式绘制项
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnDrawSubItem(DrawListViewSubItemEventArgs e)
|
||||||
|
{
|
||||||
|
e.DrawDefault = true; //采用系统默认方式绘制项
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class LogListBox
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
class LogItem
|
||||||
|
{
|
||||||
|
public String info;
|
||||||
|
public int index;
|
||||||
|
public Color color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public partial class LogListBox : ListBox
|
||||||
|
{
|
||||||
|
|
||||||
|
private int m_nMaxLength = 1000;
|
||||||
|
[CategoryAttribute("自定义")]
|
||||||
|
[DescriptionAttribute("日志最大显示条数")]
|
||||||
|
public int MaxLength
|
||||||
|
{
|
||||||
|
set
|
||||||
|
{
|
||||||
|
m_nMaxLength = value;
|
||||||
|
}
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return m_nMaxLength;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Dictionary<int, LogItem> m_dicItems = new Dictionary<int, LogItem>();
|
||||||
|
|
||||||
|
public LogListBox()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LogListBox(IContainer container)
|
||||||
|
{
|
||||||
|
container.Add(this);
|
||||||
|
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnDrawItem(DrawItemEventArgs e)
|
||||||
|
{
|
||||||
|
e.DrawBackground();
|
||||||
|
e.DrawFocusRectangle();
|
||||||
|
// 确保listbox中有日志且该日志被记录在字典中
|
||||||
|
if (e.Index >= 0 && m_dicItems.Keys.Contains(e.Index))
|
||||||
|
{
|
||||||
|
e.Graphics.DrawString(m_dicItems[e.Index].info, Font, new SolidBrush(m_dicItems[e.Index].color), e.Bounds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnMeasureItem(MeasureItemEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnMeasureItem(e);
|
||||||
|
e.ItemHeight = 16;
|
||||||
|
}
|
||||||
|
public void AddLog(String log, Color color)
|
||||||
|
{
|
||||||
|
ModefyItems();
|
||||||
|
LogItem item = new LogItem();
|
||||||
|
String showLog = String.Format("[{0}] {1}", DateTime.Now.ToString("HH:mm:ss"), log);
|
||||||
|
item.info = showLog;
|
||||||
|
item.color = color;
|
||||||
|
|
||||||
|
item.index = Items.Add(log);
|
||||||
|
if (!m_dicItems.Keys.Contains(item.index))
|
||||||
|
m_dicItems.Add(item.index, item);
|
||||||
|
SelectedIndex = item.index;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Clear()
|
||||||
|
{
|
||||||
|
Items.Clear();
|
||||||
|
m_dicItems.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ModefyItems()
|
||||||
|
{
|
||||||
|
if (Items.Count >= m_nMaxLength)
|
||||||
|
{
|
||||||
|
Items.RemoveAt(0);
|
||||||
|
for (int n = 0; n < m_dicItems.Count - 1; n++)
|
||||||
|
{
|
||||||
|
if (m_dicItems.Keys.Contains(n) && m_dicItems.Keys.Contains(n + 1))
|
||||||
|
{
|
||||||
|
m_dicItems[n].info = m_dicItems[n + 1].info;
|
||||||
|
m_dicItems[n].color = m_dicItems[n + 1].color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_dicItems.Remove(m_dicItems.Count - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Generated
+68
@@ -0,0 +1,68 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class LongTitle
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.lbl_Title = new System.Windows.Forms.Label();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// lbl_Title
|
||||||
|
//
|
||||||
|
this.lbl_Title.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.lbl_Title.Font = new System.Drawing.Font("微软雅黑", 16F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))));
|
||||||
|
this.lbl_Title.ForeColor = System.Drawing.Color.White;
|
||||||
|
this.lbl_Title.Location = new System.Drawing.Point(35, 0);
|
||||||
|
this.lbl_Title.Margin = new System.Windows.Forms.Padding(50, 0, 0, 0);
|
||||||
|
this.lbl_Title.Name = "lbl_Title";
|
||||||
|
this.lbl_Title.Size = new System.Drawing.Size(205, 52);
|
||||||
|
this.lbl_Title.TabIndex = 0;
|
||||||
|
this.lbl_Title.Text = "标题名称";
|
||||||
|
this.lbl_Title.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
|
// LongTitle
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 19F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.BackgroundImage = global::JinYuan.ControlLib.Properties.Resources.标题_03左;
|
||||||
|
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
|
this.Controls.Add(this.lbl_Title);
|
||||||
|
this.DoubleBuffered = true;
|
||||||
|
this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold);
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
|
||||||
|
this.Name = "LongTitle";
|
||||||
|
this.Size = new System.Drawing.Size(543, 52);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label lbl_Title;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public partial class LongTitle : UserControl
|
||||||
|
{
|
||||||
|
public LongTitle()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
//设置控件样式,去除缓冲
|
||||||
|
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
this.SetStyle(ControlStyles.DoubleBuffer, true);
|
||||||
|
this.SetStyle(ControlStyles.ResizeRedraw, true);
|
||||||
|
this.SetStyle(ControlStyles.Selectable, true);
|
||||||
|
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool isRight = true;
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置或显示导航按钮是否为右边")]
|
||||||
|
public bool IsRight
|
||||||
|
{
|
||||||
|
get { return isRight; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
isRight = value;
|
||||||
|
UpdataImage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private string titleName = "标题名称";
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置或显示标题名称")]
|
||||||
|
|
||||||
|
public string TitleName
|
||||||
|
{
|
||||||
|
get { return titleName; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
titleName = value;
|
||||||
|
this.lbl_Title.Text = titleName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///统一更新背景
|
||||||
|
/// </summary>
|
||||||
|
private void UpdataImage()
|
||||||
|
{
|
||||||
|
if (this.isRight)
|
||||||
|
{
|
||||||
|
lbl_Title.Dock = DockStyle.Right;
|
||||||
|
this.BackgroundImage = Properties.Resources.标题_03右;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lbl_Title.Dock = DockStyle.Left;
|
||||||
|
this.BackgroundImage = Properties.Resources.标题_03左;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
+68
@@ -0,0 +1,68 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class LongTitleStyle2
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LongTitleStyle2));
|
||||||
|
this.lbl_Title = new System.Windows.Forms.Label();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// lbl_Title
|
||||||
|
//
|
||||||
|
this.lbl_Title.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.lbl_Title.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.lbl_Title.Font = new System.Drawing.Font("微软雅黑", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||||
|
this.lbl_Title.ForeColor = System.Drawing.Color.White;
|
||||||
|
this.lbl_Title.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.lbl_Title.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||||
|
this.lbl_Title.Name = "lbl_Title";
|
||||||
|
this.lbl_Title.Size = new System.Drawing.Size(233, 41);
|
||||||
|
this.lbl_Title.TabIndex = 1;
|
||||||
|
this.lbl_Title.Text = "标题名称";
|
||||||
|
this.lbl_Title.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||||
|
//
|
||||||
|
// LongTitleStyle2
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
|
||||||
|
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
|
this.Controls.Add(this.lbl_Title);
|
||||||
|
this.DoubleBuffered = true;
|
||||||
|
this.Name = "LongTitleStyle2";
|
||||||
|
this.Size = new System.Drawing.Size(233, 41);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label lbl_Title;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
public partial class LongTitleStyle2 : UserControl
|
||||||
|
{
|
||||||
|
public LongTitleStyle2()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
//设置控件样式,去除缓冲
|
||||||
|
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||||
|
this.SetStyle(ControlStyles.DoubleBuffer, true);
|
||||||
|
this.SetStyle(ControlStyles.ResizeRedraw, true);
|
||||||
|
this.SetStyle(ControlStyles.Selectable, true);
|
||||||
|
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private string titleName = "标题名称";
|
||||||
|
[Browsable(true)]//是否可见
|
||||||
|
[Category("自定义属性")] //类别
|
||||||
|
[Description("设置或显示标题名称")]
|
||||||
|
|
||||||
|
public string TitleName
|
||||||
|
{
|
||||||
|
get { return titleName; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
titleName = value;
|
||||||
|
this.lbl_Title.Text = titleName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,256 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="$this.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAAkcAAAApCAYAAAA/Io30AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
|
||||||
|
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKNWlDQ1BzUkdCIElFQzYxOTY2LTIuMQAA
|
||||||
|
SMedlndUVNcWh8+9d3qhzTDSGXqTLjCA9C4gHQRRGGYGGMoAwwxNbIioQEQREQFFkKCAAaOhSKyIYiEo
|
||||||
|
qGAPSBBQYjCKqKhkRtZKfHl57+Xl98e939pn73P32XuftS4AJE8fLi8FlgIgmSfgB3o401eFR9Cx/QAG
|
||||||
|
eIABpgAwWempvkHuwUAkLzcXerrICfyL3gwBSPy+ZejpT6eD/0/SrFS+AADIX8TmbE46S8T5Ik7KFKSK
|
||||||
|
7TMipsYkihlGiZkvSlDEcmKOW+Sln30W2VHM7GQeW8TinFPZyWwx94h4e4aQI2LER8QFGVxOpohvi1gz
|
||||||
|
SZjMFfFbcWwyh5kOAIoktgs4rHgRm4iYxA8OdBHxcgBwpLgvOOYLFnCyBOJDuaSkZvO5cfECui5Lj25q
|
||||||
|
bc2ge3IykzgCgaE/k5XI5LPpLinJqUxeNgCLZ/4sGXFt6aIiW5paW1oamhmZflGo/7r4NyXu7SK9Cvjc
|
||||||
|
M4jW94ftr/xS6gBgzIpqs+sPW8x+ADq2AiB3/w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7x3TN
|
||||||
|
rcyzzLmGOdjzMXPzw3WeZt7uW+fv/prLDfM6c/wTmuuB+R868aDGhqemLyhDFSuIG8Nr/CCWAHFl9OyF
|
||||||
|
ZYygdNwhDjkmwUTFKuKVYxdxjJgWmVZjHyVx0GUnPooZlRg7HVNNjLuOw8RnQ5yOOJ4bYrxp+oCmVzBt
|
||||||
|
vqLdf3T5E3sUL68qz/8ZLH2R8sXyP91+H9jQCZNaAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
namespace JinYuan.ControlLib.Models
|
||||||
|
{
|
||||||
|
//子组大小:这个与计算内的CPK值又非常打的关系,即是分组的样本个数,数据的分组在此处需要说明的是,必须
|
||||||
|
//是根据实际情况来填写,比如每次抽样为5个,那么子组大小为5个,我们不能随心所欲的任意填写这个值,否则
|
||||||
|
//将没有实际意义。
|
||||||
|
//上规格:用户录入的上规格值
|
||||||
|
//目标值:用户输入的目标值,即期望达到的中心值
|
||||||
|
//下规格:用户输入的下规格值
|
||||||
|
|
||||||
|
|
||||||
|
public class CPKModel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 总样本数 。参与分析的数据的个数
|
||||||
|
/// </summary>
|
||||||
|
public int TotalNumber { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 图表类型 .说明进行分析的控制图的类型,此处为XR控制图
|
||||||
|
/// </summary>
|
||||||
|
public string ChartType { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 平均值 所有样本数据的平均值
|
||||||
|
/// </summary>
|
||||||
|
public double MeanVlaue { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 最大值 所有样本的最大值
|
||||||
|
/// </summary>
|
||||||
|
public double MaxValue { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 最小值
|
||||||
|
/// </summary>
|
||||||
|
public double MinValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 正的3倍标准差线
|
||||||
|
/// </summary>
|
||||||
|
public double Pos3Sigma { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 负的3倍标准差线
|
||||||
|
/// </summary>
|
||||||
|
public double Neg3Sigma { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 组内标准差值
|
||||||
|
/// </summary>
|
||||||
|
public double GroupSTDEV { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 整体标准差值
|
||||||
|
/// </summary>
|
||||||
|
public double WholeSTDEV { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组内CPK值 工序能力指数,与规格值及上述标准差值相关联
|
||||||
|
/// </summary>
|
||||||
|
public double GroupCPK { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 整体CPK值 工序能力指数,与规格值及上述标准差值相关联
|
||||||
|
/// </summary>
|
||||||
|
public double WholeCPK { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组内CP值 Cp值是衡量过程满足产品品质标准的成都,也叫制程精密度,Cp值越大,表示过程变异越小,过程能力越差
|
||||||
|
/// </summary>
|
||||||
|
public double GroupCP { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 整体CP值 Cp值是衡量过程满足产品品质标准的成都,也叫制程精密度,Cp值越大,表示过程变异越小,过程能力越差
|
||||||
|
/// </summary>
|
||||||
|
public double WholeCP { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组内CPL值 相对应于下规格的工序能力值;
|
||||||
|
/// </summary>
|
||||||
|
public double GroupCPL { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 整体CPL值 相对应于下规格的工序能力值;
|
||||||
|
/// </summary>
|
||||||
|
public double WholeCPL { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组内CPU值 相对应于上规格的工序能力值;
|
||||||
|
/// </summary>
|
||||||
|
public double GroupCPU { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 整体CPU值 相对应于上规格的工序能力值;
|
||||||
|
/// </summary>
|
||||||
|
public double WholeCPU { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组内PPM<LSL值,预测的低于下规格值的不合格品数(PPM -百万分之比)
|
||||||
|
/// </summary>
|
||||||
|
public double GroupPPM_LSL { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 整体PPM<LSL值,预测的低于下规格值的不合格品数(PPM -百万分之比);
|
||||||
|
/// </summary>
|
||||||
|
public double WholePPM_LSL { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 实际检测PPM<LSL值,预测的低于下规格值的不合格品数(PPM -百万分之比);
|
||||||
|
/// </summary>
|
||||||
|
public double MeasuredPPM_LSL { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 组内PPM<USL值,预测的低于上规格值的不合格品数(PPM -百万分之比)
|
||||||
|
/// </summary>
|
||||||
|
public double GroupPPM_USL { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 整体PPM<USL值,预测的低于上规格值的不合格品数(PPM -百万分之比);
|
||||||
|
/// </summary>
|
||||||
|
public double WholePPM_USL { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 实际检测PPM<USL值,预测的低于上规格值的不合格品数(PPM -百万分之比)
|
||||||
|
/// </summary>
|
||||||
|
public double MeasuredPPM_USL { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 组内PPM Total值,预测的总的不合格品数
|
||||||
|
/// </summary>
|
||||||
|
public double GroupPPM_Total { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 整体PPM<USL值,预测的总的不合格品数
|
||||||
|
/// </summary>
|
||||||
|
public double WholePPM_Total { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 实际检测PPM<USL值,预测的总的不合格品数
|
||||||
|
/// </summary>
|
||||||
|
public double MeasuredPPM_Total { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 制程准确度,值越小越好
|
||||||
|
/// </summary>
|
||||||
|
public double CA { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
+66
@@ -0,0 +1,66 @@
|
|||||||
|
namespace JinYuan.ControlLib
|
||||||
|
{
|
||||||
|
partial class NaviButton
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 必需的设计器变量。
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清理所有正在使用的资源。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 组件设计器生成的代码
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设计器支持所需的方法 - 不要修改
|
||||||
|
/// 使用代码编辑器修改此方法的内容。
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.lbl_Title = new System.Windows.Forms.Label();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// lbl_Title
|
||||||
|
//
|
||||||
|
this.lbl_Title.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
this.lbl_Title.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.lbl_Title.Font = new System.Drawing.Font("微软雅黑", 11F, System.Drawing.FontStyle.Bold);
|
||||||
|
this.lbl_Title.ForeColor = System.Drawing.Color.White;
|
||||||
|
this.lbl_Title.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.lbl_Title.Name = "lbl_Title";
|
||||||
|
this.lbl_Title.Size = new System.Drawing.Size(129, 43);
|
||||||
|
this.lbl_Title.TabIndex = 0;
|
||||||
|
this.lbl_Title.Text = "导航按钮";
|
||||||
|
this.lbl_Title.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
this.lbl_Title.Click += new System.EventHandler(this.lbl_Title_Click);
|
||||||
|
//
|
||||||
|
// NaviButton
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.BackgroundImage = global::JinYuan.ControlLib.Properties.Resources.LeftUnSelected;
|
||||||
|
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||||
|
this.Controls.Add(this.lbl_Title);
|
||||||
|
this.DoubleBuffered = true;
|
||||||
|
this.Name = "NaviButton";
|
||||||
|
this.Size = new System.Drawing.Size(129, 43);
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Label lbl_Title;
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user