2026-07-27 15:56:05 +08:00
|
|
|
using System.Windows;
|
2026-04-28 10:23:58 +08:00
|
|
|
using System.Windows.Controls;
|
2026-07-27 15:56:05 +08:00
|
|
|
using YY.Admin.ViewModels.Dialogs;
|
2026-04-28 10:23:58 +08:00
|
|
|
|
|
|
|
|
namespace YY.Admin.Views.Dialogs
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// ServerSettingsDialogView.xaml 的交互逻辑
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class ServerSettingsDialogView : UserControl
|
|
|
|
|
{
|
|
|
|
|
public ServerSettingsDialogView()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2026-07-27 15:56:05 +08:00
|
|
|
DataContextChanged += OnDataContextChanged;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OnDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (DataContext is ServerSettingsDialogViewModel vm && !string.IsNullOrEmpty(vm.EqPassword))
|
|
|
|
|
{
|
|
|
|
|
EqPasswordBox.Password = vm.EqPassword;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void EqPasswordBox_OnPasswordChanged(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (DataContext is ServerSettingsDialogViewModel vm)
|
|
|
|
|
{
|
|
|
|
|
vm.EqPassword = EqPasswordBox.Password;
|
|
|
|
|
}
|
2026-04-28 10:23:58 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|