예제 #1
0
        public void CreateEditor(Control parent, string language)
        {
            ScintillaEditor editor = null;

            switch (language.ToLower())
            {
            case "python":
                editor = CreateEditor <PythonEditor>(parent);
                break;

            case "javascript":
                editor = CreateEditor <JavascriptEditor>(parent);
                break;

            case "html":
                editor = CreateEditor <HtmlEditor>(parent);
                break;

            case "css":
                editor = CreateEditor <CssEditor>(parent);
                break;
            }

            editor.Language          = language.ToLower();
            editors[editor.Language] = editor;
        }
예제 #2
0
        protected void OnTextChanged(object sender, EventArgs e)
        {
            ScintillaEditor editor = (ScintillaEditor)sender;

            TextChanged.Fire(this, new TextChangedEventArgs()
            {
                Language = editor.Language, Text = editor.Text
            });
        }