public override PS.BufferCell[,] GetBufferContents(Rectangle rectangle) { FN.BufferCell[,] r1 = Far.Api.UI.GetBufferContents(ToPlace(rectangle)); PS.BufferCell[,] r2 = new PS.BufferCell[r1.GetLength(0), r1.GetLength(1)]; for (int i = 0; i < r1.GetLength(0); ++i) { for (int j = 0; j < r1.GetLength(1); ++j) { r2[i, j] = ToBufferCell(r1[i, j]); } } return(r2); }
public BufferCell[,] NewBufferCellArray(int width, int height, BufferCell contents) { if (width <= 0) { throw PSTraceSource.NewArgumentOutOfRangeException("width", width, "MshHostRawUserInterfaceStrings", "NonPositiveNumberErrorTemplate", new object[] { "width" }); } if (height <= 0) { throw PSTraceSource.NewArgumentOutOfRangeException("height", height, "MshHostRawUserInterfaceStrings", "NonPositiveNumberErrorTemplate", new object[] { "height" }); } BufferCell[,] cellArray = new BufferCell[height, width]; switch (this.LengthInBufferCells(contents.Character)) { case 1: for (int i = 0; i < cellArray.GetLength(0); i++) { for (int j = 0; j < cellArray.GetLength(1); j++) { cellArray[i, j] = contents; cellArray[i, j].BufferCellType = BufferCellType.Complete; } } return cellArray; case 2: { int num4 = ((width % 2) == 0) ? width : (width - 1); for (int k = 0; k < height; k++) { for (int m = 0; m < num4; m++) { cellArray[k, m] = contents; cellArray[k, m].BufferCellType = BufferCellType.Leading; m++; cellArray[k, m] = new BufferCell('\0', contents.ForegroundColor, contents.BackgroundColor, BufferCellType.Trailing); } if (num4 < width) { cellArray[k, num4] = contents; cellArray[k, num4].BufferCellType = BufferCellType.Leading; } } break; } } return cellArray; }
public override void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill) { // TODO: REIMPLEMENT PSHostRawUserInterface.ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill) throw new NotImplementedException("The ScrollBufferContents method is not (yet) implemented!"); //if (_control.Dispatcher.CheckAccess()) //{ // _control.ScrollBufferContents(source, destination, clip, fill); //} //else //{ // _control.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate // { // _control.ScrollBufferContents(source, destination, clip, fill); // }); //} }
public override void SetBufferContents(Coordinates origin, BufferCell[,] contents) { // TODO: REIMPLEMENT PSHostRawUserInterface.SetBufferContents(Coordinates origin, BufferCell[,] contents) throw new NotImplementedException("The SetBufferContents method is not (yet) implemented!"); //if (_control.Dispatcher.CheckAccess()) // { // _control.SetBufferContents(origin, contents); // } // else // { // _control.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate // { // _control.SetBufferContents(origin, contents); // }); // } }
ScrollBufferContents ( Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill ) { if (_externalRawUI == null) { ThrowNotInteractive(); } _externalRawUI.ScrollBufferContents(source, destination, clip, fill); }
/// <summary> /// Sets the contents of the buffer inside the specified rectangle. /// </summary> /// <param name="rectangle">The rectangle inside which buffer contents will be filled.</param> /// <param name="fill">The BufferCell which will be used to fill the requested space.</param> public override void SetBufferContents( Rectangle rectangle, BufferCell fill) { Logger.Write( LogLevel.Warning, "PSHostRawUserInterface.SetBufferContents was called"); }
/// <summary> /// This functionality is not currently implemented. The call fails with an exception. /// </summary> /// <param name="origin">Unused</param> /// <param name="contents">Unused</param> public override void SetBufferContents(Coordinates origin, BufferCell[,] contents) { throw new NotImplementedException("The method or operation is not implemented."); }
SetBufferContents(Coordinates origin, BufferCell[,] contents) { if (_externalRawUI == null) { ThrowNotInteractive(); } _externalRawUI.SetBufferContents(origin, contents); }
public override void SetBufferContents(Coordinates origin, BufferCell[,] contents) { throw new NotImplementedException(); }
public override void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip, PS.BufferCell fill) { Far.Api.UI.ScrollBufferContents(ToPlace(source), ToPoint(destination), ToPlace(clip), ToBufferCell(fill)); }
public BufferCell[,] NewBufferCellArray(Size size, BufferCell contents) { return this.NewBufferCellArray(size.Width, size.Height, contents); }
public override void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill) { throw new NotSupportedException(Resources.PSHostRawUserInterfaceScrollBufferContentsNotSupported); }
public override void ScrollBufferContents(System.Management.Automation.Host.Rectangle source, System.Management.Automation.Host.Coordinates destination, System.Management.Automation.Host.Rectangle clip, System.Management.Automation.Host.BufferCell fill) { // throw new NotImplementedException(); }
public override void SetBufferContents(System.Management.Automation.Host.Rectangle rectangle, System.Management.Automation.Host.BufferCell fill) { // throw new NotImplementedException(); return(null); }
public abstract void SetBufferContents(Rectangle rectangle, BufferCell fill);
public abstract void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill);
public BufferCell[,] NewBufferCellArray(int width, int height, BufferCell contents) { throw new NotImplementedException(); }
public override void SetBufferContents(Coordinates origin, BufferCell[,] contents) { throw new NotSupportedException(Resources.PSHostRawUserInterfaceSetBufferContentsNotSupported); }
public BufferCell[,] NewBufferCellArray(string[] contents, ConsoleColor foregroundColor, ConsoleColor backgroundColor) { if (contents == null) { throw PSTraceSource.NewArgumentNullException("contents"); } byte[][] bufferArray = new byte[contents.Length][]; int num = 0; for (int i = 0; i < contents.Length; i++) { if (!string.IsNullOrEmpty(contents[i])) { int num3 = 0; bufferArray[i] = new byte[contents[i].Length]; for (int k = 0; k < contents[i].Length; k++) { bufferArray[i][k] = (byte) this.LengthInBufferCells(contents[i][k]); num3 += bufferArray[i][k]; } if (num < num3) { num = num3; } } } if (num <= 0) { throw PSTraceSource.NewArgumentException("contents", "MshHostRawUserInterfaceStrings", "AllNullOrEmptyStringsErrorTemplate", new object[0]); } var cellArray = new BufferCell[contents.Length, num]; for (int j = 0; j < contents.Length; j++) { int num6 = 0; int index = 0; while (index < contents[j].Length) { if (bufferArray[j][index] == 1) { cellArray[j, num6] = new BufferCell(contents[j][index], foregroundColor, backgroundColor, BufferCellType.Complete); } else if (bufferArray[j][index] == 2) { cellArray[j, num6] = new BufferCell(contents[j][index], foregroundColor, backgroundColor, BufferCellType.Leading); num6++; cellArray[j, num6] = new BufferCell('\0', foregroundColor, backgroundColor, BufferCellType.Trailing); } index++; num6++; } while (num6 < num) { cellArray[j, num6] = new BufferCell(' ', foregroundColor, backgroundColor, BufferCellType.Complete); num6++; } } return cellArray; }
public BufferCell[,] NewBufferCellArray(Size size, BufferCell contents) { throw new NotImplementedException(); }
/// <summary> /// Scroll buffer contents. /// </summary> public override void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill) { _serverMethodExecutor.ExecuteVoidMethod(RemoteHostMethodId.ScrollBufferContents, new object[] { source, destination, clip, fill }); }
/// <summary> /// This functionality is not currently implemented. The call fails with an exception. /// </summary> /// <param name="source">Unused</param> /// <param name="destination">Unused</param> /// <param name="clip">Unused</param> /// <param name="fill">Unused</param> public override void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill) { throw new NotImplementedException("The method or operation is not implemented."); }
/// <summary> /// Set buffer contents. /// </summary> public override void SetBufferContents(Rectangle rectangle, BufferCell fill) { _serverMethodExecutor.ExecuteVoidMethod(RemoteHostMethodId.SetBufferContents1, new object[] { rectangle, fill }); }
/// <summary> /// This functionality is not currently implemented. The call fails with an exception. /// </summary> /// <param name="rectangle">Unused</param> /// <param name="fill">Unused</param> public override void SetBufferContents(Rectangle rectangle, BufferCell fill) { throw new NotImplementedException("The method or operation is not implemented."); }
/// <summary> /// Set buffer contents. /// </summary> public override void SetBufferContents(Coordinates origin, BufferCell[,] contents) { _serverMethodExecutor.ExecuteVoidMethod(RemoteHostMethodId.SetBufferContents2, new object[] { origin, contents }); }
SetBufferContents(Rectangle r, BufferCell fill) { if (_externalRawUI == null) { ThrowNotInteractive(); } _externalRawUI.SetBufferContents(r, fill); }
/// <summary> /// Scrolls the contents of the console buffer. /// </summary> /// <param name="source">The source rectangle to scroll.</param> /// <param name="destination">The destination coordinates by which to scroll.</param> /// <param name="clip">The rectangle inside which the scrolling will be clipped.</param> /// <param name="fill">The cell with which the buffer will be filled.</param> public override void ScrollBufferContents( Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill) { Logger.Write( LogLevel.Warning, "PSHostRawUserInterface.ScrollBufferContents was called"); }
/// <summary> /// Sets the contents of the buffer at the given coordinate. /// </summary> /// <param name="origin">The coordinate at which the buffer will be changed.</param> /// <param name="contents">The new contents for the buffer at the given coordinate.</param> public override void SetBufferContents( Coordinates origin, BufferCell[,] contents) { Logger.Write( LogLevel.Warning, "PSHostRawUserInterface.SetBufferContents was called"); }
public override void SetBufferContents(Rectangle rectangle, BufferCell fill) { _control.CompleteBackgroundWorkItems(); if (rectangle.Left == -1 && rectangle.Right == -1) { _control.ClearScreen(); } else // TODO: REIMPLEMENT PSHostRawUserInterface.SetBufferContents(Rectangle rectangle, BufferCell fill) throw new NotImplementedException("The SetBufferContents method is not (yet) implemented!"); //if (_control.Dispatcher.CheckAccess()) // { // _control.SetBufferContents(rectangle, fill); // } // else // { // _control.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate // { // _control.SetBufferContents(rectangle, fill); // }); // } }
public abstract void SetBufferContents(Coordinates origin, BufferCell[,] contents);
public override void SetBufferContents(Rectangle rectangle, BufferCell fill) { throw new NotImplementedException(); }
public override void SetBufferContents(Rectangle rectangle, BufferCell fill) { this.OnMessageCreated(new MessageCreatedEventArgs(new ClearBufferMessage(), false)); }
public override void SetBufferContents(Rectangle rectangle, PS.BufferCell fill) { Far.Api.UI.SetBufferContents(ToPlace(rectangle), ToBufferCell(fill)); }
public override void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill) { throw new NotImplementedException(); }
static FN.BufferCell ToBufferCell(PS.BufferCell cell) { return(new FN.BufferCell(cell.Character, cell.ForegroundColor, cell.BackgroundColor, (FN.BufferCellType)cell.BufferCellType)); }
public override void SetBufferContents(Rectangle rectangle, BufferCell fill) { this.Output.Clear(); }
public BufferCell[,] NewBufferCellArray(Size size, BufferCell contents) { return(this.NewBufferCellArray(size.Width, size.Height, contents)); }