using Common;
using Common.Models;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using MegaRobo.Contract;
using MegaRobo.Entities;
using MegaRobo.WpfInfrastructure.Abstractions;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
namespace MegaRobo.C00225155App.MenuViewModels
{
public class EditSampleBottlePropertiesViewModel : ViewModelBaseEx
{
private SampleBottleModel sampleBottle = new SampleBottleModel();
public SampleBottleModel SampleBottle
{
get => sampleBottle;
set
{
SetProperty(ref sampleBottle, value);
}
}
private MaterialDoseFunctionFlow _selectedFlow_Dose = null;
public MaterialDoseFunctionFlow SelectedFlow_Dose
{
get => _selectedFlow_Dose;
set
{
SetProperty(ref _selectedFlow_Dose, value);
}
}
private ReactSampleFunctionFlow _selectedsample = null;
///
/// 选中的取样
///
public ReactSampleFunctionFlow SelectedSample
{
get => _selectedsample;
set => SetProperty(ref _selectedsample, value);
}
private AddLiquidFunctionFlow _selectedSampleAfterAddLiquid = null;
///
/// 选中的加液液体,取样后紧接着加液
///
public AddLiquidFunctionFlow SelectedSampleAfterAddLiquid
{
get { return _selectedSampleAfterAddLiquid; }
set { SetProperty(ref _selectedSampleAfterAddLiquid, value); }
}
private AddLiquidFunctionFlow _selectedaddLiquid = null;
///
/// 选中的加液液体
///
public AddLiquidFunctionFlow SelectedAddLiquid
{
get { return _selectedaddLiquid; }
set { SetProperty(ref _selectedaddLiquid, value); }
}
private AddDiluentFunction _selecteddiluent = null;
///
/// 选中的稀释剂
///
public AddDiluentFunction SelectedDiluent
{
get { return _selecteddiluent; }
set { SetProperty(ref _selecteddiluent, value); }
}
#region 命令
public ICommand AddCommand { get; set; }
public ICommand DeleteCommand { get; set; }
public ICommand MoveUpCommand { get; set; }
public ICommand MoveDownCommand { get; set; }
//public ICommand CopyCommand { get; set; }
//public ICommand PasteCommand { get; set; }
public ICommand ClearCommand { get; set; }
//public ICommand ExportExcelCommand { get; set; }
//public ICommand ImportExcelCommand { get; set; }
//加液
public ICommand AddCommand_Datagrid { get; set; }
public ICommand DeleteCommand_Datagrid { get; set; }
public ICommand ClearCommand_Datagrid { get; set; }
#endregion
public EditSampleBottlePropertiesViewModel()
{
// 初始化命令
AddCommand = new RelayCommand