duheng
2025-02-19 bb7165071ee890cfac760dbb15cd921e6f6e3096
报表优化
已修改7个文件
1611 ■■■■ 文件已修改
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/13-print/99-test/XtraForm1.Designer.cs 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/13-print/99-test/XtraForm1.cs 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/13-print/99-test/XtraForm1.resx 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/13-print/99-test/XtraReport1.Designer.cs 327 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/13-print/99-test/XtraReport1.cs 1032 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/01-curve/HydroSingleWorkingLossCurveCtrl.Designer.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/01-curve/HydroSingleWorkingLossCurveInteropCtrl.resx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/13-print/99-test/XtraForm1.Designer.cs
@@ -28,29 +28,63 @@
        /// </summary>
        private void InitializeComponent()
        {
            ComponentResourceManager resources = new ComponentResourceManager(typeof(XtraForm1));
            ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl();
            barSubItem1 = new DevExpress.XtraBars.BarSubItem();
            btnExportWord = new DevExpress.XtraBars.BarButtonItem();
            btnExportPDF = new DevExpress.XtraBars.BarButtonItem();
            ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage();
            ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
            Root = new DevExpress.XtraLayout.LayoutControlGroup();
            documentViewer1 = new DevExpress.XtraPrinting.Preview.DocumentViewer();
            Root = new DevExpress.XtraLayout.LayoutControlGroup();
            layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
            ((System.ComponentModel.ISupportInitialize)ribbonControl1).BeginInit();
            ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit();
            ((ISupportInitialize)ribbonControl1).BeginInit();
            ((ISupportInitialize)layoutControl1).BeginInit();
            layoutControl1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)Root).BeginInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit();
            ((ISupportInitialize)Root).BeginInit();
            ((ISupportInitialize)layoutControlItem1).BeginInit();
            SuspendLayout();
            // 
            // ribbonControl1
            // 
            ribbonControl1.ExpandCollapseItem.Id = 0;
            ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem });
            ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic;
            ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barSubItem1, btnExportWord, btnExportPDF });
            ribbonControl1.Location = new Point(0, 0);
            ribbonControl1.MaxItemId = 1;
            ribbonControl1.MaxItemId = 5;
            ribbonControl1.Name = "ribbonControl1";
            ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 });
            ribbonControl1.Size = new Size(1070, 152);
            ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False;
            ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages;
            ribbonControl1.ShowToolbarCustomizeItem = false;
            ribbonControl1.Size = new Size(1070, 128);
            ribbonControl1.Toolbar.ShowCustomizeItem = false;
            ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden;
            //
            // barSubItem1
            //
            barSubItem1.Caption = "导出";
            barSubItem1.Id = 2;
            barSubItem1.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barSubItem1.ImageOptions.SvgImage");
            barSubItem1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(btnExportWord), new DevExpress.XtraBars.LinkPersistInfo(btnExportPDF) });
            barSubItem1.Name = "barSubItem1";
            //
            // btnExportWord
            //
            btnExportWord.Caption = "导出为Word";
            btnExportWord.Id = 3;
            btnExportWord.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("btnExportWord.ImageOptions.SvgImage");
            btnExportWord.Name = "btnExportWord";
            btnExportWord.ItemClick += btnExportWord_ItemClick;
            //
            // btnExportPDF
            //
            btnExportPDF.Caption = "导出为PDF";
            btnExportPDF.Id = 4;
            btnExportPDF.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("btnExportPDF.ImageOptions.SvgImage");
            btnExportPDF.Name = "btnExportPDF";
            btnExportPDF.ItemClick += btnExportPDF_ItemClick;
            // 
            // ribbonPage1
            // 
@@ -60,19 +94,28 @@
            // 
            // ribbonPageGroup1
            // 
            ribbonPageGroup1.ItemLinks.Add(barSubItem1);
            ribbonPageGroup1.Name = "ribbonPageGroup1";
            ribbonPageGroup1.Text = "ribbonPageGroup1";
            ribbonPageGroup1.Text = "基础操作";
            // 
            // layoutControl1
            // 
            layoutControl1.Controls.Add(documentViewer1);
            layoutControl1.Dock = DockStyle.Fill;
            layoutControl1.Location = new Point(0, 152);
            layoutControl1.Location = new Point(0, 128);
            layoutControl1.Name = "layoutControl1";
            layoutControl1.Root = Root;
            layoutControl1.Size = new Size(1070, 357);
            layoutControl1.Size = new Size(1070, 381);
            layoutControl1.TabIndex = 2;
            layoutControl1.Text = "layoutControl1";
            //
            // documentViewer1
            //
            documentViewer1.IsMetric = true;
            documentViewer1.Location = new Point(2, 2);
            documentViewer1.Name = "documentViewer1";
            documentViewer1.Size = new Size(1066, 377);
            documentViewer1.TabIndex = 4;
            // 
            // Root
            // 
@@ -81,23 +124,15 @@
            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1 });
            Root.Name = "Root";
            Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
            Root.Size = new Size(1070, 357);
            Root.Size = new Size(1070, 381);
            Root.TextVisible = false;
            //
            // documentViewer1
            //
            documentViewer1.IsMetric = true;
            documentViewer1.Location = new Point(2, 2);
            documentViewer1.Name = "documentViewer1";
            documentViewer1.Size = new Size(1066, 353);
            documentViewer1.TabIndex = 4;
            // 
            // layoutControlItem1
            // 
            layoutControlItem1.Control = documentViewer1;
            layoutControlItem1.Location = new Point(0, 0);
            layoutControlItem1.Name = "layoutControlItem1";
            layoutControlItem1.Size = new Size(1070, 357);
            layoutControlItem1.Size = new Size(1070, 381);
            layoutControlItem1.TextSize = new Size(0, 0);
            layoutControlItem1.TextVisible = false;
            // 
@@ -109,12 +144,12 @@
            Controls.Add(layoutControl1);
            Controls.Add(ribbonControl1);
            Name = "XtraForm1";
            Text = "XtraForm1";
            ((System.ComponentModel.ISupportInitialize)ribbonControl1).EndInit();
            ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit();
            Text = "节能报告";
            ((ISupportInitialize)ribbonControl1).EndInit();
            ((ISupportInitialize)layoutControl1).EndInit();
            layoutControl1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)Root).EndInit();
            ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit();
            ((ISupportInitialize)Root).EndInit();
            ((ISupportInitialize)layoutControlItem1).EndInit();
            ResumeLayout(false);
            PerformLayout();
        }
@@ -128,5 +163,9 @@
        private DevExpress.XtraPrinting.Preview.DocumentViewer documentViewer1;
        private DevExpress.XtraLayout.LayoutControlGroup Root;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
        private DevExpress.XtraBars.BarButtonItem btnExportWord;
        private DevExpress.XtraBars.BarSubItem barSubItem1;
        private DevExpress.XtraBars.BarButtonItem barButtonItem1;
        private DevExpress.XtraBars.BarButtonItem btnExportPDF;
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/13-print/99-test/XtraForm1.cs
@@ -8,15 +8,17 @@
            this.Load += Form1_Load;
        }
        private XtraReport1 _report1;
        public void SetBindingData(SimulationPrintViewModel viewModel)
        {
            XtraReport1 report = new XtraReport1();
            report.SetBingdingData(viewModel);
            _report1 = new XtraReport1();
            _report1.SetBingdingData(viewModel);
            // 生成报表文档
            report.CreateDocument();
            _report1.CreateDocument();
            // 将报表文档加载到 DocumentViewer 中
            documentViewer1.DocumentSource = report;
            documentViewer1.DocumentSource = _report1;
        }
        private void Form1_Load(object sender, EventArgs e)
