using CommunityToolkit.Mvvm.ComponentModel; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Models; using NVelocity.Runtime.Directive; using SlnMesnac.Repository.service; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SlnMesnac.WPF.ViewModel.IndexPage { public partial class FirstContentViewModel : ObservableObject { private ILogger _logger; private ICfgstationattrService _cfgstationattrService; public FirstContentViewModel() { _cfgstationattrService = App.ServiceProvider.GetService(); Init(); } private async Task Init() { List cfgstationattrs = await _cfgstationattrService.GetTableListAsync(); } /// /// 监听PLC地址值 /// private void ListeningPlcValue() { try { } catch (Exception ex) { } } private bool TryObject(object value, out object[] arry) { arry = null; try { arry = (object[])value; return true; } catch { return false; } } } }