Beispiel #1
0
        public TextEditForm(MainForm mainForm, MyScriptableNode target)
        {
            InitializeComponent();

            //Icon = Properties.Resources.TextDoc;

            m_mainForm = mainForm;
            Target = target;
            Text = target.Name;

            SetupEditorStyle();

            scintilla.Text = Target.Script;

            scintilla.TextChanged += scintilla_TextChanged;
            scintilla.HandleDestroyed += scintilla_HandleDestroyed;
            scintilla.HandleCreated += scintilla_HandleCreated;
        }
Beispiel #2
0
        internal void CloseTextEditor(MyScriptableNode target)
        {
            TextEditForm textEditor;

            if (TextEditors.TryGetValue(target, out textEditor))
            {
                textEditor.Close();
            }
        }
Beispiel #3
0
        public TextEditForm OpenTextEditor(MyScriptableNode target)
        {
            TextEditForm textEditor;

            if (!TextEditors.TryGetValue(target, out textEditor))
            {
                textEditor = new TextEditForm(this, target);
                textEditor.FormClosed += textEditor_FormClosed;
                TextEditors[target] = textEditor;
            }

            textEditor.Show(dockPanel, DockState.Document);
            return textEditor;
        }