72 lines
3.1 KiB
C#
72 lines
3.1 KiB
C#
using OliviaAddInPro.Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Media.Imaging;
|
|
|
|
namespace OliviaAddInPro
|
|
{
|
|
class PaneLimpiezaViewModel : PanelViewModelBase
|
|
{
|
|
private PaneLimpiezaSub1ViewModel _subPanel1ViewModel;
|
|
private PaneLimpiezaSub2ViewModel _subPanel2ViewModel;
|
|
private PaneLimpiezaSub3ViewModel _subPanel3ViewModel;
|
|
private PaneLimpiezaSub4ViewModel _subPanel4ViewModel;
|
|
private PaneEjecutarViewModel _subPanelEjecutar;
|
|
public PaneLimpiezaViewModel()
|
|
{
|
|
_subPanel1ViewModel = new PaneLimpiezaSub1ViewModel(OliviaGlob.Limp);
|
|
_subPanel2ViewModel = new PaneLimpiezaSub2ViewModel();
|
|
_subPanel3ViewModel = new PaneLimpiezaSub3ViewModel();
|
|
_subPanel4ViewModel = new PaneLimpiezaSub4ViewModel();
|
|
_subPanelEjecutar = new PaneEjecutarViewModel();
|
|
|
|
OptionsMenu = new ObservableCollection<OptionsMenuItem>
|
|
{
|
|
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/Dog32.png")), Resource1.String_tto, _subPanel1ViewModel),
|
|
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/Dino32.png")), Resource1.String_zonif, _subPanel2ViewModel),
|
|
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/Cat32.png")), Resource1.String_ctrol, _subPanel3ViewModel),
|
|
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/Panda32.png")), Resource1.String_tiempos, _subPanel4ViewModel)
|
|
};
|
|
SelectedOption = OptionsMenu[0];
|
|
}
|
|
public override string DisplayName
|
|
{
|
|
get { return Resource1.String_header_limpieza; }
|
|
}
|
|
private ObservableCollection<OptionsMenuItem> _optionsMenu = new ObservableCollection<OptionsMenuItem>();
|
|
public ObservableCollection<OptionsMenuItem> OptionsMenu
|
|
{
|
|
get { return _optionsMenu; }
|
|
set { SetProperty(ref _optionsMenu, value, () => OptionsMenu); }
|
|
}
|
|
|
|
private PanelViewModelBase _currentSubPanelPage;
|
|
public PanelViewModelBase CurrentSubPanelPage
|
|
{
|
|
get { return _currentSubPanelPage; }
|
|
set { SetProperty(ref _currentSubPanelPage, value, () => CurrentSubPanelPage); }
|
|
}
|
|
|
|
private PanelViewModelBase _subPanelEjec;
|
|
public PanelViewModelBase SubPanelEjec
|
|
{
|
|
get { return _subPanelEjec; }
|
|
set { SetProperty(ref _subPanelEjec, value, () => SubPanelEjec); }
|
|
}
|
|
|
|
private OptionsMenuItem _selectionOption;
|
|
public OptionsMenuItem SelectedOption
|
|
{
|
|
get { return _selectionOption; }
|
|
set {
|
|
SetProperty(ref _selectionOption, value, () => SelectedOption);
|
|
CurrentSubPanelPage = value.SubPanelViewModel;
|
|
}
|
|
}
|
|
}
|
|
}
|