You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
916 B
39 lines
916 B
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using CommunityToolkit.Mvvm.Input;
|
|
using MultiTerm.Core.Model;
|
|
using MultiTerm.Core.Types;
|
|
|
|
namespace MultiTerm.Core.ViewModel;
|
|
|
|
public partial class SendReceiveViewModel : TerminalViewModel
|
|
{
|
|
public override string Title
|
|
{
|
|
get
|
|
{
|
|
return $"{ViewType} {ProtocolType}";
|
|
}
|
|
}
|
|
public override TerminalViewType ViewType => TerminalViewType.SendReceive;
|
|
|
|
/// <summary>
|
|
/// Send data model.
|
|
/// </summary>
|
|
[ObservableProperty]
|
|
private MultiFormatString sendData = new();
|
|
|
|
/// <summary>
|
|
/// Temporary sent data property, for testing purposes.
|
|
/// </summary>
|
|
[ObservableProperty]
|
|
private string sentData = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Send command.
|
|
/// </summary>
|
|
[RelayCommand]
|
|
private void Send()
|
|
{
|
|
this.SentData = this.SendData.ToString();
|
|
}
|
|
}
|
|
|