Ejemplo n.º 1
0
        string _GetContentText()
        {
            var s = ContentText ?? EdResources.GetEmbeddedResourceString("Au.Editor.Tools.Regex.txt");

            if (!s.Contains('\n'))
            {
                s = File.ReadAllText(s);
            }
            return(s);
        }
Ejemplo n.º 2
0
        protected override void OnLoad(EventArgs e)
        {
            var c = this.Control1;

            //c.Call(Sci.SCI_SETWRAPSTARTINDENT, 4);
            //c.ZTags.AddStyleTag(".h", new SciTags.UserDefinedStyle { backColor = 0xC0E0C0, bold = true, eolFilled = true }); //topic header
            c.ZTags.AddLinkTag("+a", o => _Insert(o));             //link that inserts a key etc
            c.ZTags.SetLinkStyle(new SciTags.UserDefinedStyle {
                textColor = 0x0080FF, underline = false
            });                                                                                                         //remove underline from links

            var s = EdResources.GetEmbeddedResourceString("Au.Editor.Tools.Keys.txt").RegexReplace(@"\{(.+?)\}(?!\})", "<+a>$1<>");
            var z = this.Window.ClientSize; z.Height = c.Z.LineHeight() * s.LineCount() + 6; this.Window.ClientSize = z;

            this.Text = s;
        }