/// <summary> /// Send instruction message to the client to trigger interaction. /// </summary> /// <param name="config">The configuration of the instructions to be sent.</param> public static void SendInstruction(RdpeiSUTControlConfig config) { Bitmap img = new Bitmap(config.width, config.height); Graphics graph = Graphics.FromImage(img); if (config.instructions != null) { foreach (RdpeiSUTControlInstruction i in config.instructions) { graph.DrawString(i.text, i.font, new SolidBrush(Color.White), i.left, i.top, new StringFormat()); } } ushort left = (ushort)((rdpbcgrAdapter.CapabilitySetting.DesktopWidth - config.width) / 2); ushort top = (ushort)((rdpbcgrAdapter.CapabilitySetting.DesktopHeight - config.height) / 2); SendImageToClient(img, left, top, 0); }