public new event EventHandler OnTextChanged;         //mxd

        #endregion

        #region ================== Constructor

        // Constructor
        protected ScriptDocumentTab(ScriptEditorPanel panel, ScriptConfiguration config)
        {
            // Keep panel and config
            this.panel  = panel;
            this.config = config;             //mxd

            // Make the script control
            editor          = new ScriptEditorControl();
            editor.Location = new Point(EDITOR_BORDER_LEFT, EDITOR_BORDER_TOP);
            editor.Size     = new Size(this.ClientSize.Width - EDITOR_BORDER_LEFT - EDITOR_BORDER_RIGHT,
                                       this.ClientSize.Height - EDITOR_BORDER_TOP - EDITOR_BORDER_BOTTOM);
            editor.Anchor   = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            editor.Name     = "editor";
            editor.TabStop  = true;
            editor.TabIndex = 1;
            this.Controls.Add(editor);

            // Bind events
            editor.OnExplicitSaveTab    += panel.ExplicitSaveCurrentTab;
            editor.OnOpenScriptBrowser  += panel.OpenBrowseScript;
            editor.OnOpenFindAndReplace += panel.OpenFindAndReplace;
            editor.OnFindNext           += panel.FindNext;
            editor.OnFindPrevious       += panel.FindPrevious;      //mxd
            editor.OnTextChanged        += editor_TextChanged;      //mxd

            //mxd. Bind functionbar events
            editor.OnFunctionBarDropDown += functionbar_DropDown;

            //mxd. Setup styles
            editor.SetupStyles(config);
        }
        protected ScriptDocumentTab(ScriptEditorPanel panel, ScriptConfiguration config)
        {
            this.panel  = panel;
            this.config = config;

            editor = new ScriptEditorControl();
            this.Controls.Add(editor);
        }
Example #3
0
        public new event EventHandler OnTextChanged;         //mxd

        #endregion

        #region ================== Constructor

        // Constructor
        protected ScriptDocumentTab(ScriptEditorPanel panel, ScriptConfiguration config)
        {
            // Keep panel and config
            this.panel     = panel;
            this.config    = config;                         //mxd
            this.BackColor = SystemColors.ControlLightLight; //mxd

            // Make the script control
            editor          = new ScriptEditorControl();
            editor.Location = new Point(EDITOR_BORDER_LEFT, EDITOR_BORDER_TOP);
            editor.Size     = new Size(this.ClientSize.Width - EDITOR_BORDER_LEFT - EDITOR_BORDER_RIGHT,
                                       this.ClientSize.Height - EDITOR_BORDER_TOP - EDITOR_BORDER_BOTTOM);
            editor.Anchor   = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            editor.Name     = "editor";
            editor.TabStop  = true;
            editor.TabIndex = 1;
            this.Controls.Add(editor);

            // Bind events
            editor.OnExplicitSaveTab        += panel.ExplicitSaveCurrentTab;
            editor.OnOpenScriptBrowser      += panel.OpenBrowseScript;
            editor.OnOpenFindAndReplace     += panel.OpenFindAndReplace;
            editor.OnFindNext               += panel.FindNext;
            editor.OnFindPrevious           += panel.FindPrevious;   //mxd
            editor.OnFindNextWrapAround     += panel.FindNextWrapAround;
            editor.OnFindPreviousWrapAround += panel.FindPreviousWrapAround;
            editor.OnTextChanged            += editor_TextChanged; //mxd
            editor.OnGoToLine               += panel.GoToLine;     //mxd
            editor.OnCompileScript          -= Compile;            //mxd

            //mxd. Bind functionbar events
            editor.OnFunctionBarDropDown += functionbar_DropDown;

            //mxd. Setup styles
            editor.SetupStyles(config);

            //mxd. Apply panel settings
            editor.ShowWhitespace = panel.ShowWhitespace;
            editor.WrapLongLines  = panel.WrapLongLines;

            //mxd. Set icon
            this.ImageIndex = panel.Icons.GetScriptIcon(config.ScriptType);
        }
Example #4
0
        // Constructor
        public ScriptDocumentTab(ScriptEditorPanel panel)
        {
            // Keep panel
            this.panel = panel;

            // Make the script control
            editor          = new ScriptEditorControl();
            editor.Location = new Point(EDITOR_BORDER_LEFT, EDITOR_BORDER_TOP);
            editor.Size     = new Size(this.ClientSize.Width - EDITOR_BORDER_LEFT - EDITOR_BORDER_RIGHT,
                                       this.ClientSize.Height - EDITOR_BORDER_TOP - EDITOR_BORDER_BOTTOM);
            editor.Anchor   = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            editor.Name     = "editor";
            editor.TabStop  = true;
            editor.TabIndex = 0;
            this.Controls.Add(editor);

            // Bind events
            editor.OnExplicitSaveTab    += panel.ExplicitSaveCurrentTab;
            editor.OnOpenScriptBrowser  += panel.OpenBrowseScript;
            editor.OnOpenFindAndReplace += panel.OpenFindAndReplace;
            editor.OnFindNext           += panel.FindNext;
        }