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.
24 lines
807 B
24 lines
807 B
using CommunityToolkit.Mvvm.Messaging;
|
|
using MultiTerm.Protocols.Network;
|
|
|
|
namespace MultiTerm.Protocols.Udp;
|
|
|
|
public partial class UdpProtocolSettingsViewModel : NetworkProtocolSettingsViewModel, IRecipient<UdpConnectedMessage>
|
|
{
|
|
public override Types.ProtocolType ProtocolType => Types.ProtocolType.Udp;
|
|
|
|
public UdpProtocolSettingsViewModel(IMessenger messenger) : base(messenger)
|
|
{
|
|
// register for messages
|
|
messenger.Register(this);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Sets the <see cref="ResolvedAddress"/> proprty to the resolved address from the message.
|
|
/// </summary>
|
|
/// <param name="message"></param>
|
|
void IRecipient<UdpConnectedMessage>.Receive(UdpConnectedMessage message)
|
|
{
|
|
this.ResolvedAddress = message.ResolvedAddress.ToString();
|
|
}
|
|
}
|
|
|