CSharpGL.FormSelectType.btnOK_Click C# (CSharp) Method

btnOK_Click() private method

private btnOK_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (this.lstType.SelectedItem == null)
            {
                MessageBox.Show("Please select a type first!");
                return;
            }

            this.SelectedType = this.lstType.SelectedItem as Type;

            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }