public void AddxHighlightStyle(string syntax, Color fore, Color back, FontStyle fontstyle) { rcvSetting.AddRow(syntax, fore, back, fontstyle); if (syntax != null && syntax != "") { KeyWordStyle style = new KeyWordStyle(fore, back, fontstyle, syntax); TextKeyWordStyles.Add(style); } }
private void SyntaxHighlight_Set() { try { Parent.TextKeyWordStyles.Clear(); foreach (DataGridViewRow row in HighLightList.Rows) { string keyword = (string)row.Cells[1].Value; if (keyword != null && keyword != "" && true == (bool)row.Cells[0].Value) { KeyWordStyle style = new KeyWordStyle(row.Cells[2].Style.ForeColor, row.Cells[2].Style.BackColor, row.Cells[2].Style.Font.Style, (string)row.Cells[1].Value); Parent.TextKeyWordStyles.Add(style); } } } catch { } }
public void Add(KeyWordStyle style) { keyWordList.Add(style); }