duheng
2024-07-25 713d5218ee2b47c0c92f75c19c49bb7e883cd214
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
using DevExpress.Utils.Extensions;
using System.Collections.Generic;
 
namespace IStation.WinFrmUI.River
{
    public partial class RiverWaterLevelMainOldPage : DocumentPage
    {
        public RiverWaterLevelMainOldPage()
        {
            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()
        {   
            _tabRibbon = new Dictionary<DevExpress.XtraBars.Navigation.TabNavigationPage, DevExpress.XtraBars.Ribbon.RibbonPageGroup>()
            {
                 {
                    this.tabNavigationPageMonthDataCtrl,
                    this.ribbonPageGroupScreening
                },
            };
            this.tabPane1.SelectedPage = this.tabNavigationPageMonthDataCtrl;
 
            WaitFrmHelper.ShowWaitForm();
 
 
            var allPacketList = new BLL.MonthSignalRecordPacket().Get();
            monthDataCtrl.SetBindingData(allPacketList);
            byPumpCountCtrl.SetBindingData(allPacketList);
            byFlowCtrl.SetBindingData(allPacketList);
 
 
 
 
            WaitFrmHelper.HideWaitForm();
        }
 
 
        /// <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();
        }
 
 
    }
}