本文整理汇总了C#中System.Management.Automation.Host.Rectangle类的典型用法代码示例。如果您正苦于以下问题:C# Rectangle类的具体用法?C# Rectangle怎么用?C# Rectangle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Rectangle类属于System.Management.Automation.Host命名空间,在下文中一共展示了Rectangle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBufferContents
public override BufferCell[,] GetBufferContents(Rectangle r)
{
if (this.externalRawUI == null)
{
this.ThrowNotInteractive();
}
return this.externalRawUI.GetBufferContents(r);
}
示例2: PushHostUI
public static void PushHostUI( this PSHostRawUserInterface host )
{
var buffer = new Rectangle( 0, 0, host.BufferSize.Width, host.BufferSize.Height );
HostBufferImage = new HostBuffer
{
BufferSize = host.BufferSize,
Buffer = host.GetBufferContents( buffer ),
CursorSize = host.CursorSize,
CursorPosition = host.CursorPosition,
Background = host.BackgroundColor,
Foreground = host.ForegroundColor,
WindowPosition = host.WindowPosition,
WindowSize = host.WindowSize,
WindowTitle = host.WindowTitle
};
}
示例3: ScrollBufferContents
public override void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip,
BufferCell fill)
{
throw new NotImplementedException();
}
示例4: SetBufferContents
public override void SetBufferContents(Rectangle rectangle, BufferCell fill)
{
this.OnMessageCreated(new MessageCreatedEventArgs(new ClearBufferMessage(), false));
}
示例5: GetBufferContents
public override BufferCell[,] GetBufferContents(Rectangle rectangle)
{
throw new NotSupportedException(Resources.PSHostRawUserInterfaceGetBufferContentsNotSupported);
}
示例6: SetBufferContents
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);
// });
// }
}
示例7: GetBufferContents
public override BufferCell[,] GetBufferContents(Rectangle rectangle)
{
// TODO: REIMPLEMENT PSHostRawUserInterface.GetBufferContents(Rectangle rectangle)
// throw new NotImplementedException("The GetBufferContents method is not (yet) implemented!");
_control.CompleteBackgroundWorkItems();
if (_control.Dispatcher.CheckAccess())
{
return _control.GetBufferContents(rectangle);
}
return (BufferCell[,])_control.Dispatcher.Invoke(DispatcherPriority.Normal, (Func<BufferCell[,]>)(() => _control.GetBufferContents(rectangle)));
}
示例8: ScrollBufferContents
/// <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");
}
示例9: ScrollBufferContents
public abstract void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill);
示例10: GetBufferContents
public abstract BufferCell[,] GetBufferContents(Rectangle rectangle);
示例11: GetBufferContents
/// <summary>
/// Get buffer contents.
/// </summary>
public override BufferCell[,] GetBufferContents(Rectangle rectangle)
{
// This method had an implementation earlier. However, owing
// to a potential security risk of a malicious server scrapping
// the screen contents of a client, this is now removed
throw RemoteHostExceptions.NewNotImplementedException(RemoteHostMethodId.GetBufferContents);
}
示例12: SetBufferContents
/// <summary>
/// Set buffer contents.
/// </summary>
public override void SetBufferContents(Rectangle rectangle, BufferCell fill)
{
_serverMethodExecutor.ExecuteVoidMethod(RemoteHostMethodId.SetBufferContents1, new object[] { rectangle, fill });
}
示例13: ScrollBufferContents
/// <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 });
}
示例14: SetBufferContents
public override void SetBufferContents(Rectangle rectangle, BufferCell fill)
{
}
示例15: ScrollBufferContents
public override void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill)
{
}