From d256755e724aacf39ebc187b399753d845ae359d Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期六, 21 九月 2024 02:19:24 +0800 Subject: [PATCH] SharpGL探索 --- WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Reservoir.cs | 42 + WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/07-l3d/XhsProjectSimulationL3dCtrl.cs | 29 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d_Border.cs | 20 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/06-valve/Paras_HydroL3d_Valve.cs | 56 + WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/07-l3d/XhsProjectSimulationL3dCtrl.resx | 50 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/04-link/Pump.cs | 73 + WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/05-pump/Paras_HydroL3d_Pump.cs | 59 + WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/00-core/Network_Method.cs | 40 + WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l3d/HydroL3dViewPage.resx | 50 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/CacheHelper.cs | 29 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/02-panel/NetworkPanel.resx | 50 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/paras_hydro_l3d_settings.json | 138 +++ WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d_Size.cs | 18 WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l3d/HydroL3dViewPage.cs | 33 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Source.cs | 9 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/Yw.WinFrmUI.Hydro.L3d.Core.csproj | 14 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs | 1 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Tank.cs | 44 + WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs | 24 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/00-core/Network_Append.cs | 196 +++++ WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/02-panel/NetworkPanel.cs | 137 +++ WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/01-parter/Parter.cs | 58 + WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/Yw.WinFrmUI.Hydro.L3d.Core.csproj.user | 2 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/02-reservoir/Paras_HydroL3d_Reservoir.cs | 40 + WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/04-link/Valve.cs | 70 + WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/04-link/Link.cs | 30 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/FloatExtensions.cs | 30 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/04-link/Pipe.cs | 49 + WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/04-pipe/Paras_HydroL3d_Pipe.cs | 26 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d_Fill.cs | 13 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/00-core/HydroL3dParasHelper.cs | 27 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/02-panel/NetworkPanel.Designer.cs | 67 + WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l3d/HydroL3dViewPage.Designer.cs | 58 + WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d_Line.cs | 18 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/07-l3d/XhsProjectSimulationL3dCtrl.Designer.cs | 56 + WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Junction.cs | 60 + WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj | 3 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Node.cs | 14 HStation.Xhs.Core.sln | 23 WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj | 4 /dev/null | 11 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/01-junction/Paras_HydroL3d_Junction.cs | 43 + WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/Point3d.cs | 77 + WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/00-core/Network.cs | 105 ++ WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/GlobalUsings.cs | 6 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/00-core/HydroL3dFileHelper.cs | 62 + WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/HydroL3dTransferHelper.cs | 161 ++++ WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/HydroL3dParas.cs | 13 WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d.cs | 40 + WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/03-tank/Paras_HydroL3d_Tank.cs | 41 + 50 files changed, 2,229 insertions(+), 90 deletions(-) diff --git a/HStation.Xhs.Core.sln b/HStation.Xhs.Core.sln index 34fb829..02ebb3d 100644 --- a/HStation.Xhs.Core.sln +++ b/HStation.Xhs.Core.sln @@ -125,7 +125,9 @@ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HStation.Application.Assets.Core", "Application\HStation.Application.Assets.Core\HStation.Application.Assets.Core.csproj", "{6BC4873C-FB0D-46F1-ADCD-C1FD96B29A5D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HStation.WinFrmUI.Dict.Core", "WinFrmUI\HStation.WinFrmUI.Dict.Core\HStation.WinFrmUI.Dict.Core.csproj", "{0D096C38-89A7-4C18-A62D-74A70693DC9F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HStation.WinFrmUI.Dict.Core", "WinFrmUI\HStation.WinFrmUI.Dict.Core\HStation.WinFrmUI.Dict.Core.csproj", "{0D096C38-89A7-4C18-A62D-74A70693DC9F}" +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 Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -1058,6 +1060,24 @@ {0D096C38-89A7-4C18-A62D-74A70693DC9F}.Release|x64.Build.0 = Release|Any CPU {0D096C38-89A7-4C18-A62D-74A70693DC9F}.Release|x86.ActiveCfg = Release|Any CPU {0D096C38-89A7-4C18-A62D-74A70693DC9F}.Release|x86.Build.0 = Release|Any CPU + {1201C5C6-8762-4168-B6D6-C658B6D654E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1201C5C6-8762-4168-B6D6-C658B6D654E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1201C5C6-8762-4168-B6D6-C658B6D654E7}.Debug|x64.ActiveCfg = Debug|Any CPU + {1201C5C6-8762-4168-B6D6-C658B6D654E7}.Debug|x64.Build.0 = Debug|Any CPU + {1201C5C6-8762-4168-B6D6-C658B6D654E7}.Debug|x86.ActiveCfg = Debug|Any CPU + {1201C5C6-8762-4168-B6D6-C658B6D654E7}.Debug|x86.Build.0 = Debug|Any CPU + {1201C5C6-8762-4168-B6D6-C658B6D654E7}.dll_test|Any CPU.ActiveCfg = Debug|Any CPU + {1201C5C6-8762-4168-B6D6-C658B6D654E7}.dll_test|Any CPU.Build.0 = Debug|Any CPU + {1201C5C6-8762-4168-B6D6-C658B6D654E7}.dll_test|x64.ActiveCfg = Debug|Any CPU + {1201C5C6-8762-4168-B6D6-C658B6D654E7}.dll_test|x64.Build.0 = Debug|Any CPU + {1201C5C6-8762-4168-B6D6-C658B6D654E7}.dll_test|x86.ActiveCfg = Debug|Any CPU + {1201C5C6-8762-4168-B6D6-C658B6D654E7}.dll_test|x86.Build.0 = Debug|Any CPU + {1201C5C6-8762-4168-B6D6-C658B6D654E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1201C5C6-8762-4168-B6D6-C658B6D654E7}.Release|Any CPU.Build.0 = Release|Any CPU + {1201C5C6-8762-4168-B6D6-C658B6D654E7}.Release|x64.ActiveCfg = Release|Any CPU + {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 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1114,6 +1134,7 @@ {62B68CCE-1FDA-42EB-8BBC-2053EB0E04CA} = {4F0A7BA1-6ED6-4F4F-A3B4-B9B3A133D869} {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} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E02989A8-9B6F-43E5-AACA-790328215089} diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs index 3f45632..603c07b 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs @@ -72,6 +72,8 @@ controlContainer4 = new DevExpress.XtraBars.Docking.ControlContainer(); xhsProjectSimulationUnMatchingListCtrl1 = new XhsProjectSimulationUnMatchingListCtrl(); svgImg32 = new DevExpress.Utils.SvgImageCollection(components); + tabPageL3d = new DevExpress.XtraBars.Navigation.TabNavigationPage(); + xhsProjectSimulationL3dCtrl1 = new XhsProjectSimulationL3dCtrl(); ((ISupportInitialize)ribbonControl1).BeginInit(); ((ISupportInitialize)tabPane1).BeginInit(); tabPane1.SuspendLayout(); @@ -89,6 +91,7 @@ docPnlUnMatchingList.SuspendLayout(); controlContainer4.SuspendLayout(); ((ISupportInitialize)svgImg32).BeginInit(); + tabPageL3d.SuspendLayout(); SuspendLayout(); // // ribbonControl1 @@ -254,10 +257,11 @@ // tabPane1.Controls.Add(pageBimface); tabPane1.Controls.Add(pageQ3d); + tabPane1.Controls.Add(tabPageL3d); tabPane1.Dock = DockStyle.Fill; tabPane1.Location = new Point(0, 128); tabPane1.Name = "tabPane1"; - tabPane1.Pages.AddRange(new DevExpress.XtraBars.Navigation.NavigationPageBase[] { pageBimface, pageQ3d }); + tabPane1.Pages.AddRange(new DevExpress.XtraBars.Navigation.NavigationPageBase[] { pageBimface, pageQ3d, tabPageL3d }); tabPane1.RegularSize = new Size(886, 228); tabPane1.SelectedPage = pageBimface; tabPane1.Size = new Size(886, 228); @@ -452,6 +456,21 @@ svgImg32.ImageSize = new Size(32, 32); svgImg32.Add("calculatesheet", "image://svgimages/spreadsheet/calculatesheet.svg"); // + // tabPageL3d + // + tabPageL3d.Caption = "L3d"; + tabPageL3d.Controls.Add(xhsProjectSimulationL3dCtrl1); + tabPageL3d.Name = "tabPageL3d"; + tabPageL3d.Size = new Size(886, 195); + // + // xhsProjectSimulationL3dCtrl1 + // + xhsProjectSimulationL3dCtrl1.Dock = DockStyle.Fill; + xhsProjectSimulationL3dCtrl1.Location = new Point(0, 0); + xhsProjectSimulationL3dCtrl1.Name = "xhsProjectSimulationL3dCtrl1"; + xhsProjectSimulationL3dCtrl1.Size = new Size(886, 195); + xhsProjectSimulationL3dCtrl1.TabIndex = 0; + // // XhsProjectSimulationCorePage // Appearance.BackColor = SystemColors.Control; @@ -485,6 +504,7 @@ docPnlUnMatchingList.ResumeLayout(false); controlContainer4.ResumeLayout(false); ((ISupportInitialize)svgImg32).EndInit(); + tabPageL3d.ResumeLayout(false); ResumeLayout(false); PerformLayout(); } @@ -533,5 +553,7 @@ private DevExpress.XtraBars.Docking.ControlContainer controlContainer4; private XhsProjectSimulationUnMatchingListCtrl xhsProjectSimulationUnMatchingListCtrl1; private DevExpress.XtraBars.BarButtonItem barBtnUnMatchingList; + private DevExpress.XtraBars.Navigation.TabNavigationPage tabPageL3d; + private XhsProjectSimulationL3dCtrl xhsProjectSimulationL3dCtrl1; } } diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs index 1b345ca..ddeee59 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs @@ -57,6 +57,7 @@ _hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(hydroRelation.ModelID); } this.xhsProjectSimulationQ3dCtrl1.SetBindingData(_hydroInfo); + this.xhsProjectSimulationL3dCtrl1.SetBindingData(_hydroInfo); } /// <summary> diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/07-l3d/XhsProjectSimulationL3dCtrl.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/07-l3d/XhsProjectSimulationL3dCtrl.Designer.cs new file mode 100644 index 0000000..9901482 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/07-l3d/XhsProjectSimulationL3dCtrl.Designer.cs @@ -0,0 +1,56 @@ +锘縩amespace HStation.WinFrmUI +{ + partial class XhsProjectSimulationL3dCtrl + { + /// <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() + { + networkPanel1 = new Yw.WinFrmUI.HydroL3d.NetworkPanel(); + SuspendLayout(); + // + // networkPanel1 + // + networkPanel1.Dock = DockStyle.Fill; + networkPanel1.Location = new Point(0, 0); + networkPanel1.Name = "networkPanel1"; + networkPanel1.Size = new Size(889, 597); + networkPanel1.TabIndex = 0; + // + // XhsProjectSimulationL3dCtrl + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(networkPanel1); + Name = "XhsProjectSimulationL3dCtrl"; + Size = new Size(889, 597); + ResumeLayout(false); + } + + #endregion + + private Yw.WinFrmUI.HydroL3d.NetworkPanel networkPanel1; + } +} diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/07-l3d/XhsProjectSimulationL3dCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/07-l3d/XhsProjectSimulationL3dCtrl.cs new file mode 100644 index 0000000..64c4cfc --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/07-l3d/XhsProjectSimulationL3dCtrl.cs @@ -0,0 +1,29 @@ +锘縩amespace HStation.WinFrmUI +{ + public partial class XhsProjectSimulationL3dCtrl : DevExpress.XtraEditors.XtraUserControl + { + public XhsProjectSimulationL3dCtrl() + { + InitializeComponent(); + } + + private Yw.Model.HydroModelInfo _hydroInfo = null; + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(Yw.Model.HydroModelInfo rhs) + { + _hydroInfo = rhs; + if (_hydroInfo == null) + { + return; + } + var netWork = Yw.WinFrmUI.HydroL3dTransferHelper.ToL3dNetworkViewModel(rhs); + this.networkPanel1.Initial(netWork); + } + + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/UserControl1.resx b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/07-l3d/XhsProjectSimulationL3dCtrl.resx similarity index 92% copy from WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/UserControl1.resx copy to WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/07-l3d/XhsProjectSimulationL3dCtrl.resx index 1af7de1..af32865 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/UserControl1.resx +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/07-l3d/XhsProjectSimulationL3dCtrl.resx @@ -1,17 +1,17 @@ 锘�<?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 + + 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> @@ -26,36 +26,36 @@ <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 + + 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 + + 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 + + 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 + + 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 + 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 + 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 + value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj index 9bd2d26..521305e 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj @@ -177,6 +177,9 @@ <Compile Update="04-simulation\06-simulation\03-calcu\XhsProjectSimulationHydroCalcuFailedDlg.cs"> <SubType>Form</SubType> </Compile> + <Compile Update="04-simulation\07-l3d\XhsProjectSimulationL3dCtrl.cs"> + <SubType>UserControl</SubType> + </Compile> <Compile Update="Properties\Resources.Designer.cs"> <DesignTime>True</DesignTime> <AutoGen>True</AutoGen> diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/HydroL3dTransferHelper.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/HydroL3dTransferHelper.cs new file mode 100644 index 0000000..b2a1f90 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/HydroL3dTransferHelper.cs @@ -0,0 +1,161 @@ +锘� +using Yw.WinFrmUI.HydroL3d; + +namespace Yw.WinFrmUI +{ + /// <summary> + /// + /// </summary> + public static class HydroL3dTransferHelper + { + /// <summary> + /// + /// </summary> + public static Network ToL3dNetworkViewModel(this Yw.Model.HydroModelInfo rhs) + { + if (rhs == null) + { + return default; + } + var vm = new Network(); + if (rhs.Junctions != null && rhs.Junctions.Count > 0) + { + foreach (var junction in rhs.Junctions) + { + + } + } + if (rhs.Nozzles != null && rhs.Nozzles.Count > 0) + { + foreach (var nozzle in rhs.Nozzles) + { + + } + } + if (rhs.Hydrants != null && rhs.Hydrants.Count > 0) + { + foreach (var hydrant in rhs.Hydrants) + { + + } + } + if (rhs.Elbows != null && rhs.Elbows.Count > 0) + { + foreach (var elbow in rhs.Elbows) + { + + } + } + if (rhs.Threelinks != null && rhs.Threelinks.Count > 0) + { + foreach (var threelink in rhs.Threelinks) + { + + } + } + if (rhs.Fourlinks != null && rhs.Fourlinks.Count > 0) + { + foreach (var fourlink in rhs.Fourlinks) + { + + } + } + if (rhs.Meters != null && rhs.Meters.Count > 0) + { + foreach (var meter in rhs.Meters) + { + + } + } + if (rhs.Flowmeters != null && rhs.Flowmeters.Count > 0) + { + foreach (var flowmeter in rhs.Flowmeters) + { + + } + } + if (rhs.Pressmeters != null && rhs.Pressmeters.Count > 0) + { + foreach (var pressmeter in rhs.Pressmeters) + { + + } + } + if (rhs.Bluntheads != null && rhs.Bluntheads.Count > 0) + { + foreach (var blunthead in rhs.Bluntheads) + { + + } + } + + if (rhs.Reservoirs != null && rhs.Reservoirs.Count > 0) + { + foreach (var reservoir in rhs.Reservoirs) + { + + } + } + if (rhs.Tanks != null && rhs.Tanks.Count > 0) + { + foreach (var tank in rhs.Tanks) + { + + } + } + if (rhs.Waterboxs != null && rhs.Waterboxs.Count > 0) + { + foreach (var waterbox in rhs.Waterboxs) + { + + } + } + + if (rhs.Pipes != null && rhs.Pipes.Count > 0) + { + foreach (var pipe in rhs.Pipes) + { + var startNode = rhs.GetAllNodes().Find(x => x.Code == pipe.StartCode); + var endNode = rhs.GetAllNodes().Find(x => x.Code == pipe.EndCode); + var pipeViewModel = new Pipe(); + pipeViewModel.Id = pipe.Code; + pipeViewModel.Name = pipe.Name; + pipeViewModel.StartPosition = new Point3d(startNode.Position3d.X, startNode.Position3d.Y, startNode.Position3d.Z); + pipeViewModel.EndPosition = new Point3d(endNode.Position3d.X, endNode.Position3d.Y, endNode.Position3d.Z); + vm.Append(pipeViewModel, out _); + } + } + if (rhs.Translations != null && rhs.Translations.Count > 0) + { + foreach (var translation in rhs.Translations) + { + + } + } + if (rhs.Exchangers != null && rhs.Exchangers.Count > 0) + { + foreach (var exchanger in rhs.Exchangers) + { + + } + } + + if (rhs.Pumps != null && rhs.Pumps.Count > 0) + { + foreach (var pump in rhs.Pumps) + { + + } + } + if (rhs.Valves != null && rhs.Valves.Count > 0) + { + foreach (var valve in rhs.Valves) + { + + } + } + + return vm; + } + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l3d/HydroL3dViewPage.Designer.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l3d/HydroL3dViewPage.Designer.cs new file mode 100644 index 0000000..39e8b7b --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l3d/HydroL3dViewPage.Designer.cs @@ -0,0 +1,58 @@ +锘縩amespace Yw.WinFrmUI +{ + partial class HydroL3dViewPage + { + /// <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() + { + networkPanel1 = new HydroL3d.NetworkPanel(); + SuspendLayout(); + // + // networkPanel1 + // + networkPanel1.Dock = DockStyle.Fill; + networkPanel1.Location = new Point(0, 0); + networkPanel1.Name = "networkPanel1"; + networkPanel1.Size = new Size(736, 476); + networkPanel1.TabIndex = 0; + // + // HydroL3dViewPage + // + Appearance.BackColor = SystemColors.Control; + Appearance.Options.UseBackColor = true; + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(networkPanel1); + Name = "HydroL3dViewPage"; + Size = new Size(736, 476); + ResumeLayout(false); + } + + #endregion + + private HydroL3d.NetworkPanel networkPanel1; + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l3d/HydroL3dViewPage.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l3d/HydroL3dViewPage.cs new file mode 100644 index 0000000..97ec46a --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l3d/HydroL3dViewPage.cs @@ -0,0 +1,33 @@ +锘縩amespace Yw.WinFrmUI +{ + public partial class HydroL3dViewPage : Yw.WinFrmUI.DocumentPage + { + public HydroL3dViewPage() + { + InitializeComponent(); + this.PageTitle.Caption = "姘村姏妯″瀷"; + } + + private Yw.Model.HydroModelInfo _hydroInfo = null; + + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(Yw.Model.HydroModelInfo rhs) + { + this.PageTitle.Caption = $"{rhs.Name}\r\nL3d姘村姏妯″瀷"; + + var netWork = HydroL3dTransferHelper.ToL3dNetworkViewModel(rhs); + this.networkPanel1.Initial(netWork); + } + + /// <summary> + /// 鍒濆鍖栨暟鎹簮 + /// </summary> + public override void InitialDataSource() + { + base.InitialDataSource(); + } + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/UserControl1.resx b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l3d/HydroL3dViewPage.resx similarity index 93% rename from WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/UserControl1.resx rename to WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l3d/HydroL3dViewPage.resx index 1af7de1..af32865 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/UserControl1.resx +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l3d/HydroL3dViewPage.resx @@ -1,17 +1,17 @@ 锘�<?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 + + 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> @@ -26,36 +26,36 @@ <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 + + 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 + + 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 + + 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 + + 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 + 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 + 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 + value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj index 5184d61..5df11df 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj @@ -17,6 +17,7 @@ <ProjectReference Include="..\..\Hydro\Yw.Hydro.Core\Yw.Hydro.Core.csproj" /> <ProjectReference Include="..\Yw.WinFrmUI.Core\Yw.WinFrmUI.Core.csproj" /> <ProjectReference Include="..\Yw.WinFrmUI.Hydro.L2d.Core\Yw.WinFrmUI.Hydro.L2d.Core.csproj" /> + <ProjectReference Include="..\Yw.WinFrmUI.Hydro.L3d.Core\Yw.WinFrmUI.Hydro.L3d.Core.csproj" /> <ProjectReference Include="..\Yw.WinFrmUI.Hydro.Q3d.Core\Yw.WinFrmUI.Hydro.Q3d.Core.csproj" /> </ItemGroup> @@ -81,6 +82,9 @@ <Compile Update="06-l2d\HydroL2dViewPage.cs"> <SubType>UserControl</SubType> </Compile> + <Compile Update="07-l3d\HydroL3dViewPage.cs"> + <SubType>UserControl</SubType> + </Compile> <Compile Update="Properties\Resources.Designer.cs"> <DesignTime>True</DesignTime> <AutoGen>True</AutoGen> diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/CacheHelper.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/CacheHelper.cs new file mode 100644 index 0000000..bac4823 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/CacheHelper.cs @@ -0,0 +1,29 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + /// <summary> + /// 缂撳瓨杈呭姪绫� + /// </summary> + internal class CacheHelper + { + /// <summary> + /// HydroL3d + /// </summary> + public static Paras_HydroL3d HydroL3d + { + get { return HydroL3dParasHelper.HydroL3d; } + } + + + + + + + + + + + + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/FloatExtensions.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/FloatExtensions.cs new file mode 100644 index 0000000..dad1105 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/FloatExtensions.cs @@ -0,0 +1,30 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + /// <summary> + /// float鎷撳睍 + /// </summary> + public static class FloatExtensions + { + /// <summary> + /// 鏄惁鏃犳晥 + /// </summary> + public static bool Invalid(this float rhs) + { + if (float.IsNaN(rhs) || rhs == float.MinValue || rhs == float.MaxValue) + { + return true; + } + return false; + } + + /// <summary> + /// 鏄惁鏈夋晥 + /// </summary> + /// <param name="rhs"></param> + /// <returns></returns> + public static bool Valid(this float rhs) + { + return !rhs.Invalid(); + } + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/Point3d.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/Point3d.cs new file mode 100644 index 0000000..1b3b383 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/00-core/Point3d.cs @@ -0,0 +1,77 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + /// <summary> + /// + /// </summary> + public class Point3d + { + /// <summary> + /// + /// </summary> + public Point3d() { } + + /// <summary> + /// + /// </summary> + public Point3d(float x, float y, float z) + { + this.X = x; + this.Y = y; + this.Z = z; + } + + /// <summary> + /// + /// </summary> + public Point3d(double x, double y, double z) + { + this.X = (float)x; + this.Y = (float)y; + this.Z = (float)z; + } + + /// <summary> + /// x + /// </summary> + public float X { get; set; } + + /// <summary> + /// y + /// </summary> + public float Y { get; set; } + + /// <summary> + /// z + /// </summary> + public float Z { get; set; } + + /// <summary> + /// 鏄惁鏃犳晥 + /// </summary> + public bool InValid() + { + if (this.X.Invalid()) + { + return true; + } + if (this.Y.Invalid()) + { + return true; + } + if (this.Z.Invalid()) + { + return true; + } + return false; + } + + /// <summary> + /// 鏄惁鏈夋晥 + /// </summary> + public bool Valid() + { + return !InValid(); + } + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/00-core/Network.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/00-core/Network.cs new file mode 100644 index 0000000..4e1c2f3 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/00-core/Network.cs @@ -0,0 +1,105 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + /// <summary> + /// 绠$綉 + /// </summary> + public partial class Network + { + + /// <summary> + /// + /// </summary> + public Network() { } + + + /// <summary> + /// 缁勪欢鍒楄〃 + /// </summary> + public List<Parter> Parters + { + get { return _parters.ToList(); } + private set { _parters = value; } + } + private List<Parter> _parters = new(); + + /// <summary> + /// 鑺傜偣鍒楄〃 + /// </summary> + public List<Node> Nodes + { + get + { + return _parters.Where(x => x is Node).Select(x => x as Node).ToList(); + } + } + + /// <summary> + /// 绠℃鍒楄〃 + /// </summary> + public List<Link> Links + { + get { return _parters.Where(x => x is Link).Select(x => x as Link).ToList(); } + } + + /// <summary> + /// 姘存簮鍒楄〃 + /// </summary> + public List<Source> Sources + { + get { return _parters.Where(x => x is Source).Select(x => x as Source).ToList(); } + } + + /// <summary> + /// 姘村簱鍒楄〃 + /// </summary> + public List<Reservoir> Reservoirs + { + get { return _parters.Where(x => x is Reservoir).Select(x => x as Reservoir).ToList(); } + } + + /// <summary> + /// 姘存睜鍒楄〃 + /// </summary> + public List<Tank> Tanks + { + get { return _parters.Where(x => x is Tank).Select(x => x as Tank).ToList(); } + } + + /// <summary> + /// 杩炴帴鑺傜偣鍒楄〃 + /// </summary> + public List<Junction> Junctions + { + get { return _parters.Where(x => x is Junction).Select(x => x as Junction).ToList(); } + } + + /// <summary> + /// 绠¢亾鍒楄〃 + /// </summary> + public List<Pipe> Pipes + { + get { return _parters.Where(x => x is Pipe).Select(x => x as Pipe).ToList(); } + } + + /// <summary> + /// 姘存车鍒楄〃 + /// </summary> + public List<Pump> Pumps + { + get { return _parters.Where(x => x is Pump).Select(x => x as Pump).ToList(); } + } + + /// <summary> + /// 闃�闂ㄥ垪琛� + /// </summary> + public List<Valve> Valves + { + get { return _parters.Where(x => x is Valve).Select(x => x as Valve).ToList(); } + } + + + + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/00-core/Network_Append.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/00-core/Network_Append.cs new file mode 100644 index 0000000..837c6fe --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/00-core/Network_Append.cs @@ -0,0 +1,196 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + /// <summary> + /// + /// </summary> + public partial class Network + { + /// <summary> + /// 娣诲姞缁勪欢 + /// </summary> + /// <param name="parter">缁勪欢</param> + /// <param name="msg">澶辫触淇℃伅</param> + /// <returns></returns> + public bool Append(Parter parter, out string msg) + { + msg = string.Empty; + if (parter == null) + { + msg = "鏁版嵁涓虹┖"; + return false; + } + if (string.IsNullOrEmpty(parter.Id)) + { + msg = "Id涓虹┖"; + return false; + } + if (IsExist(parter.Id)) + { + msg = "缁勪欢Id宸插瓨鍦�"; + return false; + } + _parters.Add(parter); + return true; + } + + /// <summary> + /// 娣诲姞鑺傜偣 + /// </summary> + /// <param name="node">鑺傜偣</param> + /// <param name="msg">澶辫触淇℃伅</param> + /// <returns></returns> + public bool Append(Node node, out string msg) + { + if (node == null) + { + msg = "鏁版嵁涓虹┖"; + return false; + } + if (node.Position.InValid()) + { + msg = "鑺傜偣浣嶇疆鏃犳晥"; + return false; + } + return Append(node as Parter, out msg); + } + + /// <summary> + /// 娣诲姞绠℃ + /// </summary> + /// <param name="link">绠℃</param> + /// <param name="msg">澶辫触淇℃伅</param> + /// <returns></returns> + public bool Append(Link link, out string msg) + { + if (link == null) + { + msg = "鏁版嵁涓虹┖"; + return false; + } + if (link.StartPosition.InValid()) + { + msg = "绠℃涓婃父浣嶇疆鏃犳晥"; + return false; + } + if (link.EndPosition.InValid()) + { + msg = "绠℃涓嬫父浣嶇疆鏃犳晥"; + return false; + } + return Append(link as Parter, out msg); + } + + /// <summary> + /// 娣诲姞姘存簮 + /// </summary> + /// <param name="source">姘存簮</param> + /// <param name="msg">澶辫触淇℃伅</param> + /// <returns></returns> + public bool Append(Source source, out string msg) + { + if (source == null) + { + msg = "鏁版嵁涓虹┖"; + return false; + } + return Append(source as Node, out msg); + } + + /// <summary> + /// 娣诲姞姘村簱 + /// </summary> + /// <param name="reservoir">姘村簱</param> + /// <param name="msg">澶辫触淇℃伅</param> + /// <returns></returns> + public bool Append(Reservoir reservoir, out string msg) + { + if (reservoir == null) + { + msg = "鏁版嵁涓虹┖"; + return false; + } + return Append(reservoir as Source, out msg); + } + + /// <summary> + /// 娣诲姞姘存睜 + /// </summary> + /// <param name="tank">姘存睜</param> + /// <param name="msg">澶辫触淇℃伅</param> + /// <returns></returns> + public bool Append(Tank tank, out string msg) + { + if (tank == null) + { + msg = "鏁版嵁涓虹┖"; + return false; + } + return Append(tank as Source, out msg); + } + + /// <summary> + /// 娣诲姞杩炴帴鑺傜偣 + /// </summary> + /// <param name="junction">杩炴帴鑺傜偣</param> + /// <param name="msg">澶辫触淇℃伅</param> + /// <returns></returns> + public bool Append(Junction junction, out string msg) + { + if (junction == null) + { + msg = "鏁版嵁涓虹┖"; + return false; + } + return Append(junction as Node, out msg); + } + + /// <summary> + /// 娣诲姞绠¢亾 + /// </summary> + /// <param name="pipe">绠¢亾</param> + /// <param name="msg">澶辫触淇℃伅</param> + /// <returns></returns> + public bool Append(Pipe pipe, out string msg) + { + if (pipe == null) + { + msg = "鏁版嵁涓虹┖"; + return false; + } + return Append(pipe as Link, out msg); + } + + /// <summary> + /// 娣诲姞姘存车 + /// </summary> + /// <param name="pump">姘存车</param> + /// <param name="msg">澶辫触淇℃伅</param> + /// <returns></returns> + public bool Append(Pump pump, out string msg) + { + if (pump == null) + { + msg = "鏁版嵁涓虹┖"; + return false; + } + return Append(pump as Link, out msg); + } + + /// <summary> + /// 娣诲姞闃�闂� + /// </summary> + /// <param name="valve">闃�闂�</param> + /// <param name="msg">澶辫触淇℃伅</param> + /// <returns></returns> + public bool Append(Valve valve, out string msg) + { + if (valve == null) + { + msg = "鏁版嵁涓虹┖"; + return false; + } + return Append(valve as Link, out msg); + } + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/00-core/Network_Method.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/00-core/Network_Method.cs new file mode 100644 index 0000000..4bb19f4 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/00-core/Network_Method.cs @@ -0,0 +1,40 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + /// <summary> + /// + /// </summary> + public partial class Network + { + + /// <summary> + /// 鍒ゆ柇鏄惁瀛樺湪 + /// </summary> + public bool IsExist(string id) + { + return _parters.Exists(x => x.Id == id); + } + + + /// <summary> + /// 缁樺埗 + /// </summary> + public void Draw() + { + foreach (var link in this.Links) + { + link.Draw(); + } + foreach (var node in this.Nodes) + { + node.Draw(); + } + } + + + + + + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/01-parter/Parter.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/01-parter/Parter.cs new file mode 100644 index 0000000..d65db24 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/01-parter/Parter.cs @@ -0,0 +1,58 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + /// <summary> + /// 缁勪欢 + /// 鎵�鏈夌粍浠剁殑鍩虹被 + /// </summary> + public abstract class Parter + { + /// <summary> + /// + /// </summary> + public Parter() { } + + /// <summary> + /// + /// </summary> + public Parter(Parter rhs) + { + this.Id = rhs.Id; + this.Name = rhs.Name; + this.Level = rhs.Level; + this.Selected = rhs.Selected; + this.Hovered = rhs.Hovered; + } + + /// <summary> + /// id + /// </summary> + public string Id { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鍥惧眰 + /// </summary> + public int Level { get; set; } + + /// <summary> + /// 閫変腑 + /// </summary> + public bool Selected { get; set; } + + /// <summary> + /// 鎮仠 + /// </summary> + public bool Hovered { get; set; } + + /// <summary> + /// 缁樺埗 + /// </summary> + public abstract void Draw(); + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Junction.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Junction.cs new file mode 100644 index 0000000..9abc8f2 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Junction.cs @@ -0,0 +1,60 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + /// <summary> + /// 杩炴帴鑺傜偣 + /// </summary> + public abstract class Junction : Node + { + + /// <summary> + /// 瀹藉害 + /// </summary> + public float? Width { get; set; } + + /// <summary> + /// 楂樺害 + /// </summary> + public float? Height { get; set; } + + /// <summary> + /// 濉厖棰滆壊 + /// </summary> + public Color? FillColor { get; set; } + + /// <summary> + /// 鎮仠瀹藉害 + /// </summary> + public float? HoveredWidth { get; set; } + + /// <summary> + /// 鎮仠楂樺害 + /// </summary> + public float? HoveredHeight { get; set; } + + /// <summary> + /// 鎮仠濉厖棰滆壊 + /// </summary> + public Color? HoveredFillColor { get; set; } + + /// <summary> + /// 閫夋嫨瀹藉害 + /// </summary> + public float? SelectedWidth { get; set; } + + /// <summary> + /// 閫夋嫨楂樺害 + /// </summary> + public float? SelectedHeight { get; set; } + + /// <summary> + /// 閫夋嫨濉厖棰滆壊 + /// </summary> + public Color? SelectedFillColor { get; set; } + + + + + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Node.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Node.cs new file mode 100644 index 0000000..6e53a97 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Node.cs @@ -0,0 +1,14 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + /// <summary> + /// 鑺傜偣 + /// </summary> + public abstract class Node : Parter + { + /// <summary> + /// 浣嶇疆 + /// </summary> + public Point3d Position { get; set; } + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Reservoir.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Reservoir.cs new file mode 100644 index 0000000..50f543b --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Reservoir.cs @@ -0,0 +1,42 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + /// <summary> + /// 姘村簱 + /// </summary> + public abstract class Reservoir : Source + { + + /// <summary> + /// 瀹藉害 + /// </summary> + public float? Width { get; set; } + + /// <summary> + /// 楂樺害 + /// </summary> + public float? Height { get; set; } + + /// <summary> + /// 鎮仠瀹藉害 + /// </summary> + public float? HoveredWidth { get; set; } + + /// <summary> + /// 鎮仠楂樺害 + /// </summary> + public float? HoveredHeight { get; set; } + + /// <summary> + /// 閫夋嫨瀹藉害 + /// </summary> + public float? SelectedWidth { get; set; } + + /// <summary> + /// 閫夋嫨楂樺害 + /// </summary> + public float? SelectedHeight { get; set; } + + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Source.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Source.cs new file mode 100644 index 0000000..714f0f2 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Source.cs @@ -0,0 +1,9 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + /// <summary> + /// 姘存簮 + /// </summary> + public abstract class Source : Node + { + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Tank.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Tank.cs new file mode 100644 index 0000000..3fc7220 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/02-node/Tank.cs @@ -0,0 +1,44 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + /// <summary> + /// 姘存睜 + /// </summary> + public abstract class Tank : Source + { + + + /// <summary> + /// 瀹藉害 + /// </summary> + public float? Width { get; set; } + + /// <summary> + /// 楂樺害 + /// </summary> + public float? Height { get; set; } + + /// <summary> + /// 鎮仠瀹藉害 + /// </summary> + public float? HoveredWidth { get; set; } + + /// <summary> + /// 鎮仠楂樺害 + /// </summary> + public float? HoveredHeight { get; set; } + + /// <summary> + /// 閫夋嫨瀹藉害 + /// </summary> + public float? SelectedWidth { get; set; } + + /// <summary> + /// 閫夋嫨楂樺害 + /// </summary> + public float? SelectedHeight { get; set; } + + + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/04-link/Link.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/04-link/Link.cs new file mode 100644 index 0000000..7c41d9a --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/04-link/Link.cs @@ -0,0 +1,30 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + /// <summary> + /// 绠℃ + /// </summary> + public abstract class Link : Parter + { + /// <summary> + /// 涓婃父浣嶇疆 + /// </summary> + public Point3d StartPosition { get; set; } + + /// <summary> + /// 涓嬫父浣嶇疆 + /// </summary> + public Point3d EndPosition { get; set; } + + /// <summary> + /// 浣嶇疆鍒楄〃 + /// </summary> + public virtual List<Point3d> Positions + { + get + { + return new List<Point3d>() { this.StartPosition, this.EndPosition }; + } + } + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/04-link/Pipe.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/04-link/Pipe.cs new file mode 100644 index 0000000..b493c57 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/04-link/Pipe.cs @@ -0,0 +1,49 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + /// <summary> + /// 绠¢亾 + /// </summary> + public class Pipe : Link + { + /// <summary> + /// 绾胯壊 + /// </summary> + public Color? LineColor { get; set; } + + /// <summary> + /// 绾垮 + /// </summary> + public float? LineWidth { get; set; } + + /// <summary> + /// 鎮仠绾胯壊 + /// </summary> + public Color? HoveredLineColor { get; set; } + + /// <summary> + /// 鎮仠绾垮 + /// </summary> + public float? HoveredLineWidth { get; set; } + + /// <summary> + /// 閫夋嫨绾胯壊 + /// </summary> + public Color? SelectedLineColor { get; set; } + + /// <summary> + /// 閫夋嫨绾垮 + /// </summary> + public float? SelectedLineWidth { get; set; } + + + public override void Draw() + { + throw new NotImplementedException(); + } + + + + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/04-link/Pump.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/04-link/Pump.cs new file mode 100644 index 0000000..4fe119e --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/04-link/Pump.cs @@ -0,0 +1,73 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + /// <summary> + /// 姘存车 + /// </summary> + public abstract class Pump : Link + { + /// <summary> + /// 绾胯壊 + /// </summary> + public Color? LineColor { get; set; } + + /// <summary> + /// 绾垮 + /// </summary> + public float? LineWidth { get; set; } + + /// <summary> + /// 鎮仠绾胯壊 + /// </summary> + public Color? HoveredLineColor { get; set; } + + /// <summary> + /// 鎮仠绾垮 + /// </summary> + public float? HoveredLineWidth { get; set; } + + /// <summary> + /// 閫夋嫨绾胯壊 + /// </summary> + public Color? SelectedLineColor { get; set; } + + /// <summary> + /// 閫夋嫨绾垮 + /// </summary> + public float? SelectedLineWidth { get; set; } + + /// <summary> + /// 瀹藉害 + /// </summary> + public float? Width { get; set; } + + /// <summary> + /// 楂樺害 + /// </summary> + public float? Height { get; set; } + + /// <summary> + /// 鎮仠瀹藉害 + /// </summary> + public float? HoveredWidth { get; set; } + + /// <summary> + /// 鎮仠楂樺害 + /// </summary> + public float? HoveredHeight { get; set; } + + /// <summary> + /// 閫夋嫨瀹藉害 + /// </summary> + public float? SelectedWidth { get; set; } + + /// <summary> + /// 閫夋嫨楂樺害 + /// </summary> + public float? SelectedHeight { get; set; } + + + + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/04-link/Valve.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/04-link/Valve.cs new file mode 100644 index 0000000..b127ba7 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/01-network/04-link/Valve.cs @@ -0,0 +1,70 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + /// <summary> + /// 闃�闂� + /// </summary> + public abstract class Valve : Link + { + /// <summary> + /// 绾胯壊 + /// </summary> + public Color? LineColor { get; set; } + + /// <summary> + /// 绾垮 + /// </summary> + public float? LineWidth { get; set; } + + /// <summary> + /// 鎮仠绾胯壊 + /// </summary> + public Color? HoveredLineColor { get; set; } + + /// <summary> + /// 鎮仠绾垮 + /// </summary> + public float? HoveredLineWidth { get; set; } + + /// <summary> + /// 閫夋嫨绾胯壊 + /// </summary> + public Color? SelectedLineColor { get; set; } + + /// <summary> + /// 閫夋嫨绾垮 + /// </summary> + public float? SelectedLineWidth { get; set; } + + /// <summary> + /// 瀹藉害 + /// </summary> + public float? Width { get; set; } + + /// <summary> + /// 楂樺害 + /// </summary> + public float? Height { get; set; } + + /// <summary> + /// 鎮仠瀹藉害 + /// </summary> + public float? HoveredWidth { get; set; } + + /// <summary> + /// 鎮仠楂樺害 + /// </summary> + public float? HoveredHeight { get; set; } + + /// <summary> + /// 閫夋嫨瀹藉害 + /// </summary> + public float? SelectedWidth { get; set; } + + /// <summary> + /// 閫夋嫨楂樺害 + /// </summary> + public float? SelectedHeight { get; set; } + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/02-panel/NetworkPanel.Designer.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/02-panel/NetworkPanel.Designer.cs new file mode 100644 index 0000000..d331e6b --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/02-panel/NetworkPanel.Designer.cs @@ -0,0 +1,67 @@ +锘縩amespace Yw.WinFrmUI.HydroL3d +{ + partial class NetworkPanel + { + /// <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() + { + openGLControl1 = new SharpGL.OpenGLControl(); + ((ISupportInitialize)openGLControl1).BeginInit(); + SuspendLayout(); + // + // openGLControl1 + // + openGLControl1.BackColor = Color.WhiteSmoke; + openGLControl1.Dock = DockStyle.Fill; + openGLControl1.DrawFPS = false; + openGLControl1.Location = new Point(0, 0); + openGLControl1.Margin = new Padding(4, 3, 4, 3); + openGLControl1.Name = "openGLControl1"; + openGLControl1.OpenGLVersion = SharpGL.Version.OpenGLVersion.OpenGL2_1; + openGLControl1.RenderContextType = SharpGL.RenderContextType.DIBSection; + openGLControl1.RenderTrigger = SharpGL.RenderTrigger.TimerBased; + openGLControl1.Size = new Size(455, 321); + openGLControl1.TabIndex = 0; + openGLControl1.OpenGLInitialized += openGLControl1_OpenGLInitialized; + openGLControl1.OpenGLDraw += openGLControl1_OpenGLDraw; + openGLControl1.Resize += openGLControl1_Resize; + // + // NetworkPanel + // + AutoScaleDimensions = new SizeF(7F, 14F); + AutoScaleMode = AutoScaleMode.Font; + Controls.Add(openGLControl1); + Name = "NetworkPanel"; + Size = new Size(455, 321); + ((ISupportInitialize)openGLControl1).EndInit(); + ResumeLayout(false); + } + + #endregion + + private SharpGL.OpenGLControl openGLControl1; + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/02-panel/NetworkPanel.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/02-panel/NetworkPanel.cs new file mode 100644 index 0000000..f253b55 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/02-panel/NetworkPanel.cs @@ -0,0 +1,137 @@ +锘縰sing DevExpress.XtraBars.Docking.Paint; +using DevExpress.XtraEditors; +using SharpGL; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Windows.Media; + +namespace Yw.WinFrmUI.HydroL3d +{ + public partial class NetworkPanel : DevExpress.XtraEditors.XtraUserControl + { + public NetworkPanel() + { + InitializeComponent(); + } + + protected Network _network = null;//绠$綉 + + /// <summary> + /// 鏄惁鍒濆鍖� + /// </summary> + public bool Initialized => _network != null; + + private float rotation_X = 0.0f; + private float rotation_Y = 0.0f; + private float rotation_Z = 0.0f; + + /// <summary> + /// 鍒濆鍖� + /// </summary> + public virtual void Initial(Network network) + { + _network = network; + } + + private void openGLControl1_OpenGLDraw(object sender, RenderEventArgs args) + { + SharpGL.OpenGL gl = this.openGLControl1.OpenGL; + //娓呴櫎娣卞害缂撳瓨 + gl.Clear(OpenGL.GL_COLOR_BUFFER_BIT | OpenGL.GL_DEPTH_BUFFER_BIT); + + //閲嶇疆褰撳墠鎸囧畾鐨勭煩闃典负鍗曚綅鐭╅樀,灏嗗綋鍓嶇殑鐢ㄦ埛鍧愭爣绯荤殑鍘熺偣绉诲埌浜嗗睆骞曚腑蹇� + gl.LoadIdentity(); + + //鍧愭爣杞村彉鎹綅缃埌(0.0f, 0.0f, -5.0f)锛岃繖鏍锋垜浠殑鍧愭爣杞村氨鐩稿綋浜庡線灞忓箷鍐呰蛋5涓崟浣� + gl.Translate(0.0f, 0.0f, -5.0f); + + rotation_X += 1f; + gl.Rotate(rotation_X, 1.0f, 0.0f, 0.0f);//rotationX:瑙掑害 + rotation_Y += 1f; + gl.Rotate(rotation_Y, 0.0f, 1.0f, 0.0f);//rotationY:瑙掑害 + rotation_Z += 1f; + gl.Rotate(rotation_Z, 0.0f, 0.0f, 1.0f);//rotationZ:瑙掑害 + + #region 鐐瑰埌绾� + gl.Begin(OpenGL.GL_LINES); + gl.Color(1.0f, 1.0f, 1.0f); + gl.Vertex(-2.0f, 0.0f, 0.0f);//宸﹂《鐐� + gl.Vertex(2.0f, 2.0f, 0.0f);//鍙抽《鐐� + gl.End(); + #endregion + #region 绾挎垚闈�(涓夎褰�) + gl.Begin(OpenGL.GL_TRIANGLES);//绗竴涓潰 + gl.Color(1.0f, 0.0f, 0.0f); + gl.Vertex(0.0f, 1f, 0.0f);//椤剁偣 + gl.Color(0.0f, 1.0f, 0.0f); + gl.Vertex(-1.0f, -1.0f, 0.0f);//宸﹂《鐐� + gl.Color(0.0f, 0.0f, 1.0f); + gl.Vertex(1.0f, -1.0f, 0.0f);//鍙抽《鐐� + gl.End(); + #endregion + #region 闈㈢粍鍚堟垚浣� + gl.Begin(OpenGL.GL_TRIANGLES);//绗簩涓潰 + gl.Color(1.0f, 1.0f, 1.0f); + gl.Vertex(0.0f, 0.0f, -2.0f);//绗洓涓偣 + gl.Color(0.0f, 1.0f, 0.0f); + gl.Vertex(-1.0f, -1.0f, 0.0f);//宸﹂《鐐� + gl.Color(0.0f, 0.0f, 1.0f); + gl.Vertex(1.0f, -1.0f, 0.0f);//鍙抽《鐐� + gl.End(); + gl.Begin(OpenGL.GL_TRIANGLES);//绗笁涓潰 + gl.Color(1.0f, 1.0f, 1.0f); + gl.Vertex(0.0f, 0.0f, -2.0f);//绗洓涓偣 + gl.Color(0.0f, 1.0f, 0.0f); + gl.Vertex(-1.0f, -1.0f, 0.0f);//宸﹂《鐐� + gl.Color(1.0f, 0.0f, 0.0f); + gl.Vertex(0.0f, 1f, 0.0f);//椤剁偣 + gl.End(); + gl.Begin(OpenGL.GL_TRIANGLES);//绗洓涓潰 + gl.Color(1.0f, 1.0f, 1.0f); + gl.Vertex(0.0f, 0.0f, -2.0f);//绗洓涓偣 + gl.Color(0.0f, 0.0f, 1.0f); + gl.Vertex(1.0f, -1.0f, 0.0f);//鍙抽《鐐� + gl.Color(1.0f, 0.0f, 0.0f); + gl.Vertex(0.0f, 1f, 0.0f);//椤剁偣 + gl.End(); + #endregion + + gl.Flush(); //寮哄埗鍒锋柊 + + } + + private void openGLControl1_OpenGLInitialized(object sender, EventArgs e) + { + OpenGL gl = openGLControl1.OpenGL; + gl.ClearColor(0, 0, 0, 0); + } + + + private void openGLControl1_Resize(object sender, EventArgs e) + { + OpenGL gl = openGLControl1.OpenGL; + + // 璁剧疆褰撳墠鐭╅樀妯″紡,瀵规姇褰辩煩闃靛簲鐢ㄩ殢鍚庣殑鐭╅樀鎿嶄綔 + gl.MatrixMode(OpenGL.GL_PROJECTION); + + // 閲嶇疆褰撳墠鎸囧畾鐨勭煩闃典负鍗曚綅鐭╅樀,灏嗗綋鍓嶇殑鐢ㄦ埛鍧愭爣绯荤殑鍘熺偣绉诲埌浜嗗睆骞曚腑蹇� + gl.LoadIdentity(); + + // 鍒涘缓閫忚鎶曞奖鍙樻崲 + gl.Perspective(30.0f, (double)Width / (double)Height, 5, 100.0); + + // 瑙嗙偣鍙樻崲 + gl.LookAt(0, 5, 0, 0, 0, 0, 0, 1, 0); + + // 璁剧疆褰撳墠鐭╅樀涓烘ā鍨嬭鍥剧煩闃� + gl.MatrixMode(OpenGL.GL_MODELVIEW); + } + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/UserControl1.resx b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/02-panel/NetworkPanel.resx similarity index 93% copy from WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/UserControl1.resx copy to WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/02-panel/NetworkPanel.resx index 1af7de1..af32865 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/UserControl1.resx +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/02-panel/NetworkPanel.resx @@ -1,17 +1,17 @@ 锘�<?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 + + 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> @@ -26,36 +26,36 @@ <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 + + 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 + + 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 + + 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 + + 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 + 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 + 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 + value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/00-core/HydroL3dFileHelper.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/00-core/HydroL3dFileHelper.cs new file mode 100644 index 0000000..6097626 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/00-core/HydroL3dFileHelper.cs @@ -0,0 +1,62 @@ +锘縩amespace Yw.Settings +{ + internal class HydroL3dFileHelper + { + /// <summary> + /// json鏂囦欢鍚嶇О + /// </summary> + internal static string JsonFileName + { + get + { + if (string.IsNullOrEmpty(_jsonFileName)) + { + _jsonFileName = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "paras_hydro_l3d_settings.json"); + } + return _jsonFileName; + } + } + private static string _jsonFileName = null; + + /// <summary> + /// 鑾峰彇 + /// </summary> + internal static HydroL3dParas Get() + { + if (_appparas == null) + { + lock (_locker) + { + if (_appparas == null) + { + var json = File.ReadAllText(JsonFileName, Encoding.UTF8); + _appparas = JsonHelper.Json2Object<HydroL3dParas>(json); + if (_appparas == null) + { + _appparas = new HydroL3dParas(); + } + } + } + } + return _appparas; + } + private static HydroL3dParas _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; + } + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/00-core/HydroL3dParasHelper.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/00-core/HydroL3dParasHelper.cs new file mode 100644 index 0000000..7929210 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/00-core/HydroL3dParasHelper.cs @@ -0,0 +1,27 @@ +锘縩amespace Yw.Settings +{ + /// <summary> + /// + /// </summary> + public class HydroL3dParasHelper + { + + /// <summary> + /// + /// </summary> + public static Paras_HydroL3d HydroL3d + { + get { return HydroL3dFileHelper.Get().HydroL3d; } + } + + /// <summary> + /// 淇濆瓨 + /// </summary> + public static bool Save() + { + return HydroL3dFileHelper.Save(); + } + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/HydroL3dParas.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/HydroL3dParas.cs new file mode 100644 index 0000000..6019b92 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/HydroL3dParas.cs @@ -0,0 +1,13 @@ +锘縩amespace Yw.Settings +{ + /// <summary> + /// + /// </summary> + internal class HydroL3dParas + { + /// <summary> + /// + /// </summary> + public Paras_HydroL3d HydroL3d { get; set; } + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d.cs new file mode 100644 index 0000000..1a701ef --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d.cs @@ -0,0 +1,40 @@ +锘縩amespace Yw.Settings +{ + /// <summary> + /// + /// </summary> + public class Paras_HydroL3d + { + + /// <summary> + /// 杩炴帴鑺傜偣 + /// </summary> + public Paras_HydroL3d_Junction Junction { get; set; } + + /// <summary> + /// 姘村簱 + /// </summary> + public Paras_HydroL3d_Reservoir Reservoir { get; set; } + + /// <summary> + /// 姘存睜 + /// </summary> + public Paras_HydroL3d_Tank Tank { get; set; } + + /// <summary> + /// 绠¢亾 + /// </summary> + public Paras_HydroL3d_Pipe Pipe { get; set; } + + /// <summary> + /// 姘存车 + /// </summary> + public Paras_HydroL3d_Pump Pump { get; set; } + + /// <summary> + /// 闃�闂� + /// </summary> + public Paras_HydroL3d_Pump Valve { get; set; } + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d_Border.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d_Border.cs new file mode 100644 index 0000000..9c9de91 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d_Border.cs @@ -0,0 +1,20 @@ +锘縩amespace Yw.Settings +{ + /// <summary> + /// 杈规 + /// </summary> + public class Paras_HydroL3d_Border + { + /// <summary> + /// 棰滆壊 + /// </summary> + public string Color { get; set; } + + /// <summary> + /// 瀹藉害 + /// </summary> + public float Width { get; set; } + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d_Fill.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d_Fill.cs new file mode 100644 index 0000000..ba41d81 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d_Fill.cs @@ -0,0 +1,13 @@ +锘縩amespace Yw.Settings +{ + /// <summary> + /// 濉厖 + /// </summary> + public class Paras_HydroL3d_Fill + { + /// <summary> + /// 棰滆壊 + /// </summary> + public string Color { get; set; } + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d_Line.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d_Line.cs new file mode 100644 index 0000000..c1d1888 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d_Line.cs @@ -0,0 +1,18 @@ +锘縩amespace Yw.Settings +{ + /// <summary> + /// 绾� + /// </summary> + public class Paras_HydroL3d_Line + { + /// <summary> + /// 棰滆壊 + /// </summary> + public string Color { get; set; } + + /// <summary> + /// 瀹藉害 + /// </summary> + public float Width { get; set; } + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d_Size.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d_Size.cs new file mode 100644 index 0000000..bd883c9 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/00-core/Paras_HydroL3d_Size.cs @@ -0,0 +1,18 @@ +锘縩amespace Yw.Settings +{ + /// <summary> + /// 灏哄 + /// </summary> + public class Paras_HydroL3d_Size + { + /// <summary> + /// 瀹藉害 + /// </summary> + public float Width { get; set; } + + /// <summary> + /// 楂樺害 + /// </summary> + public float Height { get; set; } + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/01-junction/Paras_HydroL3d_Junction.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/01-junction/Paras_HydroL3d_Junction.cs new file mode 100644 index 0000000..9d62bf6 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/01-junction/Paras_HydroL3d_Junction.cs @@ -0,0 +1,43 @@ +锘縩amespace Yw.Settings +{ + /// <summary> + /// 杩炴帴鑺傜偣 + /// </summary> + public class Paras_HydroL3d_Junction + { + /// <summary> + /// 灏哄 + /// </summary> + public Paras_HydroL3d_Size Size { get; set; } + + /// <summary> + /// 濉厖 + /// </summary> + public Paras_HydroL3d_Fill Fill { get; set; } + + /// <summary> + /// 鎮仠灏哄 + /// </summary> + public Paras_HydroL3d_Size HoveredSize { get; set; } + + /// <summary> + /// 鎮仠濉厖 + /// </summary> + public Paras_HydroL3d_Fill HoveredFill { get; set; } + + /// <summary> + /// 閫夋嫨灏哄 + /// </summary> + public Paras_HydroL3d_Size SelectedSize { get; set; } + + /// <summary> + /// 閫夋嫨濉厖 + /// </summary> + public Paras_HydroL3d_Fill SelectedFill { get; set; } + + + + + } + +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/02-reservoir/Paras_HydroL3d_Reservoir.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/02-reservoir/Paras_HydroL3d_Reservoir.cs new file mode 100644 index 0000000..4c39c0f --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/02-reservoir/Paras_HydroL3d_Reservoir.cs @@ -0,0 +1,40 @@ +锘縩amespace Yw.Settings +{ + /// <summary> + /// 姘村簱 + /// </summary> + public class Paras_HydroL3d_Reservoir + { + /// <summary> + /// 鍥剧墖 + /// </summary> + public string Image { get; set; } + + /// <summary> + /// 灏哄 + /// </summary> + public Paras_HydroL3d_Size Size { get; set; } + + /// <summary> + /// 閫夋嫨鍥剧墖 + /// </summary> + public string SelectedImage { get; set; } + + /// <summary> + /// 閫夋嫨灏哄 + /// </summary> + public Paras_HydroL3d_Size SelectedSize { get; set; } + + /// <summary> + /// 鎮仠鍥剧墖 + /// </summary> + public string HoveredImage { get; set; } + + /// <summary> + /// 鎮仠灏哄 + /// </summary> + public Paras_HydroL3d_Size HoveredSize { get; set; } + + } + +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/03-tank/Paras_HydroL3d_Tank.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/03-tank/Paras_HydroL3d_Tank.cs new file mode 100644 index 0000000..8b2923a --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/03-tank/Paras_HydroL3d_Tank.cs @@ -0,0 +1,41 @@ +锘縩amespace Yw.Settings +{ + /// <summary> + /// 姘存睜 + /// </summary> + public class Paras_HydroL3d_Tank + { + /// <summary> + /// 鍥剧墖 + /// </summary> + public string Image { get; set; } + + /// <summary> + /// 灏哄 + /// </summary> + public Paras_HydroL3d_Size Size { get; set; } + + /// <summary> + /// 閫夋嫨鍥剧墖 + /// </summary> + public string SelectedImage { get; set; } + + /// <summary> + /// 閫夋嫨灏哄 + /// </summary> + public Paras_HydroL3d_Size SelectedSize { get; set; } + + /// <summary> + /// 鎮仠鍥剧墖 + /// </summary> + public string HoveredImage { get; set; } + + /// <summary> + /// 鎮仠灏哄 + /// </summary> + public Paras_HydroL3d_Size HoveredSize { get; set; } + + + } + +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/04-pipe/Paras_HydroL3d_Pipe.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/04-pipe/Paras_HydroL3d_Pipe.cs new file mode 100644 index 0000000..79950ae --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/04-pipe/Paras_HydroL3d_Pipe.cs @@ -0,0 +1,26 @@ +锘縩amespace Yw.Settings +{ + /// <summary> + /// 绠¢亾 + /// </summary> + public class Paras_HydroL3d_Pipe + { + /// <summary> + /// 绾� + /// </summary> + public Paras_HydroL3d_Line Line { get; set; } + + /// <summary> + /// 鎮仠绾� + /// </summary> + public Paras_HydroL3d_Line HoveredLine { get; set; } + + /// <summary> + /// 閫夋嫨绾� + /// </summary> + public Paras_HydroL3d_Line SelectedLine { get; set; } + + + } + +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/05-pump/Paras_HydroL3d_Pump.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/05-pump/Paras_HydroL3d_Pump.cs new file mode 100644 index 0000000..d831754 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/05-pump/Paras_HydroL3d_Pump.cs @@ -0,0 +1,59 @@ +锘縩amespace Yw.Settings +{ + /// <summary> + /// 姘存车 + /// </summary> + public class Paras_HydroL3d_Pump + { + /// <summary> + /// 鍥剧墖 + /// </summary> + public string Image { get; set; } + + /// <summary> + /// 绾� + /// </summary> + public Paras_HydroL3d_Line Line { get; set; } + + /// <summary> + /// 灏哄 + /// </summary> + public Paras_HydroL3d_Size Size { get; set; } + + /// <summary> + /// 閫夋嫨绾� + /// </summary> + public Paras_HydroL3d_Line SelectedLine { get; set; } + + /// <summary> + /// 閫夋嫨鍥剧墖 + /// </summary> + public string SelectedImage { get; set; } + + /// <summary> + /// 閫夋嫨灏哄 + /// </summary> + public Paras_HydroL3d_Size SelectedSize { get; set; } + + /// <summary> + /// 鎮仠绾� + /// </summary> + public Paras_HydroL3d_Line HoveredLine { get; set; } + + /// <summary> + /// 鎮仠鍥剧墖 + /// </summary> + public string HoveredImage { get; set; } + + /// <summary> + /// 鎮仠灏哄 + /// </summary> + public Paras_HydroL3d_Size HoveredSize { get; set; } + + + + + + } + +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/06-valve/Paras_HydroL3d_Valve.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/06-valve/Paras_HydroL3d_Valve.cs new file mode 100644 index 0000000..b50127f --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/03-settings/01-paras/06-valve/Paras_HydroL3d_Valve.cs @@ -0,0 +1,56 @@ +锘縩amespace Yw.Settings +{ + /// <summary> + /// 闃�闂� + /// </summary> + public class Paras_HydroL3d_Valve + { + /// <summary> + /// 鍥剧墖 + /// </summary> + public string Image { get; set; } + + /// <summary> + /// 绾� + /// </summary> + public Paras_HydroL3d_Line Line { get; set; } + + /// <summary> + /// 灏哄 + /// </summary> + public Paras_HydroL3d_Size Size { get; set; } + + /// <summary> + /// 閫夋嫨绾� + /// </summary> + public Paras_HydroL3d_Line SelectedLine { get; set; } + + /// <summary> + /// 閫夋嫨鍥剧墖 + /// </summary> + public string SelectedImage { get; set; } + + /// <summary> + /// 閫夋嫨灏哄 + /// </summary> + public Paras_HydroL3d_Size SelectedSize { get; set; } + + /// <summary> + /// 鎮仠绾� + /// </summary> + public Paras_HydroL3d_Line HoveredLine { get; set; } + + /// <summary> + /// 鎮仠鍥剧墖 + /// </summary> + public string HoveredImage { get; set; } + + /// <summary> + /// 鎮仠灏哄 + /// </summary> + public Paras_HydroL3d_Size HoveredSize { get; set; } + + + } + +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/GlobalUsings.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/GlobalUsings.cs new file mode 100644 index 0000000..80f1550 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/GlobalUsings.cs @@ -0,0 +1,6 @@ +锘縢lobal using System.Drawing.Imaging; +global using System.ComponentModel.DataAnnotations; +global using System.ComponentModel; +global using System.Text; +global using Yw.Settings; +global using System.IO; diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/UserControl1.Designer.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/UserControl1.Designer.cs deleted file mode 100644 index c1dc21e..0000000 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/UserControl1.Designer.cs +++ /dev/null @@ -1,38 +0,0 @@ -锘縩amespace Yw.WinFrmUI.Hydro.L3d.Core -{ - partial class UserControl1 - { - /// <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(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - } - - #endregion - } -} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/UserControl1.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/UserControl1.cs deleted file mode 100644 index aa8bdf6..0000000 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/UserControl1.cs +++ /dev/null @@ -1,11 +0,0 @@ -锘縩amespace Yw.WinFrmUI.Hydro.L3d.Core -{ - public partial class UserControl1 : UserControl - { - public UserControl1() - { - InitializeComponent(); - - } - } -} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/Yw.WinFrmUI.Hydro.L3d.Core.csproj b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/Yw.WinFrmUI.Hydro.L3d.Core.csproj index 10d9571..4ce5ad2 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/Yw.WinFrmUI.Hydro.L3d.Core.csproj +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/Yw.WinFrmUI.Hydro.L3d.Core.csproj @@ -2,13 +2,25 @@ <PropertyGroup> <TargetFramework>net6.0-windows</TargetFramework> - <Nullable>enable</Nullable> + <Nullable>disable</Nullable> <UseWindowsForms>true</UseWindowsForms> <ImplicitUsings>enable</ImplicitUsings> </PropertyGroup> <ItemGroup> + <None Remove="paras_hydro_l3d_settings.json" /> + </ItemGroup> + + <ItemGroup> + <Content Include="paras_hydro_l3d_settings.json"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + </ItemGroup> + + <ItemGroup> + <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" /> <PackageReference Include="SharpGL.WinForms" Version="3.1.1" /> + <PackageReference Include="Yw.Newtonsoft.Core" Version="3.0.0" /> </ItemGroup> </Project> diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/Yw.WinFrmUI.Hydro.L3d.Core.csproj.user b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/Yw.WinFrmUI.Hydro.L3d.Core.csproj.user index 81dca9d..2dd2042 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/Yw.WinFrmUI.Hydro.L3d.Core.csproj.user +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/Yw.WinFrmUI.Hydro.L3d.Core.csproj.user @@ -1,7 +1,7 @@ 锘�<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> - <Compile Update="UserControl1.cs"> + <Compile Update="02-panel\NetworkPanel.cs"> <SubType>UserControl</SubType> </Compile> </ItemGroup> diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/paras_hydro_l3d_settings.json b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/paras_hydro_l3d_settings.json new file mode 100644 index 0000000..aeb4fc0 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.L3d.Core/paras_hydro_l3d_settings.json @@ -0,0 +1,138 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + + "HydroL3d": { + "Junction": { + "Size": { + "Width": 10, + "Height": 10 + }, + "Fill": { + "Color": "Black" + }, + "HoveredSize": { + "Width": 12, + "Height": 12 + }, + "HoveredFill": { + "Color": "#ffbf00" + }, + "SelectedSize": { + "Width": 12, + "Height": 12 + }, + "SelectedFill": { + "Color": "Red" + } + }, + "Reservoir": { + "Image": "reservoir", + "Size": { + "Width": 30, + "Height": 30 + }, + "HoveredImage": "reservoir_hovered", + "HoveredSize": { + "Width": 32, + "Height": 32 + }, + "SelectedImage": "reservoir_selected", + "SelectedSize": { + "Width": 32, + "Height": 32 + } + }, + "Tank": { + "Image": "tank", + "Size": { + "Width": 30, + "Height": 30 + }, + "HoveredImage": "tank_hovered", + "HoveredSize": { + "Width": 32, + "Height": 32 + }, + "SelectedImage": "tank_selected", + "SelectedSize": { + "Width": 32, + "Height": 32 + } + }, + "Pipe": { + "Line": { + "Color": "Blue", + "Width": 3 + }, + "HoveredLine": { + "Color": "#ffbf00", + "Width": 4 + }, + "SelectedLine": { + "Color": "Red", + "Width": 4 + } + }, + "Pump": { + "Line": { + "Color": "Blue", + "Width": 3 + }, + "Image": "pump", + "Size": { + "Width": 30, + "Height": 30 + }, + "HoveredLine": { + "Color": "#ffbf00", + "Width": 4 + }, + "HoveredImage": "pump_hovered", + "HoveredSize": { + "Width": 32, + "Height": 32 + }, + "SelectedLine": { + "Color": "Red", + "Width": 4 + }, + "SelectedImage": "pump_selected", + "SelectedSize": { + "Width": 32, + "Height": 32 + } + }, + "Valve": { + "Line": { + "Color": "Blue", + "Width": 3 + }, + "Image": "valve", + "Size": { + "Width": 30, + "Height": 30 + }, + "HoveredLine": { + "Color": "#ffbf00", + "Width": 4 + }, + "HoveredImage": "valve_hovered", + "HoveredSize": { + "Width": 32, + "Height": 32 + }, + "SelectedLine": { + "Color": "Red", + "Width": 4 + }, + "SelectedImage": "valve_selected", + "SelectedSize": { + "Width": 32, + "Height": 32 + } + } + } + + +} -- Gitblit v1.9.3