|
|
|
@ -2,10 +2,13 @@
|
|
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
|
using LiveCharts;
|
|
|
|
|
using LiveCharts.Wpf;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using SlnMesnac.Business;
|
|
|
|
|
using SlnMesnac.Model.domain;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
@ -37,8 +40,16 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
{
|
|
|
|
|
public class IndexViewModel : ObservableObject
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
private TagScanBusiness tagScanBusiness;
|
|
|
|
|
public IndexViewModel()
|
|
|
|
|
{
|
|
|
|
|
tagScanBusiness = App.ServiceProvider.GetService<TagScanBusiness>();
|
|
|
|
|
this.Init();
|
|
|
|
|
this.RefreshScanInfo();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void Init()
|
|
|
|
|
{
|
|
|
|
|
PassRate = 30;
|
|
|
|
|
|
|
|
|
@ -54,19 +65,11 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
|
|
|
|
|
AxisX = new ObservableCollection<string> { "8", "12", "16", "20" };
|
|
|
|
|
|
|
|
|
|
ImagePath = "E:\\2024年项目\\RFID行李跟踪\\程序设计\\SlnMesnac.RfidIdentification\\SlnMesnac.WPF\\bin\\Debug\\net6.0-windows\\picture\\3898291920.jpg";
|
|
|
|
|
|
|
|
|
|
RefreshLogMessage($"1#站台任务下发站台任务下发站台任务下发站台任务下发站台任务下发站台任务下发");
|
|
|
|
|
|
|
|
|
|
ScanItems = new ObservableCollection<ScanLogModel>()
|
|
|
|
|
{
|
|
|
|
|
new ScanLogModel {CreateTime = DateTime.Now,DataType=1,Rfid="20240918",Code="20240918",Ocr="20240918"},
|
|
|
|
|
new ScanLogModel {CreateTime = DateTime.Now,DataType=1,Rfid="20240918",Code="20240918",Ocr="20240918"},
|
|
|
|
|
new ScanLogModel {CreateTime = DateTime.Now,DataType=1,Rfid="20240918",Code="20240918",Ocr="20240918"},
|
|
|
|
|
};
|
|
|
|
|
RefreshLogMessage($"1#站台任务下发站台任务下发站台任务下发站台任务下发站台任务下发站台任务下发");
|
|
|
|
|
|
|
|
|
|
TagCode = "20240918";
|
|
|
|
|
TagAmount = 362;
|
|
|
|
|
ScanItems = new ObservableCollection<ScanLogModel>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -150,6 +153,25 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
set => SetProperty(ref _scanItems, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void RefreshScanInfo()
|
|
|
|
|
{
|
|
|
|
|
tagScanBusiness.RefreshTagScanInfoEvent += info =>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
App.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
TagCode = info.Rfid;
|
|
|
|
|
ImagePath = info.Url;
|
|
|
|
|
|
|
|
|
|
string fileName = Path.GetFileName(info.Url);
|
|
|
|
|
info.Url = fileName;
|
|
|
|
|
ScanItems.Add(info);
|
|
|
|
|
|
|
|
|
|
TagAmount++;
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ObservableCollection<string> listItems = new ObservableCollection<string>();
|
|
|
|
|