lixiaojun
2025-01-22 46f64905a3c309a50c0f245b3350cdeb8dd699c6
计算优化
已修改7个文件
已添加6个文件
614 ■■■■■ 文件已修改
Hydro/Yw.EPAnet.Calcu.Core/04-Inp/InpInteropHelper.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Hydro/Yw.Hydro.Core/ParseHelper.cs 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/04-link/04-valve/HydroValveViewModel.cs 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-property/HydroVisualPropertyCtrl.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/21-curve/HydroCurveViewCtrl.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/21-curve/HydroValveCurveViewCtrl.Designer.cs 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/21-curve/HydroValveCurveViewCtrl.cs 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/21-curve/HydroValveCurveViewCtrl.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/21-curve/HydroValveCurveViewDlg.Designer.cs 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/21-curve/HydroValveCurveViewDlg.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/21-curve/HydroValveCurveViewDlg.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj.user 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Hydro/Yw.EPAnet.Calcu.Core/04-Inp/InpInteropHelper.cs
@@ -155,6 +155,10 @@
            valveSb.AppendLine(";ID                  Node1               Node2               Diameter        Type    Setting         MinorLoss  ");
            network.Valves?.ForEach(x =>
            {
                if (x.Id == "694311")
                {
                }
                string settings;
                if (x.LinkStatus == ValveStatus.None)
                {
Hydro/Yw.Hydro.Core/ParseHelper.cs
@@ -339,6 +339,10 @@
                    translationModel.EndNode = allNodes.Find(x => x.Id == translation.EndCode);
                    translationModel.LinkStatus = Yw.Hydro.LinkStatus.Open;
                    translationModel.Length = translation.Length;
                    if (translation.Length <= 0)
                    {
                        translation.Length = 0.1;
                    }
                    translationModel.Diameter = (translation.StartDiameter + translation.EndDiameter) / 2f;
                    translationModel.Roughness = translation.Roughness;
                    translationModel.MinorLossCoeff = translation.MinorLoss;
@@ -378,16 +382,29 @@
                    //止回阀被当成管道处理
                    if (valve.ValveType == Yw.Hydro.ValveType.CV)
                    {
                        double length = 0.01;
                        if (double.TryParse(valve.ValveSetting, out double valveLength))
                        {
                            length = valveLength;
                            if (length <= 0)
                            {
                                length = 0.01;
                            }
                        }
                        var pipeModel = new Pipe();
                        pipeModel.Id = valve.Code;
                        pipeModel.Catalog = Yw.EPAnet.Catalog.Pipe;
                        pipeModel.Name = valve.Name;
                        pipeModel.StartNode = allNodes.Find(x => x.Id == valve.StartCode);
                        pipeModel.EndNode = allNodes.Find(x => x.Id == valve.EndCode);
                        pipeModel.LinkStatus = valve.LinkStatus;
                        pipeModel.Length = 0.01;
                        pipeModel.LinkStatus = Yw.Hydro.PipeStatus.Open;
                        pipeModel.Length = length;
                        pipeModel.Diameter = valve.Diameter;
                        pipeModel.Roughness = 110;
                        pipeModel.Roughness = valve.Roughness;
                        if (pipeModel.Roughness < 90)
                        {
                            pipeModel.Roughness = 110;
                        }
                        pipeModel.MinorLossCoeff = valve.MinorLoss;
                        netWork.Pipes.Add(pipeModel);
                    }
@@ -403,52 +420,64 @@
                        valveModel.Diameter = valve.Diameter;
                        valveModel.MinorLoss = valve.MinorLoss;
                        valveModel.ValveType = valve.ValveType;
                        //valveModel.ValveSetting = valve.ValveSetting;
                        switch (valve.ValveType)
                        {
                            case Yw.Hydro.ValveType.PRV://减压阀
                                {
                                    valveModel.ValveSetting = valve.ValveSetting;
                                }
                                break;
                            case Yw.Hydro.ValveType.PSV://稳压阀
                                {
                                    valveModel.ValveSetting = valve.ValveSetting;
                                }
                                break;
                            case Yw.Hydro.ValveType.PBV://压力制动阀
                                {
                                    valveModel.ValveSetting = valve.ValveSetting;
                                }
                                break;
                            case Yw.Hydro.ValveType.FCV://流量控制阀
                                {
                                    valveModel.ValveSetting = valve.ValveSetting;
                                }
                                break;
                            case Yw.Hydro.ValveType.TCV://节流控制阀
                                {
                                    valveModel.ValveSetting = "0";
                                    // var curveol = model.Curves?.Find(x => x.Code == valve.ValveSetting);
                                    //if (curveol != null)
                                    //{
                                    //    var point2dList = curveol.CurveData.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList();
                                    //    var ptCurveOL = new Yw.Geometry.CubicSpline2d(point2dList);
                                    //    valveModel.ValveSetting = ptCurveOL.GetPointY(valve.OpeningDegree).ToString();
                                    //    if (valve.LinkStatus == Yw.Hydro.LinkStatus.Open)
                                    //    {
                                    //        if (valve.OpeningDegree > 0)
                                    //        {
                                    //            valveModel.LinkStatus = Yw.EPAnet.ValveStatus.None;
                                    //        }
                                    //    }
                                    //}
                                    var curveol = model.Curves?.Find(x => x.Code == valve.CurveOL);
                                    if (curveol != null)
                                    {
                                        var point2dList = curveol.CurveData.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList();
                                        var ptCurveOL = new Yw.Geometry.CubicSpline2d(point2dList);
                                        valveModel.ValveSetting = ptCurveOL.GetPointY(valve.OpeningDegree).ToString();
                                        if (valve.LinkStatus == Yw.Hydro.LinkStatus.Open)
                                        {
                                            if (valve.OpeningDegree > 0)
                                            {
                                                valveModel.LinkStatus = Yw.EPAnet.ValveStatus.None;
                                            }
                                        }
                                    }
                                }
                                break;
                            case Yw.Hydro.ValveType.GPV://常规阀门
                                {
                                    if (valve.Code == "694311")
                                    {
                                    }
                                    var curve_ql_code_list = valve.CurvesQL;
                                    if (curve_ql_code_list == null)
                                    {
                                        curve_ql_code_list = new List<string>();
                                    }
                                    var curvesql = model.Curves?.Where(x => curve_ql_code_list.Contains(x.Code)).ToList();
                                    var nearCurveql = curvesql?.OrderBy(x => Math.Abs(valve.OpeningDegree - x.CurveFactor ?? 0)).FirstOrDefault();
                                    if (nearCurveql != null)
                                    {
                                        valveModel.ValveSetting = nearCurveql.Code;
                                    }
                                }
                                break;
                            default: break;
WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/04-link/04-valve/HydroValveViewModel.cs
@@ -22,7 +22,7 @@
            this.MinorLoss = rhs.MinorLoss;
            this.OpeningDegree = rhs.OpeningDegree;
            this.CurveOL = rhs.CurveOL;
            this.CurvesQL = rhs.CurvesQL?.ToList();
            this.CurvesQL = rhs.CurvesQL?.ToArray();
            UpdateValveSetting();
        }
@@ -212,13 +212,33 @@
        public double? ValveLength { get; set; }
        /// <summary>
        /// ç‰¹æ€§æ›²çº¿
        /// </summary>
        [Category("数据")]
        [DisplayName("特性曲线")]
        [HydroCurvePro(HydroCurve.Valve)]
        [PropertyOrder(2020)]
        [Browsable(true)]
        public string Curve
        {
            get
            {
                if (string.IsNullOrEmpty(this.CurveOL))
                {
                    return "未配置";
                }
                return "已配置";
            }
        }
        /// <summary>
        /// å¼€åº¦æŸå¤±æ›²çº¿
        /// </summary>
        [Category("数据")]
        [DisplayName("开度损失曲线")]
        [HydroCurvePro(HydroCurve.Valve, HydroCurveType.CurveOL)]
        [PropertyOrder(2009)]
        [Browsable(true)]
        [PropertyOrder(2021)]
        [Browsable(false)]
        public string CurveOL { get; set; }
        /// <summary>
@@ -227,9 +247,9 @@
        [Category("数据")]
        [DisplayName("水头损失曲线")]
        [HydroCurvePro(HydroCurve.Valve, HydroCurveType.CurvesQL)]
        [PropertyOrder(2009)]
        [Browsable(true)]
        public List<string> CurvesQL { get; set; }
        [PropertyOrder(2022)]
        [Browsable(false)]
        public string[] CurvesQL { get; set; }
        /// <summary>
        /// æµé‡
@@ -307,7 +327,7 @@
            this.MinorLoss = this.Vmo.MinorLoss;
            this.OpeningDegree = this.Vmo.OpeningDegree;
            this.CurveOL = this.Vmo.CurveOL;
            this.CurvesQL = this.Vmo.CurvesQL?.ToList();
            this.CurvesQL = this.Vmo.CurvesQL?.ToArray();
            UpdateValveSetting();
        }
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-property/HydroVisualPropertyCtrl.cs
@@ -226,8 +226,15 @@
            {
                e.CellText = ((DateTime)e.Properties.Value).ToString("yyyy-MM-dd HH:mm:ss");
            }
            else if (fullTypeName == typeof(string[]).FullName)
            {
                var stringValue = (string[])e.Properties.Value;
                e.CellText = stringValue?.Length.ToString();
            }
            else
            {
                var descriptor = this.propertyGridControl1.GetPropertyDescriptor(e.Row);
                if (descriptor != null)
                {
WinFrmUI/Yw.WinFrmUI.Hydro.Core/21-curve/HydroCurveViewCtrl.cs
@@ -24,6 +24,7 @@
            {
                return;
            }
            _curve = curve;
            var pts = curve.CurveData.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList();
            this.universalViewChart1.SetBindingData(pts);
            switch (curve.CurveType)
WinFrmUI/Yw.WinFrmUI.Hydro.Core/21-curve/HydroValveCurveViewCtrl.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,58 @@
namespace Yw.WinFrmUI
{
    partial class HydroValveCurveViewCtrl
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
        #region Component Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            valveViewChart1 = new Phart.ValveViewChart();
            SuspendLayout();
            //
            // valveViewChart1
            //
            valveViewChart1.Dock = DockStyle.Fill;
            valveViewChart1.LineVisible = false;
            valveViewChart1.Location = new Point(0, 0);
            valveViewChart1.Margin = new Padding(2, 2, 2, 2);
            valveViewChart1.Name = "valveViewChart1";
            valveViewChart1.Size = new Size(953, 552);
            valveViewChart1.TabIndex = 0;
            //
            // HydroValveCurveViewCtrl
            //
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            Controls.Add(valveViewChart1);
            Name = "HydroValveCurveViewCtrl";
            Size = new Size(953, 552);
            ResumeLayout(false);
        }
        #endregion
        private Phart.ValveViewChart valveViewChart1;
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/21-curve/HydroValveCurveViewCtrl.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,66 @@
using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Yw.WinFrmUI.Phart;
namespace Yw.WinFrmUI
{
    public partial class HydroValveCurveViewCtrl : DevExpress.XtraEditors.XtraUserControl
    {
        public HydroValveCurveViewCtrl()
        {
            InitializeComponent();
        }
        private Yw.Model.HydroCurveInfo _curveol = null;//阀门开度曲线
        private List<Yw.Model.HydroCurveInfo> _curvesql = null;//水头损失曲线列表
        /// <summary>
        /// ç»‘定数据
        /// </summary>
        public void SetBindingData(Yw.Model.HydroCurveInfo curveOL, List<Yw.Model.HydroCurveInfo> curvesQL)
        {
            _curveol = curveOL;
            _curvesql = curvesQL;
            var allVmList = new List<ValveViewChartViewModel>();
            if (curveOL != null)
            {
                var vmol = new ValveViewChartViewModel();
                vmol.Id = curveOL.Code;
                vmol.Name = curveOL.Name;
                vmol.Color = Color.Blue;
                vmol.CurveType = Ahart.eCurveType.OL;
                vmol.FeatType = Ahart.eFeatType.Quadratic;
                vmol.DefPointList = curveOL.CurveData?.Select(x => new Geometry.Point2d(x.X, x.Y)).ToList();
                vmol.IsSelect = false;
                allVmList.Add(vmol);
            }
            if (curvesQL != null && curvesQL.Count > 0)
            {
                foreach (var curveql in curvesQL)
                {
                    var vmql = new ValveViewChartViewModel();
                    vmql.Id = curveql.Code;
                    vmql.Name = curveql.Name;
                    vmql.Color = Color.Green;
                    vmql.CurveType = Ahart.eCurveType.QL;
                    vmql.FeatType = Ahart.eFeatType.Quadratic;
                    vmql.DefPointList = curveql.CurveData?.Select(x => new Geometry.Point2d(x.X, x.Y)).ToList();
                    vmql.IsSelect = false;
                    allVmList.Add(vmql);
                }
            }
            this.valveViewChart1.SetBindingData(allVmList);
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/21-curve/HydroValveCurveViewCtrl.resx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!--
    Microsoft ResX Schema
    Version 2.0
    The primary goals of this format is to allow a simple XML format
    that is mostly human readable. The generation and parsing of the
    various data types are done through the TypeConverter classes
    associated with the data types.
    Example:
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
    There are any number of "resheader" rows that contain simple
    name/value pairs.
    Each data row contains a name, and value. The row also contains a
    type or mimetype. Type corresponds to a .NET class that support
    text/value conversion through the TypeConverter architecture.
    Classes that don't support this are serialized and stored with the
    mimetype set.
    The mimetype is used for serialized objects, and tells the
    ResXResourceReader how to depersist the object. This is currently not
    extensible. For a given mimetype the value must be set accordingly:
    Note - application/x-microsoft.net.object.binary.base64 is the format
    that the ResXResourceWriter will generate, however the reader can
    read any of the formats listed below.
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
</root>
WinFrmUI/Yw.WinFrmUI.Hydro.Core/21-curve/HydroValveCurveViewDlg.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,94 @@
namespace Yw.WinFrmUI
{
    partial class HydroValveCurveViewDlg
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
        #region Windows Form Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            ribbon = new DevExpress.XtraBars.Ribbon.RibbonControl();
            ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage();
            ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            hydroValveCurveViewCtrl1 = new HydroValveCurveViewCtrl();
            ((ISupportInitialize)ribbon).BeginInit();
            SuspendLayout();
            //
            // ribbon
            //
            ribbon.ExpandCollapseItem.Id = 0;
            ribbon.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbon.ExpandCollapseItem });
            ribbon.Location = new Point(0, 0);
            ribbon.MaxItemId = 1;
            ribbon.Name = "ribbon";
            ribbon.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 });
            ribbon.RibbonCaptionAlignment = DevExpress.XtraBars.Ribbon.RibbonCaptionAlignment.Left;
            ribbon.ShowDisplayOptionsMenuButton = DevExpress.Utils.DefaultBoolean.False;
            ribbon.Size = new Size(953, 32);
            //
            // ribbonPage1
            //
            ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribbonPageGroup1 });
            ribbonPage1.Name = "ribbonPage1";
            ribbonPage1.Text = "ribbonPage1";
            //
            // ribbonPageGroup1
            //
            ribbonPageGroup1.Name = "ribbonPageGroup1";
            ribbonPageGroup1.Text = "ribbonPageGroup1";
            //
            // hydroValveCurveViewCtrl1
            //
            hydroValveCurveViewCtrl1.Dock = DockStyle.Fill;
            hydroValveCurveViewCtrl1.Location = new Point(0, 32);
            hydroValveCurveViewCtrl1.Name = "hydroValveCurveViewCtrl1";
            hydroValveCurveViewCtrl1.Size = new Size(953, 583);
            hydroValveCurveViewCtrl1.TabIndex = 3;
            //
            // HydroValveCurveViewDlg
            //
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            ClientSize = new Size(953, 615);
            Controls.Add(hydroValveCurveViewCtrl1);
            Controls.Add(ribbon);
            FormBorderStyle = FormBorderStyle.SizableToolWindow;
            Name = "HydroValveCurveViewDlg";
            Ribbon = ribbon;
            RibbonVisibility = DevExpress.XtraBars.Ribbon.RibbonVisibility.Hidden;
            StartPosition = FormStartPosition.CenterParent;
            Text = "查看曲线";
            ((ISupportInitialize)ribbon).EndInit();
            ResumeLayout(false);
            PerformLayout();
        }
        #endregion
        private DevExpress.XtraBars.Ribbon.RibbonControl ribbon;
        private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1;
        private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1;
        private HydroValveCurveViewCtrl hydroValveCurveViewCtrl1;
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/21-curve/HydroValveCurveViewDlg.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
namespace Yw.WinFrmUI
{
    public partial class HydroValveCurveViewDlg : DevExpress.XtraBars.Ribbon.RibbonForm
    {
        public HydroValveCurveViewDlg()
        {
            InitializeComponent();
            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
        }
        private Yw.Model.HydroCurveInfo _curveol = null;//阀门开度损失曲线
        private List<Yw.Model.HydroCurveInfo> _curvesql = null;//水头损失曲线列表
        /// <summary>
        /// ç»‘定数据
        /// </summary>
        public void SetBindingData(Yw.Model.HydroCurveInfo curveol, List<Yw.Model.HydroCurveInfo> curvesql)
        {
            _curveol = curveol;
            _curvesql = curvesql;
            this.hydroValveCurveViewCtrl1.SetBindingData(curveol, curvesql);
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/21-curve/HydroValveCurveViewDlg.resx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!--
    Microsoft ResX Schema
    Version 2.0
    The primary goals of this format is to allow a simple XML format
    that is mostly human readable. The generation and parsing of the
    various data types are done through the TypeConverter classes
    associated with the data types.
    Example:
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
    There are any number of "resheader" rows that contain simple
    name/value pairs.
    Each data row contains a name, and value. The row also contains a
    type or mimetype. Type corresponds to a .NET class that support
    text/value conversion through the TypeConverter architecture.
    Classes that don't support this are serialized and stored with the
    mimetype set.
    The mimetype is used for serialized objects, and tells the
    ResXResourceReader how to depersist the object. This is currently not
    extensible. For a given mimetype the value must be set accordingly:
    Note - application/x-microsoft.net.object.binary.base64 is the format
    that the ResXResourceWriter will generate, however the reader can
    read any of the formats listed below.
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
</root>
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj
@@ -270,6 +270,9 @@
        <Compile Update="21-curve\HydroCurveEditDlg.cs">
            <SubType>Form</SubType>
        </Compile>
        <Compile Update="21-curve\HydroValveCurveViewDlg.cs">
          <SubType>Form</SubType>
        </Compile>
        <Compile Update="21-curve\HydroCurveViewDlg.cs">
            <SubType>Form</SubType>
        </Compile>
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj.user
@@ -94,6 +94,9 @@
    <Compile Update="21-curve\HydroCurveViewCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="21-curve\HydroValveCurveViewCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="99-view\01-q3d\HydroQ3dViewPage.cs">
      <SubType>UserControl</SubType>
    </Compile>