本文整理汇总了C#中System.Management.Automation.Host.Rectangle类的典型用法代码示例。如果您正苦于以下问题:C# Rectangle类的具体用法?C# Rectangle怎么用?C# Rectangle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Rectangle类属于System.Management.Automation.Host命名空间,在下文中一共展示了Rectangle类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetBufferContents
public override BufferCell[,] GetBufferContents(Rectangle r)
{
if (this.externalRawUI == null)
{
this.ThrowNotInteractive();
}
return this.externalRawUI.GetBufferContents(r);
}
开发者ID:nickchal,项目名称:pash,代码行数:8,代码来源:InternalHostRawUserInterface.cs
示例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
};
}
开发者ID:rbobot,项目名称:Fqopy,代码行数:19,代码来源:PSCmdletExtender.cs
示例3: ScrollBufferContents
public override void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip,
BufferCell fill)
{
throw new NotImplementedException();
}
开发者ID:scjunkie,项目名称:Console,代码行数:5,代码来源:ScriptingHostRawUserInterface.cs
示例4: SetBufferContents
public override void SetBufferContents(Rectangle rectangle, BufferCell fill)
{
this.OnMessageCreated(new MessageCreatedEventArgs(new ClearBufferMessage(), false));
}
开发者ID:nickchal,项目名称:pash,代码行数:4,代码来源:PowwaHostRawUserInterface.cs
示例5: GetBufferContents
public override BufferCell[,] GetBufferContents(Rectangle rectangle)
{
throw new NotSupportedException(Resources.PSHostRawUserInterfaceGetBufferContentsNotSupported);
}
开发者ID:nickchal,项目名称:pash,代码行数:4,代码来源:PowwaHostRawUserInterface.cs
示例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);
// });
// }
}
开发者ID:Jaykul,项目名称:PoshConsole,代码行数:23,代码来源:HostRawUI.cs
示例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)));
}
开发者ID:Jaykul,项目名称:PoshConsole,代码行数:11,代码来源:HostRawUI.cs
示例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");
}
开发者ID:sunnyc7,项目名称:PowerShellEditorServices,代码行数:17,代码来源:SessionPSHostRawUserInterface.cs
示例9: ScrollBufferContents
public abstract void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill);
开发者ID:mauve,项目名称:Pash,代码行数:1,代码来源:PSHostRawUserInterface.cs
示例10: GetBufferContents
public abstract BufferCell[,] GetBufferContents(Rectangle rectangle);
开发者ID:mauve,项目名称:Pash,代码行数:1,代码来源:PSHostRawUserInterface.cs
示例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);
}
开发者ID:40a,项目名称:PowerShell,代码行数:10,代码来源:ServerRemoteHostRawUserInterface.cs
示例12: SetBufferContents
/// <summary>
/// Set buffer contents.
/// </summary>
public override void SetBufferContents(Rectangle rectangle, BufferCell fill)
{
_serverMethodExecutor.ExecuteVoidMethod(RemoteHostMethodId.SetBufferContents1, new object[] { rectangle, fill });
}
开发者ID:40a,项目名称:PowerShell,代码行数:7,代码来源:ServerRemoteHostRawUserInterface.cs
示例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 });
}
开发者ID:40a,项目名称:PowerShell,代码行数:7,代码来源:ServerRemoteHostRawUserInterface.cs
示例14: SetBufferContents
public override void SetBufferContents(Rectangle rectangle, BufferCell fill)
{
}
开发者ID:x-cubed,项目名称:Second-Law,代码行数:3,代码来源:HostUI.cs
示例15: ScrollBufferContents
public override void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill)
{
}
开发者ID:x-cubed,项目名称:Second-Law,代码行数:3,代码来源:HostUI.cs
示例16: GetCharacterUnderCursor
/// <summary>
/// Get the character at the cursor when the user types 'tab' in the middle of line.
/// </summary>
/// <param name="cursorPosition">the cursor position where 'tab' is hit</param>
/// <returns></returns>
private char GetCharacterUnderCursor(Coordinates cursorPosition)
{
Rectangle region = new Rectangle(0, cursorPosition.Y, RawUI.BufferSize.Width - 1, cursorPosition.Y);
BufferCell[,] content = RawUI.GetBufferContents(region);
for (int index = 0, column = 0; column <= cursorPosition.X; index++)
{
BufferCell cell = content[0, index];
if (cell.BufferCellType == BufferCellType.Complete || cell.BufferCellType == BufferCellType.Leading)
{
if (column == cursorPosition.X)
{
return cell.Character;
}
column += ConsoleControl.LengthInBufferCells(cell.Character);
}
}
Dbg.Assert(false, "the character at the cursor should be retrieved, never gets to here");
return '\0';
}
开发者ID:dfinke,项目名称:powershell,代码行数:27,代码来源:ConsoleHostUserInterface.cs
示例17: GetBufferContents
/// <summary>
/// Gets the contents of the console buffer in a rectangular area.
/// </summary>
/// <param name="rectangle">The rectangle inside which buffer contents will be accessed.</param>
/// <returns>A BufferCell array with the requested buffer contents.</returns>
public override BufferCell[,] GetBufferContents(Rectangle rectangle)
{
Logger.Write(
LogLevel.Warning,
"PSHostRawUserInterface.GetBufferContents was called");
throw new System.NotImplementedException();
}
开发者ID:sunnyc7,项目名称:PowerShellEditorServices,代码行数:13,代码来源:SessionPSHostRawUserInterface.cs
示例18: SetBufferContents
public abstract void SetBufferContents(Rectangle rectangle, BufferCell fill);
开发者ID:mauve,项目名称:Pash,代码行数:1,代码来源:PSHostRawUserInterface.cs
示例19: SetBufferContents
/// <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");
}
开发者ID:sunnyc7,项目名称:PowerShellEditorServices,代码行数:13,代码来源:SessionPSHostRawUserInterface.cs
示例20: GetBufferContents
/// <summary>
/// This functionality is not currently implemented. The call fails with an exception.
/// </summary>
/// <param name="rectangle">Unused</param>
/// <returns>Returns nothing - call fails.</returns>
public override BufferCell[,] GetBufferContents(Rectangle rectangle)
{
throw new NotImplementedException("The method or operation is not implemented.");
}
开发者ID:dgrapp1,项目名称:WindowsSDK7-Samples,代码行数:9,代码来源:MyRawUserInterface.cs
注:本文中的System.Management.Automation.Host.Rectangle类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论