public void GetNextScreen(int height, int width, int x, int y, ScreenDisplayMode mode) { if (this.WhetherClose) { return; } _frameCount++; //Console.WriteLine(this.imgDesktop.Height + " | " + Width + "|" + this.Height + " | " + this.Width); if (_frameCount == 1)//使帧数更连续 { var rect = SerializePacket(new ScreenHotRectanglePack() { X = x, Y = y, Height = height, Width = width, CtrlMode = mode.ConvertTo <int>() }); for (int i = 0; i < 3; i++) { SendTo(CurrentSession, MessageHead.S_SCREEN_NEXT_SCREENBITMP, rect); } } else if (_frameCount == 3) { _frameCount = 0; } }
public void StartGetScreen(int height, int width, int x, int y, ScreenDisplayMode mode) { var rect = SerializePacket(new ScreenHotRectanglePack() { X = x, Y = y, Height = height, Width = width, CtrlMode = mode.ConvertTo <int>() }); _frameCount = 0; //第一帧不计入连续帧 for (int i = 0; i < 3; i++) { SendTo(CurrentSession, MessageHead.S_SCREEN_NEXT_SCREENBITMP, rect); } }