ATMLCommonLibrary.controls.network.MappingListControl.btnEdit_Click C# (CSharp) Method

btnEdit_Click() protected method

protected btnEdit_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        protected override void btnEdit_Click( object sender, EventArgs e )
        {
            if (HasSelected)
            {
                Mapping mapping = SelectedObject as Mapping;
                if (mapping != null)
                {
                    var form = new MappingForm(HardwareItemDescription);
                    form.Text = @"Edit Map";
                    form.Mapping = mapping;
                    if (DialogResult.OK == form.ShowDialog())
                    {
                        mapping = form.Mapping;
                        SelectedListViewItem.SubItems[0].Text = mapping.ToString();
                    }
                }
            }
        }