From e39f5a762c3401ae38b0c064b10bd4c30effb6e4 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期三, 09 十月 2024 15:14:49 +0800 Subject: [PATCH] 新增单位管理(未完成) --- Service/HStation.Service.Basic.Core/GlobalUsings.cs | 7 Service/HStation.Service.Basic.Core/01-entity/Division.cs | 83 + Service/HStation.Service.Basic.Core/00-core/DbType.cs | 18 WinFrmUI/Yw.WinFrmUI.Unit.Core/GlobalUsings.cs | 1 Service/HStation.Service.Basic.Core/05-service/00-core/03-helper/DbFirstHelper.cs | 68 + WinFrmUI/Yw.WinFrmUI.Unit.Core/AddThreeLinkMainDlg.Designer.cs | 438 ++++++++ WinFrmUI/Yw.WinFrmUI.Unit.Core/SysUnitLangMainPanel.Designer.cs | 249 ++++ Service/HStation.Service.Basic.Core/02-model/ColourSpilt.cs | 59 + WinFrmUI/Yw.WinFrmUI.Unit.Core/EditThreeLinkMainDlg.resx | 126 ++ WinFrmUI/Yw.WinFrmUI.Unit.Core/AddThreeLinkMainDlg.cs | 60 + Service/HStation.Service.Basic.Core/05-service/00-core/02-cache/CacheHelper.cs | 30 Service/HStation.Service.Basic.Core/00-core/ConfigHelper.cs | 93 + Service/HStation.Service.Basic.Core/03-settings/00-core/XhsParasHelper.cs | 24 Service/HStation.Service.Basic.Core/03-settings/01-paras/01-database/Paras_Xhs_DataBase_Factory.cs | 18 Service/HStation.Service.Basic.Core/00-core/eValveSeriesType.cs | 50 + Service/HStation.Service.Basic.Core/00-core/eAdaptingType.cs | 25 Service/HStation.Service.Basic.Core/00-core/eRegionType.cs | 22 WinFrmUI/Yw.WinFrmUI.Unit.Core/SysUnitLangMainPanel.cs | 106 ++ Service/HStation.Service.Basic.Core/00-core/MemoryCacheKey.cs | 28 Desktop/HStation.Desktop.Xhs.Core/HStation.Desktop.Xhs.Core.csproj | 1 Service/HStation.Service.Basic.Core/00-core/eAlgorithmType.cs | 28 WinFrmUI/Yw.WinFrmUI.Unit.Core/AddThreeLinkMainDlg.resx | 126 ++ WinFrmUI/Yw.WinFrmUI.Unit.Core/EditThreeLinkMainDlg.cs | 55 + Service/HStation.Service.Basic.Core/03-settings/01-paras/01-database/Paras_Xhs_DataBase.cs | 28 HStation.Xhs.Core.sln | 63 + Service/HStation.Service.Basic.Core/03-settings/01-paras/01-database/Paras_Xhs_DataBase_SQLite.cs | 13 Service/HStation.Service.Basic.Core/03-settings/01-paras/00-core/XhsParas.cs | 13 WinFrmUI/Yw.WinFrmUI.Unit.Core/SysUnitLangViewModel.cs | 43 Service/HStation.Service.Basic.Core/03-settings/01-paras/02-cal/Paras_Xhs_CAL_HttpClient.cs | 13 WinFrmUI/Yw.WinFrmUI.Unit.Core/Yw.WinFrmUI.Unit.Core.csproj.user | 9 Service/HStation.Service.Basic.Core/03-settings/01-paras/01-database/Paras_Xhs_DataBase_PostgreSql.cs | 13 Service/HStation.Service.Basic.Core/03-settings/01-paras/02-cal/Paras_Xhs_CAL_LocalClient.cs | 9 Service/HStation.Service.Basic.Core/HStation.Service.Division.Core.csproj | 19 Service/HStation.Service.Basic.Core/00-core/DataType.cs | 13 Service/HStation.Service.Basic.Core/03-settings/01-paras/00-core/Paras_Xhs.cs | 23 Service/HStation.Service.Basic.Core/03-settings/01-paras/02-cal/Paras_Xhs_CAL.cs | 23 WinFrmUI/HStation.WinFrmUI.LinShi/HStation.WinFrmUI.LinShi.csproj | 9 WinFrmUI/Yw.WinFrmUI.Unit.Core/SysUnitLangMainPanel.resx | 211 ++++ Service/HStation.Service.Basic.Core/04-dal/01-interface/01-IAdaptingManage/IDivision.cs | 11 Service/HStation.Service.Basic.Core/01-entity/ColourSpilt.cs | 51 + Service/HStation.Service.Basic.Core/02-model/Division.cs | 109 ++ Service/HStation.Service.Basic.Core/05-service/00-core/01-dal/DALCreateHelper.cs | 23 WinFrmUI/Yw.WinFrmUI.Unit.Core/EditThreeLinkMainDlg.Designer.cs | 460 +++++++++ WinFrmUI/Yw.WinFrmUI.Unit.Core/Properties/DataSources/Yw.WinFrmUI.SysUnitLangViewModel.datasource | 10 WinFrmUI/Yw.WinFrmUI.Unit.Core/Yw.WinFrmUI.Unit.Core.csproj | 27 Service/HStation.Service.Basic.Core/03-settings/00-core/XhsFileHelper.cs | 65 + Service/HStation.Service.Basic.Core/00-core/Flags.cs | 18 47 files changed, 2,991 insertions(+), 0 deletions(-) diff --git a/Desktop/HStation.Desktop.Xhs.Core/HStation.Desktop.Xhs.Core.csproj b/Desktop/HStation.Desktop.Xhs.Core/HStation.Desktop.Xhs.Core.csproj index b9ac797..cf5baf6 100644 --- a/Desktop/HStation.Desktop.Xhs.Core/HStation.Desktop.Xhs.Core.csproj +++ b/Desktop/HStation.Desktop.Xhs.Core/HStation.Desktop.Xhs.Core.csproj @@ -72,6 +72,7 @@ <ProjectReference Include="..\..\WinFrmUI\HStation.WinFrmUI.Basic\HStation.WinFrmUI.Basic.csproj" /> <ProjectReference Include="..\..\WinFrmUI\HStation.WinFrmUI.Dict.Core\HStation.WinFrmUI.Dict.Core.csproj" /> <ProjectReference Include="..\..\WinFrmUI\HStation.WinFrmUI.Xhs.Core\HStation.WinFrmUI.Xhs.Core.csproj" /> + <ProjectReference Include="..\..\WinFrmUI\Yw.WinFrmUI.Unit.Core\Yw.WinFrmUI.Unit.Core.csproj" /> </ItemGroup> <ItemGroup> diff --git a/HStation.Xhs.Core.sln b/HStation.Xhs.Core.sln index fa1da47..31c5ef0 100644 --- a/HStation.Xhs.Core.sln +++ b/HStation.Xhs.Core.sln @@ -127,6 +127,12 @@ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yw.WinFrmUI.Hydro.L3d.Core", "WinFrmUI\Yw.WinFrmUI.Hydro.L3d.Core\Yw.WinFrmUI.Hydro.L3d.Core.csproj", "{1201C5C6-8762-4168-B6D6-C658B6D654E7}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HStation.WinFrmUI.LinShi", "WinFrmUI\HStation.WinFrmUI.LinShi\HStation.WinFrmUI.LinShi.csproj", "{10224C72-9484-452F-9C5E-66969F2922A5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HStation.Service.Division.Core", "Service\HStation.Service.Basic.Core\HStation.Service.Division.Core.csproj", "{265DFD37-FB36-444B-A766-CAB9BAB73D68}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yw.WinFrmUI.Unit.Core", "WinFrmUI\Yw.WinFrmUI.Unit.Core\Yw.WinFrmUI.Unit.Core.csproj", "{2274B96A-C41A-42B5-A4E7-1C0706DF5D48}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1058,6 +1064,60 @@ {1201C5C6-8762-4168-B6D6-C658B6D654E7}.Release|x64.Build.0 = Release|Any CPU {1201C5C6-8762-4168-B6D6-C658B6D654E7}.Release|x86.ActiveCfg = Release|Any CPU {1201C5C6-8762-4168-B6D6-C658B6D654E7}.Release|x86.Build.0 = Release|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.Debug|x64.ActiveCfg = Debug|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.Debug|x64.Build.0 = Debug|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.Debug|x86.ActiveCfg = Debug|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.Debug|x86.Build.0 = Debug|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.dll_test|Any CPU.ActiveCfg = Debug|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.dll_test|Any CPU.Build.0 = Debug|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.dll_test|x64.ActiveCfg = Debug|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.dll_test|x64.Build.0 = Debug|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.dll_test|x86.ActiveCfg = Debug|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.dll_test|x86.Build.0 = Debug|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.Release|Any CPU.Build.0 = Release|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.Release|x64.ActiveCfg = Release|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.Release|x64.Build.0 = Release|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.Release|x86.ActiveCfg = Release|Any CPU + {10224C72-9484-452F-9C5E-66969F2922A5}.Release|x86.Build.0 = Release|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.Debug|Any CPU.Build.0 = Debug|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.Debug|x64.ActiveCfg = Debug|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.Debug|x64.Build.0 = Debug|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.Debug|x86.ActiveCfg = Debug|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.Debug|x86.Build.0 = Debug|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.dll_test|Any CPU.ActiveCfg = Debug|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.dll_test|Any CPU.Build.0 = Debug|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.dll_test|x64.ActiveCfg = Debug|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.dll_test|x64.Build.0 = Debug|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.dll_test|x86.ActiveCfg = Debug|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.dll_test|x86.Build.0 = Debug|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.Release|Any CPU.ActiveCfg = Release|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.Release|Any CPU.Build.0 = Release|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.Release|x64.ActiveCfg = Release|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.Release|x64.Build.0 = Release|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.Release|x86.ActiveCfg = Release|Any CPU + {265DFD37-FB36-444B-A766-CAB9BAB73D68}.Release|x86.Build.0 = Release|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.Debug|x64.ActiveCfg = Debug|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.Debug|x64.Build.0 = Debug|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.Debug|x86.ActiveCfg = Debug|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.Debug|x86.Build.0 = Debug|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.dll_test|Any CPU.ActiveCfg = Debug|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.dll_test|Any CPU.Build.0 = Debug|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.dll_test|x64.ActiveCfg = Debug|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.dll_test|x64.Build.0 = Debug|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.dll_test|x86.ActiveCfg = Debug|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.dll_test|x86.Build.0 = Debug|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.Release|Any CPU.Build.0 = Release|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.Release|x64.ActiveCfg = Release|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.Release|x64.Build.0 = Release|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.Release|x86.ActiveCfg = Release|Any CPU + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1114,6 +1174,9 @@ {6BC4873C-FB0D-46F1-ADCD-C1FD96B29A5D} = {276C57AF-5A9C-4A50-A79E-A5098D322FE9} {0D096C38-89A7-4C18-A62D-74A70693DC9F} = {4F0A7BA1-6ED6-4F4F-A3B4-B9B3A133D869} {1201C5C6-8762-4168-B6D6-C658B6D654E7} = {4F0A7BA1-6ED6-4F4F-A3B4-B9B3A133D869} + {10224C72-9484-452F-9C5E-66969F2922A5} = {4F0A7BA1-6ED6-4F4F-A3B4-B9B3A133D869} + {265DFD37-FB36-444B-A766-CAB9BAB73D68} = {CF8E0A6C-9342-430D-BD10-6E1B5DE18571} + {2274B96A-C41A-42B5-A4E7-1C0706DF5D48} = {4F0A7BA1-6ED6-4F4F-A3B4-B9B3A133D869} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E02989A8-9B6F-43E5-AACA-790328215089} diff --git a/Service/HStation.Service.Basic.Core/00-core/ConfigHelper.cs b/Service/HStation.Service.Basic.Core/00-core/ConfigHelper.cs new file mode 100644 index 0000000..9f4fa11 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/00-core/ConfigHelper.cs @@ -0,0 +1,93 @@ +锘縩amespace HStation.Assets +{ + internal class ConfigHelper + { + /// <summary> + /// 榛樿杩炴帴閰嶇疆 + /// </summary> + internal static ConnectionConfig DefaultConnectionConfig + { + get + { + ConnectionConfig connectConfig = null; + switch (XhsParasHelper.Xhs.DataBase.DbType) + { + case DbType.PostgreSql: + { + connectConfig = PostgreSqlConnectionConfig; + } + break; + + case DbType.SQLite: + { + connectConfig = SQLiteConnectionConfig; + } + break; + + default: break; + } + return connectConfig; + } + } + + /// <summary> + /// PostgreSql杩炴帴閰嶇疆 + /// </summary> + internal static ConnectionConfig PostgreSqlConnectionConfig + { + get + { + //SnowFlakeSingle.WorkId = Settings.SqlSugar.SnowFlakeWorkId; 涓嶅悓鏈哄櫒閰嶇疆鐨勫敮涓�鏁板瓧; // 鍗曟湇鍔″櫒涓嶉渶瑕佹寚瀹� + return new ConnectionConfig() + { + DbType = SqlSugar.DbType.PostgreSQL,//鏁版嵁搴撶被鍨� + ConnectionString = XhsParasHelper.Xhs.DataBase.PostgreSql.ConnectString, + IsAutoCloseConnection = true,//鏄惁鑷姩鍏抽棴 + MoreSettings = new ConnMoreSettings() + { + //PgSqlIsAutoToLower = false //鏁版嵁搴撳瓨鍦ㄥぇ鍐欏瓧娈电殑 锛岄渶瑕佹妸杩欎釜璁句负false 锛屽苟涓斿疄浣撳拰瀛楁鍚嶇О瑕佷竴鏍� + }, + AopEvents = new AopEvents + { + OnLogExecuting = (sql, p) => + { + // var sqlString = UtilMethods.GetNativeSql(sql, p); + //LogHelper.Debug(sqlString); + // Console.WriteLine(sql); + } + } + }; + } + } + + /// <summary> + /// SQLite杩炴帴閰嶇疆 + /// </summary> + internal static ConnectionConfig SQLiteConnectionConfig + { + get + { + //SnowFlakeSingle.WorkId = Settings.SqlSugar.SnowFlakeWorkId; 涓嶅悓鏈哄櫒閰嶇疆鐨勫敮涓�鏁板瓧; // 鍗曟湇鍔″櫒涓嶉渶瑕佹寚瀹� + return new ConnectionConfig() + { + DbType = SqlSugar.DbType.Sqlite,//鏁版嵁搴撶被鍨� + ConnectionString = XhsParasHelper.Xhs.DataBase.SQLite.ConnectString, + IsAutoCloseConnection = true,//鏄惁鑷姩鍏抽棴 + MoreSettings = new ConnMoreSettings() + { + //PgSqlIsAutoToLower = false //鏁版嵁搴撳瓨鍦ㄥぇ鍐欏瓧娈电殑 锛岄渶瑕佹妸杩欎釜璁句负false 锛屽苟涓斿疄浣撳拰瀛楁鍚嶇О瑕佷竴鏍� + }, + AopEvents = new AopEvents + { + OnLogExecuting = (sql, p) => + { + // var sqlString = UtilMethods.GetNativeSql(sql, p); + //LogHelper.Debug(sqlString); + // Console.WriteLine(sql); + } + } + }; + } + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/00-core/DataType.cs b/Service/HStation.Service.Basic.Core/00-core/DataType.cs new file mode 100644 index 0000000..6a21483 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/00-core/DataType.cs @@ -0,0 +1,13 @@ +锘縩amespace HStation.Assets +{ + /// <summary> + /// + /// </summary> + internal class DataType + { + /// <summary> + /// 椤圭洰 + /// </summary> + public const string XhsProject = "xhs-project"; + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/00-core/DbType.cs b/Service/HStation.Service.Basic.Core/00-core/DbType.cs new file mode 100644 index 0000000..44631d9 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/00-core/DbType.cs @@ -0,0 +1,18 @@ +锘縩amespace HStation.Assets +{ + /// <summary> + /// + /// </summary> + internal class DbType + { + /// <summary> + /// + /// </summary> + public const string SQLite = "SQLite"; + + /// <summary> + /// + /// </summary> + public const string PostgreSql = "PostgreSql"; + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/00-core/Flags.cs b/Service/HStation.Service.Basic.Core/00-core/Flags.cs new file mode 100644 index 0000000..3c76ce4 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/00-core/Flags.cs @@ -0,0 +1,18 @@ +锘縩amespace HStation.Assets +{ + /// <summary> + /// + /// </summary> + internal class Flags + { + /// <summary> + /// + /// </summary> + public const string 榛樿 = "榛樿"; + + /// <summary> + /// + /// </summary> + public const string 涓氬姟 = "涓氬姟"; + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/00-core/MemoryCacheKey.cs b/Service/HStation.Service.Basic.Core/00-core/MemoryCacheKey.cs new file mode 100644 index 0000000..97af733 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/00-core/MemoryCacheKey.cs @@ -0,0 +1,28 @@ +锘縩amespace HStation.Assets +{ + /// <summary> + /// 鍐呭瓨缂撳瓨閿�-涓轰互鍚庡鍔犳竻闄ょ紦瀛樺仛鍑嗗 + /// </summary> + internal class MemoryCacheKey + { + /// <summary> + /// 鏈嶅姟灞傜骇 + /// </summary> + public const string ServiceLevel = "Service"; + + /// <summary> + /// 鎺ュ彛灞傜骇 + /// </summary> + public const string WebApiLevel = "WebApi"; + + /// <summary> + /// BLL灞傜骇 + /// </summary> + public const string BllLevel = "BLL"; + + /// <summary> + /// 妯″潡 + /// </summary> + public const string Module = "Xhs"; + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/00-core/eAdaptingType.cs b/Service/HStation.Service.Basic.Core/00-core/eAdaptingType.cs new file mode 100644 index 0000000..27cfe68 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/00-core/eAdaptingType.cs @@ -0,0 +1,25 @@ +锘縰sing System.ComponentModel.DataAnnotations; + +namespace HStation.Assets +{ + public enum eAdaptingType + { + /// <summary> + /// 寮ご + /// </summary> + [Display(Name = "寮ご")] + Elbow = 0, + + /// <summary> + /// 涓夐�� + /// </summary> + [Display(Name = "涓夐��")] + Tee = 1, + + /// <summary> + /// 鍥涢�� + /// </summary> + [Display(Name = "鍥涢��")] + Cross = 2, + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/00-core/eAlgorithmType.cs b/Service/HStation.Service.Basic.Core/00-core/eAlgorithmType.cs new file mode 100644 index 0000000..d5c3038 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/00-core/eAlgorithmType.cs @@ -0,0 +1,28 @@ +锘縰sing System.ComponentModel.DataAnnotations; + +namespace HStation.Assets +{ + /// <summary> + /// 绠楁硶绫诲瀷 + /// </summary> + public enum eAlgorithmType + { + /// <summary> + /// 娴锋.-濞佸粔濮嗘柉绯绘暟 + /// </summary> + [Display(Name = "娴锋.-濞佸粔濮嗘柉绯绘暟")] + Hazen = 0, + + /// <summary> + /// 杈捐タ-榄忔柉宸磋但绮楃硻搴︾郴鏁� + /// </summary> + [Display(Name = "杈捐タ-榄忔柉宸磋但绮楃硻搴︾郴鏁�")] + Darcy = 1, + + /// <summary> + /// 鏇煎畞绮楃硻绯绘暟 + /// </summary> + [Display(Name = "鏇煎畞绮楃硻绯绘暟")] + Manning = 2 + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/00-core/eRegionType.cs b/Service/HStation.Service.Basic.Core/00-core/eRegionType.cs new file mode 100644 index 0000000..28d789e --- /dev/null +++ b/Service/HStation.Service.Basic.Core/00-core/eRegionType.cs @@ -0,0 +1,22 @@ +锘縰sing System.ComponentModel.DataAnnotations; + +namespace HStation.Model +{ + /// <summary> + /// 琛屾斂鍖哄煙绫诲瀷 + /// </summary> + public enum eRegionType + { + [Display(Name = "鐪佸競鍖�")] + Province = 1, + + [Display(Name = "鍦扮骇甯�")] + City = 2, + + [Display(Name = "鍖哄幙")] + District = 3, + + [Display(Name = "琛楅亾")] + Street = 4, + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/00-core/eValveSeriesType.cs b/Service/HStation.Service.Basic.Core/00-core/eValveSeriesType.cs new file mode 100644 index 0000000..f9f549b --- /dev/null +++ b/Service/HStation.Service.Basic.Core/00-core/eValveSeriesType.cs @@ -0,0 +1,50 @@ +锘縰sing System.ComponentModel.DataAnnotations; +using System.Xml.Linq; + +namespace HStation.Assets +{ + public enum eValveSeriesType + { + /// <summary> + /// 鐞冮榾 + /// </summary> + [Display(Name = "鐞冮榾")] + PRV = 0, + + /// <summary> + /// 绋冲帇闃� + /// </summary> + [Display(Name = "绋冲帇闃�")] + PSV = 1, + + /// <summary> + /// 鍘嬪姏鍒跺姩闃� + /// </summary> + [Display(Name = "鍘嬪姏鍒跺姩闃�")] + PBV = 2, + + /// <summary> + /// 娴侀噺鎺у埗闃� + /// </summary> + [Display(Name = "娴侀噺鎺у埗闃�")] + FCV = 3, + + /// <summary> + /// 鑺傛祦鎺у埗闃� + /// </summary> + [Display(Name = "鑺傛祦鎺у埗闃�")] + TCV = 4, + + /// <summary> + /// 甯歌闃�闂� + /// </summary> + [Display(Name = "甯歌闃�闂�")] + GP锛� = 5, + + /// <summary> + /// 姝㈠洖闃� + /// </summary> + [Display(Name = "姝㈠洖闃�")] + CBV = 6 + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/01-entity/ColourSpilt.cs b/Service/HStation.Service.Basic.Core/01-entity/ColourSpilt.cs new file mode 100644 index 0000000..b879761 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/01-entity/ColourSpilt.cs @@ -0,0 +1,51 @@ +锘縰sing Yw.Entity; + +namespace HStation.Entity +{ + [SysType("assets_basic_colourspilt")] + [SugarTable("assets_basic_colourspilt")] + public class ColourSpilt : BaseEntity, System.ICloneable + { + public ColourSpilt() + { } + + public ColourSpilt(ColourSpilt rhs) + { + this.ID = rhs.ID; + this.Belong = rhs.Belong; + this.StartValue = rhs.StartValue; + this.EndValue = rhs.EndValue; + this.Color = rhs.Color; + } + + /// <summary> + /// 鎵�灞濱D + /// </summary> + public long Belong { get; set; } + + /// <summary> + /// 寮�濮嬪�� + /// </summary> + public decimal StartValue { get; set; } + + /// <summary> + /// 缁撴潫鍊� + /// </summary> + public decimal EndValue { get; set; } + + /// <summary> + /// 棰滆壊 + /// </summary> + public string Color { get; set; } + + public ColourSpilt Clone() + { + return (ColourSpilt)this.MemberwiseClone(); + } + + object ICloneable.Clone() + { + return this.MemberwiseClone(); + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/01-entity/Division.cs b/Service/HStation.Service.Basic.Core/01-entity/Division.cs new file mode 100644 index 0000000..54c1b35 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/01-entity/Division.cs @@ -0,0 +1,83 @@ +锘縰sing Yw.Entity; + +namespace HStation.Entity +{ + /// <summary> + /// 琛屾斂鍖哄煙 + /// </summary> + [SysType("assets_basic_region")] + [SugarTable("assets_basic_region")] + public class Division : BaseEntity, ITreeSorter, System.ICloneable + { + public Division() + { } + + public Division(Division rhs) : base(rhs) + { + this.Name = rhs.Name; + this.ParentIds = rhs.ParentIds; + this.Type = rhs.Type; + this.ADCode = rhs.ADCode; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鐖剁骇ID鍒楄〃 + /// </summary> + public string ParentIds { get; set; } + + /// <summary> + /// 绫诲瀷 + /// </summary> + public int Type { get; set; } + + /// <summary> + /// 楂樺痉鍦板浘鍩庡競缂栫爜 + /// </summary> + public string ADCode { get; set;} + + /// <summary> + /// 鏍囩鍒楄〃 + /// </summary> + public string Flags { get; set; } + + /// <summary> + /// 鏍囩鍚嶇О + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 浣跨敤鐘舵�� + /// </summary> + public int UseStatus { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + public Division Clone() + { + return (Division)this.MemberwiseClone(); + } + + object ICloneable.Clone() + { + return this.MemberwiseClone(); + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/02-model/ColourSpilt.cs b/Service/HStation.Service.Basic.Core/02-model/ColourSpilt.cs new file mode 100644 index 0000000..a8ef43b --- /dev/null +++ b/Service/HStation.Service.Basic.Core/02-model/ColourSpilt.cs @@ -0,0 +1,59 @@ +锘縰sing System.Drawing; +using Yw.Model; + +namespace HStation.Model +{ + public class ColourSpilt : BaseModel, System.ICloneable + { + public ColourSpilt() + { } + + public ColourSpilt(ColourSpilt rhs) + { + this.ID = rhs.ID; + this.Belong = rhs.Belong; + this.StartValue = rhs.StartValue; + this.EndValue = rhs.EndValue; + this.Color = rhs.Color; + } + + public void Reset(ColourSpilt rhs) + { + this.ID = rhs.ID; + this.Belong = rhs.Belong; + this.StartValue = rhs.StartValue; + this.EndValue = rhs.EndValue; + this.Color = rhs.Color; + } + + /// <summary> + /// 鎵�灞濱D + /// </summary> + public long Belong { get; set; } + + /// <summary> + /// 寮�濮嬪�� + /// </summary> + public decimal StartValue { get; set; } + + /// <summary> + /// 缁撴潫鍊� + /// </summary> + public decimal EndValue { get; set; } + + /// <summary> + /// 棰滆壊 + /// </summary> + public Color Color { get; set; } + + public ColourSpilt Clone() + { + return (ColourSpilt)this.MemberwiseClone(); + } + + object ICloneable.Clone() + { + return this.MemberwiseClone(); + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/02-model/Division.cs b/Service/HStation.Service.Basic.Core/02-model/Division.cs new file mode 100644 index 0000000..cf534d6 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/02-model/Division.cs @@ -0,0 +1,109 @@ +锘縰sing System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using Yw.Model; + +namespace ISupply.Model +{ + /// <summary> + /// 琛屾斂鍖哄煙 + /// </summary> + public class Division : BaseModel, System.ICloneable + { + public Division() + { } + + public Division(Division rhs) : base(rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.ParentIds = rhs.ParentIds; + this.Type = rhs.Type; + this.ADCode = rhs.ADCode; + this.Flags = rhs.Flags?.ToList(); + this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + public void Reset(Division rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.ParentIds = rhs.ParentIds; + this.Type = rhs.Type; + this.ADCode = rhs.ADCode; + this.Flags = rhs.Flags?.ToList(); + this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// 鍚嶇О + /// </summary> + [Display(Name = "鍚嶇О")] + public string Name { get; set; } + + /// <summary> + /// 鐖剁骇ID鍒楄〃 + /// </summary> + [Display(Name = "鐖剁骇ID鍒楄〃")] + public List<long> ParentIds { get; set; } + + /// <summary> + /// 绫诲瀷 + /// </summary> + [Display(Name = "绫诲瀷")] + public HStation.Model.eRegionType Type { get; set; } + + /// <summary> + /// 楂樺痉鍦板浘鍩庡競缂栫爜 + /// </summary> + [Display(Name = "楂樺痉鍦板浘鍩庡競缂栫爜")] + public string ADCode { get; set; } + + /// <summary> + /// 鏍囩鍒楄〃 + /// </summary> + [Display(Name = "鏍囩鍒楄〃")] + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囩鍚嶇О + /// </summary> + [Display(Name = "鏍囩鍚嶇О")] + public string TagName { get; set; } + + /// <summary> + /// 浣跨敤鐘舵�� + /// </summary> + [Display(Name = "浣跨敤鐘舵��")] + public eUseStatus UseStatus { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + [Display(Name = "鎺掑簭鐮�")] + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + [Display(Name = "璇存槑")] + public string Description { get; set; } + + public Division Clone() + { + return (Division)this.MemberwiseClone(); + } + + object ICloneable.Clone() + { + return this.MemberwiseClone(); + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/03-settings/00-core/XhsFileHelper.cs b/Service/HStation.Service.Basic.Core/03-settings/00-core/XhsFileHelper.cs new file mode 100644 index 0000000..d83765e --- /dev/null +++ b/Service/HStation.Service.Basic.Core/03-settings/00-core/XhsFileHelper.cs @@ -0,0 +1,65 @@ +锘縰sing System.Text; + +namespace HStation.Settings +{ + internal class XhsFileHelper + { + /// <summary> + /// json鏂囦欢鍚嶇О + /// </summary> + internal static string JsonFileName + { + get + { + if (string.IsNullOrEmpty(_jsonFileName)) + { + _jsonFileName = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "paras_xhs_settings.json"); + } + return _jsonFileName; + } + } + + private static string _jsonFileName = null; + + /// <summary> + /// 鑾峰彇 + /// </summary> + internal static XhsParas Get() + { + if (_appparas == null) + { + lock (_locker) + { + if (_appparas == null) + { + var json = File.ReadAllText(JsonFileName, Encoding.UTF8); + _appparas = JsonHelper.Json2Object<XhsParas>(json); + if (_appparas == null) + { + _appparas = new XhsParas(); + } + } + } + } + return _appparas; + } + + private static XhsParas _appparas = null; + private static readonly object _locker = new object(); + + /// <summary> + /// 淇濆瓨 + /// </summary> + /// <returns></returns> + internal static bool Save() + { + if (_appparas == null) + { + return default; + } + var json = JsonHelper.Object2FormatJson(_appparas); + File.WriteAllText(JsonFileName, json, Encoding.UTF8); + return true; + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/03-settings/00-core/XhsParasHelper.cs b/Service/HStation.Service.Basic.Core/03-settings/00-core/XhsParasHelper.cs new file mode 100644 index 0000000..f2be8fb --- /dev/null +++ b/Service/HStation.Service.Basic.Core/03-settings/00-core/XhsParasHelper.cs @@ -0,0 +1,24 @@ +锘縩amespace HStation.Settings.Assets +{ + /// <summary> + /// + /// </summary> + public class XhsParasHelper + { + /// <summary> + /// + /// </summary> + public static Paras_Xhs Xhs + { + get { return XhsFileHelper.Get().Xhs; } + } + + /// <summary> + /// 淇濆瓨 + /// </summary> + public static bool Save() + { + return XhsFileHelper.Save(); + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/03-settings/01-paras/00-core/Paras_Xhs.cs b/Service/HStation.Service.Basic.Core/03-settings/01-paras/00-core/Paras_Xhs.cs new file mode 100644 index 0000000..8868fe4 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/03-settings/01-paras/00-core/Paras_Xhs.cs @@ -0,0 +1,23 @@ +锘縩amespace HStation.Settings.Assets +{ + /// <summary> + /// + /// </summary> + public class Paras_Xhs + { + /// <summary> + /// 鏁版嵁搴� + /// </summary> + public Paras_Xhs_DataBase DataBase { get; set; } + + /// <summary> + /// 鏁版嵁鏂囦欢澶� + /// </summary> + public string DataFolder { get; set; } + + /// <summary> + /// CAL + /// </summary> + public Paras_Xhs_CAL CAL { get; set; } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/03-settings/01-paras/00-core/XhsParas.cs b/Service/HStation.Service.Basic.Core/03-settings/01-paras/00-core/XhsParas.cs new file mode 100644 index 0000000..ec3c584 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/03-settings/01-paras/00-core/XhsParas.cs @@ -0,0 +1,13 @@ +锘縩amespace HStation.Settings.Assets +{ + /// <summary> + /// + /// </summary> + internal class XhsParas + { + /// <summary> + /// + /// </summary> + public Paras_Xhs Xhs { get; set; } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/03-settings/01-paras/01-database/Paras_Xhs_DataBase.cs b/Service/HStation.Service.Basic.Core/03-settings/01-paras/01-database/Paras_Xhs_DataBase.cs new file mode 100644 index 0000000..d6c0a25 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/03-settings/01-paras/01-database/Paras_Xhs_DataBase.cs @@ -0,0 +1,28 @@ +锘縩amespace HStation.Settings.Assets +{ + /// <summary> + /// + /// </summary> + public class Paras_Xhs_DataBase + { + /// <summary> + /// 鏁版嵁搴撶被鍨� + /// </summary> + public string DbType { get; set; } + + /// <summary> + /// 宸ュ巶 + /// </summary> + public Paras_Xhs_DataBase_Factory Factory { get; set; } + + /// <summary> + /// PostgreSql + /// </summary> + public Paras_Xhs_DataBase_PostgreSql PostgreSql { get; set; } + + /// <summary> + /// SQLite + /// </summary> + public Paras_Xhs_DataBase_SQLite SQLite { get; set; } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/03-settings/01-paras/01-database/Paras_Xhs_DataBase_Factory.cs b/Service/HStation.Service.Basic.Core/03-settings/01-paras/01-database/Paras_Xhs_DataBase_Factory.cs new file mode 100644 index 0000000..bcc42b6 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/03-settings/01-paras/01-database/Paras_Xhs_DataBase_Factory.cs @@ -0,0 +1,18 @@ +锘縩amespace HStation.Settings.Assets +{ + /// <summary> + /// + /// </summary> + public class Paras_Xhs_DataBase_Factory + { + /// <summary> + /// 鏄惁寮�鍚紦瀛� + /// </summary> + public bool EnableCache { get; set; } + + /// <summary> + /// 缂撳瓨鏃堕棿锛堢锛� + /// </summary> + public int CacheTime { get; set; } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/03-settings/01-paras/01-database/Paras_Xhs_DataBase_PostgreSql.cs b/Service/HStation.Service.Basic.Core/03-settings/01-paras/01-database/Paras_Xhs_DataBase_PostgreSql.cs new file mode 100644 index 0000000..146e43f --- /dev/null +++ b/Service/HStation.Service.Basic.Core/03-settings/01-paras/01-database/Paras_Xhs_DataBase_PostgreSql.cs @@ -0,0 +1,13 @@ +锘縩amespace HStation.Settings.Assets +{ + /// <summary> + /// + /// </summary> + public class Paras_Xhs_DataBase_PostgreSql + { + /// <summary> + /// 杩炴帴瀛楃涓� + /// </summary> + public string ConnectString { get; set; } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/03-settings/01-paras/01-database/Paras_Xhs_DataBase_SQLite.cs b/Service/HStation.Service.Basic.Core/03-settings/01-paras/01-database/Paras_Xhs_DataBase_SQLite.cs new file mode 100644 index 0000000..ed6c5d7 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/03-settings/01-paras/01-database/Paras_Xhs_DataBase_SQLite.cs @@ -0,0 +1,13 @@ +锘縩amespace HStation.Settings.Assets +{ + /// <summary> + /// + /// </summary> + public class Paras_Xhs_DataBase_SQLite + { + /// <summary> + /// 杩炴帴瀛楃涓� + /// </summary> + public string ConnectString { get; set; } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/03-settings/01-paras/02-cal/Paras_Xhs_CAL.cs b/Service/HStation.Service.Basic.Core/03-settings/01-paras/02-cal/Paras_Xhs_CAL.cs new file mode 100644 index 0000000..f205001 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/03-settings/01-paras/02-cal/Paras_Xhs_CAL.cs @@ -0,0 +1,23 @@ +锘縩amespace HStation.Settings.Assets +{ + /// <summary> + /// + /// </summary> + public class Paras_Xhs_CAL + { + /// <summary> + /// CAL绫诲瀷 + /// </summary> + public string CALType { get; set; } + + /// <summary> + /// HttpClient + /// </summary> + public Paras_Xhs_CAL_HttpClient HttpClient { get; set; } + + /// <summary> + /// LocalClient + /// </summary> + public Paras_Xhs_CAL_LocalClient LocalClient { get; set; } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/03-settings/01-paras/02-cal/Paras_Xhs_CAL_HttpClient.cs b/Service/HStation.Service.Basic.Core/03-settings/01-paras/02-cal/Paras_Xhs_CAL_HttpClient.cs new file mode 100644 index 0000000..9a8570a --- /dev/null +++ b/Service/HStation.Service.Basic.Core/03-settings/01-paras/02-cal/Paras_Xhs_CAL_HttpClient.cs @@ -0,0 +1,13 @@ +锘縩amespace HStation.Settings.Assets +{ + /// <summary> + /// + /// </summary> + public class Paras_Xhs_CAL_HttpClient + { + /// <summary> + /// + /// </summary> + public string HttpUrl { get; set; } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/03-settings/01-paras/02-cal/Paras_Xhs_CAL_LocalClient.cs b/Service/HStation.Service.Basic.Core/03-settings/01-paras/02-cal/Paras_Xhs_CAL_LocalClient.cs new file mode 100644 index 0000000..bfaf952 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/03-settings/01-paras/02-cal/Paras_Xhs_CAL_LocalClient.cs @@ -0,0 +1,9 @@ +锘縩amespace HStation.Settings.Assets +{ + /// <summary> + /// + /// </summary> + public class Paras_Xhs_CAL_LocalClient + { + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/04-dal/01-interface/01-IAdaptingManage/IDivision.cs b/Service/HStation.Service.Basic.Core/04-dal/01-interface/01-IAdaptingManage/IDivision.cs new file mode 100644 index 0000000..ffa514a --- /dev/null +++ b/Service/HStation.Service.Basic.Core/04-dal/01-interface/01-IAdaptingManage/IDivision.cs @@ -0,0 +1,11 @@ +锘縰sing Yw.DAL; + +namespace HStation.DAL +{ + /// <summary> + /// + /// </summary> + public interface IDivision : IBaseDAL<Entity.Division>, IUpdateSorter + { + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/05-service/00-core/01-dal/DALCreateHelper.cs b/Service/HStation.Service.Basic.Core/05-service/00-core/01-dal/DALCreateHelper.cs new file mode 100644 index 0000000..8f04d9e --- /dev/null +++ b/Service/HStation.Service.Basic.Core/05-service/00-core/01-dal/DALCreateHelper.cs @@ -0,0 +1,23 @@ +锘縰sing System.Reflection; + +namespace HStation.Service +{ + /// <summary> + /// DAL杈呭姪绫� + /// </summary> + internal class DALCreateHelper + { + /// <summary> + /// 鍒涘缓DAL + /// </summary> + /// <typeparam name="T"></typeparam> + /// <returns></returns> + public static T CreateDAL<T>() + { + var dbType = Settings.Assets.XhsParasHelper.Xhs.DataBase.DbType; + var enableCache = Settings.Assets.XhsParasHelper.Xhs.DataBase.Factory.EnableCache; + var cacheTime = Settings.Assets.XhsParasHelper.Xhs.DataBase.Factory.CacheTime; + return Yw.DALFactory.CreateDAL3<T>(dbType, enableCache, cacheTime); + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/05-service/00-core/02-cache/CacheHelper.cs b/Service/HStation.Service.Basic.Core/05-service/00-core/02-cache/CacheHelper.cs new file mode 100644 index 0000000..4619fc5 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/05-service/00-core/02-cache/CacheHelper.cs @@ -0,0 +1,30 @@ +锘縩amespace HStation.Service +{ + /// <summary> + /// 缂撳瓨杈呭姪绫� + /// </summary> + internal class CacheHelper + { + private const string _cacheKeyPrefix = "Assets";//缂撳瓨閿墠缂� + + /// <summary> + /// 鑾峰彇缂撳瓨閿� + /// </summary> + public static string GetCacheKey(string keyContent) + { + return MemoryCacheKeyHelper.GetKey(HStation.Assets.MemoryCacheKey.ServiceLevel, HStation.Assets.MemoryCacheKey.Module, $"*{_cacheKeyPrefix}*_{keyContent}"); + } + + /// <summary> + /// 娓呴櫎鍏ㄩ儴 + /// </summary> + public static void Clear() + { + Yw.MemoryCacheHelper.Remove((key) => + { + var prefix = MemoryCacheKeyHelper.GetKey(HStation.Assets.MemoryCacheKey.ServiceLevel, HStation.Assets.MemoryCacheKey.Module, $"*{_cacheKeyPrefix}*"); + return key.StartsWith(prefix); + }); + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/05-service/00-core/03-helper/DbFirstHelper.cs b/Service/HStation.Service.Basic.Core/05-service/00-core/03-helper/DbFirstHelper.cs new file mode 100644 index 0000000..a984c7f --- /dev/null +++ b/Service/HStation.Service.Basic.Core/05-service/00-core/03-helper/DbFirstHelper.cs @@ -0,0 +1,68 @@ +锘縩amespace HStation.Service.Assets +{ + /// <summary> + /// + /// </summary> + public class DbFirstHelper + { + /// <summary> + /// 鍒濆鍖� + /// </summary> + public static bool Initial(out string msg) + { + msg = string.Empty; + try + { + var connectConfig = HStation.Assets.ConfigHelper.DefaultConnectionConfig; + if (connectConfig == null) + { + msg = "杩炴帴閰嶇疆鍒濆鍖栧け璐�"; + return false; + } + + connectConfig.ConfigureExternalServices = new ConfigureExternalServices() + { + EntityService = (property, column) => + { + //闄や富閿鍏朵粬鍒楅兘鍙┖ + if (!column.IsPrimarykey) + { + column.IsNullable = true; + } + if (column.DataType == StaticConfig.CodeFirst_BigString) + { + if (Settings.Assets.XhsParasHelper.Xhs.DataBase.DbType == HStation.Assets.DbType.PostgreSql) + { + column.DataType = "character varying"; + } + } + } + }; + + var typeList = new List<Type>() + { + }; + + using (var db = new SqlSugarClient(connectConfig)) + { + //璁剧疆瀛楃涓查粯璁ら暱搴� + //db.CodeFirst.SetStringDefaultLength(250); + //db.CodeFirst.SetStringDefaultLength(int.MaxValue); + //寤哄簱锛氬鏋滀笉瀛樺湪鍒涘缓鏁版嵁搴撳瓨鍦ㄤ笉浼氶噸澶嶅垱寤� createdb;娉ㄦ剰 锛歄racle鍜屼釜鍒浗浜у簱闇�涓嶆敮鎸佽鏂规硶锛岄渶瑕佹墜鍔ㄥ缓搴� + db.DbMaintenance.CreateDatabase(); + db.CodeFirst.InitTables + ( + typeList.ToArray() + ); + } + + return true; + } + catch (Exception ex) + { + msg = ex.Message; + return false; + } + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/GlobalUsings.cs b/Service/HStation.Service.Basic.Core/GlobalUsings.cs new file mode 100644 index 0000000..89c61c4 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/GlobalUsings.cs @@ -0,0 +1,7 @@ +锘縢lobal using AutoMapper; +global using SqlSugar; +global using System.Data; +global using Yw; +global using Yw.Service; +global using Yw.Untity; +global using HStation.Settings.Assets; \ No newline at end of file diff --git a/Service/HStation.Service.Basic.Core/HStation.Service.Division.Core.csproj b/Service/HStation.Service.Basic.Core/HStation.Service.Division.Core.csproj new file mode 100644 index 0000000..8087770 --- /dev/null +++ b/Service/HStation.Service.Basic.Core/HStation.Service.Division.Core.csproj @@ -0,0 +1,19 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>net6.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + + <ItemGroup> + <Folder Include="04-dal\02-postgresql\" /> + <Folder Include="04-dal\03-sqlite\" /> + </ItemGroup> + + <ItemGroup> + <PackageReference Include="Yw.DAL.Core" Version="3.0.5" /> + <PackageReference Include="Yw.Service.Core" Version="3.0.8" /> + </ItemGroup> + +</Project> diff --git a/WinFrmUI/HStation.WinFrmUI.LinShi/HStation.WinFrmUI.LinShi.csproj b/WinFrmUI/HStation.WinFrmUI.LinShi/HStation.WinFrmUI.LinShi.csproj new file mode 100644 index 0000000..111be72 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.LinShi/HStation.WinFrmUI.LinShi.csproj @@ -0,0 +1,9 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>net6.0-windows</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/WinFrmUI/Yw.WinFrmUI.Unit.Core/AddThreeLinkMainDlg.Designer.cs b/WinFrmUI/Yw.WinFrmUI.Unit.Core/AddThreeLinkMainDlg.Designer.cs new file mode 100644 index 0000000..c33792f --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Unit.Core/AddThreeLinkMainDlg.Designer.cs @@ -0,0 +1,438 @@ +锘縩amespace HStation.WinFrmUI.Assets +{ + partial class AddThreeLinkMainDlg + { + /// <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() + { + components = new System.ComponentModel.Container(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + BtnOk = new DevExpress.XtraEditors.SimpleButton(); + simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + TextEditName = new DevExpress.XtraEditors.TextEdit(); + DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); + TextEditCaliber = new DevExpress.XtraEditors.ImageComboBoxEdit(); + TextEditMaterial = new DevExpress.XtraEditors.ImageComboBoxEdit(); + TextEditCoefficient = new DevExpress.XtraEditors.TextEdit(); + TextEditKeyWorld = new DevExpress.XtraEditors.TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); + imageComboBoxEdit1 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); + imageComboBoxEdit2 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + tabbedControlGroup2 = new DevExpress.XtraLayout.TabbedControlGroup(); + layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem27 = new DevExpress.XtraLayout.LayoutControlItem(); + toolTipController1 = new DevExpress.Utils.ToolTipController(components); + ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditCoefficient.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditKeyWorld.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem12).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem9).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem13).BeginInit(); + ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem15).BeginInit(); + ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem27).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(BtnOk); + layoutControl1.Controls.Add(simpleButton1); + layoutControl1.Controls.Add(TextEditName); + layoutControl1.Controls.Add(DescriptionTextEdit); + layoutControl1.Controls.Add(TextEditCaliber); + layoutControl1.Controls.Add(TextEditMaterial); + layoutControl1.Controls.Add(TextEditCoefficient); + layoutControl1.Controls.Add(TextEditKeyWorld); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(971, 225, 650, 400); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(681, 482); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // BtnOk + // + BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; + BtnOk.Appearance.Options.UseBackColor = true; + BtnOk.Location = new Point(495, 452); + BtnOk.Name = "BtnOk"; + BtnOk.Size = new Size(89, 22); + BtnOk.StyleController = layoutControl1; + BtnOk.TabIndex = 9; + BtnOk.Text = "瀹屾垚"; + BtnOk.Click += BtnOk_ClickAsync; + // + // simpleButton1 + // + simpleButton1.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Danger; + simpleButton1.Appearance.Options.UseBackColor = true; + simpleButton1.DialogResult = DialogResult.Cancel; + simpleButton1.Location = new Point(588, 452); + simpleButton1.Name = "simpleButton1"; + simpleButton1.Size = new Size(85, 22); + simpleButton1.StyleController = layoutControl1; + simpleButton1.TabIndex = 10; + simpleButton1.Text = "鍙栨秷"; + // + // TextEditName + // + TextEditName.Location = new Point(72, 8); + TextEditName.Name = "TextEditName"; + TextEditName.Size = new Size(266, 20); + TextEditName.StyleController = layoutControl1; + TextEditName.TabIndex = 0; + // + // DescriptionTextEdit + // + DescriptionTextEdit.Location = new Point(20, 113); + DescriptionTextEdit.Name = "DescriptionTextEdit"; + DescriptionTextEdit.Size = new Size(641, 323); + DescriptionTextEdit.StyleController = layoutControl1; + DescriptionTextEdit.TabIndex = 8; + // + // TextEditCaliber + // + TextEditCaliber.Location = new Point(72, 32); + TextEditCaliber.Name = "TextEditCaliber"; + TextEditCaliber.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); + TextEditCaliber.Size = new Size(266, 20); + TextEditCaliber.StyleController = layoutControl1; + TextEditCaliber.TabIndex = 3; + // + // TextEditMaterial + // + TextEditMaterial.Location = new Point(406, 32); + TextEditMaterial.Name = "TextEditMaterial"; + TextEditMaterial.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); + TextEditMaterial.Size = new Size(267, 20); + TextEditMaterial.StyleController = layoutControl1; + TextEditMaterial.TabIndex = 4; + // + // TextEditCoefficient + // + TextEditCoefficient.Location = new Point(72, 56); + TextEditCoefficient.Name = "TextEditCoefficient"; + TextEditCoefficient.Size = new Size(601, 20); + TextEditCoefficient.StyleController = layoutControl1; + TextEditCoefficient.TabIndex = 2; + // + // TextEditKeyWorld + // + TextEditKeyWorld.Location = new Point(406, 8); + TextEditKeyWorld.Name = "TextEditKeyWorld"; + TextEditKeyWorld.Size = new Size(267, 20); + TextEditKeyWorld.StyleController = layoutControl1; + TextEditKeyWorld.TabIndex = 2; + // + // Root + // + Root.AppearanceItemCaption.Options.UseTextOptions = true; + Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + Root.GroupBordersVisible = false; + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlItem12, layoutControlGroup5, layoutControlItem9, layoutControlItem2, layoutControlItem3 }); + Root.Name = "Root"; + Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); + Root.Size = new Size(681, 482); + Root.TextVisible = false; + // + // layoutControlItem4 + // + layoutControlItem4.Control = BtnOk; + layoutControlItem4.Location = new Point(487, 444); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(93, 26); + layoutControlItem4.TextSize = new Size(0, 0); + layoutControlItem4.TextVisible = false; + // + // emptySpaceItem1 + // + emptySpaceItem1.AllowHotTrack = false; + emptySpaceItem1.Location = new Point(0, 444); + emptySpaceItem1.Name = "emptySpaceItem1"; + emptySpaceItem1.Size = new Size(487, 26); + emptySpaceItem1.TextSize = new Size(0, 0); + // + // layoutControlItem8 + // + layoutControlItem8.Control = simpleButton1; + layoutControlItem8.Location = new Point(580, 444); + layoutControlItem8.Name = "layoutControlItem8"; + layoutControlItem8.Size = new Size(89, 26); + layoutControlItem8.TextSize = new Size(0, 0); + layoutControlItem8.TextVisible = false; + // + // layoutControlItem1 + // + layoutControlItem1.AllowHtmlStringInCaption = true; + layoutControlItem1.Control = TextEditName; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(334, 24); + layoutControlItem1.Text = "<color=red>*</color>鍨嬪彿:"; + layoutControlItem1.TextSize = new Size(52, 14); + // + // layoutControlItem12 + // + layoutControlItem12.Control = TextEditMaterial; + layoutControlItem12.Location = new Point(334, 24); + layoutControlItem12.Name = "layoutControlItem12"; + layoutControlItem12.Size = new Size(335, 24); + layoutControlItem12.Text = "鏉愭枡:"; + layoutControlItem12.TextSize = new Size(52, 14); + // + // layoutControlGroup5 + // + layoutControlGroup5.AppearanceGroup.FontSizeDelta = 1; + layoutControlGroup5.AppearanceGroup.Options.UseFont = true; + layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5 }); + layoutControlGroup5.Location = new Point(0, 72); + layoutControlGroup5.Name = "layoutControlGroup5"; + layoutControlGroup5.Size = new Size(669, 372); + layoutControlGroup5.Text = "璇存槑"; + // + // layoutControlItem5 + // + layoutControlItem5.Control = DescriptionTextEdit; + layoutControlItem5.Location = new Point(0, 0); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(645, 327); + layoutControlItem5.Text = "璇存槑:"; + layoutControlItem5.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize; + layoutControlItem5.TextSize = new Size(0, 0); + layoutControlItem5.TextToControlDistance = 0; + layoutControlItem5.TextVisible = false; + // + // layoutControlItem9 + // + layoutControlItem9.Control = TextEditCaliber; + layoutControlItem9.Location = new Point(0, 24); + layoutControlItem9.Name = "layoutControlItem9"; + layoutControlItem9.Size = new Size(334, 24); + layoutControlItem9.Text = "鍙e緞:"; + layoutControlItem9.TextSize = new Size(52, 14); + // + // layoutControlItem2 + // + layoutControlItem2.Control = TextEditKeyWorld; + layoutControlItem2.Location = new Point(334, 0); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(335, 24); + layoutControlItem2.Text = "鍏抽敭瀛�:"; + layoutControlItem2.TextSize = new Size(52, 14); + // + // layoutControlItem3 + // + layoutControlItem3.Control = TextEditCoefficient; + layoutControlItem3.Location = new Point(0, 48); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(669, 24); + layoutControlItem3.Text = "鎹熷け绯绘暟:"; + layoutControlItem3.TextSize = new Size(52, 14); + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // layoutControlItem13 + // + layoutControlItem13.Control = imageComboBoxEdit1; + layoutControlItem13.Location = new Point(0, 72); + layoutControlItem13.Name = "layoutControlItem8"; + layoutControlItem13.Size = new Size(499, 24); + layoutControlItem13.Text = "閫夋嫨鍒嗙被"; + layoutControlItem13.TextSize = new Size(52, 14); + // + // imageComboBoxEdit1 + // + imageComboBoxEdit1.Location = new Point(0, 0); + imageComboBoxEdit1.Name = "imageComboBoxEdit1"; + imageComboBoxEdit1.Size = new Size(100, 20); + imageComboBoxEdit1.TabIndex = 0; + // + // layoutControlItem15 + // + layoutControlItem15.Control = imageComboBoxEdit2; + layoutControlItem15.Location = new Point(0, 72); + layoutControlItem15.Name = "layoutControlItem8"; + layoutControlItem15.Size = new Size(499, 24); + layoutControlItem15.Text = "閫夋嫨鍒嗙被"; + layoutControlItem15.TextSize = new Size(52, 14); + // + // imageComboBoxEdit2 + // + imageComboBoxEdit2.Location = new Point(0, 0); + imageComboBoxEdit2.Name = "imageComboBoxEdit2"; + imageComboBoxEdit2.Size = new Size(100, 20); + imageComboBoxEdit2.TabIndex = 0; + // + // tabbedControlGroup2 + // + tabbedControlGroup2.Location = new Point(0, 354); + tabbedControlGroup2.Name = "tabbedControlGroup1"; + tabbedControlGroup2.SelectedTabPage = layoutControlGroup3; + tabbedControlGroup2.Size = new Size(669, 90); + tabbedControlGroup2.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup4, layoutControlGroup3 }); + tabbedControlGroup2.Text = "璇存槑"; + // + // layoutControlGroup3 + // + layoutControlGroup3.Location = new Point(0, 0); + layoutControlGroup3.Name = "layoutControlGroup2"; + layoutControlGroup3.Size = new Size(645, 56); + layoutControlGroup3.Text = "灞炴��"; + layoutControlGroup3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; + // + // layoutControlGroup4 + // + layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem27 }); + layoutControlGroup4.Location = new Point(0, 0); + layoutControlGroup4.Name = "layoutControlGroup1"; + layoutControlGroup4.Size = new Size(645, 42); + layoutControlGroup4.Text = "璇存槑"; + // + // layoutControlItem27 + // + layoutControlItem27.Control = DescriptionTextEdit; + layoutControlItem27.Location = new Point(0, 0); + layoutControlItem27.Name = "layoutControlItem5"; + layoutControlItem27.Size = new Size(645, 42); + layoutControlItem27.Text = "璇存槑:"; + layoutControlItem27.TextSize = new Size(59, 14); + // + // AddThreeLinkMainDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(681, 482); + Controls.Add(layoutControl1); + Name = "AddThreeLinkMainDlg"; + StartPosition = FormStartPosition.CenterScreen; + Text = "娣诲姞涓夐��"; + ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditCoefficient.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditKeyWorld.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)Root).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem12).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem9).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem13).EndInit(); + ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem15).EndInit(); + ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem27).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraEditors.TextEdit TextEditName; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.MemoEdit DescriptionTextEdit; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + private DevExpress.XtraEditors.SimpleButton BtnOk; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraEditors.SimpleButton btnCancel; + private DevExpress.XtraEditors.TextEdit MotorFrequencyTextEdit; + private DevExpress.XtraEditors.TextEdit TagNameTextEdit; + private DevExpress.XtraEditors.TextEdit NameTextEdit; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; + private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15; + private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.TabbedControlGroup tabbedControlGroup2; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem27; + private DevExpress.XtraEditors.ImageComboBoxEdit TextEditCaliber; + private DevExpress.XtraEditors.ImageComboBoxEdit TextEditMaterial; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5; + private DevExpress.Utils.ToolTipController toolTipController1; + private DevExpress.XtraEditors.TextEdit TextEditKeyWorld; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraEditors.TextEdit TextEditCoefficient; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + } +} \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Unit.Core/AddThreeLinkMainDlg.cs b/WinFrmUI/Yw.WinFrmUI.Unit.Core/AddThreeLinkMainDlg.cs new file mode 100644 index 0000000..ed8fd2f --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Unit.Core/AddThreeLinkMainDlg.cs @@ -0,0 +1,60 @@ +锘縰sing DevExpress.XtraEditors.Controls; +using Yw.Dto; + +namespace HStation.WinFrmUI.Assets +{ + public partial class AddThreeLinkMainDlg : DevExpress.XtraEditors.XtraForm + { + public AddThreeLinkMainDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + } + + private AddSysUnitLangInput _ThreeLinkVmo = null; + + public async void SetBindingData(long SeriesID) + { + _ThreeLinkVmo = new AddSysUnitLangInput(); + } + + public event Func<AddSysUnitLangInput, Task<bool>> ReloadDataEvent = null; + + //鏁版嵁楠岃瘉 + private bool Valid() + { + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(TextEditName.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.TextEditName, "蹇呭~椤�"); + return false; + } + if (string.IsNullOrEmpty(TextEditCoefficient.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.TextEditCoefficient, "蹇呭~椤�"); + return false; + } + + return true; + } + + //瀹屾垚 + private async void BtnOk_ClickAsync(object sender, EventArgs e) + { + if (!(Valid())) + return; + _ThreeLinkVmo.Description = DescriptionTextEdit.Text.Trim(); + _ThreeLinkVmo.Name = TextEditName.Text.Trim(); + if (await this.ReloadDataEvent.Invoke(_ThreeLinkVmo)) + { + TipFormHelper.ShowSucceed("娣诲姞鎴愬姛!"); + } + else + { + TipFormHelper.ShowError("娣诲姞澶辫触!"); + } + this.DialogResult = DialogResult.OK; + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Unit.Core/AddThreeLinkMainDlg.resx b/WinFrmUI/Yw.WinFrmUI.Unit.Core/AddThreeLinkMainDlg.resx new file mode 100644 index 0000000..a001931 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Unit.Core/AddThreeLinkMainDlg.resx @@ -0,0 +1,126 @@ +锘�<?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> + <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="toolTipController1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>172, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Unit.Core/EditThreeLinkMainDlg.Designer.cs b/WinFrmUI/Yw.WinFrmUI.Unit.Core/EditThreeLinkMainDlg.Designer.cs new file mode 100644 index 0000000..a0d9f90 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Unit.Core/EditThreeLinkMainDlg.Designer.cs @@ -0,0 +1,460 @@ +锘縩amespace HStation.WinFrmUI.Assets +{ + partial class EditThreeLinkMainDlg + { + /// <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() + { + components = new System.ComponentModel.Container(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + BtnOk = new DevExpress.XtraEditors.SimpleButton(); + simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + TextEditName = new DevExpress.XtraEditors.TextEdit(); + DescriptionTextEdit = new DevExpress.XtraEditors.MemoEdit(); + TextEditCaliber = new DevExpress.XtraEditors.ImageComboBoxEdit(); + TextEditMaterial = new DevExpress.XtraEditors.ImageComboBoxEdit(); + TextEditCoefficient = new DevExpress.XtraEditors.TextEdit(); + TextEditKeyWorld = new DevExpress.XtraEditors.TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); + imageComboBoxEdit1 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); + imageComboBoxEdit2 = new DevExpress.XtraEditors.ImageComboBoxEdit(); + tabbedControlGroup2 = new DevExpress.XtraLayout.TabbedControlGroup(); + layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem27 = new DevExpress.XtraLayout.LayoutControlItem(); + toolTipController1 = new DevExpress.Utils.ToolTipController(components); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditCoefficient.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditKeyWorld.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem9).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem12).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem13).BeginInit(); + ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem15).BeginInit(); + ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem27).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(BtnOk); + layoutControl1.Controls.Add(simpleButton1); + layoutControl1.Controls.Add(TextEditName); + layoutControl1.Controls.Add(DescriptionTextEdit); + layoutControl1.Controls.Add(TextEditCaliber); + layoutControl1.Controls.Add(TextEditMaterial); + layoutControl1.Controls.Add(TextEditCoefficient); + layoutControl1.Controls.Add(TextEditKeyWorld); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(971, 225, 650, 400); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(681, 482); + layoutControl1.TabIndex = 0; + layoutControl1.Text = "layoutControl1"; + // + // BtnOk + // + BtnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; + BtnOk.Appearance.Options.UseBackColor = true; + BtnOk.Location = new Point(515, 452); + BtnOk.Name = "BtnOk"; + BtnOk.Size = new Size(81, 22); + BtnOk.StyleController = layoutControl1; + BtnOk.TabIndex = 9; + BtnOk.Text = "瀹屾垚"; + BtnOk.Click += BtnOk_ClickAsync; + // + // simpleButton1 + // + simpleButton1.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Danger; + simpleButton1.Appearance.Options.UseBackColor = true; + simpleButton1.DialogResult = DialogResult.Cancel; + simpleButton1.Location = new Point(600, 452); + simpleButton1.Name = "simpleButton1"; + simpleButton1.Size = new Size(73, 22); + simpleButton1.StyleController = layoutControl1; + simpleButton1.TabIndex = 10; + simpleButton1.Text = "鍙栨秷"; + // + // TextEditName + // + TextEditName.Location = new Point(72, 8); + TextEditName.Name = "TextEditName"; + TextEditName.Size = new Size(266, 20); + TextEditName.StyleController = layoutControl1; + TextEditName.TabIndex = 0; + // + // DescriptionTextEdit + // + DescriptionTextEdit.Location = new Point(20, 113); + DescriptionTextEdit.Name = "DescriptionTextEdit"; + DescriptionTextEdit.Size = new Size(641, 323); + DescriptionTextEdit.StyleController = layoutControl1; + DescriptionTextEdit.TabIndex = 8; + // + // TextEditCaliber + // + TextEditCaliber.Location = new Point(72, 32); + TextEditCaliber.Name = "TextEditCaliber"; + TextEditCaliber.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); + TextEditCaliber.Size = new Size(266, 20); + TextEditCaliber.StyleController = layoutControl1; + TextEditCaliber.TabIndex = 3; + // + // TextEditMaterial + // + TextEditMaterial.Location = new Point(406, 32); + TextEditMaterial.Name = "TextEditMaterial"; + TextEditMaterial.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); + TextEditMaterial.Size = new Size(267, 20); + TextEditMaterial.StyleController = layoutControl1; + TextEditMaterial.TabIndex = 4; + // + // TextEditCoefficient + // + TextEditCoefficient.Location = new Point(72, 56); + TextEditCoefficient.Name = "TextEditCoefficient"; + TextEditCoefficient.Size = new Size(601, 20); + TextEditCoefficient.StyleController = layoutControl1; + TextEditCoefficient.TabIndex = 2; + // + // TextEditKeyWorld + // + TextEditKeyWorld.Location = new Point(406, 8); + TextEditKeyWorld.Name = "TextEditKeyWorld"; + TextEditKeyWorld.Size = new Size(267, 20); + TextEditKeyWorld.StyleController = layoutControl1; + TextEditKeyWorld.TabIndex = 2; + // + // Root + // + Root.AppearanceItemCaption.Options.UseTextOptions = true; + Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + Root.GroupBordersVisible = false; + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem1, layoutControlItem9, layoutControlGroup5, layoutControlItem12, layoutControlItem7, layoutControlItem6 }); + Root.Name = "Root"; + Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); + Root.Size = new Size(681, 482); + Root.TextVisible = false; + // + // layoutControlItem4 + // + layoutControlItem4.Control = BtnOk; + layoutControlItem4.Location = new Point(507, 444); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(85, 26); + layoutControlItem4.TextSize = new Size(0, 0); + layoutControlItem4.TextVisible = false; + // + // emptySpaceItem1 + // + emptySpaceItem1.AllowHotTrack = false; + emptySpaceItem1.Location = new Point(0, 444); + emptySpaceItem1.Name = "emptySpaceItem1"; + emptySpaceItem1.Size = new Size(507, 26); + emptySpaceItem1.TextSize = new Size(0, 0); + // + // layoutControlItem8 + // + layoutControlItem8.Control = simpleButton1; + layoutControlItem8.Location = new Point(592, 444); + layoutControlItem8.Name = "layoutControlItem8"; + layoutControlItem8.Size = new Size(77, 26); + layoutControlItem8.TextSize = new Size(0, 0); + layoutControlItem8.TextVisible = false; + // + // layoutControlItem1 + // + layoutControlItem1.AllowHtmlStringInCaption = true; + layoutControlItem1.Control = TextEditName; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(334, 24); + layoutControlItem1.Text = "<color=red>*</color>鍨嬪彿:"; + layoutControlItem1.TextSize = new Size(52, 14); + // + // layoutControlItem9 + // + layoutControlItem9.Control = TextEditCaliber; + layoutControlItem9.Location = new Point(0, 24); + layoutControlItem9.Name = "layoutControlItem9"; + layoutControlItem9.Size = new Size(334, 24); + layoutControlItem9.Text = "鍙e緞:"; + layoutControlItem9.TextSize = new Size(52, 14); + // + // layoutControlGroup5 + // + layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5 }); + layoutControlGroup5.Location = new Point(0, 72); + layoutControlGroup5.Name = "layoutControlGroup5"; + layoutControlGroup5.Size = new Size(669, 372); + layoutControlGroup5.Text = "璇存槑"; + // + // layoutControlItem5 + // + layoutControlItem5.Control = DescriptionTextEdit; + layoutControlItem5.Location = new Point(0, 0); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(645, 327); + layoutControlItem5.Text = "璇存槑:"; + layoutControlItem5.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize; + layoutControlItem5.TextSize = new Size(0, 0); + layoutControlItem5.TextToControlDistance = 0; + layoutControlItem5.TextVisible = false; + // + // layoutControlItem12 + // + layoutControlItem12.Control = TextEditMaterial; + layoutControlItem12.Location = new Point(334, 24); + layoutControlItem12.Name = "layoutControlItem12"; + layoutControlItem12.Size = new Size(335, 24); + layoutControlItem12.Text = "鏉愭枡:"; + layoutControlItem12.TextSize = new Size(52, 14); + // + // layoutControlItem7 + // + layoutControlItem7.Control = TextEditKeyWorld; + layoutControlItem7.Location = new Point(334, 0); + layoutControlItem7.Name = "layoutControlItem7"; + layoutControlItem7.Size = new Size(335, 24); + layoutControlItem7.Text = "鍏抽敭瀛�:"; + layoutControlItem7.TextSize = new Size(52, 14); + // + // layoutControlItem6 + // + layoutControlItem6.Control = TextEditCoefficient; + layoutControlItem6.Location = new Point(0, 48); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(669, 24); + layoutControlItem6.Text = "鎹熷け绯绘暟:"; + layoutControlItem6.TextSize = new Size(52, 14); + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // layoutControlItem13 + // + layoutControlItem13.Control = imageComboBoxEdit1; + layoutControlItem13.Location = new Point(0, 72); + layoutControlItem13.Name = "layoutControlItem8"; + layoutControlItem13.Size = new Size(499, 24); + layoutControlItem13.Text = "閫夋嫨鍒嗙被"; + layoutControlItem13.TextSize = new Size(52, 14); + // + // imageComboBoxEdit1 + // + imageComboBoxEdit1.Location = new Point(0, 0); + imageComboBoxEdit1.Name = "imageComboBoxEdit1"; + imageComboBoxEdit1.Size = new Size(100, 20); + imageComboBoxEdit1.TabIndex = 0; + // + // layoutControlItem15 + // + layoutControlItem15.Control = imageComboBoxEdit2; + layoutControlItem15.Location = new Point(0, 72); + layoutControlItem15.Name = "layoutControlItem8"; + layoutControlItem15.Size = new Size(499, 24); + layoutControlItem15.Text = "閫夋嫨鍒嗙被"; + layoutControlItem15.TextSize = new Size(52, 14); + // + // imageComboBoxEdit2 + // + imageComboBoxEdit2.Location = new Point(0, 0); + imageComboBoxEdit2.Name = "imageComboBoxEdit2"; + imageComboBoxEdit2.Size = new Size(100, 20); + imageComboBoxEdit2.TabIndex = 0; + // + // tabbedControlGroup2 + // + tabbedControlGroup2.Location = new Point(0, 354); + tabbedControlGroup2.Name = "tabbedControlGroup1"; + tabbedControlGroup2.SelectedTabPage = layoutControlGroup3; + tabbedControlGroup2.Size = new Size(669, 90); + tabbedControlGroup2.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup4, layoutControlGroup3 }); + tabbedControlGroup2.Text = "璇存槑"; + // + // layoutControlGroup3 + // + layoutControlGroup3.Location = new Point(0, 0); + layoutControlGroup3.Name = "layoutControlGroup2"; + layoutControlGroup3.Size = new Size(645, 56); + layoutControlGroup3.Text = "灞炴��"; + layoutControlGroup3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; + // + // layoutControlGroup4 + // + layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem27 }); + layoutControlGroup4.Location = new Point(0, 0); + layoutControlGroup4.Name = "layoutControlGroup1"; + layoutControlGroup4.Size = new Size(645, 42); + layoutControlGroup4.Text = "璇存槑"; + // + // layoutControlItem27 + // + layoutControlItem27.Control = DescriptionTextEdit; + layoutControlItem27.Location = new Point(0, 0); + layoutControlItem27.Name = "layoutControlItem5"; + layoutControlItem27.Size = new Size(645, 42); + layoutControlItem27.Text = "璇存槑:"; + layoutControlItem27.TextSize = new Size(59, 14); + // + // layoutControlItem2 + // + layoutControlItem2.Location = new Point(334, 0); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(335, 24); + layoutControlItem2.Text = "鍏抽敭瀛�:"; + layoutControlItem2.TextSize = new Size(49, 14); + // + // layoutControlItem3 + // + layoutControlItem3.Location = new Point(0, 48); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(669, 24); + layoutControlItem3.Text = "鎹熷け绯绘暟:"; + layoutControlItem3.TextSize = new Size(52, 14); + // + // EditThreeLinkMainDlg + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(681, 482); + Controls.Add(layoutControl1); + Name = "EditThreeLinkMainDlg"; + StartPosition = FormStartPosition.CenterScreen; + Text = "缂栬緫涓夐��"; + ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)DescriptionTextEdit.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditCaliber.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditMaterial.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditCoefficient.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditKeyWorld.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)Root).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem9).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem12).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem13).EndInit(); + ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem15).EndInit(); + ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem27).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); + ResumeLayout(false); + } + + #endregion + + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraEditors.TextEdit TextEditName; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraEditors.MemoEdit DescriptionTextEdit; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + private DevExpress.XtraEditors.SimpleButton BtnOk; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraEditors.SimpleButton simpleButton1; + private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; + private DevExpress.XtraEditors.SimpleButton btnCancel; + private DevExpress.XtraEditors.TextEdit MotorFrequencyTextEdit; + private DevExpress.XtraEditors.TextEdit TagNameTextEdit; + private DevExpress.XtraEditors.TextEdit NameTextEdit; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; + private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15; + private DevExpress.XtraEditors.ImageComboBoxEdit imageComboBoxEdit2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.TabbedControlGroup tabbedControlGroup2; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem27; + private DevExpress.XtraEditors.ImageComboBoxEdit TextEditCaliber; + private DevExpress.XtraEditors.ImageComboBoxEdit TextEditMaterial; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5; + private DevExpress.Utils.ToolTipController toolTipController1; + private DevExpress.XtraEditors.TextEdit TextEditKeyWorld; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraEditors.TextEdit TextEditCoefficient; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; + } +} \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Unit.Core/EditThreeLinkMainDlg.cs b/WinFrmUI/Yw.WinFrmUI.Unit.Core/EditThreeLinkMainDlg.cs new file mode 100644 index 0000000..b9db386 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Unit.Core/EditThreeLinkMainDlg.cs @@ -0,0 +1,55 @@ +锘縰sing DevExpress.Utils; +using DevExpress.XtraEditors.Controls; +using Yw.Dto; + +namespace HStation.WinFrmUI.Assets +{ + public partial class EditThreeLinkMainDlg : DevExpress.XtraEditors.XtraForm + { + public EditThreeLinkMainDlg() + { + InitializeComponent(); + this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; + } + + private UpdateSysUnitLangInput _ThreeLinkVmo = null; + + public async void SetBindingData(UpdateSysUnitLangInput ThreeLinkVmo) + { + _ThreeLinkVmo = ThreeLinkVmo; + } + + public event Func<UpdateSysUnitLangInput, Task<bool>> ReloadDataEvent = null; + + //鏁版嵁楠岃瘉 + private bool Valid() + { + this.dxErrorProvider1.ClearErrors(); + if (string.IsNullOrEmpty(TextEditName.Text.Trim())) + { + this.dxErrorProvider1.SetError(this.TextEditName, "蹇呭~椤�"); + return false; + } + return true; + } + + //瀹屾垚 + private async void BtnOk_ClickAsync(object sender, EventArgs e) + { + if (!(Valid())) + return; + _ThreeLinkVmo.Description = DescriptionTextEdit.Text.Trim(); + _ThreeLinkVmo.Name = TextEditName.Text.Trim(); + if (await this.ReloadDataEvent.Invoke(_ThreeLinkVmo)) + { + TipFormHelper.ShowSucceed("淇敼鎴愬姛!"); + } + else + { + TipFormHelper.ShowSucceed("淇敼澶辫触!"); + } + this.DialogResult = DialogResult.OK; + this.Close(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Unit.Core/EditThreeLinkMainDlg.resx b/WinFrmUI/Yw.WinFrmUI.Unit.Core/EditThreeLinkMainDlg.resx new file mode 100644 index 0000000..c0ced28 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Unit.Core/EditThreeLinkMainDlg.resx @@ -0,0 +1,126 @@ +锘�<?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> + <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="toolTipController1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>197, 21</value> + </metadata> +</root> \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Unit.Core/GlobalUsings.cs b/WinFrmUI/Yw.WinFrmUI.Unit.Core/GlobalUsings.cs new file mode 100644 index 0000000..41d98a6 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Unit.Core/GlobalUsings.cs @@ -0,0 +1 @@ +锘縢lobal using Yw.WinFrmUI; \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Unit.Core/Properties/DataSources/Yw.WinFrmUI.SysUnitLangViewModel.datasource b/WinFrmUI/Yw.WinFrmUI.Unit.Core/Properties/DataSources/Yw.WinFrmUI.SysUnitLangViewModel.datasource new file mode 100644 index 0000000..5922dfb --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Unit.Core/Properties/DataSources/Yw.WinFrmUI.SysUnitLangViewModel.datasource @@ -0,0 +1,10 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<!-- + This file is automatically generated by Visual Studio. It is + used to store generic object data source configuration information. + Renaming the file extension or editing the content of this file may + cause the file to be unrecognizable by the program. +--> +<GenericObjectDataSource DisplayName="SysUnitLangViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> + <TypeInfo>Yw.WinFrmUI.SysUnitLangViewModel, Yw.WinFrmUI.Unit.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> +</GenericObjectDataSource> \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Unit.Core/SysUnitLangMainPanel.Designer.cs b/WinFrmUI/Yw.WinFrmUI.Unit.Core/SysUnitLangMainPanel.Designer.cs new file mode 100644 index 0000000..475ba83 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Unit.Core/SysUnitLangMainPanel.Designer.cs @@ -0,0 +1,249 @@ +锘縩amespace Yw.WinFrmUI +{ + partial class SysUnitLangMainPanel + { + /// <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 Component 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() + { + components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SysUnitLangMainPanel)); + DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject(); + ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl(); + barBtnAdd = new DevExpress.XtraBars.BarButtonItem(); + barBtnEdit = new DevExpress.XtraBars.BarButtonItem(); + barBtnDelete = new DevExpress.XtraBars.BarButtonItem(); + ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage(); + ribPageGroupForBasic = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); + panelControl1 = new DevExpress.XtraEditors.PanelControl(); + treeList1 = new DevExpress.XtraTreeList.TreeList(); + repositoryItemImageComboBox1 = new DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox(); + repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); + sysUnitLangViewModelBindingSource1 = new BindingSource(components); + colID = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + colName = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + colCode = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + colSortCode = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + colDescription = new DevExpress.XtraTreeList.Columns.TreeListColumn(); + ((System.ComponentModel.ISupportInitialize)ribbonControl1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)panelControl1).BeginInit(); + panelControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)treeList1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)repositoryItemImageComboBox1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)repositoryItemButtonEdit1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)sysUnitLangViewModelBindingSource1).BeginInit(); + SuspendLayout(); + // + // ribbonControl1 + // + ribbonControl1.ExpandCollapseItem.Id = 0; + ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; + ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnAdd, barBtnEdit, barBtnDelete }); + ribbonControl1.Location = new Point(0, 0); + ribbonControl1.MaxItemId = 15; + ribbonControl1.Name = "ribbonControl1"; + ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 }); + ribbonControl1.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonControlStyle.Office2010; + ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; + ribbonControl1.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False; + ribbonControl1.ShowPageHeadersInFormCaption = DevExpress.Utils.DefaultBoolean.False; + ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide; + ribbonControl1.ShowToolbarCustomizeItem = false; + ribbonControl1.Size = new Size(963, 101); + ribbonControl1.Toolbar.ShowCustomizeItem = false; + ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden; + // + // barBtnAdd + // + barBtnAdd.Caption = "娣诲姞"; + barBtnAdd.Id = 1; + barBtnAdd.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnAdd.ImageOptions.SvgImage"); + barBtnAdd.Name = "barBtnAdd"; + // + // barBtnEdit + // + barBtnEdit.Caption = "缂栬緫"; + barBtnEdit.Id = 2; + barBtnEdit.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnEdit.ImageOptions.SvgImage"); + barBtnEdit.Name = "barBtnEdit"; + // + // barBtnDelete + // + barBtnDelete.Caption = "鍒犻櫎"; + barBtnDelete.Id = 3; + barBtnDelete.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnDelete.ImageOptions.SvgImage"); + barBtnDelete.Name = "barBtnDelete"; + // + // ribbonPage1 + // + ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribPageGroupForBasic }); + ribbonPage1.Name = "ribbonPage1"; + ribbonPage1.Text = "ribbonPage1"; + // + // ribPageGroupForBasic + // + ribPageGroupForBasic.ItemLinks.Add(barBtnAdd); + ribPageGroupForBasic.ItemLinks.Add(barBtnEdit); + ribPageGroupForBasic.ItemLinks.Add(barBtnDelete); + ribPageGroupForBasic.Name = "ribPageGroupForBasic"; + ribPageGroupForBasic.Text = "鍩虹"; + // + // panelControl1 + // + panelControl1.Controls.Add(treeList1); + panelControl1.Dock = DockStyle.Fill; + panelControl1.Location = new Point(0, 101); + panelControl1.Name = "panelControl1"; + panelControl1.Size = new Size(963, 427); + panelControl1.TabIndex = 2; + // + // treeList1 + // + treeList1.Appearance.HeaderPanel.Options.UseTextOptions = true; + treeList1.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + treeList1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; + treeList1.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { colID, colName, colCode, colSortCode, colDescription }); + treeList1.DataSource = sysUnitLangViewModelBindingSource1; + treeList1.Dock = DockStyle.Fill; + treeList1.Location = new Point(2, 2); + treeList1.MenuManager = ribbonControl1; + treeList1.Name = "treeList1"; + treeList1.OptionsBehavior.PopulateServiceColumns = true; + treeList1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { repositoryItemButtonEdit1, repositoryItemImageComboBox1 }); + treeList1.Size = new Size(959, 423); + treeList1.TabIndex = 2; + // + // repositoryItemImageComboBox1 + // + repositoryItemImageComboBox1.AutoHeight = false; + serializableAppearanceObject5.Options.UseTextOptions = true; + serializableAppearanceObject5.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + serializableAppearanceObject6.Options.UseTextOptions = true; + serializableAppearanceObject6.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + serializableAppearanceObject7.Options.UseTextOptions = true; + serializableAppearanceObject7.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + serializableAppearanceObject8.Options.UseTextOptions = true; + serializableAppearanceObject8.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; + repositoryItemImageComboBox1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Ellipsis, "", -1, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) }); + repositoryItemImageComboBox1.Name = "repositoryItemImageComboBox1"; + // + // repositoryItemButtonEdit1 + // + repositoryItemButtonEdit1.AutoHeight = false; + editorButtonImageOptions1.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions1.SvgImage"); + editorButtonImageOptions1.SvgImageSize = new Size(25, 25); + repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) }); + repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; + repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; + // + // sysUnitLangViewModelBindingSource1 + // + sysUnitLangViewModelBindingSource1.DataSource = typeof(SysUnitLangViewModel); + // + // colID + // + colID.FieldName = "ID"; + colID.Name = "colID"; + colID.Visible = true; + colID.VisibleIndex = 0; + // + // colName + // + colName.FieldName = "Name"; + colName.Name = "colName"; + colName.Visible = true; + colName.VisibleIndex = 1; + // + // colCode + // + colCode.FieldName = "Code"; + colCode.Name = "colCode"; + colCode.Visible = true; + colCode.VisibleIndex = 2; + // + // colSortCode + // + colSortCode.FieldName = "SortCode"; + colSortCode.Name = "colSortCode"; + colSortCode.Visible = true; + colSortCode.VisibleIndex = 3; + // + // colDescription + // + colDescription.FieldName = "Description"; + colDescription.Name = "colDescription"; + colDescription.Visible = true; + colDescription.VisibleIndex = 4; + // + // SysUnitLangMainPanel + // + Appearance.BackColor = SystemColors.Control; + Appearance.Options.UseBackColor = true; + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(panelControl1); + Controls.Add(ribbonControl1); + Name = "SysUnitLangMainPanel"; + Size = new Size(963, 528); + ((System.ComponentModel.ISupportInitialize)ribbonControl1).EndInit(); + ((System.ComponentModel.ISupportInitialize)panelControl1).EndInit(); + panelControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)treeList1).EndInit(); + ((System.ComponentModel.ISupportInitialize)repositoryItemImageComboBox1).EndInit(); + ((System.ComponentModel.ISupportInitialize)repositoryItemButtonEdit1).EndInit(); + ((System.ComponentModel.ISupportInitialize)sysUnitLangViewModelBindingSource1).EndInit(); + ResumeLayout(false); + PerformLayout(); + } + + #endregion + + private DevExpress.XtraBars.Ribbon.RibbonControl ribbonControl1; + private DevExpress.XtraBars.BarButtonItem barBtnAdd; + private DevExpress.XtraBars.BarButtonItem barBtnEdit; + private DevExpress.XtraBars.BarButtonItem barBtnDelete; + private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1; + private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribPageGroupForBasic; + private DevExpress.XtraEditors.PanelControl panelControl1; + private DevExpress.XtraTreeList.TreeList treeList1; + private DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox repositoryItemImageComboBox1; + private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1; + private DevExpress.XtraTreeList.Columns.TreeListColumn colID; + private DevExpress.XtraTreeList.Columns.TreeListColumn colName; + private DevExpress.XtraTreeList.Columns.TreeListColumn colCode; + private DevExpress.XtraTreeList.Columns.TreeListColumn colSortCode; + private DevExpress.XtraTreeList.Columns.TreeListColumn colDescription; + private BindingSource sysUnitLangViewModelBindingSource1; + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Unit.Core/SysUnitLangMainPanel.cs b/WinFrmUI/Yw.WinFrmUI.Unit.Core/SysUnitLangMainPanel.cs new file mode 100644 index 0000000..215664f --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Unit.Core/SysUnitLangMainPanel.cs @@ -0,0 +1,106 @@ +锘縩amespace Yw.WinFrmUI +{ + public partial class SysUnitLangMainPanel : DocumentPage + { + public SysUnitLangMainPanel() + { + InitializeComponent(); + this.PageTitle.Caption = "鍗曚綅璇█"; + // this.PageTitle.HeaderSvgImage = this.svgImageCollection1[0]; + this.PageTitle.SvgImageSize = new Size(24, 24); + } + + private Yw.BLL.SysUnitLang _bll; + + private List<SysUnitLangViewModel> _allBindingList = new List<SysUnitLangViewModel>(); + + //鍒濆鍖栨暟鎹� + public override async void InitialDataSource() + { + _bll = new Yw.BLL.SysUnitLang(); + var allList = await _bll.GetAll(); + if (allList != null) + { + } + } + + //娣诲姞绠¢亾 + private void BtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + /* var dlg = new AddThreeLinkMainDlg(); + var series = this.threeLinkTreeListCtrl1.GetCurrentSeries(); + if (series == null) + { + MessageBoxHelper.ShowWarning("璇峰厛閫夋嫨绠¢亾绯诲垪!"); + return; + } + dlg.SetBindingData(series.ID); + dlg.ReloadDataEvent += async (rhs) => + { + var id = await _bll.Insert(rhs); + if (id > 0) + { + rhs.ID = id; + _allBindingList.Add(new ThreeLinkViewModel(await _bll.GetByID(id))); + this.threeLinkSeriesViewModelBindingSource.ResetBindings(false); + return true; + } + return false; + }; + dlg.ShowDialog();*/ + } + + //缂栬緫绠¢亾 + private async void BtnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + /* var vm = this.gridView1.GetCurrentViewModel(_allBindingList); + if (vm == null) + { + MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛�!"); + return; + } + var dlg = new EditThreeLinkMainDlg(); + var ThreeLink = await _bll.GetByID(vm.ID); + if (ThreeLink == null) + return; + dlg.SetBindingData(ThreeLink); + dlg.ReloadDataEvent += async (rhs) => + { + if (await _bll.Update(rhs)) + { + vm.Reset(rhs); + this.threeLinkSeriesViewModelBindingSource.ResetBindings(false); + return true; + } + return false; + }; + dlg.ShowDialog();*/ + } + + //鍒犻櫎闃�闂� + private async void BtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + /* var currentVm = this.gridView1.GetCurrentViewModel(_allBindingList); + if (currentVm == null) + { + MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛岋紒"); + return; + } + if (MessageBoxHelper.IsClickOk($"纭鍒犻櫎鏁版嵁琛�?", "鎻愮ず")) + return; + var groupresult = await _bll.DeleteByID(currentVm.ID); + if (groupresult) + { + _allBindingList.Remove(currentVm); + this.threeLinkSeriesViewModelBindingSource.ResetBindings(false); + TipFormHelper.ShowSucceed("鍒犻櫎鎴愬姛!"); + } + else + { + TipFormHelper.ShowSucceed("鍒犻櫎澶辫触!"); + return; + } + }*/ + } + } +} \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Unit.Core/SysUnitLangMainPanel.resx b/WinFrmUI/Yw.WinFrmUI.Unit.Core/SysUnitLangMainPanel.resx new file mode 100644 index 0000000..9e7fad3 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Unit.Core/SysUnitLangMainPanel.resx @@ -0,0 +1,211 @@ +锘�<?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="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> + <data name="barBtnAdd.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAKcCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkFkZCI+DQogICAgPHBhdGggZD0iTTI3LDE0aC05VjVj + MC0wLjUtMC41LTEtMS0xaC0yYy0wLjUsMC0xLDAuNS0xLDF2OUg1Yy0wLjUsMC0xLDAuNS0xLDF2MmMw + LDAuNSwwLjUsMSwxLDFoOXY5ICAgYzAsMC41LDAuNSwxLDEsMWgyYzAuNSwwLDEtMC41LDEtMXYtOWg5 + YzAuNSwwLDEtMC41LDEtMXYtMkMyOCwxNC41LDI3LjUsMTQsMjcsMTR6IiBjbGFzcz0iR3JlZW4iIC8+ + DQogIDwvZz4NCjwvc3ZnPgs= +</value> + </data> + <data name="barBtnEdit.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABwFAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3 + RDc7fQoJLldoaXRle2ZpbGw6I0ZGRkZGRjt9CgkuR3JlZW57ZmlsbDojMDM5QzIzO30KCS5zdDB7b3Bh + Y2l0eTowLjc1O30KCS5zdDF7b3BhY2l0eTowLjU7fQoJLnN0MntvcGFjaXR5OjAuMjU7fQoJLnN0M3tm + aWxsOiNGRkIxMTU7fQo8L3N0eWxlPg0KICA8ZyAvPg0KICA8ZyBpZD0iUmVuYW1lXzFfIj4NCiAgICA8 + cGF0aCBkPSJNMi4xLDE2aDIuMmwwLjYtMi4zaDMuMkw4LjgsMTZIMTFMNy44LDZINS40TDIuMSwxNnog + TTYuNCw4LjdjMC4xLTAuMywwLjEtMC42LDAuMS0wLjloMC4xICAgYzAsMC4zLDAuMSwwLjYsMC4xLDAu + OWwxLDMuM0g1LjRMNi40LDguN3ogTTE3LjUsMTAuNmMwLjYtMC4yLDEuMS0wLjUsMS41LTAuOWMwLjQt + MC40LDAuNi0wLjksMC42LTEuNGMwLTAuNy0wLjMtMS4zLTAuOS0xLjcgICBDMTguMSw2LjIsMTcuMSw2 + LDE1LjksNkgxMnY5LjlWMTZoNGMxLjIsMCwyLjItMC4yLDIuOS0wLjhDMTkuNywxNC42LDIwLDE0LDIw + LDEzYzAtMC42LTAuMi0xLjItMC43LTEuNiAgIEMxOC45LDExLDE4LjMsMTAuNywxNy41LDEwLjZ6IE0x + NC40LDcuN2gwLjljMS4xLDAsMS43LDAuNCwxLjcsMS4xYzAsMC40LTAuMSwwLjctMC40LDAuOUMxNi40 + LDkuOSwxNiwxMCwxNS41LDEwaC0xLjFWNy43eiAgICBNMTcsMTMuOGMtMC4zLDAuMi0wLjgsMC40LTEu + MywwLjRoLTEuM3YtMi42aDEuM2MwLjUsMCwwLjksMC4xLDEuMywwLjNjMC4zLDAuMiwwLjUsMC42LDAu + NSwwLjlDMTcuNSwxMy4zLDE3LjQsMTMuNiwxNywxMy44eiIgY2xhc3M9IkJsYWNrIiAvPg0KICAgIDxw + YXRoIGQ9Ik0yNywxOWwtOCw4bC00LTRsOC04TDI3LDE5eiBNMjgsMThsMS43LTEuN2MwLjQtMC40LDAu + NC0xLDAtMS4zTDI3LDEyLjNjLTAuNC0wLjQtMS0wLjQtMS4zLDBMMjQsMTRMMjgsMTh6ICAgIE0xNCwy + NHY0aDRMMTQsMjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAgPC9nPg0KPC9zdmc+Cw== +</value> + </data> + <data name="barBtnDelete.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAD0DAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJs + YWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQoJLkdyZWVue2ZpbGw6IzAzOUMy + Mzt9CgkuWWVsbG93e2ZpbGw6I0ZGQjExNTt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iRGVsZXRlIj4N + CiAgICA8Zz4NCiAgICAgIDxwYXRoIGQ9Ik0xOC44LDE2bDYuOS02LjljMC40LTAuNCwwLjQtMSwwLTEu + NGwtMS40LTEuNGMtMC40LTAuNC0xLTAuNC0xLjQsMEwxNiwxMy4yTDkuMSw2LjNjLTAuNC0wLjQtMS0w + LjQtMS40LDAgICAgTDYuMyw3LjdjLTAuNCwwLjQtMC40LDEsMCwxLjRsNi45LDYuOWwtNi45LDYuOWMt + MC40LDAuNC0wLjQsMSwwLDEuNGwxLjQsMS40YzAuNCwwLjQsMSwwLjQsMS40LDBsNi45LTYuOWw2Ljks + Ni45ICAgIGMwLjQsMC40LDEsMC40LDEuNCwwbDEuNC0xLjRjMC40LTAuNCwwLjQtMSwwLTEuNEwxOC44 + LDE2eiIgY2xhc3M9IlJlZCIgLz4NCiAgICA8L2c+DQogIDwvZz4NCjwvc3ZnPgs= +</value> + </data> + <metadata name="sysUnitLangViewModelBindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>43, 13</value> + </metadata> + <data name="editorButtonImageOptions1.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAFsCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjc1O30KPC9zdHlsZT4NCiAgPGcgaWQ9Ik5leHRWaWV3Ij4NCiAgICA8cGF0aCBkPSJNMTYs + MkM4LjMsMiwyLDguMywyLDE2czYuMywxNCwxNCwxNHMxNC02LjMsMTQtMTRTMjMuNywyLDE2LDJ6IE0x + NiwyNHYtNkg4di00aDhWOGw4LDhMMTYsMjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAgPC9nPg0KPC9zdmc+ + Cw== +</value> + </data> +</root> \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Unit.Core/SysUnitLangViewModel.cs b/WinFrmUI/Yw.WinFrmUI.Unit.Core/SysUnitLangViewModel.cs new file mode 100644 index 0000000..1e6aaa2 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Unit.Core/SysUnitLangViewModel.cs @@ -0,0 +1,43 @@ +锘縰sing System.ComponentModel; +using Yw.Dto; + +namespace Yw.WinFrmUI +{ + public class SysUnitLangViewModel + { + public SysUnitLangViewModel() + { + } + + public SysUnitLangViewModel(SysUnitLangDto rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.SortCode = rhs.SortCode; + this.Code = rhs.Code; + this.Description = rhs.Description; + } + + public void Reset(SysUnitLangDto rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.SortCode = rhs.SortCode; + this.Code = rhs.Code; + this.Description = rhs.Description; + } + + /// <summary> + /// ID + /// </summary> + public long ID { get; set; } + + public string Name { get; set; } + + public string Code { get; set; } + + public int SortCode { get; set; } + + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Unit.Core/Yw.WinFrmUI.Unit.Core.csproj b/WinFrmUI/Yw.WinFrmUI.Unit.Core/Yw.WinFrmUI.Unit.Core.csproj new file mode 100644 index 0000000..037a5c8 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Unit.Core/Yw.WinFrmUI.Unit.Core.csproj @@ -0,0 +1,27 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>net6.0-windows</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" /> + <PackageReference Include="Yw.BLL.Unit.Core" Version="3.0.2" /> + </ItemGroup> + + <ItemGroup> + <ProjectReference Include="..\Yw.WinFrmUI.Core\Yw.WinFrmUI.Core.csproj" /> + </ItemGroup> + + <ItemGroup> + <Compile Update="AddThreeLinkMainDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="EditThreeLinkMainDlg.cs"> + <SubType>Form</SubType> + </Compile> + </ItemGroup> + +</Project> diff --git a/WinFrmUI/Yw.WinFrmUI.Unit.Core/Yw.WinFrmUI.Unit.Core.csproj.user b/WinFrmUI/Yw.WinFrmUI.Unit.Core/Yw.WinFrmUI.Unit.Core.csproj.user new file mode 100644 index 0000000..0a1c0e2 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Unit.Core/Yw.WinFrmUI.Unit.Core.csproj.user @@ -0,0 +1,9 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup /> + <ItemGroup> + <Compile Update="SysUnitLangMainPanel.cs"> + <SubType>UserControl</SubType> + </Compile> + </ItemGroup> +</Project> \ No newline at end of file -- Gitblit v1.9.3