添加S7后台服务和添加PLC所需要的属性
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user