104 lines
3.7 KiB
C#
104 lines
3.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using ArcGIS.Core.CIM;
|
|
using ArcGIS.Core.Data;
|
|
using ArcGIS.Core.Geometry;
|
|
using ArcGIS.Desktop.Catalog;
|
|
using ArcGIS.Desktop.Core;
|
|
using ArcGIS.Desktop.Editing;
|
|
using ArcGIS.Desktop.Extensions;
|
|
using ArcGIS.Desktop.Framework;
|
|
using ArcGIS.Desktop.Framework.Contracts;
|
|
using System.Collections.ObjectModel;
|
|
using ArcGIS.Desktop.Framework.Dialogs;
|
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
|
using ArcGIS.Desktop.Mapping;
|
|
using OliviaAddInPro.Helper;
|
|
using OliviaAddInPro.Model;
|
|
using System.Windows.Media.Imaging;
|
|
|
|
namespace OliviaAddInPro
|
|
{
|
|
internal class PaneRecogidaViewModel : PanelViewModelBase
|
|
{
|
|
private PaneRecogidaSub1ViewModel _subPanel1ViewModel;
|
|
//Recogida reco;
|
|
|
|
public PaneRecogidaViewModel()
|
|
{
|
|
_subPanel1ViewModel = new PaneRecogidaSub1ViewModel();
|
|
_subPanel2ViewModel = new PaneLimpiezaSub2ViewModel();
|
|
_subPanel3ViewModel = new PaneLimpiezaSub3ViewModel();
|
|
_subPanel4ViewModel = new PaneLimpiezaSub4ViewModel();
|
|
|
|
OptionsMenu = new ObservableCollection<OptionsMenuItem>
|
|
{
|
|
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/inicio.png")), Resource1.String_tto, _subPanel1ViewModel),
|
|
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/zonas.png")), Resource1.String_zonif, _subPanel2ViewModel),
|
|
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/ptosctrl.png")), Resource1.String_ctrol, _subPanel3ViewModel),
|
|
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/time.png")), Resource1.String_tiempos, _subPanel4ViewModel)
|
|
};
|
|
SelectedOption = OptionsMenu[0];
|
|
//limp = OliviaGlob.Limp;
|
|
}
|
|
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 OptionsMenuItem _selectionOption;
|
|
public OptionsMenuItem SelectedOption
|
|
{
|
|
get { return _selectionOption; }
|
|
set
|
|
{
|
|
SetProperty(ref _selectionOption, value, () => SelectedOption);
|
|
CurrentSubPanelPage = value.SubPanelViewModel;
|
|
}
|
|
}
|
|
public PaneRecogidaSub1ViewModel PaneSub1
|
|
{
|
|
get { return _subPanel1ViewModel; }
|
|
}
|
|
/**
|
|
* Lee los paneles y sus elementos
|
|
*/
|
|
public bool Lee(out string err_str)
|
|
{
|
|
err_str = "";
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Acciones para comenzar ejecución
|
|
*/
|
|
public void Ejecuta(OliviaAddInPro.Services.ModosEjec modo)
|
|
{
|
|
string err = "";
|
|
if (!Lee(out err))
|
|
{
|
|
HelperGlobal.ponMsg(err);
|
|
return;
|
|
}
|
|
|
|
OliviaGlob.Reco.Ejecuta(modo);
|
|
|
|
}
|
|
}
|
|
}
|