Esempio n. 1
0
        private void listBoxVirtualCardboardDevices_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (listBoxVirtualCardboardDevices.Items.Count <= 0)
            {
                return;
            }

            int selectedIndex = listBoxVirtualCardboardDevices.SelectedIndex;

            var helloMessageData = (IHelloMessageData)(VirtualCardboardDevicesList[selectedIndex].RecievedMessage.Data);
            var remoteAddress    = new IPEndPoint(helloMessageData.GetAdress(), helloMessageData.GetPort());

            var msg = Message.CreatePingMessage();

            CardBoardInterface.WriteDataBytes(Message2BytesComposer.ComposeMessageBytes(msg), remoteAddress);
        }
Esempio n. 2
0
        private void buttonPing_Click(object sender, EventArgs e)
        {
            lock (SyncStatus)
            {
                var helloMessageData = (IHelloMessageData)(DeviceHelloMessage.RecievedMessage.Data);
                var remoteAddress    = new IPEndPoint(helloMessageData.GetAdress(), helloMessageData.GetPort());

                var msg = Message.CreatePingMessage();
                CardBoardInterface.WriteDataBytes(Message2BytesComposer.ComposeMessageBytes(msg), remoteAddress);

                _SendModeSettings();
                _SendSettingsRequet();
            }
        }