private void DisplayTextBoxValidity(GreenshotTextBox textbox, bool valid) { if (valid) { // "Added" feature #3547158 textbox.BackColor = Environment.OSVersion.Version.Major >= 6 ? SystemColors.Window : SystemColors.Control; } else { textbox.BackColor = Color.Red; } }
private void DisplayTextBoxValidity(GreenshotTextBox textbox, bool valid) { if (valid) { // "Added" feature #3547158 textbox.BackColor = WindowsVersion.IsWindowsVistaOrLater ? SystemColors.Window : SystemColors.Control; } else { textbox.BackColor = Color.Red; } }