duheng
8 天以前 4de480ec624d3b79ca690dc906e10cd2fbdc9be7
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
using System;
using System.Drawing;
using DevExpress.Skins;
using DevExpress.XtraEditors;
using DevExpress.XtraGauges.Win;
using static IStation.WinFrmUI.CalcErQu.AnaResultInfoCtrl;
 
namespace IStation.WinFrmUI.CalcErQu
{
    public partial class GaugeContentDlg : XtraForm
    {
        public GaugeContentDlg() {
            InitializeComponent();
            LookAndFeel.StyleChanged += LookAndFeel_StyleChanged;
        }
 
        public void UpdateData(AnaResultInfoCtrl.RealTimeData rtd)
        {
             
        }
        void LookAndFeel_StyleChanged(object sender, EventArgs e) {
            UpdateColor();
        }
        void UpdateColor() {
            gauge长江水位.Color = CommonSkins.GetSkin(LookAndFeel).Colors.GetColor("Information");
            gauge供水量.Color = CommonSkins.GetSkin(LookAndFeel).Colors.GetColor("Question");
            gauge功率.Color = CommonSkins.GetSkin(LookAndFeel).Colors.GetColor("Critical");
            gauge用电量.Color = CommonSkins.GetSkin(LookAndFeel).Colors.GetColor("Warning");
        }
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            UpdateColor();
        }
        public GaugeControl ActiveGauge
        {
            get {
                if(ActiveControl != null && ActiveControl is GaugeContent) {
                    return (ActiveControl as GaugeContent).Gauge;
                }
                return null;
            }
        }
 
        private void AnimationTipDlg_Load(object sender, EventArgs e)
        {
 
        }
    }
}