Files
DMS/DMS.WPF/ViewModels/Dialogs/MqttAliasDialogViewModel.cs

34 lines
927 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
namespace DMS.ViewModels.Dialogs;
public partial class MqttAliasDialogViewModel : ObservableObject
{
[ObservableProperty]
private string _title = "设置MQTT别名";
[ObservableProperty]
private string _message = "请输入变量在该MQTT服务器上的别名";
[ObservableProperty]
private string _variableName = string.Empty;
[ObservableProperty]
private string _mqttServerName = string.Empty;
[ObservableProperty]
private string _mqttAlias = string.Empty;
public MqttAliasDialogViewModel(string variableName, string mqttServerName)
{
VariableName = variableName;
MqttServerName = mqttServerName;
Message = $"请输入变量 '{VariableName}' 在MQTT服务器 '{MqttServerName}' 上的别名:";
}
public MqttAliasDialogViewModel()
{
}
}