Desktop/HStation.Desktop.Xhs.Core/Program.cs
@@ -63,7 +63,7 @@ // Yw.FileFolderZipHelper.Zip(@"C:\Users\ZKC\Desktop\å¾ªç¯æ°´ç¨ä¾", @"C:\Users\ZKC\Desktop\å¾ªç¯æ°´ç¨ä¾.ywrvt"); Yw.FileFolderZipHelper.Zip(@"C:\Users\Eventech\Desktop\å¾ªç¯æ°´ç¨ä¾", @"C:\Users\Eventech\Desktop\å¾ªç¯æ°´ç¨ä¾.ywrvt"); // Yw.FileFolderZipHelper.Zip(@"C:\Users\admin\Desktop\å± å®¶åå ¬å·¥ä½\å¾ªç¯æ°´ç¨ä¾", @"C:\Users\admin\Desktop\å± å®¶åå ¬å·¥ä½\å¾ªç¯æ°´ç¨ä¾.ywrvt"); //Yw.FileFolderZipHelper.Zip(@"C:\Users\admin\Desktop\å± å®¶åå ¬å·¥ä½\å¾ªç¯æ°´ç¨ä¾", @"C:\Users\admin\Desktop\å± å®¶åå ¬å·¥ä½\å¾ªç¯æ°´ç¨ä¾.ywrvt"); //var json = RevitTestHelper.GenerateJson(); WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/01-basic-info/XhsProjectBasicInfoBimfaceCtrl.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,57 @@ namespace HStation.WinFrmUI { partial class XhsProjectBasicInfoBimfaceCtrl { /// <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() { bimfaceInterop3dContainer1 = new BimfaceInterop3dContainer(); SuspendLayout(); // // bimfaceInterop3dContainer1 // bimfaceInterop3dContainer1.Dock = DockStyle.Fill; bimfaceInterop3dContainer1.Location = new Point(0, 0); bimfaceInterop3dContainer1.Margin = new Padding(4, 2, 4, 2); bimfaceInterop3dContainer1.Name = "bimfaceInterop3dContainer1"; bimfaceInterop3dContainer1.Size = new Size(784, 505); bimfaceInterop3dContainer1.TabIndex = 1; // // XhsProjectBasicInfoBimfaceCtrl // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(bimfaceInterop3dContainer1); Name = "XhsProjectBasicInfoBimfaceCtrl"; Size = new Size(784, 505); ResumeLayout(false); } #endregion private BimfaceInterop3dContainer bimfaceInterop3dContainer1; } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/01-basic-info/XhsProjectBasicInfoBimfaceCtrl.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,57 @@ namespace HStation.WinFrmUI { public partial class XhsProjectBasicInfoBimfaceCtrl : DevExpress.XtraEditors.XtraUserControl { public XhsProjectBasicInfoBimfaceCtrl() { InitializeComponent(); this.bimfaceInterop3dContainer1.LoadCompletedEvent += BimfaceInterop3dContainer1_LoadCompletedEvent; } private long _projectId;//项ç®id /// <summary> /// ç»å®æ°æ® /// </summary> public async void SetBindingData(long projectId) { _projectId = projectId; await this.bimfaceInterop3dContainer1.InitialContainer(); } /// <summary> /// 页é¢å è½½å®æå触å /// </summary> private async void BimfaceInterop3dContainer1_LoadCompletedEvent() { var projectSite = await new BLL.XhsProjectSiteStd().GetDefaultByProjectID(_projectId); if (projectSite == null) { return; } var relation = await new Yw.BLL.BimfaceFileRelationStd() .GetDefaultByObjectTypeAndObjectIDOfPurpose(HStation.Xhs.DataType.XhsProjectSite, projectSite.ID, Yw.Bimface.Purpose.Simulation); if (relation == null) { return; } var bimfaceFile = await new Yw.BLL.BimfaceFileStd().GetByID(relation.BimfaceFileID); if (bimfaceFile == null) { return; } var viewToken = await BimfaceHelper.GetViewToken(bimfaceFile.BimfaceId); if (string.IsNullOrEmpty(viewToken)) { return; } await this.bimfaceInterop3dContainer1.LoadView(viewToken); } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/01-basic-info/XhsProjectBasicInfoBimfaceCtrl.resx
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,120 @@ <?xml version="1.0" encoding="utf-8"?> <root> <!-- Microsoft ResX Schema Version 2.0 The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the various data types are done through the TypeConverter classes associated with the data types. Example: ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <value>[base64 mime encoded serialized .NET Framework object]</value> </data> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> There are any number of "resheader" rows that contain simple name/value pairs. Each data row contains a name, and value. The row also contains a type or mimetype. Type corresponds to a .NET class that support text/value conversion through the TypeConverter architecture. Classes that don't support this are serialized and stored with the mimetype set. The mimetype is used for serialized objects, and tells the ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.bytearray.base64 value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="metadata"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="assembly"> <xsd:complexType> <xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> </root> WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/01-basic-info/XhsProjectBasicInfoHydroCtrl.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,57 @@ namespace HStation.WinFrmUI { partial class XhsProjectBasicInfoHydroCtrl { /// <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() { hydroParterListCtrl1 = new HydroParterListCtrl(); SuspendLayout(); // // hydroParterListCtrl1 // hydroParterListCtrl1.Dock = DockStyle.Fill; hydroParterListCtrl1.HidePageWhenListIsNull = true; hydroParterListCtrl1.Location = new Point(0, 0); hydroParterListCtrl1.Name = "hydroParterListCtrl1"; hydroParterListCtrl1.Size = new Size(907, 586); hydroParterListCtrl1.TabIndex = 0; // // XhsProjectBasicInfoHydroCtrl // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(hydroParterListCtrl1); Name = "XhsProjectBasicInfoHydroCtrl"; Size = new Size(907, 586); ResumeLayout(false); } #endregion private HydroParterListCtrl hydroParterListCtrl1; } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/01-basic-info/XhsProjectBasicInfoHydroCtrl.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,41 @@ using DevExpress.XtraEditors; 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; namespace HStation.WinFrmUI { public partial class XhsProjectBasicInfoHydroCtrl : DevExpress.XtraEditors.XtraUserControl { public XhsProjectBasicInfoHydroCtrl() { InitializeComponent(); } /// <summary> /// ç»å®æ°æ® /// </summary> public async void SetBindingData(long projectId) { var projectSite = await new HStation.BLL.XhsProjectSiteStd().GetDefaultByProjectID(projectId); if (projectSite == null) { return; } var hydroRelation = await new Yw.BLL.HydroModelRelation().GetDefaultByObjectTypeAndObjectIDOfPurpose(HStation.Xhs.DataType.XhsProjectSite, projectSite.ID, HStation.Xhs.Purpose.Simulation); if (hydroRelation == null) { return; } var info = await new Yw.BLL.HydroModelInfo().GetByID(hydroRelation.ModelID); this.hydroParterListCtrl1.SetBindingData(info); } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/01-basic-info/XhsProjectBasicInfoHydroCtrl.resx
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,120 @@ <?xml version="1.0" encoding="utf-8"?> <root> <!-- Microsoft ResX Schema Version 2.0 The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the various data types are done through the TypeConverter classes associated with the data types. Example: ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <value>[base64 mime encoded serialized .NET Framework object]</value> </data> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> There are any number of "resheader" rows that contain simple name/value pairs. Each data row contains a name, and value. The row also contains a type or mimetype. Type corresponds to a .NET class that support text/value conversion through the TypeConverter architecture. Classes that don't support this are serialized and stored with the mimetype set. The mimetype is used for serialized objects, and tells the ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.bytearray.base64 value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="metadata"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="assembly"> <xsd:complexType> <xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> </root> WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/01-basic-info/XhsProjectBasicInfoViewCtrl.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,276 @@ namespace HStation.WinFrmUI { partial class XhsProjectBasicInfoViewCtrl { /// <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() { layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); txtFlags = new DevExpress.XtraEditors.TextEdit(); txtDescription = new DevExpress.XtraEditors.MemoEdit(); txtTagNme = new DevExpress.XtraEditors.TextEdit(); txtAddress = new DevExpress.XtraEditors.TextEdit(); txtCustomer = new DevExpress.XtraEditors.TextEdit(); txtName = new DevExpress.XtraEditors.TextEdit(); txtNO = new DevExpress.XtraEditors.TextEdit(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); ((ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((ISupportInitialize)txtFlags.Properties).BeginInit(); ((ISupportInitialize)txtDescription.Properties).BeginInit(); ((ISupportInitialize)txtTagNme.Properties).BeginInit(); ((ISupportInitialize)txtAddress.Properties).BeginInit(); ((ISupportInitialize)txtCustomer.Properties).BeginInit(); ((ISupportInitialize)txtName.Properties).BeginInit(); ((ISupportInitialize)txtNO.Properties).BeginInit(); ((ISupportInitialize)Root).BeginInit(); ((ISupportInitialize)layoutControlItem1).BeginInit(); ((ISupportInitialize)layoutControlItem2).BeginInit(); ((ISupportInitialize)layoutControlItem3).BeginInit(); ((ISupportInitialize)layoutControlItem4).BeginInit(); ((ISupportInitialize)layoutControlItem6).BeginInit(); ((ISupportInitialize)layoutControlItem7).BeginInit(); ((ISupportInitialize)layoutControlItem5).BeginInit(); SuspendLayout(); // // layoutControl1 // layoutControl1.Controls.Add(txtFlags); layoutControl1.Controls.Add(txtDescription); layoutControl1.Controls.Add(txtTagNme); layoutControl1.Controls.Add(txtAddress); layoutControl1.Controls.Add(txtCustomer); layoutControl1.Controls.Add(txtName); layoutControl1.Controls.Add(txtNO); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(1200, 175, 650, 400); layoutControl1.OptionsView.IsReadOnly = DevExpress.Utils.DefaultBoolean.True; layoutControl1.Root = Root; layoutControl1.Size = new Size(788, 503); layoutControl1.TabIndex = 1; layoutControl1.Text = "layoutControl1"; // // txtFlags // txtFlags.Location = new Point(60, 60); txtFlags.Name = "txtFlags"; txtFlags.Properties.ReadOnly = true; txtFlags.Properties.UseReadOnlyAppearance = false; txtFlags.Size = new Size(332, 20); txtFlags.StyleController = layoutControl1; txtFlags.TabIndex = 9; // // txtDescription // txtDescription.Location = new Point(60, 84); txtDescription.Name = "txtDescription"; txtDescription.Properties.ReadOnly = true; txtDescription.Properties.UseReadOnlyAppearance = false; txtDescription.Size = new Size(716, 407); txtDescription.StyleController = layoutControl1; txtDescription.TabIndex = 8; // // txtTagNme // txtTagNme.Location = new Point(444, 60); txtTagNme.Name = "txtTagNme"; txtTagNme.Properties.ReadOnly = true; txtTagNme.Properties.UseReadOnlyAppearance = false; txtTagNme.Size = new Size(332, 20); txtTagNme.StyleController = layoutControl1; txtTagNme.TabIndex = 6; // // txtAddress // txtAddress.Location = new Point(444, 36); txtAddress.Name = "txtAddress"; txtAddress.Properties.ReadOnly = true; txtAddress.Properties.UseReadOnlyAppearance = false; txtAddress.Size = new Size(332, 20); txtAddress.StyleController = layoutControl1; txtAddress.TabIndex = 4; // // txtCustomer // txtCustomer.Location = new Point(60, 36); txtCustomer.Name = "txtCustomer"; txtCustomer.Properties.ReadOnly = true; txtCustomer.Properties.UseReadOnlyAppearance = false; txtCustomer.Size = new Size(332, 20); txtCustomer.StyleController = layoutControl1; txtCustomer.TabIndex = 3; // // txtName // txtName.Location = new Point(444, 12); txtName.Name = "txtName"; txtName.Properties.ReadOnly = true; txtName.Properties.UseReadOnlyAppearance = false; txtName.Size = new Size(332, 20); txtName.StyleController = layoutControl1; txtName.TabIndex = 2; // // txtNO // txtNO.Location = new Point(60, 12); txtNO.Name = "txtNO"; txtNO.Properties.ReadOnly = true; txtNO.Properties.UseReadOnlyAppearance = false; txtNO.Size = new Size(332, 20); txtNO.StyleController = layoutControl1; txtNO.TabIndex = 0; // // 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[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem4, layoutControlItem6, layoutControlItem7, layoutControlItem5 }); Root.Name = "Root"; Root.Size = new Size(788, 503); Root.TextVisible = false; // // layoutControlItem1 // layoutControlItem1.Control = txtNO; layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Size = new Size(384, 24); layoutControlItem1.Text = "ç¼å·ï¼"; layoutControlItem1.TextSize = new Size(36, 14); // // layoutControlItem2 // layoutControlItem2.AllowHtmlStringInCaption = true; layoutControlItem2.Control = txtName; layoutControlItem2.Location = new Point(384, 0); layoutControlItem2.Name = "layoutControlItem2"; layoutControlItem2.Size = new Size(384, 24); layoutControlItem2.Text = "åç§°ï¼"; layoutControlItem2.TextSize = new Size(36, 14); // // layoutControlItem3 // layoutControlItem3.Control = txtCustomer; layoutControlItem3.Location = new Point(0, 24); layoutControlItem3.Name = "layoutControlItem3"; layoutControlItem3.Size = new Size(384, 24); layoutControlItem3.Text = "客æ·ï¼"; layoutControlItem3.TextSize = new Size(36, 14); // // layoutControlItem4 // layoutControlItem4.Control = txtAddress; layoutControlItem4.Location = new Point(384, 24); layoutControlItem4.Name = "layoutControlItem4"; layoutControlItem4.Size = new Size(384, 24); layoutControlItem4.Text = "å°åï¼"; layoutControlItem4.TextSize = new Size(36, 14); // // layoutControlItem6 // layoutControlItem6.Control = txtTagNme; layoutControlItem6.Location = new Point(384, 48); layoutControlItem6.Name = "layoutControlItem6"; layoutControlItem6.Size = new Size(384, 24); layoutControlItem6.Text = "æ å¿ï¼"; layoutControlItem6.TextSize = new Size(36, 14); // // layoutControlItem7 // layoutControlItem7.Control = txtDescription; layoutControlItem7.Location = new Point(0, 72); layoutControlItem7.Name = "layoutControlItem7"; layoutControlItem7.Size = new Size(768, 411); layoutControlItem7.Text = "说æ"; layoutControlItem7.TextSize = new Size(36, 14); // // layoutControlItem5 // layoutControlItem5.Control = txtFlags; layoutControlItem5.Location = new Point(0, 48); layoutControlItem5.Name = "layoutControlItem5"; layoutControlItem5.Size = new Size(384, 24); layoutControlItem5.Text = "æ ç¾ï¼"; layoutControlItem5.TextSize = new Size(36, 14); // // XhsProjectViewCtrl // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(layoutControl1); Name = "XhsProjectViewCtrl"; Size = new Size(788, 503); ((ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((ISupportInitialize)txtFlags.Properties).EndInit(); ((ISupportInitialize)txtDescription.Properties).EndInit(); ((ISupportInitialize)txtTagNme.Properties).EndInit(); ((ISupportInitialize)txtAddress.Properties).EndInit(); ((ISupportInitialize)txtCustomer.Properties).EndInit(); ((ISupportInitialize)txtName.Properties).EndInit(); ((ISupportInitialize)txtNO.Properties).EndInit(); ((ISupportInitialize)Root).EndInit(); ((ISupportInitialize)layoutControlItem1).EndInit(); ((ISupportInitialize)layoutControlItem2).EndInit(); ((ISupportInitialize)layoutControlItem3).EndInit(); ((ISupportInitialize)layoutControlItem4).EndInit(); ((ISupportInitialize)layoutControlItem6).EndInit(); ((ISupportInitialize)layoutControlItem7).EndInit(); ((ISupportInitialize)layoutControlItem5).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraLayout.LayoutControl layoutControl1; private DevExpress.XtraEditors.TextEdit txtFlags; private DevExpress.XtraEditors.MemoEdit txtDescription; private DevExpress.XtraEditors.TextEdit txtTagNme; private DevExpress.XtraEditors.TextEdit txtAddress; private DevExpress.XtraEditors.TextEdit txtCustomer; private DevExpress.XtraEditors.TextEdit txtName; private DevExpress.XtraEditors.TextEdit txtNO; private DevExpress.XtraLayout.LayoutControlGroup Root; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/01-basic-info/XhsProjectBasicInfoViewCtrl.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,56 @@ using DevExpress.XtraEditors; using HStation.BLL; 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; namespace HStation.WinFrmUI { public partial class XhsProjectBasicInfoViewCtrl : DevExpress.XtraEditors.XtraUserControl { public XhsProjectBasicInfoViewCtrl() { InitializeComponent(); this.layoutControl1.SetupLayoutControl(); } private Lazy<HStation.BLL.XhsProject> _bll = new(() => new HStation.BLL.XhsProject()); /// <summary> /// ç»å®æ°æ® /// </summary> public async void SetBindingData(long projectId) { var project = await _bll.Value.GetByID(projectId); this.txtName.EditValue = project.Name; this.txtNO.EditValue = project.NO; this.txtCustomer.EditValue = project.Customer; this.txtAddress.EditValue = project.Address; this.txtFlags.EditValue = Yw.Untity.FlagsHelper.ToString(project.Flags); this.txtTagNme.EditValue = project.TagName; this.txtDescription.EditValue = project.Description; } /// <summary> /// ç»å®æ°æ® /// </summary> public void SetBindingData(XhsProjectDto project) { this.txtName.EditValue = project.Name; this.txtNO.EditValue = project.NO; this.txtCustomer.EditValue = project.Customer; this.txtAddress.EditValue = project.Address; this.txtFlags.EditValue = Yw.Untity.FlagsHelper.ToString(project.Flags); this.txtTagNme.EditValue = project.TagName; this.txtDescription.EditValue = project.Description; } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/01-basic-info/XhsProjectBasicInfoViewCtrl.resx
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,120 @@ <?xml version="1.0" encoding="utf-8"?> <root> <!-- Microsoft ResX Schema Version 2.0 The primary goals of this format is to allow a simple XML format that is mostly human readable. The generation and parsing of the various data types are done through the TypeConverter classes associated with the data types. Example: ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <value>[base64 mime encoded serialized .NET Framework object]</value> </data> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> There are any number of "resheader" rows that contain simple name/value pairs. Each data row contains a name, and value. The row also contains a type or mimetype. Type corresponds to a .NET class that support text/value conversion through the TypeConverter architecture. Classes that don't support this are serialized and stored with the mimetype set. The mimetype is used for serialized objects, and tells the ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: Note - application/x-microsoft.net.object.binary.base64 is the format that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.bytearray.base64 value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> <xsd:element name="metadata"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="assembly"> <xsd:complexType> <xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" /> </xsd:complexType> </xsd:element> <xsd:element name="data"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> <xsd:complexType> <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> </xsd:complexType> </xsd:element> </xsd:schema> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> </root> WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/01-basic-info/XhsSchemeBasicInfoPage.Designer.cs
@@ -28,17 +28,138 @@ /// </summary> private void InitializeComponent() { DevExpress.XtraLayout.ColumnDefinition columnDefinition1 = new DevExpress.XtraLayout.ColumnDefinition(); DevExpress.XtraLayout.ColumnDefinition columnDefinition2 = new DevExpress.XtraLayout.ColumnDefinition(); DevExpress.XtraLayout.RowDefinition rowDefinition1 = new DevExpress.XtraLayout.RowDefinition(); DevExpress.XtraLayout.RowDefinition rowDefinition2 = new DevExpress.XtraLayout.RowDefinition(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); xhsProjectBasicInfoBimfaceCtrl1 = new XhsProjectBasicInfoBimfaceCtrl(); xhsProjectBasicInfoViewCtrl1 = new XhsProjectBasicInfoViewCtrl(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); xhsProjectBasicInfoHydroCtrl1 = new XhsProjectBasicInfoHydroCtrl(); layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); ((ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((ISupportInitialize)Root).BeginInit(); ((ISupportInitialize)layoutControlItem1).BeginInit(); ((ISupportInitialize)layoutControlItem2).BeginInit(); ((ISupportInitialize)layoutControlItem3).BeginInit(); SuspendLayout(); // // layoutControl1 // layoutControl1.Controls.Add(xhsProjectBasicInfoHydroCtrl1); layoutControl1.Controls.Add(xhsProjectBasicInfoBimfaceCtrl1); layoutControl1.Controls.Add(xhsProjectBasicInfoViewCtrl1); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; layoutControl1.Root = Root; layoutControl1.Size = new Size(951, 587); layoutControl1.TabIndex = 0; layoutControl1.Text = "layoutControl1"; // // xhsProjectBasicInfoBimfaceCtrl1 // xhsProjectBasicInfoBimfaceCtrl1.Location = new Point(477, 12); xhsProjectBasicInfoBimfaceCtrl1.Name = "xhsProjectBasicInfoBimfaceCtrl1"; xhsProjectBasicInfoBimfaceCtrl1.Size = new Size(462, 279); xhsProjectBasicInfoBimfaceCtrl1.TabIndex = 7; // // xhsProjectBasicInfoViewCtrl1 // xhsProjectBasicInfoViewCtrl1.Location = new Point(12, 12); xhsProjectBasicInfoViewCtrl1.Name = "xhsProjectBasicInfoViewCtrl1"; xhsProjectBasicInfoViewCtrl1.Size = new Size(461, 279); xhsProjectBasicInfoViewCtrl1.TabIndex = 4; // // Root // Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3 }); Root.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table; Root.Name = "Root"; columnDefinition1.SizeType = SizeType.Percent; columnDefinition1.Width = 100D; columnDefinition2.SizeType = SizeType.Percent; columnDefinition2.Width = 100D; Root.OptionsTableLayoutGroup.ColumnDefinitions.AddRange(new DevExpress.XtraLayout.ColumnDefinition[] { columnDefinition1, columnDefinition2 }); rowDefinition1.Height = 100D; rowDefinition1.SizeType = SizeType.Percent; rowDefinition2.Height = 100D; rowDefinition2.SizeType = SizeType.Percent; Root.OptionsTableLayoutGroup.RowDefinitions.AddRange(new DevExpress.XtraLayout.RowDefinition[] { rowDefinition1, rowDefinition2 }); Root.Size = new Size(951, 587); Root.TextVisible = false; // // layoutControlItem1 // layoutControlItem1.Control = xhsProjectBasicInfoViewCtrl1; layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Size = new Size(465, 283); layoutControlItem1.TextSize = new Size(0, 0); layoutControlItem1.TextVisible = false; // // layoutControlItem2 // layoutControlItem2.Control = xhsProjectBasicInfoBimfaceCtrl1; layoutControlItem2.Location = new Point(465, 0); layoutControlItem2.Name = "layoutControlItem2"; layoutControlItem2.OptionsTableLayoutItem.ColumnIndex = 1; layoutControlItem2.Size = new Size(466, 283); layoutControlItem2.TextSize = new Size(0, 0); layoutControlItem2.TextVisible = false; // // xhsProjectBasicInfoHydroCtrl1 // xhsProjectBasicInfoHydroCtrl1.Location = new Point(12, 295); xhsProjectBasicInfoHydroCtrl1.Name = "xhsProjectBasicInfoHydroCtrl1"; xhsProjectBasicInfoHydroCtrl1.Size = new Size(927, 280); xhsProjectBasicInfoHydroCtrl1.TabIndex = 8; // // layoutControlItem3 // layoutControlItem3.Control = xhsProjectBasicInfoHydroCtrl1; layoutControlItem3.Location = new Point(0, 283); layoutControlItem3.Name = "layoutControlItem3"; layoutControlItem3.OptionsTableLayoutItem.ColumnSpan = 2; layoutControlItem3.OptionsTableLayoutItem.RowIndex = 1; layoutControlItem3.Size = new Size(931, 284); layoutControlItem3.TextSize = new Size(0, 0); layoutControlItem3.TextVisible = false; // // XhsSchemeBasicInfoPage // AutoScaleDimensions = new SizeF(10F, 22F); Appearance.BackColor = SystemColors.Control; Appearance.Options.UseBackColor = true; AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; Controls.Add(layoutControl1); Margin = new Padding(2); Name = "XhsSchemeBasicInfoPage"; Size = new Size(1358, 923); Size = new Size(951, 587); ((ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((ISupportInitialize)Root).EndInit(); ((ISupportInitialize)layoutControlItem1).EndInit(); ((ISupportInitialize)layoutControlItem2).EndInit(); ((ISupportInitialize)layoutControlItem3).EndInit(); ResumeLayout(false); } #endregion private DevExpress.XtraLayout.LayoutControl layoutControl1; private XhsProjectBasicInfoViewCtrl xhsProjectBasicInfoViewCtrl1; private DevExpress.XtraLayout.LayoutControlGroup Root; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private XhsProjectBasicInfoBimfaceCtrl xhsProjectBasicInfoBimfaceCtrl1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private XhsProjectBasicInfoHydroCtrl xhsProjectBasicInfoHydroCtrl1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/01-basic-info/XhsSchemeBasicInfoPage.cs
@@ -4,7 +4,17 @@ { public XhsSchemeBasicInfoPage() { InitializeComponent(); InitializeComponent(); } private long _projectId;//项ç®id /// <summary> /// ç»å®æ°æ® /// </summary> public void SetBindingData(long projectId) { _projectId = projectId; } @@ -14,6 +24,14 @@ public override void InitialDataSource() { base.InitialDataSource(); this.xhsProjectBasicInfoViewCtrl1.SetBindingData(_projectId); this.xhsProjectBasicInfoBimfaceCtrl1.SetBindingData(_projectId); this.xhsProjectBasicInfoHydroCtrl1.SetBindingData(_projectId); } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/XhsSchemeMultiMgrPage.cs
@@ -73,7 +73,8 @@ if (!IsExistPage(guid, true)) { var page = new XhsSchemeBasicInfoPage(); page.PageTitle.Caption = e.Element.Text; page.SetBindingData(_project.ID); page.PageTitle.Caption = e.Element.Text; page.PageTitle.HeaderSvgImage = e.Element.ImageOptions.SvgImage; page.PageTitle.SvgImageSize = svg_image_size; CreatePage(page, guid); @@ -109,7 +110,7 @@ if (!IsExistPage(guid, true)) { var page = new XhsSchemeHydraulicSimulationPage(); page.PageTitle.Caption = e.Element.Text; page.PageTitle.Caption = e.Element.Text; page.PageTitle.HeaderSvgImage = e.Element.ImageOptions.SvgImage; page.PageTitle.SvgImageSize = svg_image_size; CreatePage(page, guid); @@ -118,7 +119,7 @@ break; case "create_scheme": { var dlg=new CreateSchemeDlg(); var dlg = new CreateSchemeDlg(); dlg.ShowDialog(); } break; WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj.user
@@ -40,6 +40,15 @@ <Compile Update="02-project\04-dlg\AddProjectDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="03-scheme\01-basic-info\XhsProjectBasicInfoBimfaceCtrl.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="03-scheme\01-basic-info\XhsProjectBasicInfoHydroCtrl.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="03-scheme\01-basic-info\XhsProjectBasicInfoViewCtrl.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="03-scheme\01-basic-info\XhsSchemeBasicInfoPage.cs"> <SubType>UserControl</SubType> </Compile>