public IDataItem createFromXML(IConnection aConnection, XmlTextReader aXMLTextReader) { Connection lConnection = (Connection)aConnection; var lReader = new XMLAttributeReader(aXMLTextReader); string lAccessString = lReader.getAttribute <String>("Access", "READ_WRITE"); EAccess lAccess = (EAccess)Enum.Parse(typeof(EAccess), lAccessString); object lValue = XMLUtils.loadValueFromXML(aXMLTextReader); return(lConnection.addItem(lAccess, lValue)); }
public IDataItem createByForm(IConnection aConnection, IWin32Window aOwner) { Connection lConnection = (Connection)aConnection; DataItem lItem = lConnection.addItem(EAccess.READ_WRITE, 0); using (var lSetupForm = new ItemSetupForm(lConnection, lItem, true)) { if (lSetupForm.ShowDialog(aOwner) == DialogResult.Cancel) { lConnection.removeItem(lItem); lItem = null; } } return(lItem); }