private void ControlsChanged() { if (initialized) { SetLegacyKeys(); if (rbGrayscale.IsChecked.Value) { SetFontSmoothingTypeIfNotAlready(FontSmoothingType.Standard); } else if (rbRGB.IsChecked.Value) { SetFontSmoothingTypeIfNotAlready(FontSmoothingType.ClearType); SetFontSmoothingIfNotAlready(FontSmoothingOrientation.RGB); } else if (rbBGR.IsChecked.Value) { SetFontSmoothingTypeIfNotAlready(FontSmoothingType.ClearType); SetFontSmoothingIfNotAlready(FontSmoothingOrientation.BGR); } if (FontSmoothing.GetContrast() != (uint)ParseInt(txtContrast.Text, 0)) { FontSmoothing.SetContrast((uint)ParseInt(txtContrast.Text, 0)); dirty = true; } if (FontSmoothing.GetAntialiasingEnabled() != cbEnableFontAntialiasing.IsChecked.Value) { FontSmoothing.SetAntialiasingEnabled(cbEnableFontAntialiasing.IsChecked.Value); dirty = true; } if (dirty) { UpdateStatus(); } } setDefaults = false; }
private void ControlsChanged(object sender, EventArgs e) { if (initialized) { SetLegacyKeys(); if (rbGrayscale.Checked) { SetFontSmoothingTypeIfNotAlready(FontSmoothingType.Standard); } else if (rbRGB.Checked) { SetFontSmoothingTypeIfNotAlready(FontSmoothingType.ClearType); SetFontSmoothingIfNotAlready(FontSmoothingOrientation.RGB); } else if (rbBGR.Checked) { SetFontSmoothingTypeIfNotAlready(FontSmoothingType.ClearType); SetFontSmoothingIfNotAlready(FontSmoothingOrientation.BGR); } if (FontSmoothing.GetContrast() != (uint)nudContrast.Value) { FontSmoothing.SetContrast((uint)nudContrast.Value); dirty = true; } if (FontSmoothing.GetAntialiasingEnabled() != cbFontAntialiasing.Checked) { FontSmoothing.SetAntialiasingEnabled(cbFontAntialiasing.Checked); dirty = true; } if (dirty) { UpdateStatus(); } } setDefaults = false; }