예제 #1
0
        // It is called when a message is received.
        private static void OnMessageReceived(object sender, TypedRequestReceivedEventArgs <MyRequest> e)
        {
            Console.WriteLine("Received: " + e.RequestMessage.Text);

            // Create the response message.
            MyResponse aResponse = new MyResponse();

            aResponse.Length = e.RequestMessage.Text.Length;

            // Send the response message back to the client.
            myReceiver.SendResponseMessage(e.ResponseReceiverId, aResponse);

            String msg = e.RequestMessage.Text;

            if (msg.Equals("Open"))
            {
                Console.WriteLine("Simulate Open Action");
                //MainWindow.simulateOpenAction();
            }
            else if (msg.Equals("Close"))
            {
                Console.WriteLine("Simulate Close Action");
                // MainWindow.simulateCloseAction();
            }
        }
예제 #2
0
파일: Program.cs 프로젝트: proinz/gragps
        // It is called when a message is received.
        private static void OnMessageReceived(object sender, TypedRequestReceivedEventArgs<MyRequest> e)
        {
            Console.WriteLine("Received: " + e.RequestMessage.Text);

            // Create the response message.
            MyResponse aResponse = new MyResponse();
            aResponse.Length = e.RequestMessage.Text.Length;

            // Send the response message back to the client.
            myReceiver.SendResponseMessage(e.ResponseReceiverId, aResponse);
        }
예제 #3
0
        // It is called when a message is received.
        private static void OnMessageReceived(object sender, TypedRequestReceivedEventArgs <MyRequest> e)
        {
            Console.WriteLine("Jumlah PC : " + e.RequestMessage.Text);
            Console.WriteLine("Waktu Mulai : " + e.RequestMessage.Text2);
            Console.WriteLine("Lama Pemakaian : " + e.RequestMessage.Text3);


            // Create the response message.
            MyResponse aResponse = new MyResponse();

            //aResponse.Length = e.RequestMessage.Text.Length;

            // Send the response message back to the client.
            myReceiver.SendResponseMessage(e.ResponseReceiverId, aResponse);
        }