Beispiel #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();
            }
        }
Beispiel #2
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);
        }
Beispiel #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);
        }