| | |
| | | using DevExpress.Charts.Native; |
| | | using DevExpress.Utils.About; |
| | | using DevExpress.Drawing; |
| | | using DevExpress.XtraCharts; |
| | | 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.Hydro; |
| | | using Yw.EPAnet; |
| | | using DevExpress.Mvvm.POCO; |
| | | using DevExpress.Utils; |
| | | using DevExpress.Drawing; |
| | | using Yw.Hydro; |
| | | |
| | | namespace Yw.WinFrmUI |
| | | { |
| | |
| | | { |
| | | public HydroSingleWorkingLossCurveCtrl() |
| | | { |
| | | InitializeComponent(); |
| | | InitializeComponent(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | diagram.AxisY.Tickmarks.MinorVisible = false; |
| | | diagram.AxisY.WholeRange.SideMarginsValue = 0; |
| | | diagram.AxisY.CrosshairAxisLabelOptions.EnableAntialiasing = DevExpress.Utils.DefaultBoolean.True; |
| | | if (pressMax <= 10) |
| | | { |
| | | diagram.AxisY.WholeRange.MinValue = Math.Floor(pressMin); |
| | |
| | | e.CrosshairLineElement.Color = Color.Green; |
| | | e.CrosshairLineElement.LineStyle.DashStyle = DashStyle.DashDot; |
| | | e.CrosshairLineElement.LineStyle.Thickness = 3; |
| | | |
| | | |
| | | // Specify the back color for the crosshair argument axis label. |
| | | foreach (CrosshairAxisLabelElement axisLabelElement in e.CrosshairAxisLabelElements) |
| | | { |
| | | axisLabelElement.BackColor = Color.Blue; |
| | | axisLabelElement.Text = $"{axisLabelElement.AxisValue:N2}"; |
| | | |
| | | } |
| | | |
| | | |
| | | foreach (CrosshairElementGroup group in e.CrosshairElementGroups) |
| | | { |
| | | CrosshairGroupHeaderElement groupHeaderElement = group.HeaderElement; |
| | | |
| | | { |
| | | CrosshairGroupHeaderElement groupHeaderElement = group.HeaderElement; |
| | | var pt = group.HeaderElement.SeriesPoints.FirstOrDefault(); |
| | | if (pt != null) |
| | | { |
| | |
| | | { |
| | | groupHeaderElement.Text = model.Name; |
| | | } |
| | | } |
| | | } |
| | | // Specify the text, text color and font for the crosshair group header element. |
| | | |
| | | groupHeaderElement.TextColor = Color.Green; |
| | | groupHeaderElement.DXFont = new DXFont("SegoeUI", 12, DXFontStyle.Bold); |
| | | groupHeaderElement.Text = group.CrosshairElements[0].AxisLabelElement.Text; |
| | | |
| | | foreach (var ele in group.CrosshairElements) |
| | | { |
| | | ele.AxisLabelElement.Text = $"{ele.AxisLabelElement.AxisValue:N1}"; |
| | | ele.AxisLabelElement.DXFont = new DXFont(this.Font.Name, 6); |
| | | //ele.AxisLabelElement.Visible = false; |
| | | } |
| | | |
| | | |
| | | //// Obtain the first series. |
| | | //CrosshairElement element = group.CrosshairElements[0]; |