| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- using MathNet.Numerics.LinearAlgebra;
- using Prism.Commands;
- using Prism.Events;
- using Prism.Ioc;
- using Prism.Mvvm;
- using Prism.Regions;
- using Prism.Services.Dialogs;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Security.Cryptography;
- using System.Threading.Tasks;
- using System.Windows;
- using Team.FFFeederService.Interfaces;
- using TeamAAS_VP.Events;
- using TeamAAS_VP.Core;
- using TeamAAS_VP.Interfaces;
- using TeamAAS_VP.Models;
- using TeamAAS_VP.Models.Calibration;
- namespace TeamAAS_VP.ViewModels.Calibration
- {
- public class ShowCalibrationResultViewModel : BindableBase, IDialogAware
- {
- IRegionManager _regionManager;
- IRegionNavigationService _regionNavigationService;
- IContainerProvider _container;
- IDialogService _dialogService;
- IEventAggregator _eventAggregator;
- #region 属性
- public string Title => "校准结果";
- private CalibrationResult _Result;
- public CalibrationResult Result
- {
- get { return _Result; }
- set { SetProperty(ref _Result,value); }
- }
- #endregion
- #region 命令
- private DelegateCommand _ConfirmCommand;
- public DelegateCommand ConfirmCommand =>
- _ConfirmCommand ?? (_ConfirmCommand = new DelegateCommand(ExecuteConfirmCommand));
- #endregion
- #region 事件
- public event Action<IDialogResult> RequestClose;
- #endregion
- public ShowCalibrationResultViewModel(IRegionManager regionManager, IEventAggregator ea, IRegionNavigationService regionNavigationService, IContainerProvider container, IDialogService dialogService)
- {
- _regionManager = regionManager;
- _regionNavigationService = regionNavigationService;
- _container = container;
- _dialogService = dialogService;
- _eventAggregator = ea;
- }
- #region 方法
- /// <summary>
- /// 确定
- /// </summary>
- void ExecuteConfirmCommand()
- {
- RequestClose?.Invoke(new DialogResult(ButtonResult.OK, null));
- }
- public bool CanCloseDialog()
- {
- return true;
- }
- public void OnDialogClosed()
- {
- }
- public void OnDialogOpened(IDialogParameters parameters)
- {
- Result = parameters.GetValue<CalibrationResult>("Result");
- }
- #endregion
- }
- }
|