private void sendButton_Click(object sender, RoutedEventArgs e) { var frame = new MODBUSFrame(Int32.Parse(comboBox.Text), sendtextBox.Text, argumentTextBox.Text, "CR"); string message = frame.MakeFrame(); connectionService.SendMessage(message); string time = DateTime.Now.ToString("HH:mm:ss", System.Globalization.DateTimeFormatInfo.InvariantInfo); richTextBox.AppendText(time + " Sent OP: " + sendtextBox.Text + " ARG: " + argumentTextBox.Text + " to: " + comboBox.Text); richTextBox.AppendText(Environment.NewLine); sendtextBox.Text = string.Empty; }
private void ReplyMaster(string message) { var frame = new MODBUSFrame(-1, "REPLY: ", message, "CR"); connectionService.SendMessage(frame.MakeFrame()); }