using DPumpHydr.WinFrmUI.RLT.Child.Crown;
|
using DPumpHydr.WinFrmUI.RLT.Docking.Crown;
|
using System.Drawing;
|
using System.Windows.Forms;
|
using System.Collections.Generic;
|
using System;
|
|
namespace DPumpHydr.WinFrmUI.Volute
|
{
|
public partial class SectAreaDockPanel : CrownToolWindow
|
{
|
public SectAreaDockPanel()
|
{
|
InitializeComponent();
|
|
this.DefaultDockArea = RLT.Enum.Crown.DockArea.Bottom;
|
this.DockText = "截面面积";
|
this.SerializationKey = "SectAreaDockPanel";
|
|
this.chart.OnRefreshSingleSectArea += (ss, ee) =>
|
{
|
if(OnRefreshSingleSectArea != null)
|
{
|
OnRefreshSingleSectArea.Invoke(ss, ee);
|
}
|
};
|
}
|
|
public Action<int , double> OnRefreshSingleSectArea = null;
|
public void RefreshControl()
|
{
|
chart.RefreshControl();
|
}
|
|
public void SetArea18(ViewModel.SectionBundleInfo bundle)
|
{
|
if (bundle == null) return;
|
|
List<double> areas = new List<double>();
|
for (int i = 0; i < 9; i++)
|
{
|
areas.Add(bundle.Area[i]);
|
}
|
chart.SetArea18(areas);
|
}
|
//更新单个断面
|
public void SetArea18(ViewModel.SectionShapePara para)
|
{
|
if(para == null) return;
|
|
chart.SetArea18(para);
|
}
|
public void SetArea9(double area)
|
{
|
chart.SetArea9(area);
|
}
|
public void SetArea10(double area)
|
{
|
chart.SetArea10(area);
|
}
|
public void SetAreaOutletDia(double area)
|
{
|
chart.SetAreaOutletDia(area);
|
}
|
|
|
|
|
|
}
|
}
|