private void ApplyConfig() { RichTextbox.Font = new Font(configEditor.Fuente, configEditor.Tamaño, FontStyle.Regular); FontsCBox.SelectedItem = configEditor.Fuente; FontSizeUpDown.Value = configEditor.Tamaño; RichTextbox.BackColor = ColorJson.ToColor(configEditor.ColorFondo); RichTextbox.ForeColor = ColorJson.ToColor(configEditor.ColorTexto); ColoresSintxCheckBox.Checked = configEditor.SintaxisActivada; }
private void TextColorBut_Click(object sender, EventArgs e) { var colorDialog = new ColorDialog(); colorDialog.FullOpen = true; colorDialog.ShowDialog(); configEditor.ColorTexto = ColorJson.FromColor(colorDialog.Color); RichTextbox.ForeColor = colorDialog.Color; }
public static Color ToColor(ColorJson json) { return(Color.FromArgb(json.A, json.R, json.G, json.B)); }