Multiprocotol Terminalprogram (BAT)
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.
MultiTerm/MultiTerm.Protocols/ProtocolConnectionSettingsV...

40 lines
1.2 KiB

using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
namespace MultiTerm.Protocols;
/// <summary>
/// Class that represents all connection settings for a specific <see cref="CommunicationProtocol"/>.
/// Can be bound to UI using MVVM pattern.
/// </summary>
public abstract partial class ProtocolConnectionSettingsViewModel : ObservableObject
{
/// <summary>
/// Event that is thrown when the user requested to connect to the device with the entered settings.
/// </summary>
public event EventHandler? ConnectRequested;
/// <summary>
/// Event that is thrown when the user requested to disconnect from the device.
/// </summary>
public event EventHandler? DisconnectRequested;
/// <summary>
/// Indicates wether the settings can currently be edited.
/// </summary>
public bool AreEditable;
[ObservableProperty]
private string connectDisconnectButtonText = "Connect";
/// <summary>
/// Binding to Connect/Disconnect button.
/// Button text is provided in <see cref="ConnectDisconnectButtonText"/>
/// </summary>
[RelayCommand]
private void ConnectDisconnect()
{
}
}