diff --git a/MessageCommunicator.TestGui/Views/_ConnectionProfile/ConnectionProfileView.xaml b/MessageCommunicator.TestGui/Views/_ConnectionProfile/ConnectionProfileView.xaml
index 4f76f3e..e4f5425 100644
--- a/MessageCommunicator.TestGui/Views/_ConnectionProfile/ConnectionProfileView.xaml
+++ b/MessageCommunicator.TestGui/Views/_ConnectionProfile/ConnectionProfileView.xaml
@@ -16,6 +16,10 @@
Margin="3"
Command="{Binding Path=Command_SendMessage}"
CommandParameter="{Binding #TxtSendMessage.Text}" />
+
diff --git a/MessageCommunicator.TestGui/Views/_ConnectionProfile/ConnectionProfileViewModel.cs b/MessageCommunicator.TestGui/Views/_ConnectionProfile/ConnectionProfileViewModel.cs
index c6d3ec3..b426bf6 100644
--- a/MessageCommunicator.TestGui/Views/_ConnectionProfile/ConnectionProfileViewModel.cs
+++ b/MessageCommunicator.TestGui/Views/_ConnectionProfile/ConnectionProfileViewModel.cs
@@ -1,6 +1,6 @@
using System;
-using System.Collections.ObjectModel;
using System.Reactive;
+using System.Text.RegularExpressions;
using MessageCommunicator.TestGui.Logic;
using ReactiveUI;
@@ -39,6 +39,10 @@ public bool IsRunning
public bool CanStop => this.IsRunning;
+ public SendFormattingMode SendFormattingMode { get; set; }
+
+ public SendFormattingMode[] SendFormattingModeList => (SendFormattingMode[])Enum.GetValues(typeof(SendFormattingMode));
+
public ConnectionState State
{
get => _connState;
@@ -96,7 +100,8 @@ public ConnectionProfileViewModel(ConnectionProfile connProfile)
try
{
if (message == null) { message = string.Empty; }
- await this.Model.SendMessageAsync(message);
+ await this.Model.SendMessageAsync(
+ Regex.Unescape(message));
}
catch (Exception e)
{
diff --git a/MessageCommunicator.TestGui/Views/_ConnectionProfile/_Misc.cs b/MessageCommunicator.TestGui/Views/_ConnectionProfile/_Misc.cs
new file mode 100644
index 0000000..f8d0461
--- /dev/null
+++ b/MessageCommunicator.TestGui/Views/_ConnectionProfile/_Misc.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace MessageCommunicator.TestGui.Views
+{
+ public enum SendFormattingMode
+ {
+ Plain,
+
+ Escaped,
+
+ Hex
+ }
+}