Example #1
0
        /// <summary>
        ///
        /// </summary>
        protected override void OnCreateControl()
        {
            this.AcceptsTab = true;
            //this.BackColor = Color.Black;
            this.DetectUrls = true;
            this.Dock       = DockStyle.Fill;
            this.Font       = new Font("Lucida Console", 8);
            //this.ForeColor = Color.Lime;
            this.HideSelection = true;
            this.Multiline     = true;
            //this.RightMargin = TextRenderer.MeasureText( "A", this.Font ).Width * 80;

            //this.ScrollBars = RichTextBoxScrollBars.ForcedVertical;
            this.ShortcutsEnabled    = true;
            this.ShowSelectionMargin = false;

            if (!this.DesignMode)
            {
                // Delegates for invoked methods
                ProcessExitedCallback       = new ProcessExitedDelegate(ProcessExited);
                OutputDataAvailableCallback = new OutputDataAvailableDelegate(OutputDataAvailable);
                // scCommandLineHistory holds old command lines for quick reuse
                scCommandLineHistory = new StringCollection();
                //
                CreateCMDProcess();
            }
            base.OnCreateControl();
        }
        /// <summary>
        /// 
        /// </summary>
        protected override void OnCreateControl()
        {
            this.AcceptsTab = true;
                this.BackColor = Color.Black;
                this.DetectUrls = true;
                this.Dock = DockStyle.Fill;
                this.Font = new Font( "Lucida Console", 8 );
                this.ForeColor = Color.Lime;
                this.HideSelection = true;
                this.Multiline = true;
                //this.RightMargin = TextRenderer.MeasureText( "A", this.Font ).Width * 80;

                //this.ScrollBars = RichTextBoxScrollBars.ForcedVertical;
                this.ShortcutsEnabled = true;
                this.ShowSelectionMargin = false;

                if ( !this.DesignMode )
                {

                    // Delegates for invoked methods
                        ProcessExitedCallback = new ProcessExitedDelegate( ProcessExited );
                        OutputDataAvailableCallback = new OutputDataAvailableDelegate( OutputDataAvailable );

                    // scCommandLineHistory holds old command lines for quick reuse
                        scCommandLineHistory = new StringCollection();

                    //
                        CreateCMDProcess();
                }

                base.OnCreateControl();
        }