ATMLEquipmentLibrary.controls.EquipmentLibraryControl.lvInstruments_OnEdit C# (CSharp) Method

lvInstruments_OnEdit() private method

private lvInstruments_OnEdit ( ) : void
return void
        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();
                }
            }
        }