private void dataListEvents_DoubleClick(object sender, EventArgs e) { if (dataListTriggers.SelectedObject != null) { long trigger_id = ((device_value_triggers)dataListTriggers.SelectedObject).id; if (((device_value_triggers.TRIGGER_TYPE)((device_value_triggers)dataListTriggers.SelectedObject).trigger_type) == device_value_triggers.TRIGGER_TYPE.Basic) { AddEditBasicTriggers eventform = new AddEditBasicTriggers(trigger_id); eventform.Show(); } else { AddEditScriptngTrigger eventform = new AddEditScriptngTrigger(trigger_id); eventform.Show(); } } }
private void createEventAdvancedToolStripMenuItem_Click(object sender, EventArgs e) { AddEditScriptngTrigger eventform = new AddEditScriptngTrigger(null); eventform.Show(); }