添加S7后台服务和添加PLC所需要的属性

This commit is contained in:
2025-07-05 01:31:44 +08:00
parent 69b75ef228
commit 404501cc17
8 changed files with 295 additions and 1 deletions

View File

@@ -2,15 +2,28 @@
using iNKORE.UI.WPF.Modern.Controls;
using PMSWPF.Models;
using PMSWPF.ViewModels.Dialogs;
using NLog; // Add NLog using directive
namespace PMSWPF.Views.Dialogs;
public partial class DeviceDialog
{
private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); // Add Logger
public DeviceDialog(DeviceDialogViewModel viewModel)
{
InitializeComponent();
DataContext = viewModel;
// Log the ProtocolType value
if (viewModel.Device != null)
{
Logger.Info($"DeviceDialog opened. Device ProtocolType: {viewModel.Device.ProtocolType}");
}
else
{
Logger.Info("DeviceDialog opened. Device is null.");
}
}
}