/// <summary> /// Window Manipulation - Performs a variety of actions relating to the window, /// such as moving the window position, resizing the window, querying /// window state, forcing the window to repaint, etc. /// This is kept separate from the input version, as there may be /// codes that are supported in one direction but not the other. /// </summary> /// <param name="type"></param> /// <param name="parameter1"></param> /// <param name="parameter2"></param> private void PerformWindowManipulation(WindowManipulationType type, int parameter1, int parameter2) { }
/// <summary> /// CSI状态解析完毕,开始执行CSI对应的动作 /// </summary> /// <param name="ch">Final Byte</param> private void ActionCSIDispatch(int finalByte, List <int> parameters) { CSIActionCodes code = (CSIActionCodes)finalByte; switch (code) { case CSIActionCodes.SGR_SetGraphicsRendition: { // Modifies the graphical rendering options applied to the next characters written into the buffer. // Options include colors, invert, underlines, and other "font style" type options. this.PerformSetGraphicsRendition(parameters); break; } case CSIActionCodes.DECRST_PrivateModeReset: { this.PerformDECPrivateMode(parameters, false); break; } case CSIActionCodes.DECSET_PrivateModeSet: { this.PerformDECPrivateMode(parameters, true); break; } case CSIActionCodes.HVP_HorizontalVerticalPosition: case CSIActionCodes.CUP_CursorPosition: { int row = parameters[0]; int col = parameters[1]; this.NotifyActionEvent(VTActions.CursorPosition, row, col); break; } case CSIActionCodes.CUF_CursorForward: { this.NotifyActionEvent(VTActions.CursorForword, parameters[0]); break; } case CSIActionCodes.DTTERM_WindowManipulation: { WindowManipulationType wmt = (WindowManipulationType)parameters[0]; this.PerformWindowManipulation(wmt, parameters[1], parameters[2]); break; } case CSIActionCodes.DECSTBM_SetScrollingRegion: { int topMargin = parameters[0]; int bottomMargin = parameters[1]; break; } case CSIActionCodes.EL_EraseLine: { this.PerformEraseLine(parameters); break; } default: logger.WarnFormat("未实现CSIAction, {0}", finalByte); break; } }