2026-03-10 19:56:55 +00:00
|
|
|
|
using OperationControl.ViewModels.Views.Operacao;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using System.Windows;
|
|
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
|
using System.Windows.Documents;
|
|
|
|
|
|
using System.Windows.Input;
|
|
|
|
|
|
using System.Windows.Media;
|
|
|
|
|
|
using System.Windows.Media.Imaging;
|
|
|
|
|
|
using System.Windows.Navigation;
|
|
|
|
|
|
using System.Windows.Shapes;
|
|
|
|
|
|
|
|
|
|
|
|
namespace OperationControl.Views.Operacao
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Interaction logic for OperacaoRightView.xaml
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public partial class OperacaoRightView : System.Windows.Controls.UserControl
|
|
|
|
|
|
{
|
|
|
|
|
|
public OperacaoRightViewModel _vm;
|
|
|
|
|
|
|
|
|
|
|
|
public OperacaoRightView()
|
|
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
_vm = new OperacaoRightViewModel();
|
|
|
|
|
|
DataContext = _vm;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public OperacaoRightView(OperacaoRightViewModel vm)
|
|
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
_vm = vm;
|
|
|
|
|
|
DataContext = _vm;
|
|
|
|
|
|
}
|
2026-03-16 19:22:06 +00:00
|
|
|
|
|
|
|
|
|
|
private void cmbModoOperacao_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (DataContext is OperacaoRightViewModel vm && sender is System.Windows.Controls.ComboBox combo && combo.SelectedItem is AgroBase.Models.Enums.ModoOperacao modo)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (vm.CarregarParametrosPadraoCommand?.CanExecute(modo) == true)
|
|
|
|
|
|
vm.CarregarParametrosPadraoCommand.Execute(modo);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-03-10 19:56:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|