private void btnExml_Click(object sender, EventArgs e) { org.unisens.Unisens u = null; try { UnisensFactory uf = UnisensFactoryBuilder.createFactory(); u = uf.createUnisens(folderDialogue.SelectedPath); var ee = u.createEventEntry("event.xml", 1000); ee.setFileFormat(ee.createXmlFileFormat()); ee.append(new Event(124, "N", "NORMAL")); ee.append(new Event(346, "N", "NORMAL")); ee.append(new Event(523, "V", "PVC")); u.save(); ShowInfo("Parse file {event.xml} suceed!"); } catch (Exception ex) { ShowError(ex.Message); } finally { if (u != null) { u.closeAll(); } } }