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) { } } }