From b4682a3abfe299c19b24752b2fb1ce2477611ec3 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Fri, 10 Apr 2020 15:06:42 +0300 Subject: Implemented FSE/PPC Logs. --- .../Tango.SharedUI/Components/BindingProxy.cs | 31 ++++++++++++++++++++++ .../Converters/StringToOneLineConverter.cs | 4 +-- .../Tango.SharedUI/Tango.SharedUI.csproj | 3 ++- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 Software/Visual_Studio/Tango.SharedUI/Components/BindingProxy.cs (limited to 'Software/Visual_Studio/Tango.SharedUI') diff --git a/Software/Visual_Studio/Tango.SharedUI/Components/BindingProxy.cs b/Software/Visual_Studio/Tango.SharedUI/Components/BindingProxy.cs new file mode 100644 index 000000000..e13436900 --- /dev/null +++ b/Software/Visual_Studio/Tango.SharedUI/Components/BindingProxy.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; + +namespace Tango.SharedUI.Components +{ + public class BindingProxy : Freezable + { + #region Overrides of Freezable + + protected override Freezable CreateInstanceCore() + { + return new BindingProxy(); + } + + #endregion + + public object Data + { + get { return (object)GetValue(DataProperty); } + set { SetValue(DataProperty, value); } + } + + public static readonly DependencyProperty DataProperty = + DependencyProperty.Register("Data", typeof(object), + typeof(BindingProxy)); + } +} diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/StringToOneLineConverter.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/StringToOneLineConverter.cs index d130ebaaf..e1255ef13 100644 --- a/Software/Visual_Studio/Tango.SharedUI/Converters/StringToOneLineConverter.cs +++ b/Software/Visual_Studio/Tango.SharedUI/Converters/StringToOneLineConverter.cs @@ -15,11 +15,11 @@ namespace Tango.SharedUI.Converters if (value != null) { string str = value.ToString(); - int newLineIndex = str.IndexOf(Environment.NewLine); + int newLineIndex = str.IndexOf("\n"); if (newLineIndex == -1) { - newLineIndex = str.IndexOf("\n"); + newLineIndex = str.IndexOf(Environment.NewLine); } string firstline = str; diff --git a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj index 000a4e5d7..a649d0c1a 100644 --- a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj +++ b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj @@ -67,6 +67,7 @@ + @@ -255,7 +256,7 @@ - + \ No newline at end of file -- cgit v1.3.1