|
|
|
@ -1,6 +1,5 @@ |
|
|
|
using MultiTerm.Core.ViewModel; |
|
|
|
using MultiTerm.Core.ViewModel; |
|
|
|
using System; |
|
|
|
using System; |
|
|
|
using System.Collections; |
|
|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.ComponentModel; |
|
|
|
using System.ComponentModel; |
|
|
|
using System.Windows; |
|
|
|
using System.Windows; |
|
|
|
@ -10,6 +9,7 @@ using System.Linq; |
|
|
|
using System.Collections.Specialized; |
|
|
|
using System.Collections.Specialized; |
|
|
|
using MultiTerm.Protocols.Model; |
|
|
|
using MultiTerm.Protocols.Model; |
|
|
|
using System.Collections.ObjectModel; |
|
|
|
using System.Collections.ObjectModel; |
|
|
|
|
|
|
|
using System.Diagnostics; |
|
|
|
|
|
|
|
|
|
|
|
namespace MultiTerm.Wpf.CustomControl; |
|
|
|
namespace MultiTerm.Wpf.CustomControl; |
|
|
|
|
|
|
|
|
|
|
|
@ -19,6 +19,7 @@ public class MultiFormatDataView : Control |
|
|
|
private const string itemsControlTemplateName = "PART_ItemsControl"; |
|
|
|
private const string itemsControlTemplateName = "PART_ItemsControl"; |
|
|
|
private const string buttonClearTemplateName = "PART_ButtonClear"; |
|
|
|
private const string buttonClearTemplateName = "PART_ButtonClear"; |
|
|
|
private const string textBoxCharOnlyViewTemplateName = "PART_CharOnlyTextBox"; |
|
|
|
private const string textBoxCharOnlyViewTemplateName = "PART_CharOnlyTextBox"; |
|
|
|
|
|
|
|
private const string realizedItemsCountTemplateName = "PART_RealizedItemsCountDisplay"; |
|
|
|
private ListBox? itemsControl; |
|
|
|
private ListBox? itemsControl; |
|
|
|
private TextBox? tbCharOnlyView; |
|
|
|
private TextBox? tbCharOnlyView; |
|
|
|
private ICollectionView? collectionView; |
|
|
|
private ICollectionView? collectionView; |
|
|
|
@ -139,6 +140,15 @@ public class MultiFormatDataView : Control |
|
|
|
{ |
|
|
|
{ |
|
|
|
button.Click += OnClearButtonClicked; ; |
|
|
|
button.Click += OnClearButtonClicked; ; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// hide realized items count when not debugging |
|
|
|
|
|
|
|
if (Debugger.IsAttached == false) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if(GetTemplateChild(realizedItemsCountTemplateName) is UIElement realizedItemsUiElement) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
realizedItemsUiElement.Visibility = Visibility.Hidden; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static void OnDataSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) |
|
|
|
private static void OnDataSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) |
|
|
|
|