Esempio n. 1
0
        public ScrollingConsole(int width, int height, int bufferHeight) : base(width - 1, bufferHeight)
        {
            controlsContainer = new ControlsConsole(1, height);

            textSurface.RenderArea = new Rectangle(0, 0, width, height);

            scrollBar               = SadConsole.Controls.ScrollBar.Create(System.Windows.Controls.Orientation.Vertical, height);
            scrollBar.IsEnabled     = false;
            scrollBar.ValueChanged += ScrollBar_ValueChanged;

            controlsContainer.Add(scrollBar);
            controlsContainer.Position                 = new Point(Position.X + width - 1, Position.Y);
            controlsContainer.IsVisible                = true;
            controlsContainer.MouseCanFocus            = false;
            controlsContainer.ProcessMouseWithoutFocus = true;

            scrollingCounter = 0;
        }
Esempio n. 2
0
        public ScrollableConsole(int width, int height, int bufferHeight)
            : base(width - 1, bufferHeight)
        {
            controlsContainer = new ControlsConsole(1, height);

            textSurface.RenderArea = new Rectangle(0, 0, width, height);

            scrollBar = SadConsole.Controls.ScrollBar.Create(System.Windows.Controls.Orientation.Vertical, height);
            scrollBar.IsEnabled = false;
            scrollBar.ValueChanged += ScrollBar_ValueChanged;

            controlsContainer.Add(scrollBar);
            controlsContainer.Position = new Point(Position.X + width - 1, Position.Y);
            controlsContainer.IsVisible = true;
            controlsContainer.MouseCanFocus = false;
            controlsContainer.ProcessMouseWithoutFocus = true;

            IsVisible = false;

            scrollingCounter = 0;
        }
        public BorderedScrollingConsole(int width, int height, int bufferHeight) : base(width - 2, bufferHeight)
        {
            controlsContainer      = new SadConsole.Consoles.ControlsConsole(1, height - 2);
            textSurface.RenderArea = new Rectangle(1, 1, width, height - 2);
            scrollBar               = SadConsole.Controls.ScrollBar.Create(System.Windows.Controls.Orientation.Vertical, height - 2);
            scrollBar.IsEnabled     = false;
            scrollBar.ValueChanged += scrollBar_ValueChanged;
            controlsContainer.Add(scrollBar);
            controlsContainer.Position                 = new Point(Position.X + width, Position.Y);
            controlsContainer.IsVisible                = true;
            controlsContainer.MouseCanFocus            = false;
            controlsContainer.ProcessMouseWithoutFocus = true;
            scrollingCounter = 0;
            borderSurface    = new TextSurface(width, height, base.textSurface.Font);
            borderEdit       = new SurfaceEditor(borderSurface);
            Box box = Box.GetDefaultBox();

            box.Width  = width;
            box.Height = height;
            box.Draw(borderEdit);
        }