完善 MCS 桌面代理与开炼机动作同步,修复原料相关菜单权限,桌面端新增上辅机 MES 菜单。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -38,6 +38,20 @@
|
||||
Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</DockPanel>
|
||||
|
||||
<TextBlock Text="设备库(厂区 SQL Server)" FontWeight="SemiBold" Margin="0,18,0,8"/>
|
||||
<TextBlock Text="设备 ID" Margin="0,0,0,6"/>
|
||||
<TextBox Text="{Binding EqDeviceId, UpdateSourceTrigger=PropertyChanged}" Height="32"/>
|
||||
<TextBlock Text="服务器" Margin="0,12,0,6"/>
|
||||
<TextBox Text="{Binding EqServerHost, UpdateSourceTrigger=PropertyChanged}" Height="32"/>
|
||||
<TextBlock Text="端口" Margin="0,12,0,6"/>
|
||||
<TextBox Text="{Binding EqServerPort, UpdateSourceTrigger=PropertyChanged}" Height="32"/>
|
||||
<TextBlock Text="数据库" Margin="0,12,0,6"/>
|
||||
<TextBox Text="{Binding EqDbName, UpdateSourceTrigger=PropertyChanged}" Height="32"/>
|
||||
<TextBlock Text="用户名" Margin="0,12,0,6"/>
|
||||
<TextBox Text="{Binding EqUsername, UpdateSourceTrigger=PropertyChanged}" Height="32"/>
|
||||
<TextBlock Text="密码" Margin="0,12,0,6"/>
|
||||
<PasswordBox x:Name="EqPasswordBox" Height="32" PasswordChanged="EqPasswordBox_OnPasswordChanged"/>
|
||||
|
||||
<TextBlock Text="{Binding ErrorMessage}" Foreground="Red" Margin="0,12,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using YY.Admin.ViewModels.Dialogs;
|
||||
|
||||
namespace YY.Admin.Views.Dialogs
|
||||
{
|
||||
@@ -10,6 +12,23 @@ namespace YY.Admin.Views.Dialogs
|
||||
public ServerSettingsDialogView()
|
||||
{
|
||||
InitializeComponent();
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user