private void tmrUpdate_Tick(object sender, EventArgs e) { using (var mainForm = new frmAlarmList()) { tblAllAlarms = mainForm.logData(); dgvAlarmLog.DataSource = tblAllAlarms; } }
public frmAlarmLog() { InitializeComponent(); setupDGV(); using (var mainForm = new frmAlarmList()) { tblAllAlarms = mainForm.logData(); dgvAlarmLog.DataSource = tblAllAlarms; tmrUpdate.Start(); } }