private void ButtonResponse_TouchUpInside(object sender, EventArgs e) { if (sender.Equals(buttonYes)) { AskResponded?.Invoke(this, true); } else if (sender.Equals(buttonNo)) { AskResponded?.Invoke(this, false); } }
private void ButtonTemperature_Click(object sender, EventArgs e) { bool?value = (bool?)null; if (sender == buttonHigh) { value = true; } else if (sender == buttonLow) { value = false; } //else if (sender == buttonSkip) // value = (bool?)null; AskResponded?.Invoke(this, value); Dismiss(); }