Example #1
0
        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);
            }
        }
Example #2
0
        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
            {
            }
        }
Example #3
0
 public void Add(KeyWordStyle style)
 {
     keyWordList.Add(style);
 }