WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/13-print/loss-statistics/input/SimulationPrintLossStatisticsInputViewModel.cs
@@ -56,7 +56,10 @@ var calcuPumpResult = allCalcuVisualDict.GetValue(pump.Code) as HydroCalcuPumpResult; if (calcuPumpResult != null) { itemForPump.Value += calcuPumpResult.CalcuP.Value * 1000; if (calcuPumpResult.CalcuP.HasValue) { itemForPump.Value += calcuPumpResult.CalcuP.Value * 1000; } } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/13-print/report/SimulationCommonReport.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,96 @@ namespace HStation.WinFrmUI { partial class SimulationCommonReport { /// <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 Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.TopMargin = new DevExpress.XtraReports.UI.TopMarginBand(); this.BottomMargin = new DevExpress.XtraReports.UI.BottomMarginBand(); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.labCorp = new DevExpress.XtraReports.UI.XRLabel(); this.pageCurrentNum = new DevExpress.XtraReports.UI.XRPageInfo(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // TopMargin // this.TopMargin.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.labCorp}); this.TopMargin.Name = "TopMargin"; // // BottomMargin // this.BottomMargin.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.pageCurrentNum}); this.BottomMargin.Name = "BottomMargin"; // // Detail // this.Detail.Name = "Detail"; // // labCorp // this.labCorp.LocationFloat = new DevExpress.Utils.PointFloat(404.5833F, 65.95834F); this.labCorp.Multiline = true; this.labCorp.Name = "labCorp"; this.labCorp.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F); this.labCorp.SizeF = new System.Drawing.SizeF(235.4166F, 24.04166F); this.labCorp.StylePriority.UseTextAlignment = false; this.labCorp.Text = "æå·ç§ç»´èè½ææ¯è¡ä»½æéå ¬å¸ "; this.labCorp.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; // // pageCurrentNum // this.pageCurrentNum.LocationFloat = new DevExpress.Utils.PointFloat(539.9999F, 10.00001F); this.pageCurrentNum.Name = "pageCurrentNum"; this.pageCurrentNum.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F); this.pageCurrentNum.PageInfo = DevExpress.XtraPrinting.PageInfo.Number; this.pageCurrentNum.SizeF = new System.Drawing.SizeF(100F, 23F); this.pageCurrentNum.StylePriority.UseTextAlignment = false; this.pageCurrentNum.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.pageCurrentNum.TextFormatString = "第{0}页"; // // SimulationCommonReport // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.TopMargin, this.BottomMargin, this.Detail}); this.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F); this.Version = "23.2"; ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); } #endregion private DevExpress.XtraReports.UI.TopMarginBand TopMargin; private DevExpress.XtraReports.UI.BottomMarginBand BottomMargin; private DevExpress.XtraReports.UI.DetailBand Detail; private DevExpress.XtraReports.UI.XRLabel labCorp; private DevExpress.XtraReports.UI.XRPageInfo pageCurrentNum; } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/13-print/report/SimulationCommonReport.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,27 @@ using DevExpress.XtraReports.UI; using System; using System.Collections; using System.ComponentModel; using System.Drawing; namespace HStation.WinFrmUI { public partial class SimulationCommonReport : DevExpress.XtraReports.UI.XtraReport { public SimulationCommonReport() { InitializeComponent(); } /// <summary> /// ç»å®æ°æ® /// </summary> public void SetBindingData(SimulationPrintViewModel vm) { } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/13-print/report/SimulationCommonReport.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-simulation/13-print/report/SimulationCommonReportDlg.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,95 @@ namespace HStation.WinFrmUI { partial class SimulationCommonReportDlg { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { ribbon = new DevExpress.XtraBars.Ribbon.RibbonControl(); ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage(); ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); documentViewer1 = new DevExpress.XtraPrinting.Preview.DocumentViewer(); ((ISupportInitialize)ribbon).BeginInit(); SuspendLayout(); // // ribbon // ribbon.ExpandCollapseItem.Id = 0; ribbon.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbon.ExpandCollapseItem }); ribbon.Location = new Point(0, 0); ribbon.MaxItemId = 1; ribbon.Name = "ribbon"; ribbon.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 }); ribbon.RibbonCaptionAlignment = DevExpress.XtraBars.Ribbon.RibbonCaptionAlignment.Left; ribbon.ShowDisplayOptionsMenuButton = DevExpress.Utils.DefaultBoolean.False; ribbon.Size = new Size(996, 32); // // ribbonPage1 // ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribbonPageGroup1 }); ribbonPage1.Name = "ribbonPage1"; ribbonPage1.Text = "ribbonPage1"; // // ribbonPageGroup1 // ribbonPageGroup1.Name = "ribbonPageGroup1"; ribbonPageGroup1.Text = "ribbonPageGroup1"; // // documentViewer1 // documentViewer1.Dock = DockStyle.Fill; documentViewer1.IsMetric = true; documentViewer1.Location = new Point(0, 32); documentViewer1.Name = "documentViewer1"; documentViewer1.Size = new Size(996, 601); documentViewer1.TabIndex = 5; // // SimulationCommonReportDlg // AutoScaleDimensions = new SizeF(7F, 14F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(996, 633); Controls.Add(documentViewer1); Controls.Add(ribbon); FormBorderStyle = FormBorderStyle.SizableToolWindow; Name = "SimulationCommonReportDlg"; Ribbon = ribbon; RibbonVisibility = DevExpress.XtraBars.Ribbon.RibbonVisibility.Hidden; StartPosition = FormStartPosition.CenterParent; Text = "æ§è½æ²çº¿"; ((ISupportInitialize)ribbon).EndInit(); ResumeLayout(false); PerformLayout(); } #endregion private DevExpress.XtraBars.Ribbon.RibbonControl ribbon; private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1; private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1; private DevExpress.XtraPrinting.Preview.DocumentViewer documentViewer1; } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/13-print/report/SimulationCommonReportDlg.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,31 @@ using DevExpress.XtraReports.UI; namespace HStation.WinFrmUI { public partial class SimulationCommonReportDlg : DevExpress.XtraBars.Ribbon.RibbonForm { public SimulationCommonReportDlg() { InitializeComponent(); this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; } /// <summary> /// ç»å®æ°æ® /// </summary> public void SetBindingData(SimulationPrintViewModel vm) { // å建æ¥è¡¨å®ä¾ var report = new SimulationCommonReport(); report.SetBindingData(vm); // å°æ¥è¡¨å è½½å° DocumentViewer ä¸ this.documentViewer1.DocumentSource = report; // æ¾ç¤ºæ¥è¡¨ report.CreateDocument(); } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/13-print/report/SimulationCommonReportDlg.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/HStation.WinFrmUI.Xhs.Core.csproj
@@ -374,11 +374,8 @@ <Compile Update="03-simulation\11-pump\05-edit\SimulationPumpCurveEditDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="03-simulation\13-print\99-test\XtraForm1.cs"> <Compile Update="03-simulation\13-print\report\SimulationCommonReportDlg.cs"> <SubType>Form</SubType> </Compile> <Compile Update="03-simulation\13-print\99-test\XtraReport1.cs"> <SubType>XtraReport</SubType> </Compile> <Compile Update="eMatchingDlg.cs" /> <Compile Update="03-simulation\06-simulation\XhsProjectSimulationCorePage.cs" /> WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj.user
@@ -277,6 +277,9 @@ <Compile Update="03-simulation\12-report\test.cs"> <SubType>UserControl</SubType> </Compile> <Compile Update="03-simulation\13-print\report\SimulationCommonReport.cs"> <SubType>XtraReport</SubType> </Compile> <Compile Update="03-simulation\XhsProjectSimulationMgrPage.cs"> <SubType>UserControl</SubType> </Compile>