chenn
2025-04-02 b398603062f8e7a5f3213a36ebc5b30508596815
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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);
        }
 
 
 
 
       
    }
}