Exemplo n.º 1
0
 private void CreateSubBuffer()
 {
     _lineSubBuffer = new SubBuffer();
     _lineSubBuffer.SetSize(1, ColumnCount);
     _lineSubBuffer.Enabled = true;
     AddSubBuffer(_lineSubBuffer);
 }
Exemplo n.º 2
0
        private void CreateProgressBarSubBuffer()
        {
            progressBarSubBuffer = new SubBuffer();
            progressBarSubBuffer.SetSize(3, ColumnCount);
            progressBarSubBuffer.Fixed       = true;
            progressBarSubBuffer.PositionRow = RowCount - progressBarSubBuffer.RowCount;
            AddSubBuffer(progressBarSubBuffer);

            var separator = new string('-', progressBarSubBuffer.ColumnCount);

            progressBarSubBuffer.Buffer[0].ArrayCopyFrom(separator.ToCharArray(), 0, 0);
        }
Exemplo n.º 3
0
        /// <summary>Whenever the terminal resizes, resize the progress bar,</summary>
        /// <param name="sb">The method operates on self (this), and the parameter sb would
        /// be unnecessary if it wasn't required by AddResizeNotifyer().</parm>
        private int CreateProgressBarSubBuffer(IScreenBuffer sb)
        {
            if (progressBarSubBuffer == null)
            {
                progressBarSubBuffer = new SubBuffer();
                progressBarSubBuffer.WillTruncate = true;
                AddSubBuffer(progressBarSubBuffer);
            }
            progressBarSubBuffer.SetSize(3, ColumnCount);
            progressBarSubBuffer.Fixed       = true;
            progressBarSubBuffer.PositionRow = RowCount - progressBarSubBuffer.RowCount;
            var separator = new string('-', progressBarSubBuffer.ColumnCount);

            progressBarSubBuffer.Buffer[0].ArrayCopyFrom(separator.ToCharArray(), 0, 0);
            return(0);
        }
Exemplo n.º 4
0
 private void CreateSubBuffer()
 {
     LineSubBuffer = new SubBuffer();
     LineSubBuffer.SetSize(1, ColumnCount);
     LineSubBuffer.Enabled = true;
     AddSubBuffer(LineSubBuffer);
 }
Exemplo n.º 5
0
 public void RemoveSubBuffer(SubBuffer subBuffer)
 {
     _subBuffers.Remove(subBuffer);
 }
Exemplo n.º 6
0
 public void AddSubBuffer(SubBuffer subBuffer)
 {
     _subBuffers.Add(subBuffer);
 }
Exemplo n.º 7
0
 public void AddSubBuffer(SubBuffer subBuffer)
 {
     subBuffers.Add(subBuffer);
 }
Exemplo n.º 8
0
 public void RemoveSubBuffer(SubBuffer subBuffer)
 {
     subBuffers.Remove(subBuffer);
 }
Exemplo n.º 9
0
        private void CreateProgressBarSubBuffer()
        {
            _progressBarSubBuffer = new SubBuffer();
            _progressBarSubBuffer.SetSize(3, ColumnCount);
            _progressBarSubBuffer.Fixed = true;
            _progressBarSubBuffer.PositionRow = RowCount - _progressBarSubBuffer.RowCount;
            AddSubBuffer(_progressBarSubBuffer);

            string separator = new string('-', _progressBarSubBuffer.ColumnCount);
            separator.ToCharArray().CopyTo(_progressBarSubBuffer.Buffer[0], 0);
        }