private void lvInstruments_OnEdit()
{
if (lvInstruments.HasSelected)
{
var document = lvInstruments.SelectedObject as Document;
var form = new InstrumentForm();
InstrumentDescription instrumentDescription =
InstrumentDescription.Deserialize( Encoding.UTF8.GetString( document.DocumentContent ) );
form.InstrumentDescription = instrumentDescription;
if (DialogResult.OK == form.ShowDialog())
{
instrumentDescription = form.InstrumentDescription;
SaveInstrumentDescriptionDocument( instrumentDescription, document, BASEBean.eDataState.DS_EDIT );
UpdateExistingDocumentInList( document, instrumentDescription.uuid );
LoadInstrumentPreview();
}
}
}