/// <summary> /// Method to get excel node color /// </summary> /// <param name="state">state</param> public static Excel.Color GetExcelStateColor(EnmState state) { switch (state) { case EnmState.NoAlarm: return(Excel.Colors.White); case EnmState.Opevent: return(Excel.Colors.White); case EnmState.Critical: return(Excel.Colors.Red); case EnmState.Major: return(Excel.Colors.Default34); case EnmState.Minor: return(Excel.Colors.Yellow); case EnmState.Hint: return(Excel.Colors.Default2C); case EnmState.Invalid: return(Excel.Colors.Blue); default: return(Excel.Colors.White); } }
public static string GetPointStatusDisplay(EnmState status) { switch (status) { case EnmState.Normal: return("正常数据"); case EnmState.Level1: return("一级告警"); case EnmState.Level2: return("二级告警"); case EnmState.Level3: return("三级告警"); case EnmState.Level4: return("四级告警"); case EnmState.Opevent: return("操作事件"); case EnmState.Invalid: return("无效数据"); default: return("未定义"); } }
/// <summary> /// Method to get state color /// </summary> /// <param name="state">state</param> public static Color GetStateColor(EnmState state) { switch (state) { case EnmState.NoAlarm: return(Color.White); case EnmState.Critical: return(Color.Red); case EnmState.Major: return(Color.Orange); case EnmState.Minor: return(Color.Yellow); case EnmState.Hint: return(Color.SkyBlue); case EnmState.Opevent: return(Color.White); case EnmState.Invalid: return(Color.Blue); default: return(Color.Blue); } }
public static Color GetPointColor(EnmState status) { switch (status) { case EnmState.Normal: return(Color.LimeGreen); case EnmState.Invalid: return(Color.LightGray); default: return(Color.White); } }