You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.4 KiB
C#
58 lines
1.4 KiB
C#
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<FirstContentViewModel> _logger;
|
|
private ICfgstationattrService _cfgstationattrService;
|
|
public FirstContentViewModel()
|
|
{
|
|
_cfgstationattrService = App.ServiceProvider.GetService<ICfgstationattrService>();
|
|
Init();
|
|
}
|
|
private async Task Init()
|
|
{
|
|
List<Cfgstationattr> cfgstationattrs = await _cfgstationattrService.GetTableListAsync();
|
|
}
|
|
/// <summary>
|
|
/// 监听PLC地址值
|
|
/// </summary>
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|