162 lines
4.4 KiB
C#
162 lines
4.4 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.Data.UtilityNetwork.Trace;
|
|
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 ArcGIS.Desktop.Framework.Dialogs;
|
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
|
using ArcGIS.Desktop.Mapping;
|
|
using System.Collections.ObjectModel;
|
|
using OliviaAddInPro.Model;
|
|
using OliviaAddInPro.Helper;
|
|
|
|
namespace OliviaAddInPro
|
|
{
|
|
internal class PaneLimpiezaSub1ViewModel : PanelViewModelBase
|
|
{
|
|
|
|
private ObservableCollection<string> tiposTto;
|
|
private int selTto = -1;
|
|
private ObservableCollection<string> opsAmbs;
|
|
private int selOpAmb = -1;
|
|
private ObservableCollection<CheckedListItem<string>> ambitos;
|
|
|
|
|
|
public PaneLimpiezaSub1ViewModel ()
|
|
{
|
|
lblCapaLimp = Resource1.String_selec_capa;
|
|
timeTto = 10;
|
|
textVeloDespl = 10;
|
|
lblUdsTimeTto = "min";
|
|
lblUdsVeloDespl = "km/h";
|
|
|
|
tiposTto = new ObservableCollection<string>(LimpiezaDef.tipos_tto_str);
|
|
ambitos = new ObservableCollection<CheckedListItem<string>>();
|
|
|
|
}
|
|
|
|
#region Properties
|
|
|
|
public override string DisplayName
|
|
{
|
|
get { return Resource1.String_tto; }
|
|
}
|
|
|
|
private string lblCapaLimp;
|
|
public string LblCapaLimp
|
|
{
|
|
get { return lblCapaLimp; }
|
|
set { base.SetProperty(ref lblCapaLimp, value, () => LblCapaLimp); }
|
|
}
|
|
|
|
private int textVeloDespl;
|
|
public int TextVeloDespl
|
|
{
|
|
get { return textVeloDespl; }
|
|
set { base.SetProperty(ref textVeloDespl, value, () => TextVeloDespl); }
|
|
}
|
|
private string lblUdsVeloDespl;
|
|
public string LblUdsVeloDespl
|
|
{
|
|
get { return lblUdsVeloDespl; }
|
|
set { base.SetProperty(ref lblUdsVeloDespl, value, () => LblUdsVeloDespl); }
|
|
}
|
|
|
|
private int timeTto;
|
|
public int TimeTto
|
|
{
|
|
get { return timeTto; }
|
|
set { base.SetProperty(ref timeTto, value, () => TimeTto); }
|
|
}
|
|
private string lblUdsTimeTto;
|
|
public string LblUdsTimeTto
|
|
{
|
|
get { return lblUdsTimeTto; }
|
|
set { base.SetProperty(ref lblUdsTimeTto, value, () => LblUdsTimeTto); }
|
|
}
|
|
|
|
public ObservableCollection<string> TiposTto
|
|
{
|
|
get { return tiposTto; }
|
|
set
|
|
{
|
|
tiposTto = value;
|
|
base.NotifyPropertyChanged("TiposTto");
|
|
}
|
|
}
|
|
public int SelTto
|
|
{
|
|
get { return selTto; }
|
|
set
|
|
{
|
|
selTto = value;
|
|
base.NotifyPropertyChanged("SelTto");
|
|
}
|
|
}
|
|
public ObservableCollection<string> OpsAmbs
|
|
{
|
|
get { return opsAmbs; }
|
|
set
|
|
{
|
|
opsAmbs = value;
|
|
base.NotifyPropertyChanged("OpsAmbs");
|
|
}
|
|
}
|
|
public int SelOpAmb
|
|
{
|
|
get { return selOpAmb; }
|
|
set
|
|
{
|
|
selOpAmb = value;
|
|
base.NotifyPropertyChanged("SelOpAmb");
|
|
}
|
|
}
|
|
public ObservableCollection<CheckedListItem<string>> Ambitos
|
|
{
|
|
get { return ambitos; }
|
|
set
|
|
{
|
|
ambitos = value;
|
|
base.NotifyPropertyChanged("OpsAmbs");
|
|
}
|
|
}
|
|
#endregion Properties
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
* Clase para la lista de ámbitos, relaciona el tipo de ámbito con su texto
|
|
*/
|
|
internal class AmbitsList
|
|
{
|
|
private LimpiezaDef.AmbitsTra mi_amb_i;
|
|
private string mi_amb_str;
|
|
|
|
public AmbitsList(LimpiezaDef.AmbitsTra amb_i, string amb_str)
|
|
{
|
|
this.mi_amb_i = amb_i;
|
|
this.mi_amb_str = amb_str;
|
|
}
|
|
public LimpiezaDef.AmbitsTra amb_i
|
|
{
|
|
get { return mi_amb_i; }
|
|
set { mi_amb_i = value; }
|
|
}
|
|
public string amb_str
|
|
{
|
|
get { return mi_amb_str; }
|
|
set { mi_amb_str = value; }
|
|
}
|
|
}
|
|
}
|