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.

101 lines
2.8 KiB
C#

using CommunityToolkit.Mvvm.ComponentModel;
using System;
using System.Collections.ObjectModel;
using log4net;
using Aucma.Core.DoorFoam.Common;
using LiveCharts;
using System.Collections.Generic;
using Admin.Core.Model;
using Admin.Core.Service;
using LiveCharts.Wpf;
1 year ago
using Admin.Core.IService;
using Microsoft.Extensions.DependencyInjection;
using System.Threading.Tasks;
1 year ago
using System.Windows.Media;
1 year ago
using Admin.Core.Model.ViewModels;
using Pipelines.Sockets.Unofficial.Arenas;
using NPOI.SS.Formula.Functions;
1 year ago
using Aucma.Core.DoorFoam.Models;
/*
1 year ago
*
*/
namespace Aucma.Core.DoorFoam.ViewModels
{
public partial class IndexPageViewModel : ObservableObject
{
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(IndexPageViewModel));
public IndexPageViewModel()
{
1 year ago
}
1 year ago
#region 获取今天的数据
1 year ago
/// <summary>
/// 获取今天的数据
/// </summary>
/// <returns></returns>
1 year ago
private void InitEveryDayMethodAsync(List<DoorModeRealTimeModel> mode)
{
1 year ago
if (mode == null) return;
foreach (var modeItem in mode)
{
1 year ago
DoorFp1DataGrid.Add(modeItem);
}
1 year ago
}
#endregion
#region 获取今天的数据
1 year ago
/// <summary>
/// 获取今天的数据
/// </summary>
/// <returns></returns>
1 year ago
private void InitEveryDayMethod2Async(List<DoorModeRealTimeModel> mode)
{
1 year ago
if (mode == null) return;
foreach (var modeItem in mode)
{
1 year ago
DoorFp1DataGrid.Add(modeItem);
}
1 year ago
}
#endregion
1 year ago
#region 初始化datagrid
1 year ago
private ObservableCollection<DoorModeRealTimeModel> _doorFp1DataGrid = new ObservableCollection<DoorModeRealTimeModel>();
public ObservableCollection<DoorModeRealTimeModel> DoorFp1DataGrid
{
1 year ago
get { return _doorFp1DataGrid; }
set
{
1 year ago
_doorFp1DataGrid = value;
OnPropertyChanged();//属性通知
}
}
#endregion
1 year ago
#region 初始化datagrid
1 year ago
private ObservableCollection<DoorModeRealTimeModel> _doorFp2DataGrid = new ObservableCollection<DoorModeRealTimeModel>();
public ObservableCollection<DoorModeRealTimeModel> DoorFp2DataGrid
{
1 year ago
get { return _doorFp1DataGrid; }
set
{
1 year ago
_doorFp1DataGrid = value;
OnPropertyChanged();//属性通知
}
}
#endregion
1 year ago
private string _stationName;
public string StationName
{
get { return _stationName; }
set
{
_stationName = DateTime.Now.ToString();
SetProperty(ref _stationName, value);
}
}
}
}