diff --git a/BetterSerialMonitor/MainWindow.xaml b/BetterSerialMonitor/MainWindow.xaml
index e0e823d..5c9e832 100644
--- a/BetterSerialMonitor/MainWindow.xaml
+++ b/BetterSerialMonitor/MainWindow.xaml
@@ -96,17 +96,9 @@
+
-
-
@@ -137,6 +129,56 @@
Name="AddAsByteSequenceButton"
Click="AddAsByteSequenceButton_Click"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BetterSerialMonitor/MainWindow.xaml.cs b/BetterSerialMonitor/MainWindow.xaml.cs
index aafdc10..55f750e 100644
--- a/BetterSerialMonitor/MainWindow.xaml.cs
+++ b/BetterSerialMonitor/MainWindow.xaml.cs
@@ -77,5 +77,16 @@ private void ClearBufferButton_Click(object sender, RoutedEventArgs e)
{
MainWindowViewModel.GetInstance().ClearBuffer();
}
+
+ private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
+ {
+ DataReceivedBuffer.ScrollToEnd();
+ }
+
+ private void DataTypeAddButton_Click(object sender, RoutedEventArgs e)
+ {
+ MainWindowViewModel.GetInstance().AddAsDataType(ImmediateText.Text);
+ ImmediateText.Text = string.Empty;
+ }
}
}
diff --git a/BetterSerialMonitor/MainWindowViewModel.cs b/BetterSerialMonitor/MainWindowViewModel.cs
index 4b1d3aa..7bc1c8d 100644
--- a/BetterSerialMonitor/MainWindowViewModel.cs
+++ b/BetterSerialMonitor/MainWindowViewModel.cs
@@ -161,10 +161,30 @@ public List AvailableBaudRates
}
}
+ public List DataTypeOptions
+ {
+ get
+ {
+ return Enum.GetNames(typeof(Model.TypesToInclude)).ToList();
+ }
+ }
+
+ public List EndiannessOptions
+ {
+ get
+ {
+ return Enum.GetNames(typeof(Model.Endianness)).ToList();
+ }
+ }
+
public int SelectedPortIndex { get; set; } = 0;
public int SelectedBaudRateIndex { get; set; } = 0;
+ public int DataTypeOptionsIndex { get; set; } = 0;
+
+ public int EndiannessOptionsIndex { get; set; } = 0;
+
[ReactToModelPropertyChanged(new string[] { "CurrentMessage" })]
public string Message_ASCII
{
@@ -253,6 +273,13 @@ public void SendCurrentMessage ()
Model.GetInstance().SendCurrentMessage();
}
+ public void AddAsDataType(string text)
+ {
+ Model.TypesToInclude t = (Model.TypesToInclude) DataTypeOptionsIndex;
+ Model.Endianness end = (Model.Endianness) EndiannessOptionsIndex;
+ Model.GetInstance().AddAsDataType(text, t, end);
+ }
+
#endregion
}
}
diff --git a/BetterSerialMonitor/Model.cs b/BetterSerialMonitor/Model.cs
index e885db4..bb47d8b 100644
--- a/BetterSerialMonitor/Model.cs
+++ b/BetterSerialMonitor/Model.cs
@@ -19,6 +19,28 @@ public class Model : NotifyPropertyChangedObject
{
#region Private variables
+ public enum Endianness
+ {
+ LitteEndian,
+ BigEndian
+ }
+
+ public enum TypesToInclude
+ {
+ Bool,
+ Sbyte,
+ Byte,
+ Int16,
+ UInt16,
+ Int32,
+ UInt32,
+ Int64,
+ UInt64,
+ Float,
+ Double,
+ Decimal
+ }
+
private List _available_baud_rates = new List() { 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 74880, 115200 };
private List _current_message = new List();
@@ -34,6 +56,8 @@ public class Model : NotifyPropertyChangedObject
private SerialPort _serial_port = null;
private object _serial_port_lock = new object();
+ private int MaxBufferLength = 1000;
+
#endregion
#region Singleton class
@@ -73,7 +97,7 @@ public static Model GetInstance ()
#endregion
#region Public properties
-
+
///
/// List of available baud rates
///
@@ -166,6 +190,151 @@ public void ClearCurrentMessage()
NotifyPropertyChanged("CurrentMessage");
}
+ ///
+ /// Adds text as a specific datatype
+ ///
+ ///
+ public void AddAsDataType (string text, TypesToInclude t, Endianness e)
+ {
+ byte[] result_bytes = null;
+
+ switch (t)
+ {
+ case Model.TypesToInclude.Bool:
+
+ var bool_parse_success = bool.TryParse(text, out bool bool_result);
+ if (bool_parse_success)
+ {
+ result_bytes = BitConverter.GetBytes(bool_result);
+ }
+
+ break;
+ case Model.TypesToInclude.Sbyte:
+
+ var sbyte_parse_success = sbyte.TryParse(text, out sbyte sbyte_result);
+ if (sbyte_parse_success)
+ {
+ unchecked
+ {
+ result_bytes = new byte[] { (byte)sbyte_result };
+ }
+ }
+
+ break;
+ case Model.TypesToInclude.Byte:
+
+ var byte_parse_success = byte.TryParse(text, out byte byte_result);
+ if (byte_parse_success)
+ {
+ result_bytes = new byte[] { byte_result };
+ }
+
+ break;
+ case Model.TypesToInclude.Int16:
+
+ var short_parse_success = Int16.TryParse(text, out Int16 short_result);
+ if (short_parse_success)
+ {
+ result_bytes = BitConverter.GetBytes(short_result);
+ }
+
+ break;
+ case Model.TypesToInclude.UInt16:
+
+ var ushort_parse_success = UInt16.TryParse(text, out UInt16 ushort_result);
+ if (ushort_parse_success)
+ {
+ result_bytes = BitConverter.GetBytes(ushort_result);
+ }
+
+ break;
+ case Model.TypesToInclude.Int32:
+
+ var int_parse_success = Int32.TryParse(text, out Int32 int_result);
+ if (int_parse_success)
+ {
+ result_bytes = BitConverter.GetBytes(int_result);
+ }
+
+ break;
+ case Model.TypesToInclude.UInt32:
+
+ var uint_parse_success = UInt32.TryParse(text, out UInt32 uint_result);
+ if (uint_parse_success)
+ {
+ result_bytes = BitConverter.GetBytes(uint_result);
+ }
+
+ break;
+ case Model.TypesToInclude.Int64:
+
+ var long_parse_success = Int64.TryParse(text, out Int64 long_result);
+ if (long_parse_success)
+ {
+ result_bytes = BitConverter.GetBytes(long_result);
+ }
+
+ break;
+ case Model.TypesToInclude.UInt64:
+
+ var ulong_parse_success = UInt64.TryParse(text, out UInt64 ulong_result);
+ if (ulong_parse_success)
+ {
+ result_bytes = BitConverter.GetBytes(ulong_result);
+ }
+
+ break;
+ case Model.TypesToInclude.Float:
+
+ var float_parse_success = Single.TryParse(text, out Single single_result);
+ if (float_parse_success)
+ {
+ result_bytes = BitConverter.GetBytes(single_result);
+ }
+
+ break;
+ case Model.TypesToInclude.Double:
+
+ var double_parse_success = Double.TryParse(text, out Double double_result);
+ if (double_parse_success)
+ {
+ result_bytes = BitConverter.GetBytes(double_result);
+ }
+
+ break;
+ case Model.TypesToInclude.Decimal:
+
+ var decimal_parse_success = Decimal.TryParse(text, out Decimal decimal_result);
+ if (decimal_parse_success)
+ {
+ Int32[] bits = decimal.GetBits(decimal_result);
+ List b = new List();
+ foreach (Int32 i in bits)
+ {
+ b.AddRange(BitConverter.GetBytes(i));
+ }
+
+ result_bytes = b.ToArray();
+ }
+
+ break;
+
+ }
+
+ if (result_bytes != null)
+ {
+ if ((BitConverter.IsLittleEndian && e == Endianness.BigEndian) ||
+ (!BitConverter.IsLittleEndian && e == Endianness.LitteEndian))
+ {
+ result_bytes = result_bytes.Reverse().ToArray();
+ }
+
+ CurrentMessage.AddRange(result_bytes);
+ }
+
+ NotifyPropertyChanged("CurrentMessage");
+ }
+
///
/// Adds text to the current message
///
@@ -376,6 +545,10 @@ private void Read_serial_data_worker_DoWork(object sender, DoWorkEventArgs e)
{
var input_data = _serial_port.ReadExisting();
CurrentReceiveBuffer += input_data;
+ if (CurrentReceiveBuffer.Length > MaxBufferLength)
+ {
+ CurrentReceiveBuffer = CurrentReceiveBuffer.Substring(CurrentReceiveBuffer.Length - MaxBufferLength);
+ }
}
}
diff --git a/BetterSerialMonitor/bin/Debug/BetterSerialMonitor.exe b/BetterSerialMonitor/bin/Debug/BetterSerialMonitor.exe
index 3d2e0f5..ab2b632 100644
Binary files a/BetterSerialMonitor/bin/Debug/BetterSerialMonitor.exe and b/BetterSerialMonitor/bin/Debug/BetterSerialMonitor.exe differ
diff --git a/BetterSerialMonitor/bin/Debug/BetterSerialMonitor.pdb b/BetterSerialMonitor/bin/Debug/BetterSerialMonitor.pdb
index 4573b91..5f30374 100644
Binary files a/BetterSerialMonitor/bin/Debug/BetterSerialMonitor.pdb and b/BetterSerialMonitor/bin/Debug/BetterSerialMonitor.pdb differ
diff --git a/BetterSerialMonitor/bin/Release/BetterSerialMonitor.exe b/BetterSerialMonitor/bin/Release/BetterSerialMonitor.exe
index 79bd80f..3ac7ec2 100644
Binary files a/BetterSerialMonitor/bin/Release/BetterSerialMonitor.exe and b/BetterSerialMonitor/bin/Release/BetterSerialMonitor.exe differ
diff --git a/BetterSerialMonitor/bin/Release/BetterSerialMonitor.pdb b/BetterSerialMonitor/bin/Release/BetterSerialMonitor.pdb
index f45dfb6..4ca9856 100644
Binary files a/BetterSerialMonitor/bin/Release/BetterSerialMonitor.pdb and b/BetterSerialMonitor/bin/Release/BetterSerialMonitor.pdb differ
diff --git a/BetterSerialMonitor/obj/Debug/BetterSerialMonitor.exe b/BetterSerialMonitor/obj/Debug/BetterSerialMonitor.exe
index 3d2e0f5..ab2b632 100644
Binary files a/BetterSerialMonitor/obj/Debug/BetterSerialMonitor.exe and b/BetterSerialMonitor/obj/Debug/BetterSerialMonitor.exe differ
diff --git a/BetterSerialMonitor/obj/Debug/BetterSerialMonitor.g.resources b/BetterSerialMonitor/obj/Debug/BetterSerialMonitor.g.resources
index 2b33a76..cd0a256 100644
Binary files a/BetterSerialMonitor/obj/Debug/BetterSerialMonitor.g.resources and b/BetterSerialMonitor/obj/Debug/BetterSerialMonitor.g.resources differ
diff --git a/BetterSerialMonitor/obj/Debug/BetterSerialMonitor.pdb b/BetterSerialMonitor/obj/Debug/BetterSerialMonitor.pdb
index 4573b91..5f30374 100644
Binary files a/BetterSerialMonitor/obj/Debug/BetterSerialMonitor.pdb and b/BetterSerialMonitor/obj/Debug/BetterSerialMonitor.pdb differ
diff --git a/BetterSerialMonitor/obj/Debug/MainWindow.baml b/BetterSerialMonitor/obj/Debug/MainWindow.baml
index 8767100..85338fd 100644
Binary files a/BetterSerialMonitor/obj/Debug/MainWindow.baml and b/BetterSerialMonitor/obj/Debug/MainWindow.baml differ
diff --git a/BetterSerialMonitor/obj/Debug/MainWindow.g.cs b/BetterSerialMonitor/obj/Debug/MainWindow.g.cs
index 1756d9f..7a508b8 100644
--- a/BetterSerialMonitor/obj/Debug/MainWindow.g.cs
+++ b/BetterSerialMonitor/obj/Debug/MainWindow.g.cs
@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "F13B0A9DE294832DEAC5795340EFE44E24111023"
+#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "7C7D1DCD24A5C5C78AB1B8E35D4839597AEC2F65"
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
@@ -57,7 +57,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 117 "..\..\MainWindow.xaml"
+ #line 109 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox ImmediateText;
@@ -65,7 +65,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 123 "..\..\MainWindow.xaml"
+ #line 115 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button SendImmediatelyButton;
@@ -73,7 +73,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 130 "..\..\MainWindow.xaml"
+ #line 122 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button AddToMessageButton;
@@ -81,7 +81,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 137 "..\..\MainWindow.xaml"
+ #line 129 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button AddAsByteSequenceButton;
@@ -89,7 +89,15 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 198 "..\..\MainWindow.xaml"
+ #line 166 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.Button DataTypeAddButton;
+
+ #line default
+ #line hidden
+
+
+ #line 240 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button ClearMessageButton;
@@ -97,7 +105,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 203 "..\..\MainWindow.xaml"
+ #line 245 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button SendMessageButton;
@@ -105,7 +113,15 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 231 "..\..\MainWindow.xaml"
+ #line 265 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.TextBox DataReceivedBuffer;
+
+ #line default
+ #line hidden
+
+
+ #line 293 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button ClearBufferButton;
@@ -166,7 +182,7 @@ void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object
case 4:
this.SendImmediatelyButton = ((System.Windows.Controls.Button)(target));
- #line 124 "..\..\MainWindow.xaml"
+ #line 116 "..\..\MainWindow.xaml"
this.SendImmediatelyButton.Click += new System.Windows.RoutedEventHandler(this.SendImmediatelyButton_Click);
#line default
@@ -175,7 +191,7 @@ void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object
case 5:
this.AddToMessageButton = ((System.Windows.Controls.Button)(target));
- #line 131 "..\..\MainWindow.xaml"
+ #line 123 "..\..\MainWindow.xaml"
this.AddToMessageButton.Click += new System.Windows.RoutedEventHandler(this.AddToMessageButton_Click);
#line default
@@ -184,34 +200,52 @@ void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object
case 6:
this.AddAsByteSequenceButton = ((System.Windows.Controls.Button)(target));
- #line 138 "..\..\MainWindow.xaml"
+ #line 130 "..\..\MainWindow.xaml"
this.AddAsByteSequenceButton.Click += new System.Windows.RoutedEventHandler(this.AddAsByteSequenceButton_Click);
#line default
#line hidden
return;
case 7:
+ this.DataTypeAddButton = ((System.Windows.Controls.Button)(target));
+
+ #line 167 "..\..\MainWindow.xaml"
+ this.DataTypeAddButton.Click += new System.Windows.RoutedEventHandler(this.DataTypeAddButton_Click);
+
+ #line default
+ #line hidden
+ return;
+ case 8:
this.ClearMessageButton = ((System.Windows.Controls.Button)(target));
- #line 199 "..\..\MainWindow.xaml"
+ #line 241 "..\..\MainWindow.xaml"
this.ClearMessageButton.Click += new System.Windows.RoutedEventHandler(this.ClearMessageButton_Click);
#line default
#line hidden
return;
- case 8:
+ case 9:
this.SendMessageButton = ((System.Windows.Controls.Button)(target));
- #line 204 "..\..\MainWindow.xaml"
+ #line 246 "..\..\MainWindow.xaml"
this.SendMessageButton.Click += new System.Windows.RoutedEventHandler(this.SendMessageButton_Click);
#line default
#line hidden
return;
- case 9:
+ case 10:
+ this.DataReceivedBuffer = ((System.Windows.Controls.TextBox)(target));
+
+ #line 264 "..\..\MainWindow.xaml"
+ this.DataReceivedBuffer.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextBox_TextChanged);
+
+ #line default
+ #line hidden
+ return;
+ case 11:
this.ClearBufferButton = ((System.Windows.Controls.Button)(target));
- #line 232 "..\..\MainWindow.xaml"
+ #line 294 "..\..\MainWindow.xaml"
this.ClearBufferButton.Click += new System.Windows.RoutedEventHandler(this.ClearBufferButton_Click);
#line default
diff --git a/BetterSerialMonitor/obj/Debug/MainWindow.g.i.cs b/BetterSerialMonitor/obj/Debug/MainWindow.g.i.cs
index 1756d9f..7a508b8 100644
--- a/BetterSerialMonitor/obj/Debug/MainWindow.g.i.cs
+++ b/BetterSerialMonitor/obj/Debug/MainWindow.g.i.cs
@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "F13B0A9DE294832DEAC5795340EFE44E24111023"
+#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "7C7D1DCD24A5C5C78AB1B8E35D4839597AEC2F65"
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
@@ -57,7 +57,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 117 "..\..\MainWindow.xaml"
+ #line 109 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox ImmediateText;
@@ -65,7 +65,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 123 "..\..\MainWindow.xaml"
+ #line 115 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button SendImmediatelyButton;
@@ -73,7 +73,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 130 "..\..\MainWindow.xaml"
+ #line 122 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button AddToMessageButton;
@@ -81,7 +81,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 137 "..\..\MainWindow.xaml"
+ #line 129 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button AddAsByteSequenceButton;
@@ -89,7 +89,15 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 198 "..\..\MainWindow.xaml"
+ #line 166 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.Button DataTypeAddButton;
+
+ #line default
+ #line hidden
+
+
+ #line 240 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button ClearMessageButton;
@@ -97,7 +105,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 203 "..\..\MainWindow.xaml"
+ #line 245 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button SendMessageButton;
@@ -105,7 +113,15 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 231 "..\..\MainWindow.xaml"
+ #line 265 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.TextBox DataReceivedBuffer;
+
+ #line default
+ #line hidden
+
+
+ #line 293 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button ClearBufferButton;
@@ -166,7 +182,7 @@ void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object
case 4:
this.SendImmediatelyButton = ((System.Windows.Controls.Button)(target));
- #line 124 "..\..\MainWindow.xaml"
+ #line 116 "..\..\MainWindow.xaml"
this.SendImmediatelyButton.Click += new System.Windows.RoutedEventHandler(this.SendImmediatelyButton_Click);
#line default
@@ -175,7 +191,7 @@ void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object
case 5:
this.AddToMessageButton = ((System.Windows.Controls.Button)(target));
- #line 131 "..\..\MainWindow.xaml"
+ #line 123 "..\..\MainWindow.xaml"
this.AddToMessageButton.Click += new System.Windows.RoutedEventHandler(this.AddToMessageButton_Click);
#line default
@@ -184,34 +200,52 @@ void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object
case 6:
this.AddAsByteSequenceButton = ((System.Windows.Controls.Button)(target));
- #line 138 "..\..\MainWindow.xaml"
+ #line 130 "..\..\MainWindow.xaml"
this.AddAsByteSequenceButton.Click += new System.Windows.RoutedEventHandler(this.AddAsByteSequenceButton_Click);
#line default
#line hidden
return;
case 7:
+ this.DataTypeAddButton = ((System.Windows.Controls.Button)(target));
+
+ #line 167 "..\..\MainWindow.xaml"
+ this.DataTypeAddButton.Click += new System.Windows.RoutedEventHandler(this.DataTypeAddButton_Click);
+
+ #line default
+ #line hidden
+ return;
+ case 8:
this.ClearMessageButton = ((System.Windows.Controls.Button)(target));
- #line 199 "..\..\MainWindow.xaml"
+ #line 241 "..\..\MainWindow.xaml"
this.ClearMessageButton.Click += new System.Windows.RoutedEventHandler(this.ClearMessageButton_Click);
#line default
#line hidden
return;
- case 8:
+ case 9:
this.SendMessageButton = ((System.Windows.Controls.Button)(target));
- #line 204 "..\..\MainWindow.xaml"
+ #line 246 "..\..\MainWindow.xaml"
this.SendMessageButton.Click += new System.Windows.RoutedEventHandler(this.SendMessageButton_Click);
#line default
#line hidden
return;
- case 9:
+ case 10:
+ this.DataReceivedBuffer = ((System.Windows.Controls.TextBox)(target));
+
+ #line 264 "..\..\MainWindow.xaml"
+ this.DataReceivedBuffer.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextBox_TextChanged);
+
+ #line default
+ #line hidden
+ return;
+ case 11:
this.ClearBufferButton = ((System.Windows.Controls.Button)(target));
- #line 232 "..\..\MainWindow.xaml"
+ #line 294 "..\..\MainWindow.xaml"
this.ClearBufferButton.Click += new System.Windows.RoutedEventHandler(this.ClearBufferButton_Click);
#line default
diff --git a/BetterSerialMonitor/obj/Release/BetterSerialMonitor.exe b/BetterSerialMonitor/obj/Release/BetterSerialMonitor.exe
index 79bd80f..3ac7ec2 100644
Binary files a/BetterSerialMonitor/obj/Release/BetterSerialMonitor.exe and b/BetterSerialMonitor/obj/Release/BetterSerialMonitor.exe differ
diff --git a/BetterSerialMonitor/obj/Release/BetterSerialMonitor.g.resources b/BetterSerialMonitor/obj/Release/BetterSerialMonitor.g.resources
index 3162691..8a05fe4 100644
Binary files a/BetterSerialMonitor/obj/Release/BetterSerialMonitor.g.resources and b/BetterSerialMonitor/obj/Release/BetterSerialMonitor.g.resources differ
diff --git a/BetterSerialMonitor/obj/Release/BetterSerialMonitor.pdb b/BetterSerialMonitor/obj/Release/BetterSerialMonitor.pdb
index f45dfb6..4ca9856 100644
Binary files a/BetterSerialMonitor/obj/Release/BetterSerialMonitor.pdb and b/BetterSerialMonitor/obj/Release/BetterSerialMonitor.pdb differ
diff --git a/BetterSerialMonitor/obj/Release/DesignTimeResolveAssemblyReferences.cache b/BetterSerialMonitor/obj/Release/DesignTimeResolveAssemblyReferences.cache
new file mode 100644
index 0000000..d3308c9
Binary files /dev/null and b/BetterSerialMonitor/obj/Release/DesignTimeResolveAssemblyReferences.cache differ
diff --git a/BetterSerialMonitor/obj/Release/MainWindow.baml b/BetterSerialMonitor/obj/Release/MainWindow.baml
index 5be90b9..4282055 100644
Binary files a/BetterSerialMonitor/obj/Release/MainWindow.baml and b/BetterSerialMonitor/obj/Release/MainWindow.baml differ
diff --git a/BetterSerialMonitor/obj/Release/MainWindow.g.cs b/BetterSerialMonitor/obj/Release/MainWindow.g.cs
index 1756d9f..7a508b8 100644
--- a/BetterSerialMonitor/obj/Release/MainWindow.g.cs
+++ b/BetterSerialMonitor/obj/Release/MainWindow.g.cs
@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "F13B0A9DE294832DEAC5795340EFE44E24111023"
+#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "7C7D1DCD24A5C5C78AB1B8E35D4839597AEC2F65"
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
@@ -57,7 +57,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 117 "..\..\MainWindow.xaml"
+ #line 109 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox ImmediateText;
@@ -65,7 +65,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 123 "..\..\MainWindow.xaml"
+ #line 115 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button SendImmediatelyButton;
@@ -73,7 +73,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 130 "..\..\MainWindow.xaml"
+ #line 122 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button AddToMessageButton;
@@ -81,7 +81,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 137 "..\..\MainWindow.xaml"
+ #line 129 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button AddAsByteSequenceButton;
@@ -89,7 +89,15 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 198 "..\..\MainWindow.xaml"
+ #line 166 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.Button DataTypeAddButton;
+
+ #line default
+ #line hidden
+
+
+ #line 240 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button ClearMessageButton;
@@ -97,7 +105,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 203 "..\..\MainWindow.xaml"
+ #line 245 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button SendMessageButton;
@@ -105,7 +113,15 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 231 "..\..\MainWindow.xaml"
+ #line 265 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.TextBox DataReceivedBuffer;
+
+ #line default
+ #line hidden
+
+
+ #line 293 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button ClearBufferButton;
@@ -166,7 +182,7 @@ void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object
case 4:
this.SendImmediatelyButton = ((System.Windows.Controls.Button)(target));
- #line 124 "..\..\MainWindow.xaml"
+ #line 116 "..\..\MainWindow.xaml"
this.SendImmediatelyButton.Click += new System.Windows.RoutedEventHandler(this.SendImmediatelyButton_Click);
#line default
@@ -175,7 +191,7 @@ void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object
case 5:
this.AddToMessageButton = ((System.Windows.Controls.Button)(target));
- #line 131 "..\..\MainWindow.xaml"
+ #line 123 "..\..\MainWindow.xaml"
this.AddToMessageButton.Click += new System.Windows.RoutedEventHandler(this.AddToMessageButton_Click);
#line default
@@ -184,34 +200,52 @@ void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object
case 6:
this.AddAsByteSequenceButton = ((System.Windows.Controls.Button)(target));
- #line 138 "..\..\MainWindow.xaml"
+ #line 130 "..\..\MainWindow.xaml"
this.AddAsByteSequenceButton.Click += new System.Windows.RoutedEventHandler(this.AddAsByteSequenceButton_Click);
#line default
#line hidden
return;
case 7:
+ this.DataTypeAddButton = ((System.Windows.Controls.Button)(target));
+
+ #line 167 "..\..\MainWindow.xaml"
+ this.DataTypeAddButton.Click += new System.Windows.RoutedEventHandler(this.DataTypeAddButton_Click);
+
+ #line default
+ #line hidden
+ return;
+ case 8:
this.ClearMessageButton = ((System.Windows.Controls.Button)(target));
- #line 199 "..\..\MainWindow.xaml"
+ #line 241 "..\..\MainWindow.xaml"
this.ClearMessageButton.Click += new System.Windows.RoutedEventHandler(this.ClearMessageButton_Click);
#line default
#line hidden
return;
- case 8:
+ case 9:
this.SendMessageButton = ((System.Windows.Controls.Button)(target));
- #line 204 "..\..\MainWindow.xaml"
+ #line 246 "..\..\MainWindow.xaml"
this.SendMessageButton.Click += new System.Windows.RoutedEventHandler(this.SendMessageButton_Click);
#line default
#line hidden
return;
- case 9:
+ case 10:
+ this.DataReceivedBuffer = ((System.Windows.Controls.TextBox)(target));
+
+ #line 264 "..\..\MainWindow.xaml"
+ this.DataReceivedBuffer.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextBox_TextChanged);
+
+ #line default
+ #line hidden
+ return;
+ case 11:
this.ClearBufferButton = ((System.Windows.Controls.Button)(target));
- #line 232 "..\..\MainWindow.xaml"
+ #line 294 "..\..\MainWindow.xaml"
this.ClearBufferButton.Click += new System.Windows.RoutedEventHandler(this.ClearBufferButton_Click);
#line default
diff --git a/BetterSerialMonitor/obj/Release/MainWindow.g.i.cs b/BetterSerialMonitor/obj/Release/MainWindow.g.i.cs
index 1756d9f..7a508b8 100644
--- a/BetterSerialMonitor/obj/Release/MainWindow.g.i.cs
+++ b/BetterSerialMonitor/obj/Release/MainWindow.g.i.cs
@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "F13B0A9DE294832DEAC5795340EFE44E24111023"
+#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "7C7D1DCD24A5C5C78AB1B8E35D4839597AEC2F65"
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
@@ -57,7 +57,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 117 "..\..\MainWindow.xaml"
+ #line 109 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox ImmediateText;
@@ -65,7 +65,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 123 "..\..\MainWindow.xaml"
+ #line 115 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button SendImmediatelyButton;
@@ -73,7 +73,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 130 "..\..\MainWindow.xaml"
+ #line 122 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button AddToMessageButton;
@@ -81,7 +81,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 137 "..\..\MainWindow.xaml"
+ #line 129 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button AddAsByteSequenceButton;
@@ -89,7 +89,15 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 198 "..\..\MainWindow.xaml"
+ #line 166 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.Button DataTypeAddButton;
+
+ #line default
+ #line hidden
+
+
+ #line 240 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button ClearMessageButton;
@@ -97,7 +105,7 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 203 "..\..\MainWindow.xaml"
+ #line 245 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button SendMessageButton;
@@ -105,7 +113,15 @@ public partial class MainWindow : System.Windows.Window, System.Windows.Markup.I
#line hidden
- #line 231 "..\..\MainWindow.xaml"
+ #line 265 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.TextBox DataReceivedBuffer;
+
+ #line default
+ #line hidden
+
+
+ #line 293 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button ClearBufferButton;
@@ -166,7 +182,7 @@ void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object
case 4:
this.SendImmediatelyButton = ((System.Windows.Controls.Button)(target));
- #line 124 "..\..\MainWindow.xaml"
+ #line 116 "..\..\MainWindow.xaml"
this.SendImmediatelyButton.Click += new System.Windows.RoutedEventHandler(this.SendImmediatelyButton_Click);
#line default
@@ -175,7 +191,7 @@ void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object
case 5:
this.AddToMessageButton = ((System.Windows.Controls.Button)(target));
- #line 131 "..\..\MainWindow.xaml"
+ #line 123 "..\..\MainWindow.xaml"
this.AddToMessageButton.Click += new System.Windows.RoutedEventHandler(this.AddToMessageButton_Click);
#line default
@@ -184,34 +200,52 @@ void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object
case 6:
this.AddAsByteSequenceButton = ((System.Windows.Controls.Button)(target));
- #line 138 "..\..\MainWindow.xaml"
+ #line 130 "..\..\MainWindow.xaml"
this.AddAsByteSequenceButton.Click += new System.Windows.RoutedEventHandler(this.AddAsByteSequenceButton_Click);
#line default
#line hidden
return;
case 7:
+ this.DataTypeAddButton = ((System.Windows.Controls.Button)(target));
+
+ #line 167 "..\..\MainWindow.xaml"
+ this.DataTypeAddButton.Click += new System.Windows.RoutedEventHandler(this.DataTypeAddButton_Click);
+
+ #line default
+ #line hidden
+ return;
+ case 8:
this.ClearMessageButton = ((System.Windows.Controls.Button)(target));
- #line 199 "..\..\MainWindow.xaml"
+ #line 241 "..\..\MainWindow.xaml"
this.ClearMessageButton.Click += new System.Windows.RoutedEventHandler(this.ClearMessageButton_Click);
#line default
#line hidden
return;
- case 8:
+ case 9:
this.SendMessageButton = ((System.Windows.Controls.Button)(target));
- #line 204 "..\..\MainWindow.xaml"
+ #line 246 "..\..\MainWindow.xaml"
this.SendMessageButton.Click += new System.Windows.RoutedEventHandler(this.SendMessageButton_Click);
#line default
#line hidden
return;
- case 9:
+ case 10:
+ this.DataReceivedBuffer = ((System.Windows.Controls.TextBox)(target));
+
+ #line 264 "..\..\MainWindow.xaml"
+ this.DataReceivedBuffer.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextBox_TextChanged);
+
+ #line default
+ #line hidden
+ return;
+ case 11:
this.ClearBufferButton = ((System.Windows.Controls.Button)(target));
- #line 232 "..\..\MainWindow.xaml"
+ #line 294 "..\..\MainWindow.xaml"
this.ClearBufferButton.Click += new System.Windows.RoutedEventHandler(this.ClearBufferButton_Click);
#line default