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