private void InitializeData(string xmlPath) { objAlarmManager.Alarms.Clear(); objAlarmManager.XmlPath = xmlPath; System.Collections.Generic.List <ClassAlarm> chList = objAlarmManager.GetAlarms(xmlPath); DGAlarmAnalog.Rows.Clear(); foreach (ClassAlarm tg in chList) { string[] row = { tg.Name, string.Format("{0}", tg.AlarmText), string.Format("{0}", tg.AlarmCalss), tg.Value, tg.TriggerTeg, tg.DataBlock, tg.Device, tg.Channel }; DGAlarmAnalog.Rows.Add(row); } }
private List <ClassAlarm> InitializeData(string xmlPath) { objAlarmManager.Alarms.Clear(); objAlarmManager.XmlPath = xmlPath; return(objAlarmManager.GetAlarms(xmlPath)); }