32 lines
912 B
C#
32 lines
912 B
C#
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using PettingZoo.Core.Macros;
|
|
|
|
namespace PettingZoo.UI.Tab.Publisher
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for TapetiPublisherView.xaml
|
|
/// </summary>
|
|
public partial class TapetiPublisherView
|
|
{
|
|
// ReSharper disable once SuggestBaseTypeForParameterInConstructor - the XAML explicitly requires TapetiPublisherViewModel
|
|
public TapetiPublisherView(TapetiPublisherViewModel viewModel)
|
|
{
|
|
DataContext = viewModel;
|
|
InitializeComponent();
|
|
|
|
PayloadEditor.Validator = viewModel;
|
|
PayloadEditor.MacroProcessor = viewModel.PayloadMacroProcessor;
|
|
}
|
|
|
|
|
|
private void CaretToEnd(object sender, RoutedEventArgs e)
|
|
{
|
|
if (sender is not TextBox textBox)
|
|
return;
|
|
|
|
textBox.CaretIndex = textBox.Text.Length;
|
|
}
|
|
}
|
|
}
|