Exemplo n.º 1
0
 public DailyReportItem()//Sample 데이터
 {
     ChannelId = 1;
     Machine   = "설비 - 1";
     Point     = "Point #1";
     Function  = "Vrms";
     Unit      = "㎜/s";
     Caution   = 5.3f;
     Failure   = 6.5f;
     Repair    = 7.7f;
     Stop      = 8.9f;
     MIN       = 1.5f;
     MAX       = 3.0f;
     AVG       = 2.0f;
     Status    = new ChannelStatus()
     {
         Stat = "Good", StatColor = Color.LightGreen
     };
     Remark = "";
 }
Exemplo n.º 2
0
        public static ChannelStatus CheckStatus(float[] alarms, float maxValue)
        {
            ChannelStatus status = new ChannelStatus();

            if (maxValue >= alarms[3])
            {
                status.Stat           = "Stop";
                status.StatColor      = AlarmColors[3];
                status.StatColor_Font = Color.White;
            }
            else if (maxValue >= alarms[2])
            {
                status.Stat           = "Repair";
                status.StatColor      = AlarmColors[2];
                status.StatColor_Font = Color.White;
            }
            else if (maxValue >= alarms[1])
            {
                status.StatColor      = AlarmColors[1];
                status.StatColor_Font = Color.Black;
                status.Stat           = "Failure";
            }
            else if (maxValue >= alarms[0])
            {
                status.StatColor      = AlarmColors[0];
                status.StatColor_Font = Color.Black;
                status.Stat           = "Caution";
            }
            else
            {
                status.StatColor      = Color.LightGreen;
                status.StatColor_Font = Color.Black;
                status.Stat           = "Good";
            }
            return(status);
        }