using System; using System.Linq; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using BMS_D1000H.BMSConstData; using BMS_D1000H.DataStructs; using BMS_D1000H.Utils.Functions; namespace BMS_D1000H { public partial class fmScreenSaver : Form { public fmScreenSaver() { InitializeComponent(); } private void tmrCheckStatus_Tick(object sender, EventArgs e) { DeviceDataSystem aData = ((fmBMSMain)(Owner)).GetBmsSystemData(); if ((aData.AlarmStatus != 0) || // Alarm status not Normal (aData.OpStatus == 1) || // Operating status Charging (aData.OpStatus == 2)) // Operating status Discharging { tmrCheckStatus.Stop(); ((fmBMSMain)(Owner)).sfmMain.Show(ScreenID.MAIN_SCREEN_ID); } //if ((((fmBMSMain)(Owner)).GetBmsSystemData() == 1) || // (((fmBMSMain)(Owner)).OPStatus == 2) || // (((fmBMSMain)(Owner)).AlarmStatus != 0)) //{ // tmrCheckStatus.Stop(); // ((fmBMSMain)(Owner)).sfmMain.Show(ScreenID.MAIN_SCREEN_ID); //} } private void fmScreenSaver_Activated(object sender, EventArgs e) { tmrCheckStatus.Start(); } private void sfmScreenSaver_Click(object sender, EventArgs e) { ((fmBMSMain)(Owner)).ScreenSaverTimeReset(); ((fmBMSMain)(Owner)).sfmMain.Show(ScreenID.MAIN_SCREEN_ID); } } }