| | |
| | | private AxisX _axis_x_flow; |
| | | private AxisY _axis_y_head; |
| | | private SecondaryAxisY _axis_y_eff, _axis_y_power; |
| | | private ConstantLine _const_line_flow; |
| | | private ConstantLine _const_line_x; |
| | | |
| | | private TextAnnotation _anno_txt_query_info; |
| | | private PumpCoordinate _coordinate; |
| | |
| | | _axis_y_power = _diagram.SecondaryAxesY.GetAxisByName("AxisYQP"); |
| | | _axis_y_power.SetSecondaryAxisYQPDisplay(); |
| | | |
| | | _const_line_flow = (ConstantLine)_diagram.AxisX.ConstantLines.GetElementByName("WorkPointLine"); |
| | | _const_line_flow.SetWorkPointLineDisplay(); |
| | | _const_line_x = (ConstantLine)_diagram.AxisX.ConstantLines.GetElementByName("WorkPointLine"); |
| | | _const_line_x.SetWorkPointLineDisplay(); |
| | | |
| | | _anno_txt_query_info = this.chartControl1.AnnotationRepository[0] as TextAnnotation; |
| | | _anno_txt_query_info.SetTextAnnoWorkPointDisplay(); |
| | |
| | | _axis_y_power.Visibility = DefaultBoolean.False; |
| | | _axis_y_power.GridLines.Visible = false; |
| | | |
| | | _const_line_flow.Visible = false; |
| | | _const_line_x.Visible = false; |
| | | _anno_txt_query_info.Visible = false; |
| | | |
| | | this.chartControl1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chartControl1_MouseMove); |
| | |
| | | _axis_y_power.Visibility = DefaultBoolean.False; |
| | | _axis_y_power.GridLines.Visible = false; |
| | | |
| | | _const_line_flow.Visible = false; |
| | | _const_line_x.Visible = false; |
| | | |
| | | _bottom_pane.Visibility = ChartElementVisibility.Hidden; |
| | | |
| | |
| | | { |
| | | if (!_line_visible) |
| | | { |
| | | _const_line_flow.Visible = false; |
| | | _const_line_flow.Title.Visible = false; |
| | | _const_line_x.Visible = false; |
| | | _const_line_x.Title.Visible = false; |
| | | _anno_txt_query_info.Visible = false; |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | _const_line_flow.Visible = true; |
| | | _const_line_flow.Title.Visible = true; |
| | | _const_line_x.Visible = true; |
| | | _const_line_x.Title.Visible = true; |
| | | _anno_txt_query_info.Visible = true; |
| | | } |
| | | |
| | |
| | | if (paralle_power.HasValue) |
| | | work_info_str_builder.Append($"功率:{paralle_power:N2}"); |
| | | |
| | | _const_line_flow.AxisValue = x_flow; |
| | | _const_line_flow.Title.Text = $"{x_flow:N1}"; |
| | | _const_line_x.AxisValue = x_flow; |
| | | _const_line_x.Title.Text = $"{x_flow:N1}"; |
| | | |
| | | _anno_txt_query_info.Text = work_info_str_builder.ToString(); |
| | | _anno_txt_query_info.AutoSize = true; |
| | |
| | | } |
| | | else if (hitInfo.InConstantLine) |
| | | { |
| | | if (hitInfo.ConstantLine == _const_line_flow) |
| | | if (hitInfo.ConstantLine == _const_line_x) |
| | | { |
| | | _onMoveWorkPointLine = true; |
| | | } |
| | |
| | | var hitInfo = chartControl1.CalcHitInfo(e.Location); |
| | | if (!hitInfo.InConstantLine) |
| | | return; |
| | | if (hitInfo.ConstantLine == _const_line_flow) |
| | | if (hitInfo.ConstantLine == _const_line_x) |
| | | { |
| | | SetAxisQValue(); |
| | | } |