예제 #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            RemoteInputDevice rid = new RemoteInputDevice();


            /*
             * rid.leftClick(100,100);
             * Thread.Sleep(1000);
             * rid.rightClick(200, 200);
             * Thread.Sleep(1000);
             * rid.middleClick(300, 300);
             * Thread.Sleep(1000);
             * //Thread.Sleep(5000);
             * //rid.typing();*/
            /*
             * rid.setMouseCursor(100, 100);//指定された場所にマウスカーソルを移動する。
             *
             * Thread.Sleep(5000);//5秒間処理を中断する。この間にメモ帳などを開いて入力場所にカーソルを合わせるとよい。
             * rid.typing("T");
             * rid.typing("E");
             * rid.typing("S");
             * rid.typing("T");*/


            sc = new ServerConnector(this);

            sc.createWebSocket();
            sc.sendMsg(ServerConnector.MessageType.CREATE);
        }
예제 #2
0
        private void type_keyDown(JObject json)
        {
            RemoteInputDevice rid = new RemoteInputDevice();

            rid.typing(json.GetValue("key").ToString());

            /* //バグあり
             * //Modifiedキーがあるかどうかで分ける。
             * bool modFlagShift =(bool)json.GetValue("shift");
             * //bool modFlagShift = (bool)json.GetValue("ctrl");
             * //bool modFlagShift = (bool)json.GetValue("alt");
             * RemoteInputDevice rid = new RemoteInputDevice();
             * if (modFlagShift == false)
             * {
             *   rid.typing(json.GetValue("key").ToString());
             * }
             * else
             * {
             *   rid.typingModifireKey(json.GetValue("key").ToString(), "");
             * }*/
        }
예제 #3
0
        private void type_mouseUp(JObject json)
        {
            RemoteInputDevice rid = new RemoteInputDevice();

            string mouseButton = json.GetValue("button").ToString();

            switch (mouseButton)
            {
            case "right":
                rid.rightUp(int.Parse(json.GetValue("x").ToString()), int.Parse(json.GetValue("y").ToString()));
                break;

            case "left":
                rid.leftUp(int.Parse(json.GetValue("x").ToString()), int.Parse(json.GetValue("y").ToString()));

                break;

            default:
                break;
            }
        }
예제 #4
0
        private void type_mouseMove(JObject json)
        {
            RemoteInputDevice rid = new RemoteInputDevice();

            rid.setMouseCursor(int.Parse(json.GetValue("x").ToString()), int.Parse(json.GetValue("y").ToString()));
        }