ATMLCommonLibrary.controls.equipment.TestStationControl.btnAddGUID_Click C# (CSharp) Method

btnAddGUID_Click() private method

private btnAddGUID_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void btnAddGUID_Click(object sender, EventArgs e)
        {
            bool ok2Create = true;
            Guid iid = Guid.NewGuid();
            if (edtUUID.Value != null)
            {
                ok2Create =
                    DialogResult.Yes == MessageBox.Show(@"Create a new UUID overwriting the existing one?",
                        @"Overwrite UUID",
                        MessageBoxButtons.YesNo,
                        MessageBoxIcon.Question);
            }
            if (ok2Create)
            {
                edtUUID.Value = iid.ToString().ToUpper();
                errorProvider.SetError(edtUUID, ""); //Clear any error that may be on the control
            }
        }