private void buttonSendData_Click(object sender, RoutedEventArgs e) { WebifiDataToSend dataToSend = new WebifiDataToSend(); dataToSend.dataForSending = Webifi.ConvertStringToByteArray(textboxSendData.Text); webifiControl.SendData(dataToSend); }
private void buttonSend_Click(object sender, EventArgs e) { WebifiDataToSend sendData = new WebifiDataToSend(); //convert the string to a byte array for sending. sendData.dataForSending = Encoding.UTF8.GetBytes(textBoxSend.Text); sendData.dataType = "Test data"; //optional field webifiControl.SendData(sendData); }