@@ -28,5 +30,53 @@
                  // 将报表文档加载到 DocumentViewer 中
                  documentViewer1.DocumentSource = report;*/
        }
        private void btnExportPDF_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            SaveFileDialog saveFileDialog = new SaveFileDialog();
            // 设置文件筛选器,只允许选择特定格式的文件
            saveFileDialog.Filter = "PDF Files (*.pdf)|*.pdf|";
            saveFileDialog.Title = "选择保存路径";
            // 显示对话框并获取用户选择的结果
            if (saveFileDialog.ShowDialog() == DialogResult.OK)
            {
                string filePath = saveFileDialog.FileName;
                try
                {
                    _report1.ExportToPdf(filePath);
                    TipFormHelper.ShowSucceed("导出成功!");
                }
                catch (Exception ex)
                {
                    MessageBox.Show($"导出报表时发生错误: {ex.Message}", "导出失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
        private void btnExportWord_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            SaveFileDialog saveFileDialog = new SaveFileDialog();
            // 设置文件筛选器,只允许选择特定格式的文件
            saveFileDialog.Filter = "Word Files (*.docx)|*.docx";
            saveFileDialog.Title = "选择保存路径";
            // 显示对话框并获取用户选择的结果
            if (saveFileDialog.ShowDialog() == DialogResult.OK)
            {
                string filePath = saveFileDialog.FileName;
                try
                {
                    _report1.ExportToDocx(filePath);
                    TipFormHelper.ShowSucceed("导出成功!");
                }
                catch (Exception ex)
                {
                    MessageBox.Show($"导出报表时发生错误: {ex.Message}", "导出失败", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/13-print/99-test/XtraForm1.resx
@@ -117,4 +117,95 @@
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
  <data name="barSubItem1.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40
        LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
        dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAFMCAAAC77u/
        PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
        IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
        MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
        Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
        MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9Cgku
        R3JlZW57ZmlsbDojMDM5QzIzO30KPC9zdHlsZT4NCiAgPGcgaWQ9IkV4cG9ydCI+DQogICAgPHBhdGgg
        ZD0iTTEwLDEySDZWNmg0VjEyeiBNMjIsMTJ2NnY5YzAsMC42LTAuNCwxLTEsMUgxYy0wLjYsMC0xLTAu
        NC0xLTFWN2MwLTAuNiwwLjQtMSwxLTFoM3Y4aDE0di0ySDIyeiBNMTgsMThINCAgIHY2aDE0VjE4eiIg
        Y2xhc3M9IkJsYWNrIiAvPg0KICAgIDxwb2x5Z29uIHBvaW50cz0iMTYsMTAgMjQsMTAgMjQsMTQgMzIs
        OCAyNCwyIDI0LDYgMTYsNiAgIiBjbGFzcz0iR3JlZW4iIC8+DQogIDwvZz4NCjwvc3ZnPgs=
</value>
  </data>
  <data name="btnExportWord.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40
        LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
        dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAF4GAAAC77u/
        PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
        IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
        MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
        Y2U9InByZXNlcnZlIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMiAzMiI+DQogIDxz
        dHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQoJLkJsYWNre2ZpbGw6Izcy
        NzI3Mjt9Cjwvc3R5bGU+DQogIDxnIGlkPSJMYXllcl8xIj4NCiAgICA8cGF0aCBkPSJNMTAuMSwxMS41
        SDkuNHY0LjloMC43YzAuNiwwLDEuMS0wLjIsMS40LTAuN3MwLjUtMS4xLDAuNS0xLjhzLTAuMi0xLjMt
        MC41LTEuNyAgIEMxMS4yLDExLjgsMTAuNywxMS41LDEwLjEsMTEuNXoiIGNsYXNzPSJCbHVlIiAvPg0K
        ICAgIDxwYXRoIGQ9Ik0xNy40LDExLjVjLTAuNSwwLTAuOSwwLjItMS4yLDAuN2MtMC4zLDAuNS0wLjQs
        MS4xLTAuNCwxLjhjMCwwLjgsMC4xLDEuNCwwLjQsMS44czAuNywwLjcsMS4yLDAuNyAgIHMwLjktMC4y
        LDEuMi0wLjZjMC4zLTAuNCwwLjQtMSwwLjQtMS44cy0wLjEtMS40LTAuNC0xLjlDMTguMiwxMS43LDE3
        LjgsMTEuNSwxNy40LDExLjV6IiBjbGFzcz0iQmx1ZSIgLz4NCiAgICA8cGF0aCBkPSJNMjYsMTh2MTBI
        OFYxOEg2djExYzAsMC41LDAuNSwxLDEsMWgyMGMwLjUsMCwxLTAuNSwxLTFWMThIMjZ6IiBjbGFzcz0i
        QmxhY2siIC8+DQogICAgPHBhdGggZD0iTTgsMTBWNGgxOHY2aDJWM2MwLTAuNS0wLjUtMS0xLTFIN0M2
        LjUsMiw2LDIuNSw2LDN2N0g4eiIgY2xhc3M9IkJsYWNrIiAvPg0KICAgIDxwYXRoIGQ9Ik0yOSw4aC0x
        aC0ySDhINkg1QzQuNCw4LDQsOC40LDQsOXYxMGMwLDAuNiwwLjQsMSwxLDFoMWgyaDE4aDJoMWMwLjYs
        MCwxLTAuNCwxLTFWOUMzMCw4LjQsMjkuNiw4LDI5LDh6ICAgIE0xMi43LDE2LjhjLTAuNiwwLjctMS40
        LDEuMS0yLjQsMS4xSDh2LTcuN2gyLjJjMi4yLDAsMy40LDEuMywzLjQsMy44QzEzLjYsMTUuMSwxMy4z
        LDE2LDEyLjcsMTYuOHogTTE5LjUsMTYuOSAgIEMxOSwxNy42LDE4LjIsMTgsMTcuMywxOGMtMC45LDAt
        MS42LTAuNC0yLjItMS4xcy0wLjktMS43LTAuOS0yLjhjMC0xLjIsMC4zLTIuMiwwLjktM2MwLjYtMC44
        LDEuMy0xLjEsMi4zLTEuMSAgIGMwLjksMCwxLjYsMC40LDIuMiwxLjFjMC42LDAuNywwLjgsMS43LDAu
        OCwyLjhDMjAuNCwxNS4xLDIwLjEsMTYuMSwxOS41LDE2Ljl6IE0yNiwxMmMtMC40LTAuMy0wLjktMC41
        LTEuNC0wLjUgICBjLTAuNiwwLTEuMSwwLjItMS40LDAuN2MtMC40LDAuNS0wLjUsMS4xLTAuNSwxLjhz
        MC4yLDEuMywwLjUsMS44YzAuMywwLjQsMC44LDAuNywxLjQsMC43czEuMS0wLjIsMS41LTAuNXYxLjYg
        ICBDMjUuNiwxNy45LDI1LDE4LDI0LjMsMThjLTEsMC0xLjctMC4zLTIuMy0xYy0wLjYtMC43LTAuOC0x
        LjYtMC44LTIuOHMwLjMtMi4yLDAuOS0zczEuNC0xLjEsMi40LTEuMWMwLjYsMCwxLjEsMC4xLDEuNiww
        LjNWMTJIMjYgICB6IiBjbGFzcz0iQmx1ZSIgLz4NCiAgPC9nPg0KICA8ZyBpZD0iTGF5ZXJfMiIgLz4N
        Cjwvc3ZnPgs=
</value>
  </data>
  <data name="btnExportPDF.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40
        LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
        dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABoHAAAC77u/
        PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
        IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
        MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
        Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
        MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJs
        YWNre2ZpbGw6IzcyNzI3Mjt9Cgkuc3Qwe29wYWNpdHk6MC4yO30KPC9zdHlsZT4NCiAgPHBhdGggZD0i
        TTgsNGgxOHY2aDJWM2MwLTAuNS0wLjUtMS0xLTFIN0M2LjUsMiw2LDIuNSw2LDN2N2gyVjR6IiBjbGFz
        cz0iQmxhY2siIC8+DQogIDxwYXRoIGQ9Ik0yNiwyNkg4VjE2SDZ2MTFjMCwwLjUsMC41LDEsMSwxaDIw
        YzAuNSwwLDEtMC41LDEtMVYxNmgtMlYyNnoiIGNsYXNzPSJCbGFjayIgLz4NCiAgPHBhdGggZD0iTTEw
        LjMsMTEuNkg5LjZWMTRoMC42YzAuOSwwLDEuMy0wLjQsMS4zLTEuMkMxMS41LDEyLDExLjEsMTEuNiwx
        MC4zLDExLjZ6IiBjbGFzcz0iUmVkIiAvPg0KICA8cGF0aCBkPSJNMTYuNywxMS43aC0wLjh2NC45aDAu
        OGMwLjcsMCwxLjMtMC4yLDEuNi0wLjdzMC42LTEuMSwwLjYtMS44YzAtMC43LTAuMi0xLjMtMC42LTEu
        NyAgQzE4LDExLjksMTcuNCwxMS43LDE2LjcsMTEuN3oiIGNsYXNzPSJSZWQiIC8+DQogIDxwYXRoIGQ9
        Ik0yOSw4SDVDNC40LDgsNCw4LjQsNCw5djEwYzAsMC42LDAuNCwxLDEsMWgyNGMwLjYsMCwxLTAuNCwx
        LTFWOUMzMCw4LjQsMjkuNiw4LDI5LDh6IE0xMi41LDE0LjYgIGMtMC41LDAuNS0xLjIsMC43LTIuMSww
        LjdIOS42VjE4SDh2LTcuN2gyLjVjMS44LDAsMi43LDAuOCwyLjcsMi41QzEzLjIsMTMuNSwxMywxNC4y
        LDEyLjUsMTQuNnogTTE5LjYsMTYuOSAgQzE4LjksMTcuNiwxOCwxOCwxNi44LDE4aC0yLjV2LTcuN2gy
        LjVjMi41LDAsMy44LDEuMywzLjgsMy44QzIwLjcsMTUuMywyMC4zLDE2LjIsMTkuNiwxNi45eiBNMjYs
        MTEuN2gtMi41djEuOWgyLjNWMTVoLTIuM3YzICBoLTEuNnYtNy43SDI2VjExLjd6IiBjbGFzcz0iUmVk
        IiAvPg0KICA8ZyBjbGFzcz0ic3QwIj4NCiAgICA8cGF0aCBkPSJNMTAuMywxMS42SDkuNlYxNGgwLjZj
        MC45LDAsMS4zLTAuNCwxLjMtMS4yQzExLjUsMTIsMTEuMSwxMS42LDEwLjMsMTEuNnoiIGNsYXNzPSJC
        bGFjayIgLz4NCiAgICA8cGF0aCBkPSJNMTYuNywxMS43aC0wLjh2NC45aDAuOGMwLjcsMCwxLjMtMC4y
        LDEuNi0wLjdzMC42LTEuMSwwLjYtMS44YzAtMC43LTAuMi0xLjMtMC42LTEuNyAgIEMxOCwxMS45LDE3
        LjQsMTEuNywxNi43LDExLjd6IiBjbGFzcz0iQmxhY2siIC8+DQogICAgPHBhdGggZD0iTTI5LDhINUM0
        LjQsOCw0LDguNCw0LDl2MTBjMCwwLjYsMC40LDEsMSwxaDI0YzAuNiwwLDEtMC40LDEtMVY5QzMwLDgu
        NCwyOS42LDgsMjksOHogTTEyLjUsMTQuNiAgIGMtMC41LDAuNS0xLjIsMC43LTIuMSwwLjdIOS42VjE4
        SDh2LTcuN2gyLjVjMS44LDAsMi43LDAuOCwyLjcsMi41QzEzLjIsMTMuNSwxMywxNC4yLDEyLjUsMTQu
        NnogTTE5LjYsMTYuOSAgIEMxOC45LDE3LjYsMTgsMTgsMTYuOCwxOGgtMi41di03LjdoMi41YzIuNSww
        LDMuOCwxLjMsMy44LDMuOEMyMC43LDE1LjMsMjAuMywxNi4yLDE5LjYsMTYuOXogTTI2LDExLjdoLTIu
        NXYxLjloMi4zVjE1aC0yLjN2MyAgIGgtMS42di03LjdIMjZWMTEuN3oiIGNsYXNzPSJCbGFjayIgLz4N
        CiAgPC9nPg0KPC9zdmc+Cw==
</value>
  </data>
</root>
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/13-print/99-test/XtraReport1.Designer.cs
@@ -28,270 +28,97 @@
        /// </summary>
        private void InitializeComponent()
        {
            DevExpress.XtraCharts.XYDiagram xyDiagram1 = new DevExpress.XtraCharts.XYDiagram();
            DevExpress.XtraCharts.XYDiagramPane xyDiagramPane1 = new DevExpress.XtraCharts.XYDiagramPane();
            DevExpress.XtraCharts.SecondaryAxisY secondaryAxisY1 = new DevExpress.XtraCharts.SecondaryAxisY();
            DevExpress.XtraCharts.Series series1 = new DevExpress.XtraCharts.Series();
            DevExpress.XtraCharts.SplineSeriesView splineSeriesView1 = new DevExpress.XtraCharts.SplineSeriesView();
            DevExpress.XtraCharts.DetrendedPriceOscillator detrendedPriceOscillator1 = new DevExpress.XtraCharts.DetrendedPriceOscillator();
            this.TopMargin = new DevExpress.XtraReports.UI.TopMarginBand();
            this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
            this.BottomMargin = new DevExpress.XtraReports.UI.BottomMarginBand();
            this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
            this.Detail = new DevExpress.XtraReports.UI.DetailBand();
            this.xrTable2 = new DevExpress.XtraReports.UI.XRTable();
            this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
            this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
            this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
            this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
            this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
            this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
            this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
            this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
            this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
            this.ReportHeader1 = new DevExpress.XtraReports.UI.ReportHeaderBand();
            this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
            ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
            this.xrChart1 = new DevExpress.XtraReports.UI.XRChart();
            ((System.ComponentModel.ISupportInitialize)(this.xrChart1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(xyDiagram1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(xyDiagramPane1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(secondaryAxisY1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(series1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(splineSeriesView1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(detrendedPriceOscillator1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            // 
            // TopMargin
            // 
            this.TopMargin.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
            this.xrLabel4,
            this.xrLabel1});
            this.TopMargin.HeightF = 187.5417F;
            this.TopMargin.HeightF = 47.95837F;
            this.TopMargin.Name = "TopMargin";
            //
            // xrLabel1
            //
            this.xrLabel1.ExpressionBindings.AddRange(new DevExpress.XtraReports.UI.ExpressionBinding[] {
            new DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "")});
            this.xrLabel1.Font = new DevExpress.Drawing.DXFont("Arial", 26F, DevExpress.Drawing.DXFontStyle.Bold);
            this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(165.9723F, 10.00001F);
            this.xrLabel1.Multiline = true;
            this.xrLabel1.Name = "xrLabel1";
            this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
            this.xrLabel1.SizeF = new System.Drawing.SizeF(295.8333F, 59.45834F);
            this.xrLabel1.StylePriority.UseFont = false;
            this.xrLabel1.Text = "[name]";
            // 
            // BottomMargin
            // 
            this.BottomMargin.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
            this.xrLabel3});
            this.BottomMargin.HeightF = 380.2083F;
            this.BottomMargin.HeightF = 54.25008F;
            this.BottomMargin.Name = "BottomMargin";
            //
            // xrLabel3
            //
            this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(9.999974F, 10.00001F);
            this.xrLabel3.Multiline = true;
            this.xrLabel3.Name = "xrLabel3";
            this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
            this.xrLabel3.SizeF = new System.Drawing.SizeF(100F, 23F);
            this.xrLabel3.Text = "水泵分析";
            // 
            // Detail
            // 
            this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
            this.xrTable2});
            this.Detail.HeightF = 25F;
            this.xrChart1});
            this.Detail.HeightF = 536.3749F;
            this.Detail.Name = "Detail";
            // 
            // xrTable2
            // xrChart1
            // 
            this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(25.3472F, 0F);
            this.xrTable2.Name = "xrTable2";
            this.xrTable2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F);
            this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
            this.xrTableRow2});
            this.xrTable2.SizeF = new System.Drawing.SizeF(597.5695F, 25F);
            //
            // xrTableRow2
            //
            this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.xrTableCell8,
            this.xrTableCell9,
            this.xrTableCell10,
            this.xrTableCell11,
            this.xrTableCell12,
            this.xrTableCell13,
            this.xrTableCell14});
            this.xrTableRow2.Name = "xrTableRow2";
            this.xrTableRow2.Weight = 1D;
            //
            // xrTableCell8
            //
            this.xrTableCell8.Multiline = true;
            this.xrTableCell8.Name = "xrTableCell8";
            this.xrTableCell8.Text = "[BeginGroup]";
            this.xrTableCell8.Weight = 0.94999865705885811D;
            //
            // xrTableCell9
            //
            this.xrTableCell9.Multiline = true;
            this.xrTableCell9.Name = "xrTableCell9";
            this.xrTableCell9.Text = "Name";
            this.xrTableCell9.Weight = 0.950000100409502D;
            //
            // xrTableCell10
            //
            this.xrTableCell10.Multiline = true;
            this.xrTableCell10.Name = "xrTableCell10";
            this.xrTableCell10.Text = "xrTableCell10";
            this.xrTableCell10.Weight = 0.94999882686481629D;
            //
            // xrTableCell11
            //
            this.xrTableCell11.Multiline = true;
            this.xrTableCell11.Name = "xrTableCell11";
            this.xrTableCell11.Text = "xrTableCell11";
            this.xrTableCell11.Weight = 0.94999916647673244D;
            //
            // xrTableCell12
            //
            this.xrTableCell12.Multiline = true;
            this.xrTableCell12.Name = "xrTableCell12";
            this.xrTableCell12.Text = "xrTableCell12";
            this.xrTableCell12.Weight = 0.94999882686481629D;
            //
            // xrTableCell13
            //
            this.xrTableCell13.Multiline = true;
            this.xrTableCell13.Name = "xrTableCell13";
            this.xrTableCell13.Text = "xrTableCell13";
            this.xrTableCell13.Weight = 0.94999882686481629D;
            //
            // xrTableCell14
            //
            this.xrTableCell14.Multiline = true;
            this.xrTableCell14.Name = "xrTableCell14";
            this.xrTableCell14.Text = "xrTableCell14";
            this.xrTableCell14.Weight = 0.94999950608864858D;
            //
            // ReportHeader
            //
            this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
            this.xrTable1});
            this.ReportHeader.HeightF = 32.29167F;
            this.ReportHeader.Name = "ReportHeader";
            //
            // xrTable1
            //
            this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(25.3472F, 0F);
            this.xrTable1.Name = "xrTable1";
            this.xrTable1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F);
            this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
            this.xrTableRow1});
            this.xrTable1.SizeF = new System.Drawing.SizeF(597.5695F, 31.25F);
            //
            // xrTableRow1
            //
            this.xrTableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
            this.xrTableCell1,
            this.xrTableCell2,
            this.xrTableCell3,
            this.xrTableCell4,
            this.xrTableCell5,
            this.xrTableCell6,
            this.xrTableCell7});
            this.xrTableRow1.Name = "xrTableRow1";
            this.xrTableRow1.Weight = 1D;
            //
            // xrTableCell1
            //
            this.xrTableCell1.Multiline = true;
            this.xrTableCell1.Name = "xrTableCell1";
            this.xrTableCell1.Text = "分组";
            this.xrTableCell1.Weight = 0.62448374928863815D;
            //
            // xrTableCell2
            //
            this.xrTableCell2.Multiline = true;
            this.xrTableCell2.Name = "xrTableCell2";
            this.xrTableCell2.Text = "名称";
            this.xrTableCell2.Weight = 0.62448374928863815D;
            //
            // xrTableCell3
            //
            this.xrTableCell3.Multiline = true;
            this.xrTableCell3.Name = "xrTableCell3";
            this.xrTableCell3.Text = "编码";
            this.xrTableCell3.Weight = 0.62448374928863815D;
            //
            // xrTableCell4
            //
            this.xrTableCell4.Multiline = true;
            this.xrTableCell4.Name = "xrTableCell4";
            this.xrTableCell4.Text = "额定流量";
            this.xrTableCell4.Weight = 0.62448374928863815D;
            //
            // xrTableCell5
            //
            this.xrTableCell5.Multiline = true;
            this.xrTableCell5.Name = "xrTableCell5";
            this.xrTableCell5.Text = "额定扬程";
            this.xrTableCell5.Weight = 0.62448374928863815D;
            //
            // xrTableCell6
            //
            this.xrTableCell6.Multiline = true;
            this.xrTableCell6.Name = "xrTableCell6";
            this.xrTableCell6.Text = "额定功率";
            this.xrTableCell6.Weight = 0.62448374928863815D;
            //
            // xrTableCell7
            //
            this.xrTableCell7.Multiline = true;
            this.xrTableCell7.Name = "xrTableCell7";
            this.xrTableCell7.Text = "额定转速";
            this.xrTableCell7.Weight = 0.62448374928863815D;
            //
            // DetailReport
            //
            this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
            this.Detail1,
            this.ReportHeader1});
            this.DetailReport.Level = 0;
            this.DetailReport.Name = "DetailReport";
            //
            // Detail1
            //
            this.Detail1.Name = "Detail1";
            //
            // ReportHeader1
            //
            this.ReportHeader1.HeightF = 23F;
            this.ReportHeader1.Name = "ReportHeader1";
            //
            // xrLabel4
            //
            this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 69.75008F);
            this.xrLabel4.Multiline = true;
            this.xrLabel4.Name = "xrLabel4";
            this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
            this.xrLabel4.SizeF = new System.Drawing.SizeF(100F, 23F);
            this.xrLabel4.Text = "精度评估";
            this.xrChart1.BorderColor = System.Drawing.Color.Black;
            this.xrChart1.Borders = DevExpress.XtraPrinting.BorderSide.None;
            xyDiagram1.AxisX.Visibility = DevExpress.Utils.DefaultBoolean.True;
            xyDiagram1.AxisX.VisibleInPanesSerializable = "-1;0";
            xyDiagram1.AxisY.VisibleInPanesSerializable = "-1";
            xyDiagram1.DefaultPane.EnableAxisXScrolling = DevExpress.Utils.DefaultBoolean.False;
            xyDiagram1.DefaultPane.EnableAxisXZooming = DevExpress.Utils.DefaultBoolean.False;
            xyDiagram1.DefaultPane.EnableAxisYScrolling = DevExpress.Utils.DefaultBoolean.False;
            xyDiagram1.DefaultPane.EnableAxisYZooming = DevExpress.Utils.DefaultBoolean.False;
            xyDiagramPane1.Name = "Pane 1";
            xyDiagramPane1.PaneID = 0;
            xyDiagram1.Panes.AddRange(new DevExpress.XtraCharts.XYDiagramPane[] {
            xyDiagramPane1});
            secondaryAxisY1.AxisID = 1;
            secondaryAxisY1.Name = "Secondary AxisY 2";
            secondaryAxisY1.VisibleInPanesSerializable = "0";
            xyDiagram1.SecondaryAxesY.AddRange(new DevExpress.XtraCharts.SecondaryAxisY[] {
            secondaryAxisY1});
            this.xrChart1.Diagram = xyDiagram1;
            this.xrChart1.Legend.LegendID = -1;
            this.xrChart1.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False;
            this.xrChart1.LocationFloat = new DevExpress.Utils.PointFloat(102.0833F, 23.91663F);
            this.xrChart1.Name = "xrChart1";
            series1.Name = "Series 1";
            series1.SeriesID = 0;
            detrendedPriceOscillator1.AxisYName = "Secondary AxisY 2";
            detrendedPriceOscillator1.IndicatorID = 2;
            detrendedPriceOscillator1.Name = "test12323";
            detrendedPriceOscillator1.PaneName = "Pane 1";
            detrendedPriceOscillator1.ValueLevel = DevExpress.XtraCharts.ValueLevel.Value;
            splineSeriesView1.Indicators.AddRange(new DevExpress.XtraCharts.Indicator[] {
            detrendedPriceOscillator1});
            series1.View = splineSeriesView1;
            this.xrChart1.SeriesSerializable = new DevExpress.XtraCharts.Series[] {
        series1};
            this.xrChart1.SizeF = new System.Drawing.SizeF(300F, 200F);
            // 
            // XtraReport1
            // 
            this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
            this.TopMargin,
            this.BottomMargin,
            this.Detail,
            this.ReportHeader,
            this.DetailReport});
            this.Detail});
            this.Font = new DevExpress.Drawing.DXFont("Arial", 9.75F);
            this.Margins = new DevExpress.Drawing.DXMargins(100F, 100F, 187.5417F, 380.2083F);
            this.Margins = new DevExpress.Drawing.DXMargins(100F, 100F, 47.95837F, 54.25008F);
            this.Version = "23.2";
            ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(xyDiagramPane1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(secondaryAxisY1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(xyDiagram1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(detrendedPriceOscillator1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(splineSeriesView1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(series1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.xrChart1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
        }
@@ -301,30 +128,6 @@
        private DevExpress.XtraReports.UI.TopMarginBand TopMargin;
        private DevExpress.XtraReports.UI.BottomMarginBand BottomMargin;
        private DevExpress.XtraReports.UI.DetailBand Detail;
        private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader;
        private DevExpress.XtraReports.UI.XRTable xrTable1;
        private DevExpress.XtraReports.UI.XRTableRow xrTableRow1;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
        private DevExpress.XtraReports.UI.XRLabel xrLabel1;
        private DevExpress.XtraReports.UI.XRLabel xrLabel3;
        private DevExpress.XtraReports.UI.DetailReportBand DetailReport;
        private DevExpress.XtraReports.UI.DetailBand Detail1;
        private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader1;
        private DevExpress.XtraReports.UI.XRLabel xrLabel4;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell3;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell4;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell5;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell6;
        private DevExpress.XtraReports.UI.XRTable xrTable2;
        private DevExpress.XtraReports.UI.XRTableRow xrTableRow2;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell8;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell9;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell10;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell11;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell12;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell13;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell14;
        private DevExpress.XtraReports.UI.XRTableCell xrTableCell7;
        private DevExpress.XtraReports.UI.XRChart xrChart1;
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/13-print/99-test/XtraReport1.cs
@@ -1,15 +1,7 @@
using Aspose.Words.Drawing.Charts;
using DevExpress.CodeParser;
using DevExpress.XtraBars.Docking;
using DevExpress.Charts.Native;
using DevExpress.Utils;
using DevExpress.XtraCharts;
using DevExpress.XtraReports.UI;
using DevExpress.XtraSpreadsheet.Model;
using NPOI.POIFS.NIO;
using Org.BouncyCastle.Tls;
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
namespace HStation.WinFrmUI
{
@@ -22,105 +14,971 @@
        private SimulationPrintViewModel _printViewModel;
        public void SetBingdingData(SimulationPrintViewModel viewModel)
        public void SetBingdingData(SimulationPrintViewModel vm)
        {
            _printViewModel = viewModel;
            ininal();
        }
            // A4设置 827 1169
            this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
            this.Margins = new DevExpress.Drawing.DXMargins(50, 50, 50, 50);
        private void ininal()
        {
            this.DataSource = _printViewModel.PumpList;
            this.xrLabel1.DataBindings.Add("Text", _printViewModel.Project, "Name");
            this.xrTable2.DataBindings.Add("Text", _printViewModel.PumpList, "Name");
            this.xrTable2.DataBindings.Add("Text", _printViewModel.PumpList, "BeginGroup");
            // 内容宽度
            float contentWidth = 727F; // 内容宽度
            float firstCaptionHeight = 30F; // 一级标题高度
            float pageHeight = 1069F; // 页面可用高度
            float currentY = 0F; // 当前Y坐标
            // 创建 XRChart 控件实例
            XRChart xrChart = new XRChart();
            foreach (var item in GenerateAllChartData(1))
            #region 页眉
            var labForCorp = new XRLabel();
            labForCorp.Name = "页眉";
            labForCorp.Text = "杭州科维节能技术股份有限公司";
            labForCorp.Multiline = true;
            labForCorp.LocationFloat = new DevExpress.Utils.PointFloat(482F, 16F);
            labForCorp.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
            labForCorp.SizeF = new System.Drawing.SizeF(236F, 24F);
            labForCorp.StylePriority.UseTextAlignment = false;
            labForCorp.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
            this.TopMargin.Controls.Add(labForCorp);
            #endregion 页眉
            #region 页脚
            var pageForCurrentNum = new XRPageInfo();
            pageForCurrentNum.LocationFloat = new DevExpress.Utils.PointFloat(617F, 10.00001F);
            pageForCurrentNum.Name = "页脚";
            pageForCurrentNum.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
            pageForCurrentNum.SizeF = new System.Drawing.SizeF(100F, 23F);
            pageForCurrentNum.StylePriority.UseTextAlignment = false;
            pageForCurrentNum.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
            pageForCurrentNum.TextFormatString = "第{0}页";
            this.BottomMargin.Controls.Add(pageForCurrentNum);
            #endregion 页脚
            #region 标题
            var labForTitle = new XRLabel();
            labForTitle.AnchorHorizontal = ((DevExpress.XtraReports.UI.HorizontalAnchorStyles)((DevExpress.XtraReports.UI.HorizontalAnchorStyles.Left | DevExpress.XtraReports.UI.HorizontalAnchorStyles.Right)));
            labForTitle.Font = new DevExpress.Drawing.DXFont("Arial", 15F, DevExpress.Drawing.DXFontStyle.Bold);
            labForTitle.LocationFloat = new DevExpress.Utils.PointFloat(0F, currentY);
            labForTitle.Multiline = true;
            labForTitle.Name = "labTitle";
            labForTitle.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F);
            labForTitle.SizeF = new System.Drawing.SizeF(727F, 50F);
            labForTitle.StylePriority.UseFont = false;
            labForTitle.StylePriority.UseTextAlignment = false;
            labForTitle.Text = $"{vm.Project.Name}项目节能报告";
            labForTitle.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
            this.Detail.Controls.Add(labForTitle);
            currentY += 50F;
            #endregion 标题
            #region 一、项目概述
            var labForDescription = CreateFirstCaption("一、项目概述", contentWidth, firstCaptionHeight, 0F, currentY);
            this.Detail.Controls.Add(labForDescription);
            currentY += firstCaptionHeight;
            #endregion 一、项目概述
            #region 项目概述内容
            var labForDescriptionContent = new XRLabel();
            labForDescriptionContent.AnchorHorizontal = (DevExpress.XtraReports.UI.HorizontalAnchorStyles.Left | DevExpress.XtraReports.UI.HorizontalAnchorStyles.Right);
            labForDescriptionContent.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
            labForDescriptionContent.LocationFloat = new DevExpress.Utils.PointFloat(0F, currentY);
            labForDescriptionContent.Multiline = true;
            labForDescriptionContent.Name = "labForDescriptionContent";
            labForDescriptionContent.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F);
            labForDescriptionContent.SizeF = new System.Drawing.SizeF(727F, 100F);
            labForDescriptionContent.StylePriority.UseFont = false;
            labForDescriptionContent.StylePriority.UseTextAlignment = false;
            labForDescriptionContent.Text = $"    {vm.Project.Description}";
            labForDescriptionContent.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
            this.Detail.Controls.Add(labForDescriptionContent);
            currentY += 100F;
            #endregion 项目概述内容
            // 二、水泵明细
            var labForPumpList = new XRLabel();
            labForPumpList.AnchorHorizontal = (DevExpress.XtraReports.UI.HorizontalAnchorStyles.Left | DevExpress.XtraReports.UI.HorizontalAnchorStyles.Right);
            labForPumpList.Font = new DevExpress.Drawing.DXFont("Arial", 12F, DevExpress.Drawing.DXFontStyle.Bold);
            labForPumpList.LocationFloat = new DevExpress.Utils.PointFloat(0F, currentY);
            labForPumpList.Multiline = true;
            labForPumpList.Name = "labForPumpList";
            labForPumpList.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
            labForPumpList.SizeF = new System.Drawing.SizeF(727F, 25F);
            labForPumpList.StylePriority.UseFont = false;
            labForPumpList.StylePriority.UseTextAlignment = false;
            labForPumpList.Text = "二、水泵明细";
            labForPumpList.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
            this.Detail.Controls.Add(labForPumpList);
            currentY += 25F;
            // 水泵明细内容
            if (vm.PumpList != null && vm.PumpList.Count > 0)
            {
                // 创建一个系列(曲线)
                Series series = new Series(item.SeriesName, ViewType.Spline);
                // 创建 XRTable
                var tableForPumpList = new XRTable();
                tableForPumpList.LocationF = new DevExpress.Utils.PointFloat(0F, currentY);
                tableForPumpList.SizeF = new SizeF(727F, 30F + vm.PumpList.Count * 25F); // 设置大小
                // 设置系列的数据筛选条件
                series.FilterString = $"SeriesName = '{item.SeriesName}'";
                // 创建表头行
                XRTableRow headerRowPumpList = new XRTableRow();
                headerRowPumpList.BackColor = Color.LightGray; // 设置背景颜色
                // 设置系列的数据绑定
                series.ArgumentDataMember = "XValue";
                series.ValueDataMembers.AddRange(new string[] { "YValue" });
                // 添加表头列
                headerRowPumpList.Cells.Add(CreateTableCell("名称", 100));
                headerRowPumpList.Cells.Add(CreateTableCell("编码", 100));
                headerRowPumpList.Cells.Add(CreateTableCell("额定流量", 100));
                headerRowPumpList.Cells.Add(CreateTableCell("额定扬程", 100));
                headerRowPumpList.Cells.Add(CreateTableCell("额定功率", 100));
                headerRowPumpList.Cells.Add(CreateTableCell("额定转速", 100));
                // 将系列添加到图表的系列集合中
                xrChart.Series.Add(series);
                // 将表头行添加到表格
                tableForPumpList.Rows.Add(headerRowPumpList);
                // 遍历水泵
                foreach (var pump in vm.PumpList)
                {
                    // 创建数据行
                    var dataRow = new XRTableRow();
                    dataRow.Cells.Add(new XRTableCell()
                    {
                        Text = pump.Name,
                        WidthF = 100F,
                        TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                        Borders = DevExpress.XtraPrinting.BorderSide.All
                    });
                    dataRow.Cells.Add(new XRTableCell()
                    {
                        Text = pump.Code,
                        WidthF = 100F,
                        TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                        Borders = DevExpress.XtraPrinting.BorderSide.All
                    });
                    dataRow.Cells.Add(new XRTableCell()
                    {
                        Text = pump.RatedQ.ToString(),
                        WidthF = 100F,
                        TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                        Borders = DevExpress.XtraPrinting.BorderSide.All
                    });
                    dataRow.Cells.Add(new XRTableCell()
                    {
                        Text = pump.RatedH.ToString(),
                        WidthF = 100F,
                        TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                        Borders = DevExpress.XtraPrinting.BorderSide.All
                    });
                    dataRow.Cells.Add(new XRTableCell()
                    {
                        Text = pump.RatedP.ToString(),
                        WidthF = 100F,
                        TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                        Borders = DevExpress.XtraPrinting.BorderSide.All
                    });
                    dataRow.Cells.Add(new XRTableCell()
                    {
                        Text = pump.RatedN.ToString(),
                        WidthF = 100F,
                        TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                        Borders = DevExpress.XtraPrinting.BorderSide.All
                    });
                    tableForPumpList.Rows.Add(dataRow);
                }
                // 将表格添加到Detail
                this.Detail.Controls.Add(tableForPumpList);
                currentY += tableForPumpList.HeightF;
                //currentY += vm.PumpList.Count*10;
            }
            xrChart.DataSource = GenerateAllChartData(1);
            //Detail1.Controls.Add(xrChart);
        }
        public class ChartDataPoint
        {
            public double XValue { get; set; } // 横坐标值
            public double YValue { get; set; } // 纵坐标值
            public string SeriesName { get; set; } // 系列名称,用于区分不同的线
        }
        public List<ChartDataPoint> GenerateAllChartData(int i)
        {
            List<ChartDataPoint> series1Data = new List<ChartDataPoint>();
            foreach (var item in _printViewModel.WorkingList.First().PumpAnaly.Items[i].RatedCurveQE)
            var labForWorking = CreateFirstCaption("三、工况视图", contentWidth, firstCaptionHeight, 0F, currentY);
            this.Detail.Controls.Add(labForWorking);
            currentY += firstCaptionHeight;
            var labForAccuracy = CreateFirstCaption("(1)、精度评估", contentWidth - 25F, 15F, 20F, currentY);
            this.Detail.Controls.Add(labForAccuracy);
            currentY += firstCaptionHeight;
            if (vm.WorkingList != null && vm.WorkingList.Count > 0)
            {
                series1Data.Add(new ChartDataPoint
                foreach (var working in vm.WorkingList)
                {
                    XValue = item.X,
                    YValue = item.Y,
                    SeriesName = _printViewModel.WorkingList.First().PumpAnaly.Items[i].Name
                });
            };
                    /*XRChart chart = new XRChart();
                    chart.LocationF = new DevExpress.Utils.PointFloat(0F, currentY);
                    chart.WidthF = contentWidth;
                    chart.HeightF = 300F;
            List<ChartDataPoint> series2Data = new List<ChartDataPoint>();
            foreach (var item in _printViewModel.WorkingList.First().PumpAnaly.Items[i].CurrentCurveQH)
            {
                series2Data.Add(new ChartDataPoint
                {
                    XValue = item.X,
                    YValue = item.Y,
                    SeriesName = _printViewModel.WorkingList.First().PumpAnaly.Items[i].Name
                });
            };
                    // 创建一个线系列
                    Series series = new Series("Series1", ViewType.Spline);
                    // 添加数据点
                    foreach (var item in working.PumpAnaly.Items[0].RatedCurveQH)
                    {
                        series.Points.Add(new SeriesPoint(item.X, item.Y));
                    }
                    chart.Series.Add(series);
                    Series series2 = new Series("Series2", ViewType.Spline);
                    // 添加数据点
                    foreach (var item in working.PumpAnaly.Items[0].CurrentCurveQE)
                    {
                        series2.Points.Add(new SeriesPoint(item.X, item.Y));
                    }
                    chart.Series.Add(series2);
                    Series series3 = new Series("Series3", ViewType.Spline);
                    // 添加数据点
                    foreach (var item in working.PumpAnaly.Items[0].CurrentCurveQP)
                    {
                        series3.Points.Add(new SeriesPoint(item.X, item.Y));
                    }
                    chart.Series.Add(series3);
            List<ChartDataPoint> series3Data = new List<ChartDataPoint>();
            foreach (var item in _printViewModel.WorkingList.First().PumpAnaly.Items[i].CurrentCurveQP)
                    Detail.Controls.Add(chart);
                    currentY += chart.HeightF;*/
                    /*          var accuracyFlowChart = CreateAccuracyItem(working.Accuracy.Flow?.AvgError ?? 0, 213F, 250F, 300F, currentY);
                              if (currentY + accuracyFlowChart.HeightF > pageHeight)
                              {
                                  accuracyFlowChart.LocationF = new DevExpress.Utils.PointFloat(accuracyFlowChart.LocationF.X, currentY);
                              }
                              Detail.Controls.Add(accuracyFlowChart);
                              currentY += accuracyFlowChart.HeightF;
                              var accuracyPressChart = CreateAccuracyItem(working.Accuracy.Press?.AvgError ?? 0, 213F, 250F, 513F, currentY);
                              if (currentY + accuracyPressChart.HeightF > pageHeight)
                              {
                                  accuracyPressChart.LocationF = new DevExpress.Utils.PointFloat(accuracyPressChart.LocationF.X, currentY);
                              }
                              Detail.Controls.Add(accuracyPressChart);
                              currentY += accuracyPressChart.HeightF;*/
                    var accuracyScaleChart = CreateAccuracyScale(working.Accuracy.Scale, 300F, 230F, currentY);
                    Detail.Controls.Add(accuracyScaleChart);
                    var accuracyFlowChart = CreateAccuracyItem(working.Accuracy.Flow?.AvgError ?? 0, 213F, 230F, 300F, currentY);
                    Detail.Controls.Add(accuracyFlowChart);
                    var accuracyPressChart = CreateAccuracyItem(working.Accuracy.Press?.AvgError ?? 0, 213F, 230F, 513F, currentY);
                    Detail.Controls.Add(accuracyPressChart);
                    currentY += accuracyScaleChart.HeightF;
                }
                currentY += 20F;
            }
            var labForAccuracyList = CreateFirstCaption("(1.1)、评估列表", contentWidth - 25F, 15F, 20F, currentY);
            this.Detail.Controls.Add(labForAccuracyList);
            currentY += firstCaptionHeight;
            #region 评估列表
            if (vm.WorkingList != null && vm.WorkingList.Count > 0)
            {
                series3Data.Add(new ChartDataPoint
                foreach (var working in vm.WorkingList)
                {
                    XValue = item.X,
                    YValue = item.Y,
                    SeriesName = _printViewModel.WorkingList.First().PumpAnaly.Items[i].Name
                });
            };
            // 合并所有系列的数据
            List<ChartDataPoint> allData = new List<ChartDataPoint>();
            allData.AddRange(series1Data);
            allData.AddRange(series2Data);
            allData.AddRange(series3Data);
            return allData;
                    if (working.Accuracy.Items != null && working.Accuracy.Items.Count > 0)
                    {                // 创建 XRTable
                        var tableForAccuracyList = new XRTable();
                        tableForAccuracyList.LocationF = new DevExpress.Utils.PointFloat(0F, currentY);
                        tableForAccuracyList.SizeF = new SizeF(727F, 30F + working.Accuracy.Items.Count * 25F); // 设置大小
                        // 创建表头行
                        XRTableRow headerRowAccuracyList = new XRTableRow();
                        headerRowAccuracyList.BackColor = Color.LightGray; // 设置背景颜色
                        // 添加表头列
                        headerRowAccuracyList.Cells.Add(CreateTableCell("评估构件", 100));
                        headerRowAccuracyList.Cells.Add(CreateTableCell("评估项", 100));
                        headerRowAccuracyList.Cells.Add(CreateTableCell("监测值", 100));
                        headerRowAccuracyList.Cells.Add(CreateTableCell("计算值", 100));
                        headerRowAccuracyList.Cells.Add(CreateTableCell("评估误差", 100));
                        // 将表头行添加到表格
                        tableForAccuracyList.Rows.Add(headerRowAccuracyList);
                        foreach (var item in working.Accuracy.Items)
                        {
                            // 创建数据行
                            var dataRow = new XRTableRow();
                            dataRow.Cells.Add(new XRTableCell()
                            {
                                Text = item.EvaluateName,
                                WidthF = 100F,
                                TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                                Borders = DevExpress.XtraPrinting.BorderSide.All
                            });
                            dataRow.Cells.Add(new XRTableCell()
                            {
                                Text = item.EvaluateItem,
                                WidthF = 100F,
                                TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                                Borders = DevExpress.XtraPrinting.BorderSide.All
                            });
                            dataRow.Cells.Add(new XRTableCell()
                            {
                                Text = item.MonitorValue.ToString(),
                                WidthF = 100F,
                                TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                                Borders = DevExpress.XtraPrinting.BorderSide.All
                            });
                            dataRow.Cells.Add(new XRTableCell()
                            {
                                Text = item.CalcuValue.ToString(),
                                WidthF = 100F,
                                TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                                Borders = DevExpress.XtraPrinting.BorderSide.All
                            });
                            dataRow.Cells.Add(new XRTableCell()
                            {
                                Text = item.EvaluateError?.ToString(),
                                WidthF = 100F,
                                TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                                Borders = DevExpress.XtraPrinting.BorderSide.All
                            });
                            tableForAccuracyList.Rows.Add(dataRow);
                        }
                        // 将表格添加到Detail
                        this.Detail.Controls.Add(tableForAccuracyList);
                        currentY += tableForAccuracyList.HeightF;
                    }
                }
                currentY += 20F;
            }
            #endregion 评估列表
            #region 水泵分析
            var labForPump = CreateFirstCaption("(2)、水泵分析", contentWidth - 25F, 15F, 20F, currentY);
            this.Detail.Controls.Add(labForPump);
            currentY += 20F;
            if (vm.WorkingList != null && vm.WorkingList.Count > 0)
            {
                foreach (var working in vm.WorkingList)
                {
                    if (working.PumpAnaly != null && working.PumpAnaly.Items != null && working.PumpAnaly.Items.Count > 0)
                    {
                        foreach (var item in working.PumpAnaly.Items)
                        {
                            var label = CreateFirstCaption(item.Name, contentWidth - 25F, 15F, 20F, currentY);
                            this.Detail.Controls.Add(label);
                            currentY += 20F;
                            XRChart chart = new XRChart();
                            ((System.ComponentModel.ISupportInitialize)(chart)).BeginInit();
                            chart.LocationF = new DevExpress.Utils.PointFloat(0F, currentY);
                            chart.WidthF = contentWidth;
                            chart.HeightF = 700F;
                            chart.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False;
                            // 创建 XY 图表
                            XYDiagram xyDiagram = new XYDiagram();
                            ((System.ComponentModel.ISupportInitialize)(xyDiagram)).BeginInit();
                            // 配置主 X 轴
                            xyDiagram.AxisX.Title.Text = "流量(m³/h)";
                            xyDiagram.AxisX.Title.Visibility = DefaultBoolean.True;
                            xyDiagram.AxisX.Visibility = DefaultBoolean.True;
                            xyDiagram.AxisX.Alignment = AxisAlignment.Far; // 将 X 轴设置在图表底部
                            // 配置主 Y 轴
                            xyDiagram.AxisY.Title.Text = "扬程/m";
                            xyDiagram.AxisY.Title.Visibility = DefaultBoolean.True;
                            xyDiagram.AxisY.Visibility = DefaultBoolean.True;
                            // 创建两个面板
                            XYDiagramPane pane1 = new XYDiagramPane();
                            pane1.Name = "Pane 1";
                            xyDiagram.Panes.Add(pane1);
                            XYDiagramPane pane2 = new XYDiagramPane();
                            pane2.Name = "Pane 2";
                            xyDiagram.Panes.Add(pane2);
                            // 创建次要 Y 轴
                            SecondaryAxisY secondaryAxisY1 = new SecondaryAxisY("Secondary Y-Axis 1");
                            secondaryAxisY1.Title.Text = "功率";
                            secondaryAxisY1.Title.Visibility = DefaultBoolean.True;
                            secondaryAxisY1.Visibility = DefaultBoolean.True;
                            xyDiagram.SecondaryAxesY.Add(secondaryAxisY1);
                            SecondaryAxisY secondaryAxisY2 = new SecondaryAxisY("Secondary Y-Axis 2");
                            secondaryAxisY2.Title.Text = "效率";
                            secondaryAxisY2.Title.Visibility = DefaultBoolean.True;
                            secondaryAxisY2.Visibility = DefaultBoolean.True;
                            xyDiagram.SecondaryAxesY.Add(secondaryAxisY2);
                            chart.Diagram = xyDiagram;
                            ((System.ComponentModel.ISupportInitialize)(xyDiagram)).EndInit();
                            ((System.ComponentModel.ISupportInitialize)(chart)).EndInit();
                            // 创建第一个系列
                            Series series1 = new Series("Series 1", ViewType.Spline);
                            foreach (var qh in item.RatedCurveQH)
                            {
                                series1.Points.Add(new SeriesPoint(qh.X, qh.Y));
                            }
                            series1.LabelsVisibility = DefaultBoolean.False;
                            chart.Series.Add(series1);
                            // 创建第二个系列
                            Series series2 = new Series("Series 2", ViewType.Spline);
                            foreach (var qe in item.RatedCurveQE)
                            {
                                series2.Points.Add(new SeriesPoint(qe.X, qe.Y));
                            }
((XYDiagramSeriesViewBase)series2.View).Pane = pane2;
                            ((XYDiagramSeriesViewBase)series2.View).AxisY = secondaryAxisY2;
                            series2.LabelsVisibility = DefaultBoolean.False;
                            chart.Series.Add(series2);
                            // 创建第三个系列
                            Series series3 = new Series("Series 3", ViewType.Spline);
                            foreach (var qp in item.RatedCurveQP)
                            {
                                series3.Points.Add(new SeriesPoint(qp.X, qp.Y));
                            }
((XYDiagramSeriesViewBase)series3.View).Pane = pane1;
                            ((XYDiagramSeriesViewBase)series3.View).AxisY = secondaryAxisY1;
                            series3.LabelsVisibility = DefaultBoolean.False;
                            chart.Series.Add(series3);
                            Detail.Controls.Add(chart);
                            currentY += chart.HeightF;
                        }
                    }
                }
                currentY += 20F;
            }
            #endregion 水泵分析
            #region 监测分析
            var labForMonitor = CreateFirstCaption("(3)、监测分析", contentWidth - 25F, 15F, 20F, currentY);
            this.Detail.Controls.Add(labForMonitor);
            currentY += 20F;
            if (vm.WorkingList != null && vm.WorkingList.Count > 0)
            {
                foreach (var working in vm.WorkingList)
                {
                    if (working.MonitorAnaly.Items != null && working.MonitorAnaly.Items.Count > 0)
                    {                // 创建 XRTable
                        var tableForMonitorList = new XRTable();
                        tableForMonitorList.LocationF = new DevExpress.Utils.PointFloat(0F, currentY);
                        tableForMonitorList.SizeF = new SizeF(727F, 30F + working.MonitorAnaly.Items.Count * 25F); // 设置大小
                        // 创建表头行
                        XRTableRow headerRowMonitorList = new XRTableRow();
                        headerRowMonitorList.BackColor = Color.LightGray; // 设置背景颜色
                        // 添加表头列
                        headerRowMonitorList.Cells.Add(CreateTableCell("构件", 100));
                        headerRowMonitorList.Cells.Add(CreateTableCell("属性", 100));
                        headerRowMonitorList.Cells.Add(CreateTableCell("计算值", 100));
                        headerRowMonitorList.Cells.Add(CreateTableCell("单位", 100));
                        // 将表头行添加到表格
                        tableForMonitorList.Rows.Add(headerRowMonitorList);
                        foreach (var item in working.MonitorAnaly.Items)
                        {
                            // 创建数据行
                            var dataRow = new XRTableRow();
                            dataRow.Cells.Add(new XRTableCell()
                            {
                                Text = item.VisualName,
                                WidthF = 100F,
                                TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                                Borders = DevExpress.XtraPrinting.BorderSide.All
                            });
                            dataRow.Cells.Add(new XRTableCell()
                            {
                                Text = item.PropName,
                                WidthF = 100F,
                                TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                                Borders = DevExpress.XtraPrinting.BorderSide.All
                            });
                            dataRow.Cells.Add(new XRTableCell()
                            {
                                Text = item.CalcuValue?.ToString(),
                                WidthF = 100F,
                                TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                                Borders = DevExpress.XtraPrinting.BorderSide.All
                            });
                            dataRow.Cells.Add(new XRTableCell()
                            {
                                Text = item.UnitName,
                                WidthF = 100F,
                                TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                                Borders = DevExpress.XtraPrinting.BorderSide.All
                            });
                            tableForMonitorList.Rows.Add(dataRow);
                        }
                        // 将表格添加到Detail
                        this.Detail.Controls.Add(tableForMonitorList);
                        currentY += tableForMonitorList.HeightF;
                        currentY += 20F;
                    }
                }
            }
            #endregion 监测分析
            #region 能耗分析
            var labForEnergyAnaly = CreateFirstCaption("(4)、能耗分析", contentWidth - 25F, 15F, 20F, currentY);
            this.Detail.Controls.Add(labForEnergyAnaly);
            currentY += 20F;
            if (vm.WorkingList != null && vm.WorkingList.Count > 0)
            {
                foreach (var working in vm.WorkingList)
                {
                    if (working.EnergyAnaly != null)
                    {
                        if (working.EnergyAnaly.Items != null && working.EnergyAnaly.Items.Count > 0)
                        {
                            var group = working.EnergyAnaly.Items.GroupBy(x => x.BeginGroup).ToArray();
                            foreach (var item in group)
                            {
                                var label = CreateFirstCaption(item.Key, contentWidth - 25F, 15F, 20F, currentY);
                                this.Detail.Controls.Add(label);
                                currentY += 20F;
                                XRChart chartQh = new XRChart();
                                chartQh.LocationF = new DevExpress.Utils.PointFloat(0F, currentY);
                                chartQh.WidthF = contentWidth;
                                chartQh.HeightF = 300F;
                                XRChart chartQE = new XRChart();
                                chartQE.LocationF = new DevExpress.Utils.PointFloat(0F, currentY + chartQh.HeightF);
                                chartQE.WidthF = contentWidth;
                                chartQE.HeightF = 300F;
                                XRChart chartQP = new XRChart();
                                chartQP.LocationF = new DevExpress.Utils.PointFloat(0F, currentY + chartQh.HeightF + chartQE.HeightF);
                                chartQP.WidthF = contentWidth;
                                chartQP.HeightF = 300F;
                                foreach (var valve in item)
                                {
                                    // 创建一个线系列
                                    Series series = new Series(valve.Code, ViewType.Spline);
                                    // 添加数据点
                                    foreach (var qh in valve.CurrentCurveQH)
                                    {
                                        series.Points.Add(new SeriesPoint(qh.X.ToString(), qh.Y.ToString()));
                                    }
                                    chartQh.Series.Add(series);
                                    Series series2 = new Series("Series2", ViewType.Spline);
                                    // 添加数据点
                                    foreach (var qe in valve.CurrentCurveQE)
                                    {
                                        series2.Points.Add(new SeriesPoint(qe.X.ToString(), qe.Y.ToString()));
                                    }
                                    chartQE.Series.Add(series2);
                                    Series series3 = new Series("Series3", ViewType.Spline);
                                    // 添加数据点
                                    foreach (var qp in valve.CurrentCurveQP)
                                    {
                                        series3.Points.Add(new SeriesPoint(qp.X.ToString(), qp.Y.ToString()));
                                    }
                                    chartQP.Series.Add(series3);
                                }
                                this.Detail.Controls.Add(chartQh);
                                this.Detail.Controls.Add(chartQE);
                                this.Detail.Controls.Add(chartQP);
                                currentY += chartQh.HeightF + chartQE.HeightF + chartQP.HeightF;
                            }
                        }
                    }
                }
            }
            #endregion 能耗分析
            //能效明细
            var labForEnergyDetails = CreateFirstCaption("(4.1)、能效明细", contentWidth - 25F, 15F, 20F, currentY);
            this.Detail.Controls.Add(labForEnergyDetails);
            currentY += 20F;
            if (vm.WorkingList != null && vm.WorkingList.Count > 0)
            {
                foreach (var working in vm.WorkingList)
                {
                    if (working.EnergyAnaly.Items != null && working.EnergyAnaly.Items.Count > 0)
                    {
                        // 创建 XRTable
                        var tableForEnergyDetails = new XRTable();
                        tableForEnergyDetails.LocationF = new DevExpress.Utils.PointFloat(0F, currentY);
                        tableForEnergyDetails.SizeF = new SizeF(727F, 30F + working.EnergyAnaly.Items.Count * 25F); // 设置大小
                        // 创建表头行
                        XRTableRow headerRowEnergyDetails = new XRTableRow();
                        headerRowEnergyDetails.BackColor = Color.LightGray; // 设置背景颜色
                        // 添加表头列
                        headerRowEnergyDetails.Cells.Add(CreateTableCell("分组", 100));
                        headerRowEnergyDetails.Cells.Add(CreateTableCell("名称", 100));
                        headerRowEnergyDetails.Cells.Add(CreateTableCell("运行状态", 100));
                        headerRowEnergyDetails.Cells.Add(CreateTableCell("设定评率(hz)", 100));
                        headerRowEnergyDetails.Cells.Add(CreateTableCell("设定流量(m³/h)", 100));
                        headerRowEnergyDetails.Cells.Add(CreateTableCell("进口压力(m)", 100));
                        headerRowEnergyDetails.Cells.Add(CreateTableCell("出口压力(m)", 100));
                        headerRowEnergyDetails.Cells.Add(CreateTableCell("扬程(m)", 100));
                        headerRowEnergyDetails.Cells.Add(CreateTableCell("功率(Kw)", 100));
                        headerRowEnergyDetails.Cells.Add(CreateTableCell("效率(%)", 100));
                        // 将表头行添加到表格
                        tableForEnergyDetails.Rows.Add(headerRowEnergyDetails);
                        foreach (var item in working.EnergyAnaly.Items)
                        {
                            // 创建数据行
                            var dataRow = new XRTableRow();
                            dataRow.Cells.Add(new XRTableCell()
                            {
                                Text = item.BeginGroup,
                                WidthF = 100F,
                                TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                                Borders = DevExpress.XtraPrinting.BorderSide.All
                            });
                            dataRow.Cells.Add(new XRTableCell()
                            {
                                Text = item.Name,
                                WidthF = 100F,
                                TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                                Borders = DevExpress.XtraPrinting.BorderSide.All
                            });
                            dataRow.Cells.Add(new XRTableCell()
                            {
                                Text = item.LinkStatus,
                                WidthF = 100F,
                                TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                                Borders = DevExpress.XtraPrinting.BorderSide.All
                            });
                            dataRow.Cells.Add(new XRTableCell()
                            {
                                Text = item.CurrentHz.ToString(),
                                WidthF = 100F,
                                TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                                Borders = DevExpress.XtraPrinting.BorderSide.All
                            });
                            dataRow.Cells.Add(new XRTableCell()
                            {
                                Text = item.RatedHz.ToString(),
                                WidthF = 100F,
                                TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter,
                                Borders = DevExpress.XtraPrinting.BorderSide.All
                            });
                            tableForEnergyDetails.Rows.Add(dataRow);
                        }
                        // 将表格添加到Detail
                        this.Detail.Controls.Add(tableForEnergyDetails);
                        currentY += tableForEnergyDetails.HeightF;
                        currentY += 20F;
                    }
                }
            }
            #region 损失曲线
            var labForLossCurve = CreateFirstCaption("(5)、损失曲线", contentWidth - 25F, 15F, 20F, currentY);
            this.Detail.Controls.Add(labForLossCurve);
            currentY += 20F;
            if (vm.WorkingList != null && vm.WorkingList.Count > 0)
            {
                foreach (var working in vm.WorkingList)
                {
                    if (working.LossCurve != null && working.LossCurve.Items != null)
                    {
                        XRChart chart = new XRChart();
                        chart.LocationF = new DevExpress.Utils.PointFloat(0F, currentY);
                        chart.WidthF = contentWidth;
                        chart.HeightF = 300F;
                        // 创建一个线系列
                        Series series = new Series("Series1", ViewType.Area);
                        Series series2 = new Series("Series2", ViewType.Area);
                        Series series3 = new Series("Series3", ViewType.Area);
                        // 添加数据点
                        foreach (var item in working.LossCurve.End.Items)
                        {
                            series.Points.Add(new SeriesPoint(item.X, item.Y));
                        }
                        // 添加数据点
                        foreach (var item in working.LossCurve.Start.Items)
                        {
                            series2.Points.Add(new SeriesPoint(item.X, item.Y));
                        }   // 添加数据点
                        foreach (var item in working.LossCurve.Elev.Items)
                        {
                            series3.Points.Add(new SeriesPoint(item.X, item.Y));
                        }
                        chart.Series.Add(series);
                        chart.Series.Add(series2);
                        chart.Series.Add(series3);
                        Detail.Controls.Add(chart);
                        currentY += chart.HeightF;
                    }
                }
            }
            #endregion 损失曲线
            #region 损失统计
            var labForLossStatistics = CreateFirstCaption("(6)、损失统计", contentWidth - 25F, 15F, 20F, currentY);
            this.Detail.Controls.Add(labForLossStatistics);
            currentY += 20F;
            if (vm.WorkingList != null && vm.WorkingList.Count > 0)
            {
                foreach (var working in vm.WorkingList)
                {
                    var accuracyScaleChart = CreateLossStatistics(working.LossStatistics, 350F, 230F, 0F, currentY);
                    Detail.Controls.Add(accuracyScaleChart);
                    var EnergyLossChart = CreateEnergyLoss(working.LossStatistics, 377F, 230F, 350F, currentY);
                    Detail.Controls.Add(EnergyLossChart);
                    currentY += accuracyScaleChart.HeightF;
                    var CategoryChart = CreateCategory(working.LossStatistics, 727F, 230F, 0F, currentY);
                    Detail.Controls.Add(CategoryChart);
                }
            }
            #endregion 损失统计
        }
        public class Product
        //创建一级标题
        private XRLabel CreateFirstCaption(string caption, float sizeX, float sizeY, float locationX, float locationY)
        {
            public string Name { get; set; }
            public decimal Code { get; set; }
            var lab = new XRLabel();
            lab.AnchorHorizontal = (DevExpress.XtraReports.UI.HorizontalAnchorStyles.Left | DevExpress.XtraReports.UI.HorizontalAnchorStyles.Right);
            lab.Font = new DevExpress.Drawing.DXFont("Arial", 12F, DevExpress.Drawing.DXFontStyle.Bold);
            lab.LocationFloat = new DevExpress.Utils.PointFloat(locationX, locationY);
            lab.Multiline = true;
            lab.Name = "lab";
            lab.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
            lab.SizeF = new System.Drawing.SizeF(sizeX, sizeY);
            lab.StylePriority.UseFont = false;
            lab.StylePriority.UseTextAlignment = false;
            lab.Text = caption;
            lab.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
            return lab;
        }
        public List<Product> CreateSampleProductList()
        //创建精度比例
        private XRChart CreateAccuracyScale(SimulationPrintAccuracyScaleViewModel scale, float sizeX, float sizeY, float locationY)
        {
            List<Product> products = new List<Product>
    {
        new Product { Name = "苹果", Code = 5.99m },
        new Product { Name = "香蕉", Code = 3.99m },
        new Product { Name = "橙子", Code = 4.99m }
    };
            var chart = new XRChart();
            chart.BackColor = System.Drawing.Color.Transparent;
            chart.BorderColor = System.Drawing.Color.Black;
            chart.Borders = DevExpress.XtraPrinting.BorderSide.All;
            chart.Legend.Name = "Default Legend";
            chart.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False;
            chart.LocationFloat = new DevExpress.Utils.PointFloat(0F, locationY);
            chart.Name = "chart";
            chart.Padding = new DevExpress.XtraPrinting.PaddingInfo(10, 10, 20, 20, 100F);
            return products;
            var series = new DevExpress.XtraCharts.Series();
            series.LabelsVisibility = DevExpress.Utils.DefaultBoolean.True;
            series.Name = "Series";
            var doughnutSeriesView = new DevExpress.XtraCharts.DoughnutSeriesView();
            doughnutSeriesView.HoleRadiusPercent = 45;
            doughnutSeriesView.TotalLabel.DXFont = new DevExpress.Drawing.DXFont("Tahoma", 12F, DevExpress.Drawing.DXFontStyle.Bold);
            doughnutSeriesView.TotalLabel.Visible = true;
            series.View = doughnutSeriesView;
            series.Label.LineVisibility = DevExpress.Utils.DefaultBoolean.True;
            series.Label.TextPattern = "{A}:{VP:P1}";
            chart.SeriesSerializable = new DevExpress.XtraCharts.Series[] { series };
            chart.SizeF = new System.Drawing.SizeF(sizeX, sizeY);
            chart.StylePriority.UseBackColor = false;
            chart.StylePriority.UsePadding = false;
            if (scale != null)
            {
                if (scale.Items != null && scale.Items.Count > 0)
                {
                    foreach (var item in scale.Items)
                    {
                        series.Points.Add(new SeriesPoint(item.EvaluateItem, item.EvaluateCount));
                    }
                }
                doughnutSeriesView.TotalLabel.TextPattern = string.Format("{0:0%}", (scale.AvgError ?? 0) / 100F);
            }
            return chart;
        }
        //创建能量输入
        private XRChart CreateLossStatistics(HydroLossStatisticsViewModel statistics, float sizeX, float sizeY, float locationX, float locationY)
        {
            var chart = new XRChart();
            chart.BackColor = System.Drawing.Color.Transparent;
            chart.BorderColor = System.Drawing.Color.Black;
            chart.Borders = DevExpress.XtraPrinting.BorderSide.All;
            chart.Legend.Name = "Default Legend";
            chart.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False;
            chart.LocationFloat = new DevExpress.Utils.PointFloat(locationX, locationY);
            chart.Name = "chart";
            chart.Padding = new DevExpress.XtraPrinting.PaddingInfo(10, 10, 20, 20, 100F);
            var series = new DevExpress.XtraCharts.Series();
            series.LabelsVisibility = DevExpress.Utils.DefaultBoolean.True;
            series.Name = "Series";
            var doughnutSeriesView = new DevExpress.XtraCharts.DoughnutSeriesView();
            doughnutSeriesView.HoleRadiusPercent = 45;
            doughnutSeriesView.TotalLabel.DXFont = new DevExpress.Drawing.DXFont("Tahoma", 8F, DevExpress.Drawing.DXFontStyle.Bold);
            doughnutSeriesView.TotalLabel.Visible = true;
            series.View = doughnutSeriesView;
            series.Label.LineVisibility = DevExpress.Utils.DefaultBoolean.True;
            series.Label.TextPattern = "{A}:{VP:P1}";
            chart.SeriesSerializable = new DevExpress.XtraCharts.Series[] { series };
            chart.SizeF = new System.Drawing.SizeF(sizeX, sizeY);
            chart.StylePriority.UseBackColor = false;
            chart.StylePriority.UsePadding = false;
            if (statistics != null)
            {
                if (statistics.Input.Items != null && statistics.Input.Items.Count > 0)
                {
                    foreach (var item in statistics.Input.Items)
                    {
                        series.Points.Add(new SeriesPoint(item.EnergyName.ToString(), item.EnergyValue));
                    }
                }
                doughnutSeriesView.TotalLabel.TextPattern = $"总能量:{statistics.Input.TotalEnergyValue:P0}";
            }
            return chart;
        }
        //创建能量统计
        private XRChart CreateCategory(HydroLossStatisticsViewModel statistics, float sizeX, float sizeY, float locationX, float locationY)
        {
            var chart = new XRChart();
            chart.BackColor = System.Drawing.Color.Transparent;
            chart.BorderColor = System.Drawing.Color.Black;
            chart.Borders = DevExpress.XtraPrinting.BorderSide.All;
            chart.Legend.Name = "Default Legend";
            chart.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False;
            chart.LocationFloat = new DevExpress.Utils.PointFloat(locationX, locationY);
            chart.Name = "chart";
            chart.Padding = new DevExpress.XtraPrinting.PaddingInfo(10, 10, 20, 20, 100F);
            chart.SizeF = new System.Drawing.SizeF(sizeX, sizeY);
            chart.StylePriority.UseBackColor = false;
            chart.StylePriority.UsePadding = false;
            if (statistics != null)
            {
                if (statistics.Category != null && statistics.Category.Items.Count > 0)
                {
                    foreach (var item in statistics.Category.Items)
                    {
                        var series1 = new Series(item.EnergyName, ViewType.Bar);
                        series1.Points.Add(new SeriesPoint(item.EnergyName.ToString(), item.EnergyValue));
                        // 获取系列视图并转换为 BarSeriesView 类型
                        BarSeriesView barSeriesView = (BarSeriesView)series1.View;
                        series1.Label.TextPattern = "{V} KW";
                        // 设置柱子宽度,这里设置为 0.8,可根据需要调整
                        barSeriesView.BarWidth = 2.5;
                        // 将系列添加到图表中
                        chart.Series.Add(series1);
                    }
                }
            }
            return chart;
        }
        //创建能量损失
        private XRChart CreateEnergyLoss(HydroLossStatisticsViewModel statistics, float sizeX, float sizeY, float locationX, float locationY)
        {
            var chart = new XRChart();
            chart.BackColor = System.Drawing.Color.Transparent;
            chart.BorderColor = System.Drawing.Color.Black;
            chart.Borders = DevExpress.XtraPrinting.BorderSide.All;
            chart.Legend.Name = "Default Legend";
            chart.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False;
            chart.LocationFloat = new DevExpress.Utils.PointFloat(locationX, locationY);
            chart.Name = "chart";
            chart.Padding = new DevExpress.XtraPrinting.PaddingInfo(10, 10, 20, 20, 100F);
            var series = new DevExpress.XtraCharts.Series();
            series.LabelsVisibility = DevExpress.Utils.DefaultBoolean.True;
            series.Name = "Series";
            var doughnutSeriesView = new DevExpress.XtraCharts.DoughnutSeriesView();
            doughnutSeriesView.HoleRadiusPercent = 45;
            doughnutSeriesView.TotalLabel.DXFont = new DevExpress.Drawing.DXFont("Tahoma", 8F, DevExpress.Drawing.DXFontStyle.Bold);
            doughnutSeriesView.TotalLabel.Visible = true;
            series.View = doughnutSeriesView;
            series.Label.LineVisibility = DevExpress.Utils.DefaultBoolean.True;
            series.Label.TextPattern = "{A}:{VP:P1}";
            chart.SeriesSerializable = new DevExpress.XtraCharts.Series[] { series };
            chart.SizeF = new System.Drawing.SizeF(sizeX, sizeY);
            chart.StylePriority.UseBackColor = false;
            chart.StylePriority.UsePadding = false;
            if (statistics != null)
            {
                if (statistics.Catalog != null && statistics.Catalog.Items.Count > 0)
                {
                    foreach (var item in statistics.Catalog.Items)
                    {
                        series.Points.Add(new SeriesPoint(item.EnergyName.ToString(), item.EnergyValue));
                    }
                }
                doughnutSeriesView.TotalLabel.TextPattern = $"总损失:{statistics.Input.TotalEnergyValue:P0}";
            }
            return chart;
        }
        //创建精度项
        private XRChart CreateAccuracyItem(double value, float sizeX, float sizeY, float locationX, float locationY)
        {
            var chart = new XRChart();
            chart.BackColor = System.Drawing.Color.Transparent;
            chart.BorderColor = System.Drawing.Color.Black;
            chart.Borders = DevExpress.XtraPrinting.BorderSide.All;
            chart.Legend.Name = "Default Legend";
            chart.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False;
            chart.LocationFloat = new DevExpress.Utils.PointFloat(locationX, locationY);
            chart.Name = "chart";
            chart.Padding = new DevExpress.XtraPrinting.PaddingInfo(10, 10, 20, 20, 100F);
            chart.PaletteRepository.Add("Palette 1", new DevExpress.XtraCharts.Palette("Palette 1", DevExpress.XtraCharts.PaletteScaleMode.Repeat, new DevExpress.XtraCharts.PaletteEntry[] {
            new DevExpress.XtraCharts.PaletteEntry(System.Drawing.Color.FromArgb(((int)(((byte)(103)))), ((int)(((byte)(174)))), ((int)(((byte)(197))))), System.Drawing.Color.FromArgb(((int)(((byte)(103)))), ((int)(((byte)(174)))), ((int)(((byte)(197)))))),
            new DevExpress.XtraCharts.PaletteEntry(System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(236)))), ((int)(((byte)(240))))), System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(236)))), ((int)(((byte)(240))))))}));
            chart.PaletteName = "Palette 1";
            var series = new DevExpress.XtraCharts.Series();
            series.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
            series.Name = "Series";
            var doughnutSeriesView = new DevExpress.XtraCharts.DoughnutSeriesView();
            doughnutSeriesView.HoleRadiusPercent = 45;
            doughnutSeriesView.TotalLabel.DXFont = new DevExpress.Drawing.DXFont("Tahoma", 12F, DevExpress.Drawing.DXFontStyle.Bold);
            doughnutSeriesView.TotalLabel.Visible = true;
            series.View = doughnutSeriesView;
            chart.SeriesSerializable = new DevExpress.XtraCharts.Series[] { series };
            chart.SizeF = new System.Drawing.SizeF(sizeX, sizeY);
            chart.StylePriority.UseBackColor = false;
            chart.StylePriority.UsePadding = false;
            var otherValue = 100 - value;
            series.Points.Add(new SeriesPoint("误差", value));
            series.Points.Add(new SeriesPoint("其他", otherValue));
            doughnutSeriesView.TotalLabel.TextPattern = string.Format("{0:0%}", value / 100f);
            return chart;
        }
        // 创建表头单元格
        private XRTableCell CreateTableCell(string text, int width)
        {
            XRTableCell cell = new XRTableCell();
            cell.Text = text;
            cell.Width = width;
            cell.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; // 文本居中
            cell.Borders = DevExpress.XtraPrinting.BorderSide.All; // 设置边框
            return cell;
        }
        // 创建数据绑定单元格
        private XRTableCell CreateTableCellWithBinding(string dataMember, int width)
        {
            XRTableCell cell = new XRTableCell();
            cell.DataBindings.Add(new XRBinding("Text", null, dataMember)); // 绑定数据字段
            cell.Width = width;
            cell.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; // 文本左对齐
            cell.Borders = DevExpress.XtraPrinting.BorderSide.All; // 设置边框
            return cell;
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/01-curve/HydroSingleWorkingLossCurveCtrl.Designer.cs
@@ -101,7 +101,6 @@
            chartControl1.Legend.LegendID = -1;
            chartControl1.Legend.MarkerMode = DevExpress.XtraCharts.LegendMarkerMode.CheckBox;
            chartControl1.Location = new Point(0, 0);
            chartControl1.Margin = new Padding(4, 5, 4, 5);
            chartControl1.Name = "chartControl1";
            chartControl1.Padding.Bottom = 10;
            chartControl1.Padding.Left = 20;
@@ -149,7 +148,7 @@
            chartControl1.SeriesTemplate.ArgumentDataMember = "X";
            chartControl1.SeriesTemplate.ToolTipHintDataMember = "Name";
            chartControl1.SeriesTemplate.ValueDataMembersSerializable = "Y";
            chartControl1.Size = new Size(1211, 894);
            chartControl1.Size = new Size(848, 569);
            chartControl1.TabIndex = 0;
            chartControl1.ToolTipEnabled = DevExpress.Utils.DefaultBoolean.True;
            chartControl1.ToolTipOptions.ShowForSeries = true;
@@ -158,12 +157,11 @@
            // 
            // HydroSingleWorkingLossCurveCtrl
            // 
            AutoScaleDimensions = new SizeF(10F, 22F);
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            Controls.Add(chartControl1);
            Margin = new Padding(4, 5, 4, 5);
            Name = "HydroSingleWorkingLossCurveCtrl";
            Size = new Size(1211, 894);
            Size = new Size(848, 569);
            ((ISupportInitialize)lossBindingSource).EndInit();
            ((ISupportInitialize)elevBindingSource).EndInit();
            ((ISupportInitialize)textAnnotation1).EndInit();
WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/01-curve/HydroSingleWorkingLossCurveInteropCtrl.resx
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!--
    Microsoft ResX Schema
    Microsoft ResX Schema
    Version 2.0
@@ -48,7 +48,7 @@
    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