public formAutologinConfig(Settings.Point <ushort> empty, Settings.Point <ushort> play) { InitializeComponents(); checkEmpty.Checked = !empty.IsEmpty; checkPlay.Checked = !play.IsEmpty; textEmpty.Text = empty.X + ", " + empty.Y; textPlay.Text = play.X + ", " + play.Y; }
private void buttonOK_Click(object sender, EventArgs e) { if (checkEmpty.Checked) { this.EmptyLocation = ParsePoint(textEmpty.Text); } if (checkPlay.Checked) { this.PlayLocation = ParsePoint(textPlay.Text); } this.DialogResult = System.Windows.Forms.DialogResult.OK; }