tangxu
2024-04-24 1c5fa983ae3506c2edaa88c51a959d46685c1ba1
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
using DevExpress.Utils.Extensions;
using System.Collections.Generic;
 
namespace IStation.WinFrmUI.River
{
    public partial class RiverWaterLevelMainPage : DocumentPage
    {
        public RiverWaterLevelMainPage()
        {
            InitializeComponent();
            this.PageTitle.Caption = "水位分析";
            this.SurfaceGuid = new SurfaceGuid()
            {
                Modular = eModular.Basic,
                Function = this.PageTitle.Caption
            };
        }
 
        //private Dictionary<DevExpress.XtraBars.Navigation.TabNavigationPage, DevExpress.XtraBars.Ribbon.RibbonPageGroup> _tabRibbon = null;
 
        /// <summary>
        /// 初始化数据
        /// </summary>
        public override void InitialDataSource()
        {   
 
 
 
        }
 
 
        /// <summary>
        /// 刷新数据
        /// </summary>
        public override void RefreshDataSource()
        {
        }
 
        //页面变换
        private void tabPane1_SelectedPageChanged(object sender, DevExpress.XtraBars.Navigation.SelectedPageChangedEventArgs e)
        {
            //if (_tabRibbon == null)
            //    return;
            //var page = (DevExpress.XtraBars.Navigation.TabNavigationPage)e.Page;
            //if (!_tabRibbon.ContainsKey(page))
            //{
            //    this.ribbonPage1.Groups.ForEach(x =>
            //    {
            //        if (x != this.ribbonPageGroupDefault)
            //        {
            //            x.Visible = false;
            //        }
            //    });
            //}
            //else
            //{
            //    _tabRibbon[page].Visible = true;
            //}
        }
 
  
 
        //刷新数据
        private void barBtnReload_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            //this.dataScreeningChartCtrl1.InitialDataSource();
        }
        List<Model.MonthSignalRecordPacket> allPacketList;
        private void navigationPane数据分析_SelectedPageChanged(object sender, DevExpress.XtraBars.Navigation.SelectedPageChangedEventArgs e)
        {
            if(e.Page == this.navigationPage2)
            {
                if(allPacketList == null)
                {
                    WaitFrmHelper.ShowWaitForm(); 
                    allPacketList = new BLL.MonthSignalRecordPacket().Get();
                     monthDataCtrl.SetBindingData(allPacketList);
                    byPumpCountCtrl.SetBindingData(allPacketList);
                    byFlowCtrl.SetBindingData(allPacketList);  
                    WaitFrmHelper.HideWaitForm();
                }
 
            }
            if (e.Page == this.navigationPage3)
            {
                if (allPacketList == null)
                {
                    WaitFrmHelper.ShowWaitForm();
                    allPacketList = new BLL.MonthSignalRecordPacket().Get();
                     monthDataCtrl.SetBindingData(allPacketList);
                    byPumpCountCtrl.SetBindingData(allPacketList);
                    byFlowCtrl.SetBindingData(allPacketList);
                    WaitFrmHelper.HideWaitForm();
                }
            }
            if (e.Page == this.navigationPage4)
            {
                if (allPacketList == null)
                {
                    WaitFrmHelper.ShowWaitForm();
                    allPacketList = new BLL.MonthSignalRecordPacket().Get();
                     monthDataCtrl.SetBindingData(allPacketList);
                    byPumpCountCtrl.SetBindingData(allPacketList);
                    byFlowCtrl.SetBindingData(allPacketList);
                    WaitFrmHelper.HideWaitForm();
                }
            }
        }
    }
}