Example #1
0
        public Document()
        {
            editor.Lexing.Lexer = (ScintillaNet.Lexer) 100;

            ScintillaNet.Style S = editor.Styles[0x21];
            S.ForeColor = Color.DimGray;
            S.Italic    = true;

            editor.Encoding = Encoding.UTF8;
        }
Example #2
0
		public void CopyTo(Style target)
		{
			target.BackColor = BackColor;
			target.Bold = Bold;
			target.Case = Case;
			target.CharacterSet = CharacterSet;
			target.FontName = FontName;
			target.ForeColor = ForeColor;
			target.IsChangeable = IsChangeable;
			target.IsHotspot = IsHotspot;
			target.IsSelectionEolFilled = IsSelectionEolFilled;
			target.IsVisible = IsVisible;
			target.Italic = Italic;
			target.Size = Size;
			target.Underline = Underline;
		}
        /// <summary>
        /// Sets an annotation at the given line.
        /// A warning is displayed in yellow, an error in red color.
        /// </summary>
        public void SetAnnotation(int line, string text, bool isWarning)
        {
            _ns.SendMessageDirect(Constants.SCI_ANNOTATIONSETTEXT, line, text);
            _ns.SendMessageDirect(Constants.SCI_ANNOTATIONSETVISIBLE, line, 2);

            if (isWarning)
            {
                Style s = new Style(8, this);
                s.BackColor = Color.FromArgb(255, 255, 238);
                s.ForeColor = Color.FromArgb(125, 129, 13);
                _ns.SendMessageDirect(Constants.SCI_ANNOTATIONSETSTYLE, line, 8);
            }
            else
            {
                Style s = new Style(9, this);
                s.BackColor = Color.FromArgb(250, 238, 238);
                s.ForeColor = Color.FromArgb(101, 13, 3);
                _ns.SendMessageDirect(Constants.SCI_ANNOTATIONSETSTYLE, line, 9);
            }
        }