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; using Admin.Core.IService; using Microsoft.Extensions.DependencyInjection; using System.Threading.Tasks; using System.Windows.Media; using Admin.Core.Model.ViewModels; using Pipelines.Sockets.Unofficial.Arenas; using NPOI.SS.Formula.Functions; using Aucma.Core.DoorFoam.Models; /* * 首页信息 */ namespace Aucma.Core.DoorFoam.ViewModels { public partial class IndexPageViewModel : ObservableObject { private static readonly log4net.ILog log = LogManager.GetLogger(typeof(IndexPageViewModel)); public IndexPageViewModel() { } #region 获取今天的数据 /// /// 获取今天的数据 /// /// private void InitEveryDayMethodAsync(List mode) { if (mode == null) return; foreach (var modeItem in mode) { DoorFp1DataGrid.Add(modeItem); } } #endregion #region 获取今天的数据 /// /// 获取今天的数据 /// /// private void InitEveryDayMethod2Async(List mode) { if (mode == null) return; foreach (var modeItem in mode) { DoorFp1DataGrid.Add(modeItem); } } #endregion #region 初始化datagrid private ObservableCollection _doorFp1DataGrid = new ObservableCollection(); public ObservableCollection DoorFp1DataGrid { get { return _doorFp1DataGrid; } set { _doorFp1DataGrid = value; OnPropertyChanged();//属性通知 } } #endregion #region 初始化datagrid private ObservableCollection _doorFp2DataGrid = new ObservableCollection(); public ObservableCollection DoorFp2DataGrid { get { return _doorFp1DataGrid; } set { _doorFp1DataGrid = value; OnPropertyChanged();//属性通知 } } #endregion private string _stationName; public string StationName { get { return _stationName; } set { _stationName = DateTime.Now.ToString(); SetProperty(ref _stationName, value); } } } }