Avances ventana Recogida
|
|
@ -27,7 +27,8 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
if (OliviaGlob.TipoEjec == TiposEjecucion.Ninguno)
|
if (OliviaGlob.TipoEjec == TiposEjecucion.Ninguno)
|
||||||
{
|
{
|
||||||
OliviaGlob.TipoEjec = TiposEjecucion.Config;
|
OliviaGlob.TipoEjec = TiposEjecucion.Props;
|
||||||
|
DockpaneConfigViewModel.Reset();
|
||||||
DockpaneConfigViewModel.Show();
|
DockpaneConfigViewModel.Show();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
12
Config.daml
|
|
@ -1,8 +1,4 @@
|
||||||
<ArcGIS defaultAssembly="OliviaAddInPro.dll"
|
<ArcGIS defaultAssembly="OliviaAddInPro.dll" defaultNamespace="OliviaAddInPro" xmlns="http://schemas.esri.com/DADF/Registry" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.esri.com/DADF/Registry file:///C:/Program%20Files/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd">
|
||||||
defaultNamespace="OliviaAddInPro"
|
|
||||||
xmlns="http://schemas.esri.com/DADF/Registry"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://schemas.esri.com/DADF/Registry file:///C:/Program%20Files/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd">
|
|
||||||
<AddInInfo id="{10742570-cf59-42f2-bea2-2a38002a06ee}" version="1.0" desktopVersion="2.8.29751">
|
<AddInInfo id="{10742570-cf59-42f2-bea2-2a38002a06ee}" version="1.0" desktopVersion="2.8.29751">
|
||||||
<Name>OliviaAddInPro</Name>
|
<Name>OliviaAddInPro</Name>
|
||||||
<Description>AddIn de Optimización de la Limpieza Viaria para ArcGIs Pro</Description>
|
<Description>AddIn de Optimización de la Limpieza Viaria para ArcGIs Pro</Description>
|
||||||
|
|
@ -26,8 +22,8 @@
|
||||||
<group id="OliviaAddInPro_Group1" caption="Olivia" appearsOnAddInTab="false">
|
<group id="OliviaAddInPro_Group1" caption="Olivia" appearsOnAddInTab="false">
|
||||||
<button refID="OliviaAddInPro_ButtonLimp" size="large" />
|
<button refID="OliviaAddInPro_ButtonLimp" size="large" />
|
||||||
<button refID="OliviaAddInPro_ButtonRec" size="large" />
|
<button refID="OliviaAddInPro_ButtonRec" size="large" />
|
||||||
<button refID="OliviaAddInPro_ButtonMaq" size="large" />
|
|
||||||
<button refID="OliviaAddInPro_ButtonConfig" size="large" />
|
<button refID="OliviaAddInPro_ButtonConfig" size="large" />
|
||||||
|
<button refID="OliviaAddInPro_ViewModel_Recogida_PaneRecogida_OpenButton" size="large" />
|
||||||
</group>
|
</group>
|
||||||
</groups>
|
</groups>
|
||||||
<controls>
|
<controls>
|
||||||
|
|
@ -40,10 +36,6 @@
|
||||||
<tooltip heading="OLIVIA - Recogida de Residuos">
|
<tooltip heading="OLIVIA - Recogida de Residuos">
|
||||||
Add-In de ArcGIS Pro para la herramienta de optimización de la limpieza viaria, OLIVIA<disabledText /></tooltip>
|
Add-In de ArcGIS Pro para la herramienta de optimización de la limpieza viaria, OLIVIA<disabledText /></tooltip>
|
||||||
</button>
|
</button>
|
||||||
<button id="OliviaAddInPro_ButtonMaq" caption="Maquetación" className="ButtonMaq" loadOnClick="true" largeImage="Images/maqueta.png">
|
|
||||||
<tooltip heading="OLIVIA - Maquetación de resultados">
|
|
||||||
Add-In de ArcGIS Pro para la herramienta de optimización de la limpieza viaria, OLIVIA<disabledText /></tooltip>
|
|
||||||
</button>
|
|
||||||
<button id="OliviaAddInPro_ButtonConfig" caption="Configuración" className="ButtonConfig" loadOnClick="true" largeImage="Images/config.png">
|
<button id="OliviaAddInPro_ButtonConfig" caption="Configuración" className="ButtonConfig" loadOnClick="true" largeImage="Images/config.png">
|
||||||
<tooltip heading="OLIVIA - Configuración">
|
<tooltip heading="OLIVIA - Configuración">
|
||||||
Add-In de ArcGIS Pro para la herramienta de optimización de la limpieza viaria, OLIVIA<disabledText /></tooltip>
|
Add-In de ArcGIS Pro para la herramienta de optimización de la limpieza viaria, OLIVIA<disabledText /></tooltip>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace OliviaAddInPro.Helper
|
||||||
|
{
|
||||||
|
class EnabledComboBoxItem<T> : INotifyPropertyChanged
|
||||||
|
{
|
||||||
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
|
private bool isEnabled;
|
||||||
|
private T item;
|
||||||
|
|
||||||
|
public EnabledComboBoxItem()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public EnabledComboBoxItem(T item, bool isEnabled = true)
|
||||||
|
{
|
||||||
|
this.item = item;
|
||||||
|
this.isEnabled = isEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public T Item
|
||||||
|
{
|
||||||
|
get { return item; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
item = value;
|
||||||
|
if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("Item"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool IsEnabled
|
||||||
|
{
|
||||||
|
get { return isEnabled; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
isEnabled = value;
|
||||||
|
if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("IsEnabled"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -324,6 +324,16 @@ namespace OliviaAddInPro.Helper
|
||||||
return f.FieldType == FieldType.String ? "'" : "";
|
return f.FieldType == FieldType.String ? "'" : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Dado un nombre de campo, devuelve los valores que encuentra para ese nombre de campo
|
||||||
|
public static Task<ObservableCollection<string>> GetFieldVals(string capa, string fieldName, bool uniquevals)
|
||||||
|
{
|
||||||
|
FeatureClass fc = GetFtClass(capa);
|
||||||
|
if (fc == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return GetFieldVals(fc, fieldName, uniquevals);
|
||||||
|
}
|
||||||
|
|
||||||
//Dado un nombre de campo, devuelve los valores que encuentra para ese nombre de campo
|
//Dado un nombre de campo, devuelve los valores que encuentra para ese nombre de campo
|
||||||
public static Task<ObservableCollection<string>> GetFieldVals(FeatureClass fc, string fieldName, bool uniquevals)
|
public static Task<ObservableCollection<string>> GetFieldVals(FeatureClass fc, string fieldName, bool uniquevals)
|
||||||
{
|
{
|
||||||
|
|
@ -555,6 +565,44 @@ namespace OliviaAddInPro.Helper
|
||||||
return n;
|
return n;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Devuelve los valores únicos de un campo dado
|
||||||
|
*/
|
||||||
|
public static ObservableCollection<string> GetUniqueVals(string capa, string campo)
|
||||||
|
{
|
||||||
|
ObservableCollection<string> uniqueVals = null;
|
||||||
|
FeatureClass ftclass = GetFtClass(capa);
|
||||||
|
if (ftclass == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
using (FeatureClassDefinition featureClassDefinition = ftclass.GetDefinition())
|
||||||
|
{
|
||||||
|
// Get fields
|
||||||
|
ArcGIS.Core.Data.Field fld = featureClassDefinition.GetFields().First(x => x.Name.Equals(campo));
|
||||||
|
|
||||||
|
// Create StatisticsDescriptions
|
||||||
|
StatisticsDescription uniqStatDesc = new StatisticsDescription(fld, new List<ArcGIS.Core.Data.StatisticsFunction>()
|
||||||
|
{ ArcGIS.Core.Data.StatisticsFunction.Count });
|
||||||
|
|
||||||
|
// Create TableStatisticsDescription
|
||||||
|
TableStatisticsDescription tableStatisticsDescription = new TableStatisticsDescription(new List<StatisticsDescription>() { uniqStatDesc});
|
||||||
|
tableStatisticsDescription.GroupBy = new List<ArcGIS.Core.Data.Field>() { fld };
|
||||||
|
tableStatisticsDescription.OrderBy = new List<SortDescription>() { new SortDescription(fld) };
|
||||||
|
|
||||||
|
// Calculate Statistics
|
||||||
|
IReadOnlyList<TableStatisticsResult> statisticsResults = ftclass.CalculateStatistics(tableStatisticsDescription);
|
||||||
|
TableStatisticsResult statRes = statisticsResults.ElementAt(0); //solo hay 1 grupo
|
||||||
|
|
||||||
|
// Code to process results goes here...
|
||||||
|
uniqueVals = new ObservableCollection<string>();
|
||||||
|
for(int i=0; i< statRes.StatisticsResults.Count; i++)
|
||||||
|
{
|
||||||
|
uniqueVals.Add(statRes.StatisticsResults.ElementAt(i).ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Free(ftclass);
|
||||||
|
return uniqueVals;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Devuelve el número de entidades de una FeatureClass que cumplen la consulta, o todos si la consulta es empty
|
* Devuelve el número de entidades de una FeatureClass que cumplen la consulta, o todos si la consulta es empty
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
|
@ -0,0 +1,33 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OliviaAddInPro.Model
|
||||||
|
{
|
||||||
|
public static class ComunDef
|
||||||
|
{
|
||||||
|
//*************************************************************************************
|
||||||
|
//Enums y structs generales
|
||||||
|
/**
|
||||||
|
* Nombre de los campos de la cartografía de la red navegable que se consultan para la exportación
|
||||||
|
*/
|
||||||
|
public struct CamposNW
|
||||||
|
{
|
||||||
|
public static string cons_onew; //<Campo que indica el sentido
|
||||||
|
public static string cons_kph; //<Campo que indica la velocidad en kph
|
||||||
|
public static string cons_name; //<Campo que indica el nombre de la calle
|
||||||
|
public static string cons_fow; //Campo que indica el tipo de vial, si es peatonal o no
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* Nombre de los Atributos de la cartografía de la red navegable que se consultan para la exportación
|
||||||
|
*/
|
||||||
|
public struct AtributosNW
|
||||||
|
{
|
||||||
|
public static string atr_TF; //<Atributo del campo Oneway que indica TO FROM
|
||||||
|
public static string atr_FT; //<Atributo del campo Oneway que indica FROM TO
|
||||||
|
public static string atr_N; //<Atributo del campo Oneway que indica NONE
|
||||||
|
public static string atr_pedes; //<Atributo del campo FOW que indica peatonal
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -32,10 +32,6 @@ namespace OliviaAddInPro.Model
|
||||||
* Tipo de unidades del tiempo de tto
|
* Tipo de unidades del tiempo de tto
|
||||||
*/
|
*/
|
||||||
public int UdsTTto { get; set; } = (int)GeneralDef.OlvTiposTto.OlvTipTtoNoDef;
|
public int UdsTTto { get; set; } = (int)GeneralDef.OlvTiposTto.OlvTipTtoNoDef;
|
||||||
/**
|
|
||||||
* Path a una capa auxiliar que almacena las columnas de sectorización y planif
|
|
||||||
*/
|
|
||||||
public string CapaAuxPlanif = string.Empty;
|
|
||||||
/**
|
/**
|
||||||
* Instancia para las funciones de exportación y demás
|
* Instancia para las funciones de exportación y demás
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -236,7 +236,7 @@ namespace OliviaAddInPro.Model
|
||||||
*/
|
*/
|
||||||
public static String[] ambs_gdb = new String[(int)LimpiezaDef.AmbitsTra.AmbN];
|
public static String[] ambs_gdb = new String[(int)LimpiezaDef.AmbitsTra.AmbN];
|
||||||
/**
|
/**
|
||||||
* Array de strings con los prefijos del tiupo de tratamiento para poner a "ambs_gdb" para que no haya posibles capas duplicadas
|
* Array de strings con los prefijos del tipo de tratamiento para poner a "ambs_gdb" para que no haya posibles capas duplicadas
|
||||||
*/
|
*/
|
||||||
public static String[] preftto_gdb = new String[(int)TiposTto.TtoN - 1];
|
public static String[] preftto_gdb = new String[(int)TiposTto.TtoN - 1];
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -937,56 +937,46 @@ namespace OliviaAddInPro.Model
|
||||||
public double Giro_max_vehiculo { get; set; }
|
public double Giro_max_vehiculo { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
#region CamposRecogida
|
#region CamposRecogida
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Campos Recogida")]
|
[Category("Campos Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("ID")]
|
||||||
[Description("")]
|
[Description("Campo para consultar el ID del contenedor")]
|
||||||
public string id { get; set; }
|
public string id { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Campos Recogida")]
|
[Category("Campos Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("Nombre tipo recogida")]
|
||||||
[Description("")]
|
[Description("Campo para consultar el tipo de recogida")]
|
||||||
public string nomrec { get; set; }
|
public string nomrec { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Campos Recogida")]
|
[Category("Campos Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("Lateralidad")]
|
||||||
[Description("")]
|
[Description("Campo para consultar la lateralidad")]
|
||||||
public string lateralidad { get; set; }
|
public string lateralidad { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Campos Recogida")]
|
[Category("Campos Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("Fracción")]
|
||||||
[Description("")]
|
[Description("Campo para consultar la fracción")]
|
||||||
public string frac { get; set; }
|
public string frac { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Campos Recogida")]
|
[Category("Campos Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("Capacidad")]
|
||||||
[Description("")]
|
[Description("Campo para consultar la capacidad, en m3")]
|
||||||
public string capac { get; set; }
|
public string capac { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Campos Recogida")]
|
[Category("Campos Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("Unidades")]
|
||||||
[Description("")]
|
[Description("Campo para consultar el número de contenedores en ese punto")]
|
||||||
public string uds { get; set; }
|
public string uds { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Campos Recogida")]
|
[Category("Campos Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("Kg a recoger")]
|
||||||
[Description("")]
|
[Description("Campo para consultar los kg del contenedor")]
|
||||||
public string kgrec { get; set; }
|
public string kgrec { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Campos Recogida")]
|
[Category("Campos Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("Kg defecto")]
|
||||||
[Description("")]
|
[Description("Indica los kg a utilizar para todos los contenedores")]
|
||||||
public int kgrec_val { get; set; }
|
public int kgrec_val { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Campos Recogida")]
|
[Category("Campos Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("¿Lleno?")]
|
||||||
[Description("")]
|
[Description("Indica si se debe considerar que todos los contenedores están llenos")]
|
||||||
public int is_lleno { get; set; }
|
public bool is_lleno { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Campos Recogida")]
|
[Category("Campos Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("¿Lee el campo de kg?")]
|
||||||
[Description("")]
|
[Description("Indica si se deben leer los kg de cada contenedor del campo 'Kg a recoger'")]
|
||||||
public int is_campo { get; set; }
|
public bool is_campo { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
#region AtributosRecogida
|
#region AtributosRecogida
|
||||||
|
|
@ -1049,154 +1039,123 @@ namespace OliviaAddInPro.Model
|
||||||
[Description("Atributo para carga izquierda")]
|
[Description("Atributo para carga izquierda")]
|
||||||
public string izquierda { get; set; }
|
public string izquierda { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ParametrosRecogida
|
#region ParametrosRecogida
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int t_llega_sale { get; set; }
|
public int t_llega_sale { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int t_descarga { get; set; }
|
public int t_descarga { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int R_t_convenio { get; set; }
|
public int R_t_convenio { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int R_t_descanso { get; set; }
|
public int R_t_descanso { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int R_hora_inicio { get; set; } //ES UNA HORA, SON LOS MINUTOS DESDE LAS 00, PERO TIENE QUE APARECER CON FORMATO DE TIME 07:30, POR EJEMPLO
|
public int R_hora_inicio { get; set; } //ES UNA HORA, SON LOS MINUTOS DESDE LAS 00, PERO TIENE QUE APARECER CON FORMATO DE TIME 07:30, POR EJEMPLO
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int dens_vehi_org { get; set; }
|
public int dens_vehi_org { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int dens_vehi_res { get; set; }
|
public int dens_vehi_res { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int dens_vehi_env { get; set; }
|
public int dens_vehi_env { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int dens_vehi_pap { get; set; }
|
public int dens_vehi_pap { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int dens_vehi_vid { get; set; }
|
public int dens_vehi_vid { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int dens_vehi_otr { get; set; }
|
public int dens_vehi_otr { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int dens_cont_org { get; set; }
|
public int dens_cont_org { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int dens_cont_res { get; set; }
|
public int dens_cont_res { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int dens_cont_env { get; set; }
|
public int dens_cont_env { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int dens_cont_pap { get; set; }
|
public int dens_cont_pap { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int dens_cont_vid { get; set; }
|
public int dens_cont_vid { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int dens_cont_otr { get; set; }
|
public int dens_cont_otr { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public double anch_vehi_3 { get; set; }
|
public double anch_vehi_3 { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public double anch_vehi_2 { get; set; }
|
public double anch_vehi_2 { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public double anch_vehi_s { get; set; }
|
public double anch_vehi_s { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public double radio_giro_3 { get; set; }
|
public double radio_giro_3 { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public double radio_giro_2 { get; set; }
|
public double radio_giro_2 { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public double radio_giro_s { get; set; }
|
public double radio_giro_s { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int t_vaci_trasera { get; set; }
|
public int t_vaci_trasera { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int t_vaci_lateral { get; set; }
|
public int t_vaci_lateral { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int t_vaci_superior { get; set; }
|
public int t_vaci_superior { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int t_vaci_bilateral { get; set; }
|
public int t_vaci_bilateral { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int t_vaci_bolseo { get; set; }
|
public int t_vaci_bolseo { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
public int t_vaci_lavado { get; set; }
|
public int t_vaci_lavado { get; set; }
|
||||||
[Browsable(false)]
|
|
||||||
[Category("Parametros Recogida")]
|
[Category("Parametros Recogida")]
|
||||||
[DisplayName("")]
|
[DisplayName("")]
|
||||||
[Description("")]
|
[Description("")]
|
||||||
|
|
@ -1261,7 +1220,7 @@ namespace OliviaAddInPro.Model
|
||||||
[Category("Atributos network")]
|
[Category("Atributos network")]
|
||||||
[DisplayName("Peatonal")]
|
[DisplayName("Peatonal")]
|
||||||
[Description("Valor que indica que es calle peatonal")]
|
[Description("Valor que indica que es calle peatonal")]
|
||||||
public int atr_pedes { get; set; }
|
public string atr_pedes { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@ namespace OliviaAddInPro.Model
|
||||||
Ejec=8,//está ejecutando por primera vez
|
Ejec=8,//está ejecutando por primera vez
|
||||||
Config2=16,//está configurando después de haber planificado ya al menos una primera vez
|
Config2=16,//está configurando después de haber planificado ya al menos una primera vez
|
||||||
Ejec2=32,//está ejecutando después de haber planificado ya al menos una primera vez
|
Ejec2=32,//está ejecutando después de haber planificado ya al menos una primera vez
|
||||||
Maqueta =64,
|
Props = 64,//está editando propiedades
|
||||||
Conifg=128,
|
Maqueta=128,
|
||||||
}
|
}
|
||||||
static class OliviaGlob
|
static class OliviaGlob
|
||||||
{
|
{
|
||||||
|
|
@ -42,7 +42,7 @@ namespace OliviaAddInPro.Model
|
||||||
public static string DirData; //<Dir donde están los shapefiles data y nw
|
public static string DirData; //<Dir donde están los shapefiles data y nw
|
||||||
public static string PathData; //<Path del shp con datos a planificar, ya filtrados e intersecados con las zonas y niveles
|
public static string PathData; //<Path del shp con datos a planificar, ya filtrados e intersecados con las zonas y niveles
|
||||||
public static string PathNW; //<Path del shp con la red navegable
|
public static string PathNW; //<Path del shp con la red navegable
|
||||||
public static string PathCartela; //<Path de la cartela que se emplea como plantilla para la generación de mapas en formato PDF
|
|
||||||
//paths GDBs
|
//paths GDBs
|
||||||
public static string PathGdbGen; //<Path de la gdb general de la que se extraen los datos de interés
|
public static string PathGdbGen; //<Path de la gdb general de la que se extraen los datos de interés
|
||||||
public static string PathGdbNw; //<Path de la gdb referente a la red de carreteras de TOMTOM
|
public static string PathGdbNw; //<Path de la gdb referente a la red de carreteras de TOMTOM
|
||||||
|
|
@ -52,6 +52,7 @@ namespace OliviaAddInPro.Model
|
||||||
|
|
||||||
private static TiposEjecucion tipoEjec = TiposEjecucion.Ninguno;
|
private static TiposEjecucion tipoEjec = TiposEjecucion.Ninguno;
|
||||||
private static Limpieza limp = new Limpieza();
|
private static Limpieza limp = new Limpieza();
|
||||||
|
private static Recogida reco = new Recogida();
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
public static TiposEjecucion TipoEjec
|
public static TiposEjecucion TipoEjec
|
||||||
|
|
@ -64,6 +65,11 @@ namespace OliviaAddInPro.Model
|
||||||
get { return limp; }
|
get { return limp; }
|
||||||
set { limp = value; }
|
set { limp = value; }
|
||||||
}
|
}
|
||||||
|
public static Recogida Reco
|
||||||
|
{
|
||||||
|
get { return reco; }
|
||||||
|
set { reco = value; }
|
||||||
|
}
|
||||||
public static EjecServ Serv { get; } = new EjecServ();
|
public static EjecServ Serv { get; } = new EjecServ();
|
||||||
public static SpatialReference SpatRef { get; set; } = null;
|
public static SpatialReference SpatRef { get; set; } = null;
|
||||||
public static ProgressDialog progrDialog { get; set; } = null;
|
public static ProgressDialog progrDialog { get; set; } = null;
|
||||||
|
|
@ -73,7 +79,9 @@ namespace OliviaAddInPro.Model
|
||||||
{
|
{
|
||||||
IniDefault();
|
IniDefault();
|
||||||
LimpiezaDef.iniciaLimpDef();
|
LimpiezaDef.iniciaLimpDef();
|
||||||
|
RecogidaDef.iniciaRecoDef();
|
||||||
limp = new Limpieza();
|
limp = new Limpieza();
|
||||||
|
reco = new Recogida();
|
||||||
SpatRef = ArcGIS.Core.Geometry.SpatialReferenceBuilder.CreateSpatialReference(GeneralDef.SpatRefDef);
|
SpatRef = ArcGIS.Core.Geometry.SpatialReferenceBuilder.CreateSpatialReference(GeneralDef.SpatRefDef);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -85,6 +93,10 @@ namespace OliviaAddInPro.Model
|
||||||
{
|
{
|
||||||
return (OliviaGlob.TipoEjec & TiposEjecucion.Reco) == TiposEjecucion.Reco;
|
return (OliviaGlob.TipoEjec & TiposEjecucion.Reco) == TiposEjecucion.Reco;
|
||||||
}
|
}
|
||||||
|
public static bool IsProps()
|
||||||
|
{
|
||||||
|
return (OliviaGlob.TipoEjec & TiposEjecucion.Props) == TiposEjecucion.Props;
|
||||||
|
}
|
||||||
public static bool IsConfig2()
|
public static bool IsConfig2()
|
||||||
{
|
{
|
||||||
return (OliviaGlob.TipoEjec & TiposEjecucion.Config2) == TiposEjecucion.Config2;
|
return (OliviaGlob.TipoEjec & TiposEjecucion.Config2) == TiposEjecucion.Config2;
|
||||||
|
|
@ -118,6 +130,17 @@ namespace OliviaAddInPro.Model
|
||||||
DockpaneRecogidaViewModel.Hide_();
|
DockpaneRecogidaViewModel.Hide_();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(OliviaGlob.IsProps())
|
||||||
|
{
|
||||||
|
if (sh)
|
||||||
|
{
|
||||||
|
DockpaneConfigViewModel.Show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DockpaneConfigViewModel.Hide_();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -148,12 +171,6 @@ namespace OliviaAddInPro.Model
|
||||||
|
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
//Capas, consultas, atributos y filtros de LIMPIEZA
|
//Capas, consultas, atributos y filtros de LIMPIEZA
|
||||||
LimpiezaDef.Capas.ftclass_niveles = "a2_Niveles_Limpieza";
|
|
||||||
LimpiezaDef.Capas.ftclass_cont = "a_Contendores";
|
|
||||||
LimpiezaDef.Capas.ftclass_mobi = "a_Mobiliario";
|
|
||||||
LimpiezaDef.Capas.ftclass_limp_mec = "b_LimpMececanica";
|
|
||||||
LimpiezaDef.Capas.ftclass_instala = "c_Instalaciones";
|
|
||||||
|
|
||||||
LimpiezaDef.Campos.consulta_entidad = c.cons_tip_ent;
|
LimpiezaDef.Campos.consulta_entidad = c.cons_tip_ent;
|
||||||
LimpiezaDef.Campos.consulta_mecan = c.cons_mecaniz;
|
LimpiezaDef.Campos.consulta_mecan = c.cons_mecaniz;
|
||||||
LimpiezaDef.Campos.consulta_observ = c.cons_obser;
|
LimpiezaDef.Campos.consulta_observ = c.cons_obser;
|
||||||
|
|
@ -256,8 +273,9 @@ namespace OliviaAddInPro.Model
|
||||||
LimpiezaDef.OtrosParam.desv_max_abs = c.Desv_max_abs;
|
LimpiezaDef.OtrosParam.desv_max_abs = c.Desv_max_abs;
|
||||||
|
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
|
/////FALTA MACHEAR A CONFIG
|
||||||
//Capas, consultas, atributos y filtros de RECOGIDA
|
//Capas, consultas, atributos y filtros de RECOGIDA
|
||||||
/*
|
|
||||||
RecogidaDef.campos_def.cons_id = RecogidaDef.campos.cons_id = "OBJECTID";
|
RecogidaDef.campos_def.cons_id = RecogidaDef.campos.cons_id = "OBJECTID";
|
||||||
RecogidaDef.campos_def.cons_nomrec = RecogidaDef.campos.cons_nomrec = "NOMB_TIP_REC";
|
RecogidaDef.campos_def.cons_nomrec = RecogidaDef.campos.cons_nomrec = "NOMB_TIP_REC";
|
||||||
RecogidaDef.campos_def.cons_lateral = RecogidaDef.campos.cons_lateral = "LATERALIDAD";
|
RecogidaDef.campos_def.cons_lateral = RecogidaDef.campos.cons_lateral = "LATERALIDAD";
|
||||||
|
|
@ -265,7 +283,7 @@ namespace OliviaAddInPro.Model
|
||||||
RecogidaDef.campos_def.cons_capac = RecogidaDef.campos.cons_capac = "CAPACIDAD";
|
RecogidaDef.campos_def.cons_capac = RecogidaDef.campos.cons_capac = "CAPACIDAD";
|
||||||
RecogidaDef.campos_def.cons_uds = RecogidaDef.campos.cons_uds = "UNIDADES";
|
RecogidaDef.campos_def.cons_uds = RecogidaDef.campos.cons_uds = "UNIDADES";
|
||||||
RecogidaDef.campos_def.cons_kgrec = RecogidaDef.campos.cons_kgrec = "KGRECO";
|
RecogidaDef.campos_def.cons_kgrec = RecogidaDef.campos.cons_kgrec = "KGRECO";
|
||||||
RecogidaDef.kgrec_cont = RecogidaDef.kgrec_cont = 200;
|
RecogidaDef.kgrec_cont = 200;
|
||||||
|
|
||||||
//Rellena los tipos de fracción
|
//Rellena los tipos de fracción
|
||||||
RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Organica] = "Organica";
|
RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Organica] = "Organica";
|
||||||
|
|
@ -331,32 +349,18 @@ namespace OliviaAddInPro.Model
|
||||||
RecogidaDef.tipos_lateralidad[(int)RecogidaDef.Lateralidad.Dcha] = "Derecha";
|
RecogidaDef.tipos_lateralidad[(int)RecogidaDef.Lateralidad.Dcha] = "Derecha";
|
||||||
RecogidaDef.tipos_lateralidad[(int)RecogidaDef.Lateralidad.Izqda] = "Izquierda";
|
RecogidaDef.tipos_lateralidad[(int)RecogidaDef.Lateralidad.Izqda] = "Izquierda";
|
||||||
|
|
||||||
//Campos de SENSORES
|
|
||||||
RecogidaDef.campos_def.cons_id_sens = RecogidaDef.campos.cons_id_sens = "OBJECTID";
|
|
||||||
RecogidaDef.campos_def.cons_url_sens = RecogidaDef.campos.cons_url_sens = "http://localiza.info/Utilidades/APIManager.aspx";
|
|
||||||
RecogidaDef.campos_def.cons_fecha_sens = RecogidaDef.campos.cons_fecha_sens = "2000-01-01T00:00:00";
|
|
||||||
RecogidaDef.campos_def.cons_fechaf_sens = RecogidaDef.campos.cons_fechaf_sens = "2050-01-01T00:00:00";
|
|
||||||
|
|
||||||
//Campos de CSV
|
|
||||||
RecogidaDef.campos_def.cons_id_csv = RecogidaDef.campos.cons_id_csv = "Nº";
|
|
||||||
RecogidaDef.campos_def.cons_llen_csv = RecogidaDef.campos.cons_llen_csv = "Lectura";
|
|
||||||
RecogidaDef.campos_def.cons_fecha_csv = RecogidaDef.campos.cons_fecha_csv = "Fecha";
|
|
||||||
RecogidaDef.campos_def.cons_fechai_csv = RecogidaDef.campos.cons_fechai_csv = "01/01/2000 0:01";
|
|
||||||
RecogidaDef.campos_def.cons_fechaf_csv = RecogidaDef.campos.cons_fechaf_csv = "01/01/2049 0:00";
|
|
||||||
|
|
||||||
//Campos de la red navegable que se leen
|
//Campos de la red navegable que se leen
|
||||||
ComunDef.CamposNW.cons_onew = "ONEWAY";
|
ComunDef.CamposNW.cons_onew = c.cons_onew;
|
||||||
ComunDef.CamposNW.cons_kph = "KPH";
|
ComunDef.CamposNW.cons_kph = c.cons_kph;
|
||||||
ComunDef.CamposNW.cons_fow = "FOW";
|
ComunDef.CamposNW.cons_fow = c.cons_fow;
|
||||||
ComunDef.CamposNW.cons_name = "NAME";
|
ComunDef.CamposNW.cons_name = c.cons_name;
|
||||||
//Atributos de la red navegable que se leen
|
//Atributos de la red navegable que se leen
|
||||||
ComunDef.AtributosNW.atr_TF = "TF";
|
ComunDef.AtributosNW.atr_TF = c.atr_TF;
|
||||||
ComunDef.AtributosNW.atr_FT = "FT";
|
ComunDef.AtributosNW.atr_FT = c.atr_FT;
|
||||||
ComunDef.AtributosNW.atr_N = "N";
|
ComunDef.AtributosNW.atr_N = c.atr_N;
|
||||||
ComunDef.AtributosNW.atr_pedes = "14";
|
ComunDef.AtributosNW.atr_pedes = c.atr_pedes;
|
||||||
|
|
||||||
//Nombre de simbolos VSM
|
|
||||||
RecogidaDef.rellena_simbrec_vsm();*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,370 +0,0 @@
|
||||||
using ArcGIS.Desktop.Internal.Core;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using OliviaAddInPro.Services;
|
|
||||||
using ArcGIS.Core.Geometry;
|
|
||||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace OliviaAddInPro.Model
|
|
||||||
{
|
|
||||||
[Flags]
|
|
||||||
/**
|
|
||||||
* 2 primeros bit indican si es nada (0), limp (1), reco(2), u otros (3)
|
|
||||||
* 3er bit indica si es config
|
|
||||||
* 4º bit indica ejec
|
|
||||||
*/
|
|
||||||
public enum TiposEjecucion
|
|
||||||
{
|
|
||||||
Ninguno = 0,
|
|
||||||
Limp=1,
|
|
||||||
Reco=2,
|
|
||||||
Config = 4, //está configurando por primera vez
|
|
||||||
Ejec=8,//está ejecutando por primera vez
|
|
||||||
Config2=16,//está configurando después de haber planificado ya al menos una primera vez
|
|
||||||
Ejec2=32,//está ejecutando después de haber planificado ya al menos una primera vez
|
|
||||||
Maqueta =64,
|
|
||||||
Conifg=128,
|
|
||||||
}
|
|
||||||
static class OliviaGlob
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Paths de la configuración
|
|
||||||
*/
|
|
||||||
public struct Paths
|
|
||||||
{
|
|
||||||
public static string PathWork; //<Path del directorio de trabajo
|
|
||||||
public static string PathCfg; //<Path de la configuración general
|
|
||||||
public static string PathExeOlivia; //<Path del ejecutable de OliviaTask
|
|
||||||
public static string PathTemp; //<Path temporal de generación de archivos intermedios
|
|
||||||
public static string DirData; //<Dir donde están los shapefiles data y nw
|
|
||||||
public static string PathData; //<Path del shp con datos a planificar, ya filtrados e intersecados con las zonas y niveles
|
|
||||||
public static string PathNW; //<Path del shp con la red navegable
|
|
||||||
public static string PathCartela; //<Path de la cartela que se emplea como plantilla para la generación de mapas en formato PDF
|
|
||||||
//paths GDBs
|
|
||||||
public static string PathGdbGen; //<Path de la gdb general de la que se extraen los datos de interés
|
|
||||||
public static string PathGdbNw; //<Path de la gdb referente a la red de carreteras de TOMTOM
|
|
||||||
public static string PathSimbVSM; //<Path de la galeria de estilos aplicada por VSM
|
|
||||||
public static string PathSimbESRI; //<Path de la galeria de estilos de ESRI
|
|
||||||
};
|
|
||||||
|
|
||||||
private static TiposEjecucion tipoEjec = TiposEjecucion.Ninguno;
|
|
||||||
private static Limpieza limp = new Limpieza();
|
|
||||||
|
|
||||||
#region Properties
|
|
||||||
public static TiposEjecucion TipoEjec
|
|
||||||
{
|
|
||||||
get { return tipoEjec; }
|
|
||||||
set { tipoEjec = value; }
|
|
||||||
}
|
|
||||||
public static Limpieza Limp
|
|
||||||
{
|
|
||||||
get { return limp; }
|
|
||||||
set { limp = value; }
|
|
||||||
}
|
|
||||||
public static EjecServ Serv { get; } = new EjecServ();
|
|
||||||
public static SpatialReference SpatRef { get; set; } = null;
|
|
||||||
public static ProgressDialog progrDialog { get; set; } = null;
|
|
||||||
#endregion Properties
|
|
||||||
|
|
||||||
public static void Inicia()
|
|
||||||
{
|
|
||||||
IniDefault();
|
|
||||||
LimpiezaDef.iniciaLimpDef();
|
|
||||||
limp = new Limpieza();
|
|
||||||
SpatRef = ArcGIS.Core.Geometry.SpatialReferenceBuilder.CreateSpatialReference(GeneralDef.SpatRefDef);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsLimp()
|
|
||||||
{
|
|
||||||
return (OliviaGlob.TipoEjec & TiposEjecucion.Limp) == TiposEjecucion.Limp;
|
|
||||||
}
|
|
||||||
public static bool IsReco()
|
|
||||||
{
|
|
||||||
return (OliviaGlob.TipoEjec & TiposEjecucion.Reco) == TiposEjecucion.Reco;
|
|
||||||
}
|
|
||||||
public static bool IsConfig2()
|
|
||||||
{
|
|
||||||
return (OliviaGlob.TipoEjec & TiposEjecucion.Config2) == TiposEjecucion.Config2;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Habilita Sh=true
|
|
||||||
* o Deshabilita sh=false
|
|
||||||
* el pane correspondiente
|
|
||||||
*/
|
|
||||||
public static void ShowHidePane(bool sh)
|
|
||||||
{
|
|
||||||
if (OliviaGlob.IsLimp())
|
|
||||||
{
|
|
||||||
if (sh)
|
|
||||||
{
|
|
||||||
DockpaneLimpiezaViewModel.Show();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DockpaneLimpiezaViewModel.Hide_();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (OliviaGlob.IsReco())
|
|
||||||
{
|
|
||||||
if (sh)
|
|
||||||
{
|
|
||||||
DockpaneRecogidaViewModel.Show();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DockpaneRecogidaViewModel.Hide_();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Inicializa los nombres por defecto de las variables, para debug por si no hay instalador
|
|
||||||
*/
|
|
||||||
public static void IniDefault()
|
|
||||||
{
|
|
||||||
<<<<<<< HEAD
|
|
||||||
var c = ConfigServ.Serv.Leer();
|
|
||||||
Paths.PathWork = c.path_work;
|
|
||||||
Paths.PathExeOlivia = c.path_exe;
|
|
||||||
Paths.DirData = c.path_data;
|
|
||||||
Paths.PathTemp = c.path_temp;
|
|
||||||
c.PathCartela = c.PathCartela;
|
|
||||||
=======
|
|
||||||
Paths.PathWork = "D:\\Proyectos\\Olivia\\Instal2.0\\";
|
|
||||||
Paths.PathExeOlivia = "D:\\Proyectos\\Olivia\\Instal2.0\\release\\OliviaTasks.exe";
|
|
||||||
Paths.DirData = "D:\\Proyectos\\Olivia\\Instal2.0\\data";
|
|
||||||
Paths.PathTemp = "D:\\Proyectos\\Olivia\\Instal2.0\\temp";
|
|
||||||
Paths.PathCartela = "C:\\olivia\\data\\Plantilla.mxd";
|
|
||||||
>>>>>>> origin/Elena/export
|
|
||||||
|
|
||||||
Paths.PathGdbGen = c.PathGdbGen;
|
|
||||||
Paths.PathGdbNw = c.red_carreteras;
|
|
||||||
Paths.PathSimbVSM = c.PathSimbVSM;
|
|
||||||
Paths.PathSimbESRI = c.PathSimbESRI;
|
|
||||||
//puerto = c.puerto;
|
|
||||||
//buff_export = c.buffer_export;
|
|
||||||
|
|
||||||
///////////////////////////////////////
|
|
||||||
//Capas, consultas y filtros GENERALES
|
|
||||||
/*Capas.ftclass_ejes = c.eje_via;
|
|
||||||
Capas.ftclass_zonas = "SubNiveles";
|
|
||||||
Capas.ftclass_restri = "TomTom_Q4_2015___rs";
|
|
||||||
Capas.ftclass_muni = c.municipios;*/
|
|
||||||
|
|
||||||
///////////////////////////////////////
|
|
||||||
//Capas, consultas, atributos y filtros de LIMPIEZA
|
|
||||||
LimpiezaDef.Capas.ftclass_niveles = "a2_Niveles_Limpieza";
|
|
||||||
LimpiezaDef.Capas.ftclass_cont = "a_Contendores";
|
|
||||||
LimpiezaDef.Capas.ftclass_mobi = "a_Mobiliario";
|
|
||||||
LimpiezaDef.Capas.ftclass_limp_mec = "b_LimpMececanica";
|
|
||||||
LimpiezaDef.Capas.ftclass_instala = "c_Instalaciones";
|
|
||||||
|
|
||||||
LimpiezaDef.Campos.consulta_entidad = c.cons_tip_ent;
|
|
||||||
LimpiezaDef.Campos.consulta_mecan = c.cons_mecaniz;
|
|
||||||
LimpiezaDef.Campos.consulta_observ = c.cons_obser;
|
|
||||||
LimpiezaDef.Campos.consulta_anch_tip = c.cons_anch_tip;
|
|
||||||
LimpiezaDef.Campos.consulta_tipolo = c.cons_tipolo;
|
|
||||||
LimpiezaDef.Campos.consulta_sector = c.consulta_sector;
|
|
||||||
LimpiezaDef.Campos.consulta_secuen = c.consulta_secuen;
|
|
||||||
|
|
||||||
LimpiezaDef.Atributos.atr_esca = c.atr_esca;
|
|
||||||
LimpiezaDef.Atributos.atr_fuent = c.atr_fuent;
|
|
||||||
LimpiezaDef.Atributos.atr_infan = c.atr_infan;
|
|
||||||
LimpiezaDef.Atributos.atr_pape = c.atr_pape;
|
|
||||||
LimpiezaDef.Atributos.atr_paso_niv = c.atr_paso_niv;
|
|
||||||
LimpiezaDef.Atributos.atr_pipi = c.atr_pipi;
|
|
||||||
LimpiezaDef.Atributos.atr_sane = c.atr_sane;
|
|
||||||
LimpiezaDef.Atributos.atr_acera = c.atr_acera;
|
|
||||||
LimpiezaDef.Atributos.atr_aparc = c.atr_aparc;
|
|
||||||
LimpiezaDef.Atributos.atr_bord = c.atr_bord;
|
|
||||||
LimpiezaDef.Atributos.atr_hoja = c.atr_hoja;
|
|
||||||
LimpiezaDef.Atributos.atr_peat = c.atr_peat;
|
|
||||||
LimpiezaDef.Atributos.atr_terri = c.atr_terri;
|
|
||||||
LimpiezaDef.Atributos.atr_ocio = c.atr_ocio;
|
|
||||||
LimpiezaDef.Atributos.atr_org_ofi = c.atr_org_ofi;
|
|
||||||
LimpiezaDef.Atributos.atr_parq = c.atr_parq;
|
|
||||||
LimpiezaDef.Atributos.atr_park = c.atr_park;
|
|
||||||
LimpiezaDef.Atributos.atr_play = c.atr_play;
|
|
||||||
LimpiezaDef.Atributos.atr_polid = c.atr_polid;
|
|
||||||
LimpiezaDef.Atributos.atr_turis = c.atr_turis;
|
|
||||||
LimpiezaDef.Atributos.atr_solar = c.atr_solar;
|
|
||||||
LimpiezaDef.Atributos.atr_suelo = c.atr_suelo;
|
|
||||||
LimpiezaDef.Atributos.atr_ap_lin = c.atr_ap_lin;
|
|
||||||
LimpiezaDef.Atributos.atr_ap_bat = c.atr_ap_bat;
|
|
||||||
|
|
||||||
//para el grupo PARAMETROS de LIMPIEZA
|
|
||||||
LimpiezaDef.Parametros.t_ttoM = c.t_tratamiento_max;
|
|
||||||
LimpiezaDef.Parametros.t_ttom = c.t_tratamiento_min;
|
|
||||||
LimpiezaDef.Parametros.v_despM = c.v_desplaz_max;
|
|
||||||
LimpiezaDef.Parametros.v_despm = c.v_desplaz_min;
|
|
||||||
LimpiezaDef.Parametros.t_cardescM = c.t_carga_desc_max;
|
|
||||||
LimpiezaDef.Parametros.t_cardescm = c.t_carga_desc_min;
|
|
||||||
LimpiezaDef.Parametros.t_cardesc = c.t_carga_desc;
|
|
||||||
LimpiezaDef.Parametros.t_despM = c.t_carga_desc_max;
|
|
||||||
LimpiezaDef.Parametros.t_despm = c.t_carga_desc_min;
|
|
||||||
LimpiezaDef.Parametros.t_desp = c.t_desplaz;
|
|
||||||
LimpiezaDef.Parametros.t_convM = c.t_convenio_max;
|
|
||||||
LimpiezaDef.Parametros.t_convm = c.t_convenio_min;
|
|
||||||
LimpiezaDef.Parametros.t_conv = c.t_convenio;
|
|
||||||
LimpiezaDef.Parametros.t_descansoM = c.t_descanso_max;
|
|
||||||
LimpiezaDef.Parametros.t_descansom = c.t_descanso_min;
|
|
||||||
LimpiezaDef.Parametros.t_descanso = c.t_descanso;
|
|
||||||
LimpiezaDef.Parametros.h_inicio = c.hora_inicio;
|
|
||||||
LimpiezaDef.Parametros.ancho_viaM = c.ancho_via_max;
|
|
||||||
LimpiezaDef.Parametros.ancho_viam = c.ancho_via_min;
|
|
||||||
LimpiezaDef.Parametros.ancho_via = c.ancho_via;
|
|
||||||
LimpiezaDef.Parametros.ttoBarMan = c.t_tratamiento_BarMan;
|
|
||||||
LimpiezaDef.Parametros.ttoBarManMant = c.t_tratamiento_BarManMant;
|
|
||||||
LimpiezaDef.Parametros.ttoBarMMot = c.t_tratamiento_BarMMot;
|
|
||||||
LimpiezaDef.Parametros.ttoBarMC = c.t_tratamiento_BarMC;
|
|
||||||
LimpiezaDef.Parametros.ttoBarMAP = c.t_tratamiento_BarMAP;
|
|
||||||
LimpiezaDef.Parametros.ttoBarMix = c.t_tratamiento_BarMix;
|
|
||||||
LimpiezaDef.Parametros.ttoBalMan = c.t_tratamiento_BalMan;
|
|
||||||
LimpiezaDef.Parametros.ttoBalMC = c.t_tratamiento_BalMC;
|
|
||||||
LimpiezaDef.Parametros.ttoBalMAP = c.t_tratamiento_BalMAP;
|
|
||||||
LimpiezaDef.Parametros.ttoBalMix = c.t_tratamiento_BalMix;
|
|
||||||
LimpiezaDef.Parametros.ttoBL = c.t_tratamiento_BL;
|
|
||||||
LimpiezaDef.Parametros.ttoCH = c.t_tratamiento_CH;
|
|
||||||
LimpiezaDef.Parametros.ttoVPap = c.t_tratamiento_VPap;
|
|
||||||
LimpiezaDef.Parametros.ttoLPap = c.t_tratamiento_LPap;
|
|
||||||
LimpiezaDef.Parametros.ttoLC = c.t_tratamiento_LC;
|
|
||||||
LimpiezaDef.Parametros.ttoLZI = c.t_tratamiento_LZI;
|
|
||||||
LimpiezaDef.Parametros.ttoLPip = c.t_tratamiento_LPip;
|
|
||||||
LimpiezaDef.Parametros.ttoLS = c.t_tratamiento_LS;
|
|
||||||
LimpiezaDef.Parametros.vdespBarMan = c.v_desp_BarMan;
|
|
||||||
LimpiezaDef.Parametros.vdespBarManMant = c.v_desp_BarManMant;
|
|
||||||
LimpiezaDef.Parametros.vdespBarMMot = c.v_desp_BarMMot;
|
|
||||||
LimpiezaDef.Parametros.vdespBarMC = c.v_desp_BarMC;
|
|
||||||
LimpiezaDef.Parametros.vdespBarMAP = c.v_desp_BarMAP;
|
|
||||||
LimpiezaDef.Parametros.vdespBarMix = c.v_desp_BarMix;
|
|
||||||
LimpiezaDef.Parametros.vdespBalMan = c.v_desp_BalMan;
|
|
||||||
LimpiezaDef.Parametros.vdespBalMC = c.v_desp_BalMC;
|
|
||||||
LimpiezaDef.Parametros.vdespBalMAP = c.v_desp_BalMAP;
|
|
||||||
LimpiezaDef.Parametros.vdespBalMix = c.v_desp_BalMix;
|
|
||||||
LimpiezaDef.Parametros.vdespBL = c.v_desp_BL;
|
|
||||||
LimpiezaDef.Parametros.vdespCH = c.v_desp_CH;
|
|
||||||
LimpiezaDef.Parametros.vdespVPap = c.v_desp_VPap;
|
|
||||||
LimpiezaDef.Parametros.vdespLPap = c.v_desp_LPap;
|
|
||||||
LimpiezaDef.Parametros.vdespLC = c.v_desp_LC;
|
|
||||||
LimpiezaDef.Parametros.vdespLZI = c.v_desp_LZI;
|
|
||||||
LimpiezaDef.Parametros.vdespLPip = c.v_desp_LPip;
|
|
||||||
LimpiezaDef.Parametros.vdespLS = c.v_desp_LS;
|
|
||||||
LimpiezaDef.Parametros.umbral_reco = 80;
|
|
||||||
|
|
||||||
LimpiezaDef.OtrosParam.giro_max = c.Giro_max_vehiculo;
|
|
||||||
LimpiezaDef.OtrosParam.anch_peat = c.Ancho_peat_def;
|
|
||||||
LimpiezaDef.OtrosParam.anch_ace = c.Ancho_acera_def;
|
|
||||||
LimpiezaDef.OtrosParam.anch_aplin = c.Ancho_ap_lin_def;
|
|
||||||
LimpiezaDef.OtrosParam.anch_apbat = c.Ancho_ap_bat_def;
|
|
||||||
LimpiezaDef.OtrosParam.anch_bordlib = c.Ancho_bord_lib_def;
|
|
||||||
LimpiezaDef.OtrosParam.desv_max = c.Desv_max;
|
|
||||||
LimpiezaDef.OtrosParam.desv_max_abs = c.Desv_max_abs;
|
|
||||||
|
|
||||||
///////////////////////////////////////
|
|
||||||
//Capas, consultas, atributos y filtros de RECOGIDA
|
|
||||||
/*
|
|
||||||
RecogidaDef.campos_def.cons_id = RecogidaDef.campos.cons_id = "OBJECTID";
|
|
||||||
RecogidaDef.campos_def.cons_nomrec = RecogidaDef.campos.cons_nomrec = "NOMB_TIP_REC";
|
|
||||||
RecogidaDef.campos_def.cons_lateral = RecogidaDef.campos.cons_lateral = "LATERALIDAD";
|
|
||||||
RecogidaDef.campos_def.cons_fracc = RecogidaDef.campos.cons_fracc = "FRACCION";
|
|
||||||
RecogidaDef.campos_def.cons_capac = RecogidaDef.campos.cons_capac = "CAPACIDAD";
|
|
||||||
RecogidaDef.campos_def.cons_uds = RecogidaDef.campos.cons_uds = "UNIDADES";
|
|
||||||
RecogidaDef.campos_def.cons_kgrec = RecogidaDef.campos.cons_kgrec = "KGRECO";
|
|
||||||
RecogidaDef.kgrec_cont = RecogidaDef.kgrec_cont = 200;
|
|
||||||
|
|
||||||
//Rellena los tipos de fracción
|
|
||||||
RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Organica] = "Organica";
|
|
||||||
RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Resto] = "Resto";
|
|
||||||
RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Envases] = "Envases";
|
|
||||||
RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Papel] = "PapelCarton";
|
|
||||||
RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Vidrio] = "Vidrio";
|
|
||||||
//Rellena los tipos de carga
|
|
||||||
RecogidaDef.tipos_carg_str[(int)RecogidaDef.TiposCarga.Trasera] = "Carga Trasera";
|
|
||||||
RecogidaDef.tipos_carg_str[(int)RecogidaDef.TiposCarga.Lateral] = "Carga Lateral";
|
|
||||||
RecogidaDef.tipos_carg_str[(int)RecogidaDef.TiposCarga.Superior] = "Carga Superior";
|
|
||||||
RecogidaDef.tipos_carg_str[(int)RecogidaDef.TiposCarga.Bilateral] = "Carga Bilateral";
|
|
||||||
RecogidaDef.tipos_carg_str[(int)RecogidaDef.TiposCarga.BolseoPtaPta] = "Bolseo";
|
|
||||||
RecogidaDef.tipos_carg_str[(int)RecogidaDef.TiposCarga.Lavado] = "Lavado de cont";
|
|
||||||
|
|
||||||
RecogidaDef.Parametros.t_vaciM = 40000;
|
|
||||||
RecogidaDef.Parametros.t_vacim = 0;
|
|
||||||
RecogidaDef.Parametros.t_llegsalM = 40000;
|
|
||||||
RecogidaDef.Parametros.t_llegsalm = 0;
|
|
||||||
RecogidaDef.Parametros.t_llegsal = 5;
|
|
||||||
RecogidaDef.Parametros.t_descM = 40000;
|
|
||||||
RecogidaDef.Parametros.t_descm = 0;
|
|
||||||
RecogidaDef.Parametros.t_desc = 40;
|
|
||||||
RecogidaDef.Parametros.t_convM = 40000;
|
|
||||||
RecogidaDef.Parametros.t_convm = 0;
|
|
||||||
RecogidaDef.Parametros.t_conv = 60 * 8;
|
|
||||||
RecogidaDef.Parametros.t_descansoM = 40000;
|
|
||||||
RecogidaDef.Parametros.t_descansom = 0;
|
|
||||||
RecogidaDef.Parametros.t_descanso = 30;
|
|
||||||
RecogidaDef.Parametros.h_inicio = 420;
|
|
||||||
RecogidaDef.Parametros.dens_vehi_org = 500;
|
|
||||||
RecogidaDef.Parametros.dens_vehi_res = 500;
|
|
||||||
RecogidaDef.Parametros.dens_vehi_env = 120;
|
|
||||||
RecogidaDef.Parametros.dens_vehi_pap = 250;
|
|
||||||
RecogidaDef.Parametros.dens_vehi_vid = 350;
|
|
||||||
RecogidaDef.Parametros.dens_vehi_otr = 100;
|
|
||||||
RecogidaDef.Parametros.dens_cont_org = 150;
|
|
||||||
RecogidaDef.Parametros.dens_cont_res = 100;
|
|
||||||
RecogidaDef.Parametros.dens_cont_env = 28;
|
|
||||||
RecogidaDef.Parametros.dens_cont_pap = 90;
|
|
||||||
RecogidaDef.Parametros.dens_cont_vid = 250;
|
|
||||||
RecogidaDef.Parametros.dens_cont_otr = 100;
|
|
||||||
RecogidaDef.Parametros.anch_vehi_3 = 2.4;
|
|
||||||
RecogidaDef.Parametros.anch_vehi_2 = 2.2;
|
|
||||||
RecogidaDef.Parametros.anch_vehi_s = 2;
|
|
||||||
RecogidaDef.Parametros.rad_giro_3 = 175;
|
|
||||||
RecogidaDef.Parametros.rad_giro_2 = 175;
|
|
||||||
RecogidaDef.Parametros.rad_giro_s = 175;
|
|
||||||
RecogidaDef.Parametros.t_vaci_tra = 30;
|
|
||||||
RecogidaDef.Parametros.t_vaci_lat = 90;
|
|
||||||
RecogidaDef.Parametros.t_vaci_sup = 180;
|
|
||||||
RecogidaDef.Parametros.t_vaci_bi = 100;
|
|
||||||
RecogidaDef.Parametros.t_vaci_bol = 5;
|
|
||||||
RecogidaDef.Parametros.t_vaci_lav = 60;
|
|
||||||
RecogidaDef.Parametros.t_vaci_otr = 60;
|
|
||||||
RecogidaDef.Parametros.kgmaxM = 20000;
|
|
||||||
RecogidaDef.Parametros.kgmaxm = 0;
|
|
||||||
RecogidaDef.Parametros.carga_maxM = 100;
|
|
||||||
RecogidaDef.Parametros.carga_maxm = 50;
|
|
||||||
|
|
||||||
//Atributos LATERALIDAD
|
|
||||||
RecogidaDef.tipos_lateralidad[(int)RecogidaDef.Lateralidad.Ambos] = "Ambos";
|
|
||||||
RecogidaDef.tipos_lateralidad[(int)RecogidaDef.Lateralidad.Dcha] = "Derecha";
|
|
||||||
RecogidaDef.tipos_lateralidad[(int)RecogidaDef.Lateralidad.Izqda] = "Izquierda";
|
|
||||||
|
|
||||||
//Campos de SENSORES
|
|
||||||
RecogidaDef.campos_def.cons_id_sens = RecogidaDef.campos.cons_id_sens = "OBJECTID";
|
|
||||||
RecogidaDef.campos_def.cons_url_sens = RecogidaDef.campos.cons_url_sens = "http://localiza.info/Utilidades/APIManager.aspx";
|
|
||||||
RecogidaDef.campos_def.cons_fecha_sens = RecogidaDef.campos.cons_fecha_sens = "2000-01-01T00:00:00";
|
|
||||||
RecogidaDef.campos_def.cons_fechaf_sens = RecogidaDef.campos.cons_fechaf_sens = "2050-01-01T00:00:00";
|
|
||||||
|
|
||||||
//Campos de CSV
|
|
||||||
RecogidaDef.campos_def.cons_id_csv = RecogidaDef.campos.cons_id_csv = "Nº";
|
|
||||||
RecogidaDef.campos_def.cons_llen_csv = RecogidaDef.campos.cons_llen_csv = "Lectura";
|
|
||||||
RecogidaDef.campos_def.cons_fecha_csv = RecogidaDef.campos.cons_fecha_csv = "Fecha";
|
|
||||||
RecogidaDef.campos_def.cons_fechai_csv = RecogidaDef.campos.cons_fechai_csv = "01/01/2000 0:01";
|
|
||||||
RecogidaDef.campos_def.cons_fechaf_csv = RecogidaDef.campos.cons_fechaf_csv = "01/01/2049 0:00";
|
|
||||||
|
|
||||||
//Campos de la red navegable que se leen
|
|
||||||
ComunDef.CamposNW.cons_onew = "ONEWAY";
|
|
||||||
ComunDef.CamposNW.cons_kph = "KPH";
|
|
||||||
ComunDef.CamposNW.cons_fow = "FOW";
|
|
||||||
ComunDef.CamposNW.cons_name = "NAME";
|
|
||||||
//Atributos de la red navegable que se leen
|
|
||||||
ComunDef.AtributosNW.atr_TF = "TF";
|
|
||||||
ComunDef.AtributosNW.atr_FT = "FT";
|
|
||||||
ComunDef.AtributosNW.atr_N = "N";
|
|
||||||
ComunDef.AtributosNW.atr_pedes = "14";
|
|
||||||
|
|
||||||
//Nombre de simbolos VSM
|
|
||||||
RecogidaDef.rellena_simbrec_vsm();*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using OliviaAddInPro.Helper;
|
||||||
|
using OliviaAddInPro.Services;
|
||||||
|
|
||||||
|
namespace OliviaAddInPro.Model
|
||||||
|
{
|
||||||
|
class Recogida : TratamientoComun
|
||||||
|
{
|
||||||
|
public RecogidaServ Serv { get; set; } = null;
|
||||||
|
public Recogida()
|
||||||
|
{
|
||||||
|
Serv = new RecogidaServ(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Ejecuta(ModosEjec modo)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,862 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OliviaAddInPro.Model
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file RecogidaDef.cs
|
||||||
|
* Clase con definiciones de recogida comunes al proyecto Olivia y a OliviaTask.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Clase con definiciones de recogida comunes al proyecto Olivia y a OliviaTask.
|
||||||
|
*/
|
||||||
|
|
||||||
|
class RecogidaDef
|
||||||
|
{
|
||||||
|
//*************************************************************************************
|
||||||
|
//Enums y structs generales
|
||||||
|
/**
|
||||||
|
* Nombre de los campos (de las capas) sobre los que se realizarán consultas para la recogida
|
||||||
|
*/
|
||||||
|
public struct Campos
|
||||||
|
{
|
||||||
|
public string cons_id; //<Campo a consultar de la capa de contenedores para leer el id
|
||||||
|
public string cons_nomrec; //<Campo a consultar de la capa de contenedores para leer el nombre del tipo de recogida
|
||||||
|
public string cons_lateral; //<Campo a consultar de la lateralidad del tipo de recogida
|
||||||
|
public string cons_fracc; //<Campo a consultar de la capa de contenedores para leer la fracción
|
||||||
|
public string cons_capac; //<Campo a consultar de la capa de contenedores para leer la capacidad
|
||||||
|
public string cons_uds; //<Campo a consultar de la capa de contenedores para leer las unidades
|
||||||
|
public string cons_kgrec; //<Campo a consultar de la capa de contenedores para leer los kg de la recogida
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Nombre de los parámetros que intervienen en el cálculo para la recogida
|
||||||
|
*/
|
||||||
|
public struct Parametros
|
||||||
|
{
|
||||||
|
public static int t_vaciM; //<Tiempo de vaciado máximo admitido
|
||||||
|
public static int t_vacim; //<Tiempo de vaciado mínimo admitido
|
||||||
|
public static int t_llegsalM; //<Tiempo de llegada y salida a las instalaciones máximo admitido
|
||||||
|
public static int t_llegsalm; //<Tiempo de llegada y salida a las instalaciones mínimo admitido
|
||||||
|
public static int t_llegsal; //<Tiempo de llegada y salida establecido
|
||||||
|
public static int t_descM; //<Tiempo de descarga máximo admitido
|
||||||
|
public static int t_descm; //<Tiempo de descarga mínimo admitido
|
||||||
|
public static int t_desc; //<Tiempo de descarga establecido
|
||||||
|
public static int t_convM; //<Tiempo de convenio máximo admitido
|
||||||
|
public static int t_convm; //<Tiempo de convenio mínimo admitido
|
||||||
|
public static int t_conv; //<Tiempo de convenio establecido
|
||||||
|
public static int t_descansoM; //<Tiempo de descanso máximo admitido
|
||||||
|
public static int t_descansom; //<Tiempo de descanso mínimo admitido
|
||||||
|
public static int t_descanso; //<Tiempo de descanso establecido
|
||||||
|
public static int h_inicio; //<Hora de inicio de la jornada de trabajo
|
||||||
|
public static int dens_vehi_org; //<Densidades en camión para fraccion orgánica
|
||||||
|
public static int dens_vehi_res; //<Densidades en camión para fraccion resto
|
||||||
|
public static int dens_vehi_env; //<Densidades en camión para fraccion envases
|
||||||
|
public static int dens_vehi_pap; //<Densidades en camión para fraccion Papel y Cartón
|
||||||
|
public static int dens_vehi_vid; //<Densidades en camión para fraccion vidrio
|
||||||
|
public static int dens_vehi_otr; //<Densidades en camión para fraccion otra
|
||||||
|
public static int dens_cont_org; //<Densidades en contenedor para fraccion orgánica
|
||||||
|
public static int dens_cont_res; //<Densidades en contenedor para fraccion resto
|
||||||
|
public static int dens_cont_env; //<Densidades en contenedor para fraccion envases
|
||||||
|
public static int dens_cont_pap; //<Densidades en contenedor para fraccion Papel y Cartón
|
||||||
|
public static int dens_cont_vid; //<Densidades en contenedor para fraccion vidrio
|
||||||
|
public static int dens_cont_otr; //<Densidades en contenedor para fraccion otra
|
||||||
|
public static double anch_vehi_3; //<Ancho del vehículo de 3 ejes
|
||||||
|
public static double anch_vehi_2; //<Ancho del vehículo de 2 ejes
|
||||||
|
public static double anch_vehi_s; //<Ancho del vehículo Satélite
|
||||||
|
public static double rad_giro_3; //<Radio de giro del vehículo de 3 ejes
|
||||||
|
public static double rad_giro_2; //<Radio de giro del vehículo de 2 ejes
|
||||||
|
public static double rad_giro_s; //<Radio de giro del vehículo Satélite
|
||||||
|
public static int t_vaci_tra; //<Tiempo de vaciado para cargas trasera
|
||||||
|
public static int t_vaci_lat; //<Tiempo de vaciado para cargas lateral
|
||||||
|
public static int t_vaci_sup; //<Tiempo de vaciado para cargas superior
|
||||||
|
public static int t_vaci_bi; //<Tiempo de vaciado para cargas bilateral
|
||||||
|
public static int t_vaci_bol; //<Tiempo de vaciado para cargas bolseo
|
||||||
|
public static int t_vaci_lav; //<Tiempo de vaciado para cargas lavado
|
||||||
|
public static int t_vaci_otr; //<Tiempo de vaciado para cargas otra
|
||||||
|
public static int kgmaxM; //<Kg máximo que puede llevar un vehículo
|
||||||
|
public static int kgmaxm; //<Kg mínimo que puede llevar un vehículo
|
||||||
|
public static int carga_maxM; //<Carga máxima para recoger los contenedores
|
||||||
|
public static int carga_maxm; //<Carga mínima para recoger los contenedores
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* Fracciones.
|
||||||
|
* Tipos de residuos a recoger
|
||||||
|
*/
|
||||||
|
public enum TiposFracción
|
||||||
|
{
|
||||||
|
Organica, //<Fracción Orgánica
|
||||||
|
Resto, //<Fracción de Restos
|
||||||
|
Envases, //<Fracción de Envases
|
||||||
|
Papel, //<Fracción de Papel y Cartón
|
||||||
|
Vidrio, //<Fracción de Vidrio
|
||||||
|
Otra, //<Fracción genérica para otro tipo de residuos
|
||||||
|
N
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Tipo de carga del vehículo
|
||||||
|
*/
|
||||||
|
public enum TiposCarga
|
||||||
|
{
|
||||||
|
Trasera, //<Carga trasera
|
||||||
|
Lateral, //<Carga lateral
|
||||||
|
Superior, //<Carga superior
|
||||||
|
Bilateral, //<Carga bilaterar
|
||||||
|
BolseoPtaPta, //<Bolseo / Puerta a Puerta
|
||||||
|
Lavado, //<Lavado de contenedores
|
||||||
|
Otra, //<Carga genérica para otro tipo de cargas
|
||||||
|
N
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Tipo de vehículo
|
||||||
|
*/
|
||||||
|
public enum TiposVehic
|
||||||
|
{
|
||||||
|
Ejes3, //<Vehículo de 3 ejes
|
||||||
|
Ejes2, //<Vehículo de 2 ejes
|
||||||
|
Satelite, //<Vehículo satélite
|
||||||
|
N
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Tipo de lateralidad de carga de los vehículos
|
||||||
|
*/
|
||||||
|
public enum Lateralidad
|
||||||
|
{
|
||||||
|
Ambos, //<Carga por ambos lados del camión
|
||||||
|
Dcha, //<Carga por lado derecho del camión
|
||||||
|
Izqda, //<Carga por lado izquierdo del camión
|
||||||
|
N
|
||||||
|
}
|
||||||
|
public struct CargaMax
|
||||||
|
{
|
||||||
|
public int n; //<Número de opciones de vehículos de ese tipo con esa carga
|
||||||
|
public int i_def; //<La opción por defecto de entre las posibles
|
||||||
|
public int[] vol; //<Array de opciones, su volumen en m3
|
||||||
|
public int[,] offset; //<Array de valores de correccion de los kg máximos de carga
|
||||||
|
|
||||||
|
}
|
||||||
|
//*************************************************************************************
|
||||||
|
//Variables
|
||||||
|
/**
|
||||||
|
* Array de cadenas de caracteres enumerando los tipos de fracción
|
||||||
|
*/
|
||||||
|
public static String[] tipos_fracc_str = new String[(int)RecogidaDef.TiposFracción.N - 1];
|
||||||
|
/**
|
||||||
|
* Array de cadenas de caracteres enumerando los tipos de carga
|
||||||
|
*/
|
||||||
|
public static String[] tipos_carg_str = new String[(int)RecogidaDef.TiposCarga.N - 1];
|
||||||
|
/**
|
||||||
|
* Array de strings con los prefijos de la fracción para la importación de capas a la GDB
|
||||||
|
*/
|
||||||
|
public static String[] preffracc_gdb = new String[(int)RecogidaDef.TiposFracción.N];
|
||||||
|
/**
|
||||||
|
* Array de strings con los prefijos de las cargas para la importación de capas a la GDB
|
||||||
|
*/
|
||||||
|
public static String[] prefcarg_gdb = new String[(int)RecogidaDef.TiposCarga.N];
|
||||||
|
/**
|
||||||
|
* Array de strings con nombres de los sibmolos referentes al tipo de recogida de basuras
|
||||||
|
*/
|
||||||
|
public static String[] nombre_simbrec_vsm = new String[20];
|
||||||
|
/**
|
||||||
|
* Array de strings con los tipos de recogida de basuras
|
||||||
|
*/
|
||||||
|
public static String[] simb_rec_vsm = new String[9];
|
||||||
|
/**
|
||||||
|
* Array de strings con los tipos de basuras
|
||||||
|
*/
|
||||||
|
public static String[] simb_tipbasura = new String[5];
|
||||||
|
/**
|
||||||
|
* Densidades de residuos en el camión, una vez compactados, en función de la fracción, en kg/m3
|
||||||
|
*/
|
||||||
|
public static int[] dens_frac_cami = new int[(int)RecogidaDef.TiposFracción.N];
|
||||||
|
/**
|
||||||
|
* Densidades de residuos en el contenedor, en función de la fracción, en kg/m3
|
||||||
|
*/
|
||||||
|
public static int[] dens_frac_cont = new int[(int)RecogidaDef.TiposFracción.N];
|
||||||
|
/**
|
||||||
|
* Anchura de los vehículos en función del tipo
|
||||||
|
*/
|
||||||
|
public static double[] ancho_vehic = new double[(int)RecogidaDef.TiposVehic.N];
|
||||||
|
/**
|
||||||
|
* Ángulo de giro de los vehículos en función del tipo en grados
|
||||||
|
*/
|
||||||
|
public static double[] giro_vehic = new double[(int)RecogidaDef.TiposVehic.N];
|
||||||
|
/**
|
||||||
|
* Tiempo de vaciado de los contenedores en función del tipo de carga, en segundos
|
||||||
|
*/
|
||||||
|
public static int[] t_vaci = new int[(int)RecogidaDef.TiposCarga.N];
|
||||||
|
/**
|
||||||
|
* Array de cadenas de caracteres enumerando los tipos de lateralidad de carga
|
||||||
|
*/
|
||||||
|
public static String[] tipos_lateralidad = new String[(int)RecogidaDef.Lateralidad.N];
|
||||||
|
/**
|
||||||
|
* Kg de recogida del contenedor
|
||||||
|
*/
|
||||||
|
public static int kgrec_cont=200;
|
||||||
|
/*
|
||||||
|
* indica si se ha marcado la opción de campo de kg recogida, si no es un valor fijo
|
||||||
|
*/
|
||||||
|
public static bool kgrec_camp = false;
|
||||||
|
/*
|
||||||
|
* indica si se ha marcado la opción de recoger sólo los contenedores llenos en el diálogo de las propiedades de los campos de recogida
|
||||||
|
*/
|
||||||
|
public static bool lleno = false;
|
||||||
|
/**
|
||||||
|
* Nombres de los campos
|
||||||
|
*/
|
||||||
|
public static Campos campos;
|
||||||
|
/**
|
||||||
|
* Nombres por defecto de los campos
|
||||||
|
*/
|
||||||
|
public static Campos campos_def;
|
||||||
|
/*
|
||||||
|
* array de las diferentes consltas de atributos a realizar en la capa de recogida.
|
||||||
|
*/
|
||||||
|
public static string[] filtro_str = null;
|
||||||
|
/**
|
||||||
|
* Array de cadenas de caracteres enumerando los tipos de vehículos
|
||||||
|
*/
|
||||||
|
public static String[] tipos_vehic_str = new String[(int)RecogidaDef.TiposVehic.N];
|
||||||
|
/**
|
||||||
|
* Array de cadenas de doubles enumerando los kg máximos permitidos por cada tipo de vehículo
|
||||||
|
*/
|
||||||
|
public static CargaMax[,] cargas_max_vehic = new CargaMax[(int)RecogidaDef.TiposCarga.N, (int)RecogidaDef.TiposVehic.N];
|
||||||
|
//************************************************************************
|
||||||
|
public static void iniciaRecoDef()
|
||||||
|
{
|
||||||
|
//Nombre de simbolos VSM
|
||||||
|
rellena_simbrec_vsm();
|
||||||
|
rellena_matrs();
|
||||||
|
rellena_preffracc_gdb();
|
||||||
|
rellena_prefcarg_gdb();
|
||||||
|
rellena_simbol_rec();
|
||||||
|
rellena_simb_tipbasura();
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Inicializa la matriz de strings con los nombres de los sibmolos referentes al tipo de recogida de basuras
|
||||||
|
*/
|
||||||
|
private static void rellena_simbrec_vsm()
|
||||||
|
{
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[0] = "Autocompactador";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[1] = "Bilateral";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[2] = "Bolseo";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[3] = "Caja_Abierta";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[4] = "Neumatica";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[5] = "Pilas";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[6] = "CL Envases";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[7] = "Cl Papel";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[8] = "CL Vidrio";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[9] = "CL Organica";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[10] = "CL Resto";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[11] = "CT Envases";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[12] = "CT Papel";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[13] = "CT Vidrio";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[14] = "CT Organica";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[15] = "CT Resto";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[16] = "Iglu Envases";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[17] = "Iglu Papel";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[18] = "Iglu Vidrio";
|
||||||
|
RecogidaDef.nombre_simbrec_vsm[19] = "Soterrados";
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Inicializa la matriz de strings con los prefijos (fracción) que llevarán los featureclass de la geodatabase importada a ArcGIS una vez realizada la planificación
|
||||||
|
*/
|
||||||
|
private static void rellena_preffracc_gdb()
|
||||||
|
{
|
||||||
|
RecogidaDef.preffracc_gdb[(int)RecogidaDef.TiposFracción.Organica] = "Org";
|
||||||
|
RecogidaDef.preffracc_gdb[(int)RecogidaDef.TiposFracción.Resto] = "R";
|
||||||
|
RecogidaDef.preffracc_gdb[(int)RecogidaDef.TiposFracción.Envases] = "E";
|
||||||
|
RecogidaDef.preffracc_gdb[(int)RecogidaDef.TiposFracción.Papel] = "P";
|
||||||
|
RecogidaDef.preffracc_gdb[(int)RecogidaDef.TiposFracción.Vidrio] = "V";
|
||||||
|
RecogidaDef.preffracc_gdb[(int)RecogidaDef.TiposFracción.Otra] = "Otr_";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inicializa la matriz de strings con los prefijos (fracción) que llevarán los featureclass de la geodatabase importada a ArcGIS una vez realizada la planificación
|
||||||
|
*/
|
||||||
|
private static void rellena_prefcarg_gdb()
|
||||||
|
{
|
||||||
|
RecogidaDef.prefcarg_gdb[(int)RecogidaDef.TiposFracción.Organica] = "Tra";
|
||||||
|
RecogidaDef.prefcarg_gdb[(int)RecogidaDef.TiposFracción.Resto] = "Lat";
|
||||||
|
RecogidaDef.prefcarg_gdb[(int)RecogidaDef.TiposFracción.Envases] = "BiLat";
|
||||||
|
RecogidaDef.prefcarg_gdb[(int)RecogidaDef.TiposFracción.Papel] = "Bols";
|
||||||
|
RecogidaDef.prefcarg_gdb[(int)RecogidaDef.TiposFracción.Vidrio] = "Lav";
|
||||||
|
RecogidaDef.prefcarg_gdb[(int)RecogidaDef.TiposFracción.Otra] = "Otr_";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inicializa la matriz de strings con los tipos de recogida
|
||||||
|
*/
|
||||||
|
private static void rellena_simbol_rec()
|
||||||
|
{
|
||||||
|
RecogidaDef.simb_rec_vsm[0] = RecogidaDef.nombre_simbrec_vsm[0];
|
||||||
|
RecogidaDef.simb_rec_vsm[1] = RecogidaDef.nombre_simbrec_vsm[1];
|
||||||
|
RecogidaDef.simb_rec_vsm[2] = RecogidaDef.nombre_simbrec_vsm[2];
|
||||||
|
RecogidaDef.simb_rec_vsm[3] = RecogidaDef.nombre_simbrec_vsm[3];
|
||||||
|
RecogidaDef.simb_rec_vsm[4] = RecogidaDef.nombre_simbrec_vsm[4];
|
||||||
|
RecogidaDef.simb_rec_vsm[5] = RecogidaDef.nombre_simbrec_vsm[5];
|
||||||
|
RecogidaDef.simb_rec_vsm[6] = RecogidaDef.tipos_carg_str[(int)RecogidaDef.TiposCarga.Lateral];
|
||||||
|
RecogidaDef.simb_rec_vsm[7] = RecogidaDef.tipos_carg_str[(int)RecogidaDef.TiposCarga.Trasera];
|
||||||
|
RecogidaDef.simb_rec_vsm[8] = RecogidaDef.tipos_carg_str[(int)RecogidaDef.TiposCarga.Superior];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inicializa la matriz de strings con los tipos de recogida
|
||||||
|
*/
|
||||||
|
private static void rellena_simb_tipbasura()
|
||||||
|
{
|
||||||
|
RecogidaDef.simb_tipbasura[0] = RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Envases];
|
||||||
|
RecogidaDef.simb_tipbasura[1] = RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Papel];
|
||||||
|
RecogidaDef.simb_tipbasura[2] = RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Vidrio];
|
||||||
|
RecogidaDef.simb_tipbasura[3] = RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Organica];
|
||||||
|
RecogidaDef.simb_tipbasura[4] = RecogidaDef.tipos_fracc_str[(int)RecogidaDef.TiposFracción.Resto];
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Rellena las matrices de datos
|
||||||
|
*/
|
||||||
|
private static void rellena_matrs()
|
||||||
|
{
|
||||||
|
//Rellena los tipos de vehículo
|
||||||
|
RecogidaDef.tipos_vehic_str[(int)RecogidaDef.TiposVehic.Ejes3] = "3 Ejes";
|
||||||
|
RecogidaDef.tipos_vehic_str[(int)RecogidaDef.TiposVehic.Ejes2] = "2 Ejes";
|
||||||
|
RecogidaDef.tipos_vehic_str[(int)RecogidaDef.TiposVehic.Satelite] = "Satélite";
|
||||||
|
|
||||||
|
//Rellena las densidades en camión
|
||||||
|
RecogidaDef.dens_frac_cami[(int)RecogidaDef.TiposFracción.Organica] = RecogidaDef.Parametros.dens_vehi_org;
|
||||||
|
RecogidaDef.dens_frac_cami[(int)RecogidaDef.TiposFracción.Resto] = RecogidaDef.Parametros.dens_vehi_res;
|
||||||
|
RecogidaDef.dens_frac_cami[(int)RecogidaDef.TiposFracción.Envases] = RecogidaDef.Parametros.dens_vehi_env;
|
||||||
|
RecogidaDef.dens_frac_cami[(int)RecogidaDef.TiposFracción.Papel] = RecogidaDef.Parametros.dens_vehi_pap;
|
||||||
|
RecogidaDef.dens_frac_cami[(int)RecogidaDef.TiposFracción.Vidrio] = RecogidaDef.Parametros.dens_vehi_vid;
|
||||||
|
RecogidaDef.dens_frac_cami[(int)RecogidaDef.TiposFracción.Otra] = RecogidaDef.Parametros.dens_vehi_otr;
|
||||||
|
|
||||||
|
//Rellena las densidades en contenedor
|
||||||
|
RecogidaDef.dens_frac_cont[(int)RecogidaDef.TiposFracción.Organica] = RecogidaDef.Parametros.dens_cont_org;
|
||||||
|
RecogidaDef.dens_frac_cont[(int)RecogidaDef.TiposFracción.Resto] = RecogidaDef.Parametros.dens_cont_res;
|
||||||
|
RecogidaDef.dens_frac_cont[(int)RecogidaDef.TiposFracción.Envases] = RecogidaDef.Parametros.dens_cont_env;
|
||||||
|
RecogidaDef.dens_frac_cont[(int)RecogidaDef.TiposFracción.Papel] = RecogidaDef.Parametros.dens_cont_pap;
|
||||||
|
RecogidaDef.dens_frac_cont[(int)RecogidaDef.TiposFracción.Vidrio] = RecogidaDef.Parametros.dens_cont_vid;
|
||||||
|
RecogidaDef.dens_frac_cont[(int)RecogidaDef.TiposFracción.Otra] = RecogidaDef.Parametros.dens_cont_otr;
|
||||||
|
|
||||||
|
//Rellena las anchuras de los vehículos
|
||||||
|
RecogidaDef.ancho_vehic[(int)RecogidaDef.TiposVehic.Ejes3] = RecogidaDef.Parametros.anch_vehi_3;
|
||||||
|
RecogidaDef.ancho_vehic[(int)RecogidaDef.TiposVehic.Ejes2] = RecogidaDef.Parametros.anch_vehi_2;
|
||||||
|
RecogidaDef.ancho_vehic[(int)RecogidaDef.TiposVehic.Satelite] = RecogidaDef.Parametros.anch_vehi_s;
|
||||||
|
|
||||||
|
//Rellena los ángulos de giro de los vehículos
|
||||||
|
RecogidaDef.giro_vehic[(int)RecogidaDef.TiposVehic.Ejes3] = RecogidaDef.Parametros.rad_giro_3;
|
||||||
|
RecogidaDef.giro_vehic[(int)RecogidaDef.TiposVehic.Ejes2] = RecogidaDef.Parametros.rad_giro_2;
|
||||||
|
RecogidaDef.giro_vehic[(int)RecogidaDef.TiposVehic.Satelite] = RecogidaDef.Parametros.rad_giro_s;
|
||||||
|
|
||||||
|
//Rellena los tiempos de vaciado
|
||||||
|
RecogidaDef.t_vaci[(int)RecogidaDef.TiposCarga.Trasera] = RecogidaDef.Parametros.t_vaci_tra;
|
||||||
|
RecogidaDef.t_vaci[(int)RecogidaDef.TiposCarga.Lateral] = RecogidaDef.Parametros.t_vaci_lat;
|
||||||
|
RecogidaDef.t_vaci[(int)RecogidaDef.TiposCarga.Superior] = RecogidaDef.Parametros.t_vaci_sup;
|
||||||
|
RecogidaDef.t_vaci[(int)RecogidaDef.TiposCarga.Bilateral] = RecogidaDef.Parametros.t_vaci_bi;
|
||||||
|
RecogidaDef.t_vaci[(int)RecogidaDef.TiposCarga.BolseoPtaPta] = RecogidaDef.Parametros.t_vaci_bol;
|
||||||
|
RecogidaDef.t_vaci[(int)RecogidaDef.TiposCarga.Lavado] = RecogidaDef.Parametros.t_vaci_lav;
|
||||||
|
RecogidaDef.t_vaci[(int)RecogidaDef.TiposCarga.Otra] = RecogidaDef.Parametros.t_vaci_otr;
|
||||||
|
|
||||||
|
|
||||||
|
//Rellena las matrices de carga máxima por tipo de vehículo y tipo de carga
|
||||||
|
rellena_matrs_carg();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Función general para rellenar campos de la matriz de cargas máximas por tipo de carga y de vehículo
|
||||||
|
*/
|
||||||
|
private static void rellena_carg(int icar, int iveh, int n, int i_def, int[] info)
|
||||||
|
{
|
||||||
|
cargas_max_vehic[icar, iveh].n = n;
|
||||||
|
cargas_max_vehic[icar, iveh].i_def = i_def;
|
||||||
|
cargas_max_vehic[icar, iveh].vol = null;
|
||||||
|
cargas_max_vehic[icar, iveh].offset = null;
|
||||||
|
if (n <= 0)
|
||||||
|
return;
|
||||||
|
cargas_max_vehic[icar, iveh].vol = new int[n];
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
cargas_max_vehic[icar, iveh].vol[i] = info[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Función general para rellenar campos de la matriz de cargas máximas por tipo de carga y de vehículo
|
||||||
|
*/
|
||||||
|
private static void rellena_carg_offset(int icar, int iveh, int ifrac, int n, int[] info)
|
||||||
|
{
|
||||||
|
if (cargas_max_vehic[icar, iveh].offset == null)
|
||||||
|
cargas_max_vehic[icar, iveh].offset = new int[n, (int)RecogidaDef.TiposFracción.N];
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
cargas_max_vehic[icar, iveh].offset[i, ifrac] = info[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Rellena la matriz de las opciones de vehículos que hay de cada tipo de carga
|
||||||
|
* y dimensión
|
||||||
|
*/
|
||||||
|
private static void rellena_matrs_carg()
|
||||||
|
{
|
||||||
|
int[] info = new int[10];
|
||||||
|
int n, i_def, icar, iveh;
|
||||||
|
|
||||||
|
//Rellena las opciones de carga máxima por vehículo
|
||||||
|
//Trasera-satelite
|
||||||
|
n = 4;
|
||||||
|
i_def = 2;
|
||||||
|
info[0] = 2;
|
||||||
|
info[1] = 3;
|
||||||
|
info[2] = 5;
|
||||||
|
info[3] = 7;
|
||||||
|
rellena_carg((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, n, i_def, info);
|
||||||
|
//rellena la corrección de la carga máxima
|
||||||
|
info[0] = info[1] = -500;
|
||||||
|
info[2] = info[3] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, (int)RecogidaDef.TiposFracción.Resto, n, info);
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, (int)RecogidaDef.TiposFracción.Organica, n, info);
|
||||||
|
|
||||||
|
//Trasera-2 ejes
|
||||||
|
n = 6;
|
||||||
|
i_def = 2;
|
||||||
|
info[0] = 8;
|
||||||
|
info[1] = 10;
|
||||||
|
info[2] = 12;
|
||||||
|
info[3] = 14;
|
||||||
|
info[4] = 16;
|
||||||
|
info[5] = 17;
|
||||||
|
rellena_carg((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, n, i_def, info);
|
||||||
|
//rellena la corrección de la carga máxima
|
||||||
|
info[1] = -500;
|
||||||
|
info[2] = -1000;
|
||||||
|
info[3] = -1500;
|
||||||
|
info[4] = -2000;
|
||||||
|
info[0] = info[5] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Resto, n, info);
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Organica, n, info);
|
||||||
|
|
||||||
|
//Trasera-3ejes
|
||||||
|
n = 4;
|
||||||
|
i_def = 3;
|
||||||
|
info[0] = 18;
|
||||||
|
info[1] = 20;
|
||||||
|
info[2] = 22;
|
||||||
|
info[3] = 23;
|
||||||
|
rellena_carg((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, n, i_def, info);
|
||||||
|
|
||||||
|
//Lateral-satelite, no hay
|
||||||
|
rellena_carg((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, 0, 0, null);
|
||||||
|
|
||||||
|
//Lateral - 2 ejes
|
||||||
|
n = 2;
|
||||||
|
i_def = 1;
|
||||||
|
info[0] = 15;
|
||||||
|
info[1] = 17;
|
||||||
|
rellena_carg((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, n, i_def, info);
|
||||||
|
//rellena la corrección de la carga máxima
|
||||||
|
info[0] = -500;
|
||||||
|
info[1] = -1000;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Resto, n, info);
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Organica, n, info);
|
||||||
|
|
||||||
|
//Lateral - 3 ejes
|
||||||
|
n = 3;
|
||||||
|
i_def = 2;
|
||||||
|
info[0] = 21;
|
||||||
|
info[1] = 23;
|
||||||
|
info[2] = 26;
|
||||||
|
rellena_carg((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, n, i_def, info);
|
||||||
|
|
||||||
|
//Superior - satelite, no hay
|
||||||
|
rellena_carg((int)RecogidaDef.TiposCarga.Superior,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, 0, 0, null);
|
||||||
|
|
||||||
|
//Superior - 2 ejes
|
||||||
|
n = 2;
|
||||||
|
i_def = 0;
|
||||||
|
info[0] = 16;
|
||||||
|
info[1] = 17;
|
||||||
|
rellena_carg((int)RecogidaDef.TiposCarga.Superior,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, n, i_def, info);
|
||||||
|
|
||||||
|
//Superior - 3 ejes
|
||||||
|
n = 3;
|
||||||
|
i_def = 2;
|
||||||
|
info[0] = 20;
|
||||||
|
info[1] = 23;
|
||||||
|
info[2] = 25;
|
||||||
|
rellena_carg((int)RecogidaDef.TiposCarga.Superior,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, n, i_def, info);
|
||||||
|
|
||||||
|
//Bilateral - satelite, no hay
|
||||||
|
rellena_carg((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, 0, 0, null);
|
||||||
|
|
||||||
|
//Bilateral - 2 ejes
|
||||||
|
n = 3;
|
||||||
|
i_def = 1;
|
||||||
|
info[0] = 14;
|
||||||
|
info[1] = 16;
|
||||||
|
info[2] = 18;
|
||||||
|
rellena_carg((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, n, i_def, info);
|
||||||
|
|
||||||
|
//Bilateral - 3 ejes
|
||||||
|
n = 3;
|
||||||
|
i_def = 1;
|
||||||
|
info[0] = 20;
|
||||||
|
info[1] = 23;
|
||||||
|
info[2] = 26;
|
||||||
|
rellena_carg((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, n, i_def, info);
|
||||||
|
|
||||||
|
//Bolseo - todas, no hay
|
||||||
|
//Lavado - todas, no hay
|
||||||
|
//Otra - todas, no hay
|
||||||
|
for (icar = (int)RecogidaDef.TiposCarga.BolseoPtaPta; icar < (int)RecogidaDef.TiposCarga.N; icar++)
|
||||||
|
{
|
||||||
|
for (iveh = (int)RecogidaDef.TiposVehic.Ejes3; iveh < (int)RecogidaDef.TiposVehic.N; iveh++)
|
||||||
|
{
|
||||||
|
rellena_carg(icar, iveh, 0, 0, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
//Barcelona new
|
||||||
|
rellena_offsets_bcn();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void rellena_offsets_bcn()
|
||||||
|
{
|
||||||
|
int[] info = new int[10];
|
||||||
|
int n, i_def;
|
||||||
|
////////////////////////////////////////////////////////
|
||||||
|
//Barcelona new
|
||||||
|
|
||||||
|
//Bilateral - satelite
|
||||||
|
n = 1;
|
||||||
|
i_def = 0;
|
||||||
|
info[0] = 11;
|
||||||
|
rellena_carg((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, n, i_def, info);
|
||||||
|
|
||||||
|
//offsets
|
||||||
|
//Bilateral - satelite - resto, org
|
||||||
|
info[0] = -3700;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, (int)RecogidaDef.TiposFracción.Resto, n, info);
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, (int)RecogidaDef.TiposFracción.Organica, n, info);
|
||||||
|
|
||||||
|
//bilateral -satélite - envases
|
||||||
|
info[0] = 480;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, (int)RecogidaDef.TiposFracción.Envases, n, info);
|
||||||
|
|
||||||
|
//bilateral -satélite - papel
|
||||||
|
info[0] = -2160;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, (int)RecogidaDef.TiposFracción.Papel, n, info);
|
||||||
|
|
||||||
|
//bilateral -satélite - vidrio
|
||||||
|
info[0] = -2050;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, (int)RecogidaDef.TiposFracción.Vidrio, n, info);
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//Trasera - satélite - organico, resto
|
||||||
|
n = 4;
|
||||||
|
info[0] = -500;
|
||||||
|
info[1] = -500;
|
||||||
|
info[2] = 0;
|
||||||
|
info[3] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, (int)RecogidaDef.TiposFracción.Organica, n, info);
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, (int)RecogidaDef.TiposFracción.Resto, n, info);
|
||||||
|
|
||||||
|
//Trasera - satélite - envases
|
||||||
|
info[0] = 0;
|
||||||
|
info[1] = 0;
|
||||||
|
info[2] = 0;
|
||||||
|
info[3] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, (int)RecogidaDef.TiposFracción.Envases, n, info);
|
||||||
|
|
||||||
|
//Trasera - satélite - papel
|
||||||
|
info[0] = -220;
|
||||||
|
info[1] = -330;
|
||||||
|
info[2] = -550;
|
||||||
|
info[3] = -770;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, (int)RecogidaDef.TiposFracción.Papel, n, info);
|
||||||
|
|
||||||
|
//Trasera - satélite - vidrio
|
||||||
|
info[0] = 0;
|
||||||
|
info[1] = 0;
|
||||||
|
info[2] = 0;
|
||||||
|
info[3] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Satelite, (int)RecogidaDef.TiposFracción.Vidrio, n, info);
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//Trasera - 2 ejes - resto, org
|
||||||
|
n = 6;
|
||||||
|
info[0] = 0;
|
||||||
|
info[1] = -500;
|
||||||
|
info[2] = -1000;
|
||||||
|
info[3] = -1500;
|
||||||
|
info[4] = -2000;
|
||||||
|
info[5] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Organica, n, info);
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Resto, n, info);
|
||||||
|
|
||||||
|
//Trasera - 2 ejes - envases
|
||||||
|
info[0] = 0;
|
||||||
|
info[1] = 0;
|
||||||
|
info[2] = 0;
|
||||||
|
info[3] = 0;
|
||||||
|
info[4] = 0;
|
||||||
|
info[5] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Envases, n, info);
|
||||||
|
|
||||||
|
//Trasera - 2 ejes - papel
|
||||||
|
info[0] = -880;
|
||||||
|
info[1] = -1100;
|
||||||
|
info[2] = -1320;
|
||||||
|
info[3] = -1540;
|
||||||
|
info[4] = -1760;
|
||||||
|
info[5] = -1870;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Papel, n, info);
|
||||||
|
|
||||||
|
//Trasera - 2 ejes - vidrio
|
||||||
|
info[0] = 0;
|
||||||
|
info[1] = 0;
|
||||||
|
info[2] = 0;
|
||||||
|
info[3] = 0;
|
||||||
|
info[4] = 0;
|
||||||
|
info[5] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Vidrio, n, info);
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//Trasera - 3 ejes - resto, org
|
||||||
|
n = 4;
|
||||||
|
info[0] = 0;
|
||||||
|
info[1] = 0;
|
||||||
|
info[2] = 0;
|
||||||
|
info[3] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Organica, n, info);
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Resto, n, info);
|
||||||
|
|
||||||
|
//Trasera - 3 ejes - envases
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Envases, n, info);
|
||||||
|
|
||||||
|
//Trasera - 3 ejes - papel
|
||||||
|
info[0] = -1980;
|
||||||
|
info[1] = -2200;
|
||||||
|
info[2] = -2420;
|
||||||
|
info[3] = -2530;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Papel, n, info);
|
||||||
|
|
||||||
|
//Trasera - 3 ejes - vidrio
|
||||||
|
info[0] = 0;
|
||||||
|
info[1] = 0;
|
||||||
|
info[2] = 0;
|
||||||
|
info[3] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Trasera,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Vidrio, n, info);
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//Lateral - 2 ejes - resto, org
|
||||||
|
n = 2;
|
||||||
|
info[0] = -500;
|
||||||
|
info[1] = -1000;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Organica, n, info);
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Resto, n, info);
|
||||||
|
|
||||||
|
//Lateral - 2 ejes - envases
|
||||||
|
n = 2;
|
||||||
|
info[0] = 0;
|
||||||
|
info[1] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Envases, n, info);
|
||||||
|
|
||||||
|
//Lateral - 2 ejes - papel
|
||||||
|
info[0] = -1650;
|
||||||
|
info[1] = -1870;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Papel, n, info);
|
||||||
|
|
||||||
|
//Lateral - 2 ejes - vidrio
|
||||||
|
info[0] = 0;
|
||||||
|
info[1] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Vidrio, n, info);
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//Lateral - 3 ejes - resto, org
|
||||||
|
n = 3;
|
||||||
|
info[0] = 0;
|
||||||
|
info[1] = 0;
|
||||||
|
info[2] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Organica, n, info);
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Resto, n, info);
|
||||||
|
|
||||||
|
//Lateral - 3 ejes - envases
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Envases, n, info);
|
||||||
|
|
||||||
|
//Lateral - 3 ejes - vidrio
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Vidrio, n, info);
|
||||||
|
|
||||||
|
//Lateral - 3 ejes - papel
|
||||||
|
info[0] = -2310;
|
||||||
|
info[1] = -2530;
|
||||||
|
info[2] = -2860;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Lateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Papel, n, info);
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//Superior - 2 ejes - resto, org
|
||||||
|
n = 2;
|
||||||
|
info[0] = 0;
|
||||||
|
info[1] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Superior,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Organica, n, info);
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Superior,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Resto, n, info);
|
||||||
|
|
||||||
|
//Superior - 2 ejes - envases
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Superior,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Envases, n, info);
|
||||||
|
|
||||||
|
//Superior - 2 ejes - vidrio
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Superior,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Vidrio, n, info);
|
||||||
|
|
||||||
|
|
||||||
|
//Superior - 2 ejes - papel
|
||||||
|
info[0] = -1760;
|
||||||
|
info[1] = -1870;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Superior,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Papel, n, info);
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//Superior - 3 ejes - resto, org
|
||||||
|
n = 3;
|
||||||
|
info[0] = 0;
|
||||||
|
info[1] = 0;
|
||||||
|
info[2] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Superior,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Organica, n, info);
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Superior,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Resto, n, info);
|
||||||
|
|
||||||
|
//Superior - 2 ejes - envases
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Superior,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Envases, n, info);
|
||||||
|
|
||||||
|
//Superior - 2 ejes - vidrio
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Superior,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Vidrio, n, info);
|
||||||
|
|
||||||
|
|
||||||
|
//Superior - 3 ejes - papel
|
||||||
|
info[0] = -2200;
|
||||||
|
info[1] = -2530;
|
||||||
|
info[2] = -2750;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Superior,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Papel, n, info);
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//Bilateral - 2 ejes - resto, org
|
||||||
|
n = 3;
|
||||||
|
info[0] = 0;
|
||||||
|
info[1] = 0;
|
||||||
|
info[2] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Organica, n, info);
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Resto, n, info);
|
||||||
|
|
||||||
|
//Bilateral - 2 ejes - envases
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Envases, n, info);
|
||||||
|
|
||||||
|
//Bilateral - 2 ejes - vidrio
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Superior,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Vidrio, n, info);
|
||||||
|
|
||||||
|
//Bilateral - 2 ejes - papel
|
||||||
|
info[0] = 1820;
|
||||||
|
info[1] = 2080;
|
||||||
|
info[2] = 2340;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Papel, n, info);
|
||||||
|
|
||||||
|
//Bilateral - 2 ejes - vidrio
|
||||||
|
info[0] = -140;
|
||||||
|
info[1] = -160;
|
||||||
|
info[2] = -180;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Vidrio, n, info);
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//Bilateral - 3 ejes - resto, org
|
||||||
|
n = 3;
|
||||||
|
info[0] = 0;
|
||||||
|
info[1] = 0;
|
||||||
|
info[2] = 0;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Organica, n, info);
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes2, (int)RecogidaDef.TiposFracción.Resto, n, info);
|
||||||
|
|
||||||
|
//Bilateral - 3 ejes - envases
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Envases, n, info);
|
||||||
|
|
||||||
|
//Bilateral - 3 ejes - vidrio
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Vidrio, n, info);
|
||||||
|
|
||||||
|
//Bilateral - 3 ejes - papel
|
||||||
|
info[0] = -2200;
|
||||||
|
info[1] = -2530;
|
||||||
|
info[2] = -2860;
|
||||||
|
rellena_carg_offset((int)RecogidaDef.TiposCarga.Bilateral,
|
||||||
|
(int)RecogidaDef.TiposVehic.Ejes3, (int)RecogidaDef.TiposFracción.Papel, n, info);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -67,6 +67,11 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
dockPane.IsVisible = false;
|
dockPane.IsVisible = false;
|
||||||
}
|
}
|
||||||
|
dockPane = FrameworkApplication.DockPaneManager.Find("OliviaAddInPro_DockpaneConfig");
|
||||||
|
if (dockPane != null)
|
||||||
|
{
|
||||||
|
dockPane.IsVisible = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Overrides
|
#endregion Overrides
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<StartAction>Program</StartAction>
|
<StartAction>Program</StartAction>
|
||||||
<StartProgram>$(ArcGISFolder)\bin\ArcGISPro.exe</StartProgram>
|
<StartProgram>$(ArcGISFolder)\bin\ArcGISPro.exe</StartProgram>
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
|
|
@ -133,10 +133,14 @@
|
||||||
<Compile Include="Button\ButtonLimp.cs" />
|
<Compile Include="Button\ButtonLimp.cs" />
|
||||||
<Compile Include="Button\ButtonMaq.cs" />
|
<Compile Include="Button\ButtonMaq.cs" />
|
||||||
<Compile Include="Button\ButtonRec.cs" />
|
<Compile Include="Button\ButtonRec.cs" />
|
||||||
|
<Compile Include="Helper\EnabledComboBoxItem.cs" />
|
||||||
<Compile Include="Helper\CheckedListItem.cs" />
|
<Compile Include="Helper\CheckedListItem.cs" />
|
||||||
<Compile Include="Helper\HelperGdb.cs" />
|
<Compile Include="Helper\HelperGdb.cs" />
|
||||||
<Compile Include="Helper\HelperGlobal.cs" />
|
<Compile Include="Helper\HelperGlobal.cs" />
|
||||||
|
<Compile Include="Model\ComunDef.cs" />
|
||||||
<Compile Include="Model\ESRI.ArcGIS.Geometry.esriSRProjCS4Type.cs" />
|
<Compile Include="Model\ESRI.ArcGIS.Geometry.esriSRProjCS4Type.cs" />
|
||||||
|
<Compile Include="Model\Recogida.cs" />
|
||||||
|
<Compile Include="Model\RecogidaDef.cs" />
|
||||||
<Compile Include="Model\TratamientoComun.cs" />
|
<Compile Include="Model\TratamientoComun.cs" />
|
||||||
<Compile Include="Model\Limpieza.cs" />
|
<Compile Include="Model\Limpieza.cs" />
|
||||||
<Compile Include="Model\LimpiezaDef.cs" />
|
<Compile Include="Model\LimpiezaDef.cs" />
|
||||||
|
|
@ -145,6 +149,7 @@
|
||||||
<Compile Include="Model\OliviaDef.cs" />
|
<Compile Include="Model\OliviaDef.cs" />
|
||||||
<Compile Include="Services\ConfigServ.cs" />
|
<Compile Include="Services\ConfigServ.cs" />
|
||||||
<Compile Include="Services\LimpiezaServ.cs" />
|
<Compile Include="Services\LimpiezaServ.cs" />
|
||||||
|
<Compile Include="Services\RecogidaServ.cs" />
|
||||||
<Compile Include="ViewModel\Configuracion\DockpaneConfigViewModel.cs" />
|
<Compile Include="ViewModel\Configuracion\DockpaneConfigViewModel.cs" />
|
||||||
<Compile Include="ViewModel\Configuracion\PaneConfigViewModel.cs" />
|
<Compile Include="ViewModel\Configuracion\PaneConfigViewModel.cs" />
|
||||||
<Compile Include="ViewModel\OptionsMenuItem.cs" />
|
<Compile Include="ViewModel\OptionsMenuItem.cs" />
|
||||||
|
|
@ -154,6 +159,14 @@
|
||||||
<Compile Include="ViewModel\Limpieza\PaneLimpiezaSub2ViewModel.cs" />
|
<Compile Include="ViewModel\Limpieza\PaneLimpiezaSub2ViewModel.cs" />
|
||||||
<Compile Include="ViewModel\Limpieza\PaneLimpiezaViewModel.cs" />
|
<Compile Include="ViewModel\Limpieza\PaneLimpiezaViewModel.cs" />
|
||||||
<Compile Include="ViewModel\PanelViewModelBase.cs" />
|
<Compile Include="ViewModel\PanelViewModelBase.cs" />
|
||||||
|
<Compile Include="ViewModel\Recogida\PaneRecogidaSub1ViewModel.cs" />
|
||||||
|
<Compile Include="View\Recogida\PaneRecogidaSub1.xaml.cs">
|
||||||
|
<DependentUpon>PaneRecogidaSub1.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="View\Recogida\PaneRecogida.xaml.cs">
|
||||||
|
<DependentUpon>PaneRecogida.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ViewModel\Recogida\PaneRecogidaViewModel.cs" />
|
||||||
<Compile Include="View\Configuracion\DockPaneConfig.xaml.cs">
|
<Compile Include="View\Configuracion\DockPaneConfig.xaml.cs">
|
||||||
<DependentUpon>DockPaneConfig.xaml</DependentUpon>
|
<DependentUpon>DockPaneConfig.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
@ -183,10 +196,10 @@
|
||||||
<DependentUpon>DockpaneLimpieza.xaml</DependentUpon>
|
<DependentUpon>DockpaneLimpieza.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="ViewModel\Limpieza\DockpaneLimpiezaViewModel.cs" />
|
<Compile Include="ViewModel\Limpieza\DockpaneLimpiezaViewModel.cs" />
|
||||||
<Compile Include="View\DockpaneRecogida.xaml.cs">
|
<Compile Include="View\Recogida\DockpaneRecogida.xaml.cs">
|
||||||
<DependentUpon>DockpaneRecogida.xaml</DependentUpon>
|
<DependentUpon>DockpaneRecogida.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="ViewModel\DockpaneRecogidaViewModel.cs" />
|
<Compile Include="ViewModel\Recogida\DockpaneRecogidaViewModel.cs" />
|
||||||
<Compile Include="Module1.cs" />
|
<Compile Include="Module1.cs" />
|
||||||
<Compile Include="Model\OliviaGlob.cs" />
|
<Compile Include="Model\OliviaGlob.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
|
@ -200,12 +213,6 @@
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="ViewModel\ShowProWndSelectFields.cs" />
|
<Compile Include="ViewModel\ShowProWndSelectFields.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<AddInContent Include="Images\GenericButtonBlue16.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AddInContent Include="Images\GenericButtonBlue32.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AddInContent Include="DarkImages\GenericButtonBlue16.png" />
|
<AddInContent Include="DarkImages\GenericButtonBlue16.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
@ -220,6 +227,14 @@
|
||||||
<Resource Include="OliviaIconPro.ico" />
|
<Resource Include="OliviaIconPro.ico" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Page Include="View\Recogida\PaneRecogidaSub1.xaml">
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Include="View\Recogida\PaneRecogida.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="View\Configuracion\DockPaneConfig.xaml">
|
<Page Include="View\Configuracion\DockPaneConfig.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
|
@ -256,7 +271,7 @@
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="View\DockpaneRecogida.xaml">
|
<Page Include="View\Recogida\DockpaneRecogida.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
|
@ -265,12 +280,6 @@
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<AddInContent Include="Images\GenericButtonPurple16.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AddInContent Include="Images\GenericButtonPurple32.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AddInContent Include="DarkImages\GenericButtonPurple16.png" />
|
<AddInContent Include="DarkImages\GenericButtonPurple16.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
@ -291,12 +300,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AddInContent Include="Images\config.png" />
|
<AddInContent Include="Images\config.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<AddInContent Include="Images\GenericButtonGreen16.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<AddInContent Include="Images\GenericButtonGreen32.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AddInContent Include="DarkImages\GenericButtonGreen16.png" />
|
<AddInContent Include="DarkImages\GenericButtonGreen16.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
@ -306,19 +309,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AddInContent Include="Images\Tiporeco.png" />
|
<AddInContent Include="Images\Tiporeco.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="Resources\Dino32.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="Resources\Cat32.png" />
|
|
||||||
<Resource Include="Resources\Dog32.png" />
|
|
||||||
<Resource Include="Resources\Panda32.png" />
|
|
||||||
<Resource Include="Resources\Pizza32.png" />
|
|
||||||
<Resource Include="Resources\Rabbit32.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="View\Limpieza\openfolder.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="View\OliviaIconPro16.png" />
|
<Resource Include="View\OliviaIconPro16.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
@ -328,6 +318,15 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\inicio.png" />
|
||||||
|
<Resource Include="Resources\ptosctrl.png" />
|
||||||
|
<Resource Include="Resources\time.png" />
|
||||||
|
<Resource Include="Resources\zonas.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Images\openfolder.png" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!--
|
<!--
|
||||||
PackageAction can be:
|
PackageAction can be:
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,15 @@ namespace OliviaAddInPro {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Busca una cadena traducida similar a OLIVIA | Recogida.
|
||||||
|
/// </summary>
|
||||||
|
internal static string String_header_recogida {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("String_header_recogida", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Busca una cadena traducida similar a Tiempo de tratamiento.
|
/// Busca una cadena traducida similar a Tiempo de tratamiento.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -150,6 +159,15 @@ namespace OliviaAddInPro {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Busca una cadena traducida similar a Si se ha seleccionado en la configuración que se consideran los contenedores llenos, se debe indicar aquí la densidad de la fracción en contenedor..
|
||||||
|
/// </summary>
|
||||||
|
internal static string String_tooltip_textbox_denscont {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("String_tooltip_textbox_denscont", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Busca una cadena traducida similar a Tratamiento.
|
/// Busca una cadena traducida similar a Tratamiento.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,9 @@
|
||||||
<data name="String_header_limpieza" xml:space="preserve">
|
<data name="String_header_limpieza" xml:space="preserve">
|
||||||
<value>OLIVIA | Limpieza</value>
|
<value>OLIVIA | Limpieza</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="String_header_recogida" xml:space="preserve">
|
||||||
|
<value>OLIVIA | Recogida</value>
|
||||||
|
</data>
|
||||||
<data name="String_lbl_timetto" xml:space="preserve">
|
<data name="String_lbl_timetto" xml:space="preserve">
|
||||||
<value>Tiempo de tratamiento</value>
|
<value>Tiempo de tratamiento</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
@ -147,6 +150,9 @@
|
||||||
<data name="String_tiempos" xml:space="preserve">
|
<data name="String_tiempos" xml:space="preserve">
|
||||||
<value>Tiempos</value>
|
<value>Tiempos</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="String_tooltip_textbox_denscont" xml:space="preserve">
|
||||||
|
<value>Si se ha seleccionado en la configuración que se consideran los contenedores llenos, se debe indicar aquí la densidad de la fracción en contenedor.</value>
|
||||||
|
</data>
|
||||||
<data name="String_tto" xml:space="preserve">
|
<data name="String_tto" xml:space="preserve">
|
||||||
<value>Tratamiento</value>
|
<value>Tratamiento</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1004 B |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
|
@ -245,8 +245,8 @@ namespace OliviaAddInPro.Services
|
||||||
c.uds= "UNIDADES";
|
c.uds= "UNIDADES";
|
||||||
c.kgrec= "KGRECO";
|
c.kgrec= "KGRECO";
|
||||||
c.kgrec_val=200;
|
c.kgrec_val=200;
|
||||||
c.is_lleno=0;
|
c.is_lleno=false;
|
||||||
c.is_campo=0;
|
c.is_campo=false;
|
||||||
|
|
||||||
//AtriReco
|
//AtriReco
|
||||||
c.organica= "Organica";
|
c.organica= "Organica";
|
||||||
|
|
@ -319,7 +319,7 @@ namespace OliviaAddInPro.Services
|
||||||
c.atr_TF="TF";
|
c.atr_TF="TF";
|
||||||
c.atr_FT="FT";
|
c.atr_FT="FT";
|
||||||
c.atr_N = "N";
|
c.atr_N = "N";
|
||||||
c.atr_pedes=14;
|
c.atr_pedes="14";
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -207,10 +207,33 @@ namespace OliviaAddInPro.Services
|
||||||
msg = "Han ocurrido errores al convertir a shape.";
|
msg = "Han ocurrido errores al convertir a shape.";
|
||||||
HelperGlobal.ponMsg(msg);
|
HelperGlobal.ponMsg(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* Lee la capa que se ha seleccionzdo de recogida y se comprueba que contiene los campos necesarios
|
||||||
|
* Devuelve 0 si va todo bien, -1 si da error, y num>0 con los campos que no encuentra
|
||||||
|
*/
|
||||||
|
public int CompruebaCampos(string pathCapa, string[] camps)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(pathCapa))
|
||||||
|
{
|
||||||
|
ErrStr = "No se encuentra la capa";
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
ErrStr = "No se encuentran el/los campo/s: ";
|
||||||
|
int mal = 0;
|
||||||
|
for (i = 0; i < camps.Length; i++)
|
||||||
|
{
|
||||||
|
if (!HelperGdb.CheckField(pathCapa, camps[i]))
|
||||||
|
{
|
||||||
|
ErrStr = ErrStr + camps[i] + " ";
|
||||||
|
mal++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(mal==0)
|
||||||
|
ErrStr = "";
|
||||||
|
return mal;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ namespace OliviaAddInPro.Services
|
||||||
ErrStr = string.Empty;
|
ErrStr = string.Empty;
|
||||||
if (!CompruebaPlanif())
|
if (!CompruebaPlanif())
|
||||||
{
|
{
|
||||||
ErrStr = "En la capa de ámbitos seleccionada no se encuentran columnas de SECTOR y/o SECUENCIA, necesarias para planificar";
|
//ErrStr = "En la capa de ámbitos seleccionada no se encuentran columnas de SECTOR y/o SECUENCIA, necesarias para planificar";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//Prepara consulta
|
//Prepara consulta
|
||||||
|
|
@ -119,6 +119,7 @@ namespace OliviaAddInPro.Services
|
||||||
//si ha importado no hace falta que compruebe, seguro que las tiene
|
//si ha importado no hace falta que compruebe, seguro que las tiene
|
||||||
if (OliviaGlob.IsConfig2())
|
if (OliviaGlob.IsConfig2())
|
||||||
return true;
|
return true;
|
||||||
|
//no ha importado, comprueba capa
|
||||||
if (ComprCamposPlanif(limp.CapaElems))
|
if (ComprCamposPlanif(limp.CapaElems))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
@ -152,53 +153,26 @@ namespace OliviaAddInPro.Services
|
||||||
{
|
{
|
||||||
int NCAMPS = 2;
|
int NCAMPS = 2;
|
||||||
string[] camps;
|
string[] camps;
|
||||||
int i;
|
|
||||||
camps = new string[NCAMPS];
|
camps = new string[NCAMPS];
|
||||||
camps[0] = LimpiezaDef.Campos.consulta_sector;
|
camps[0] = LimpiezaDef.Campos.consulta_sector;
|
||||||
camps[1] = LimpiezaDef.Campos.consulta_secuen;
|
camps[1] = LimpiezaDef.Campos.consulta_secuen;
|
||||||
if (string.IsNullOrEmpty(pathCapa))
|
return CompruebaCampos(pathCapa, camps)==0;
|
||||||
return false;
|
|
||||||
for (i = 0; i < NCAMPS; i++)
|
|
||||||
{
|
|
||||||
if (!HelperGdb.CheckField(pathCapa, camps[i]))
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i < NCAMPS)
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lee la capa que se ha seleccionzdo de limpieza y se comprueba que los campos que se han editado corresponden con la capa
|
* Lee la capa que se ha seleccionzdo de limpieza y se comprueba que contiene los campos necesarios
|
||||||
* (es decir, se puede leer la capa con los campos configurados)
|
|
||||||
*/
|
*/
|
||||||
public bool CompruebaCamposLimp(string pathCapa)
|
public bool CompruebaCamposLimp(string pathCapa)
|
||||||
{
|
{
|
||||||
int NCAMPS = 5;
|
int NCAMPS = 5;
|
||||||
string[] camps;
|
string[] camps;
|
||||||
int i;
|
|
||||||
camps = new string[NCAMPS];
|
camps = new string[NCAMPS];
|
||||||
camps[0] = LimpiezaDef.Campos.consulta_entidad;
|
camps[0] = LimpiezaDef.Campos.consulta_entidad;
|
||||||
camps[1] = LimpiezaDef.Campos.consulta_mecan;
|
camps[1] = LimpiezaDef.Campos.consulta_mecan;
|
||||||
camps[2] = LimpiezaDef.Campos.consulta_observ;
|
camps[2] = LimpiezaDef.Campos.consulta_observ;
|
||||||
camps[3] = LimpiezaDef.Campos.consulta_anch_tip;
|
camps[3] = LimpiezaDef.Campos.consulta_anch_tip;
|
||||||
camps[4] = LimpiezaDef.Campos.consulta_tipolo;
|
camps[4] = LimpiezaDef.Campos.consulta_tipolo;
|
||||||
if (string.IsNullOrEmpty(pathCapa))
|
return CompruebaCampos(pathCapa, camps)==0;
|
||||||
return false;
|
|
||||||
for (i = 0; i < NCAMPS; i++)
|
|
||||||
{
|
|
||||||
if (!HelperGdb.CheckField(pathCapa, camps[i]))
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i < NCAMPS)
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Lee la gdb y devuelve el array de ámbitos en función de si hay en la gdb o no
|
* Lee la gdb y devuelve el array de ámbitos en función de si hay en la gdb o no
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using OliviaAddInPro.Helper;
|
||||||
|
using OliviaAddInPro.Model;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
|
namespace OliviaAddInPro.Services
|
||||||
|
{
|
||||||
|
class RecogidaServ : EjecServ
|
||||||
|
{
|
||||||
|
private Recogida reco;
|
||||||
|
|
||||||
|
public RecogidaServ(Recogida _reco)
|
||||||
|
{
|
||||||
|
reco = _reco;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Lee la capa que se ha seleccionzdo de recogida y se comprueba que contiene los campos necesarios
|
||||||
|
* Devuelve 0 si va todo bien, 1 si le falta el campo de kgreco, y 2 si le faltan más u otro
|
||||||
|
*/
|
||||||
|
public int CompruebaCamposReco(string pathCapa)
|
||||||
|
{
|
||||||
|
int NCAMPS = 6;
|
||||||
|
string[] camps;
|
||||||
|
camps = new string[NCAMPS];
|
||||||
|
camps[0] = RecogidaDef.campos_def.cons_id;
|
||||||
|
camps[1] = RecogidaDef.campos_def.cons_fracc;
|
||||||
|
camps[2] = RecogidaDef.campos_def.cons_nomrec;
|
||||||
|
camps[3] = RecogidaDef.campos_def.cons_lateral;
|
||||||
|
camps[4] = RecogidaDef.campos_def.cons_uds;
|
||||||
|
camps[5] = RecogidaDef.campos_def.cons_kgrec;
|
||||||
|
int compCamp = CompruebaCampos(pathCapa, camps);
|
||||||
|
if (compCamp == 0)
|
||||||
|
return 0;
|
||||||
|
else if (compCamp == 1 && ErrStr.Contains(RecogidaDef.campos_def.cons_kgrec))
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* A partir de los datos leidos de la capa de recogida se rellena el desplegable de fracción a partir de los datos existentes en la capa.
|
||||||
|
*/
|
||||||
|
public ObservableCollection<string> DameVals(string capa, string campo)
|
||||||
|
{
|
||||||
|
ObservableCollection<string> valores;
|
||||||
|
ErrStr = string.Empty;
|
||||||
|
valores = HelperGdb.GetFieldVals(capa,campo,true).Result;
|
||||||
|
return valores;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
<!--Datatemplate to view the items in the Sub Panel Indicator list box control-->
|
<!--Datatemplate to view the items in the Sub Panel Indicator list box control-->
|
||||||
<DataTemplate x:Key="SubPanelListItem" DataType="{x:Type localMenu:OptionsMenuItem}">
|
<DataTemplate x:Key="SubPanelListItem" DataType="{x:Type localMenu:OptionsMenuItem}">
|
||||||
<Image Stretch="Fill" Width="32" Height="32" Source="{Binding Path=ImageSource}" >
|
<Image Stretch="None" Width="32" Height="32" Source="{Binding Path=ImageSource}" >
|
||||||
<Image.ToolTip>
|
<Image.ToolTip>
|
||||||
<ToolTip Content="{Binding Path=OptionString}"/>
|
<ToolTip Content="{Binding Path=OptionString}"/>
|
||||||
</Image.ToolTip>
|
</Image.ToolTip>
|
||||||
|
|
@ -39,14 +39,10 @@
|
||||||
<DataTemplate DataType="{x:Type viewModel:PaneLimpiezaSub4ViewModel}">
|
<DataTemplate DataType="{x:Type viewModel:PaneLimpiezaSub4ViewModel}">
|
||||||
<view:PaneLimpiezaSub4View/>
|
<view:PaneLimpiezaSub4View/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type viewModel:PaneEjecutarViewModel}">
|
|
||||||
<view:PaneEjecutarView/>
|
|
||||||
</DataTemplate>
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
|
|
||||||
<Grid MinHeight="200" MinWidth="300" x:Name="GridLimp">
|
<Grid MinHeight="200" MinWidth="300" x:Name="GridLimp">
|
||||||
<!--TextBlock Text="Add your custom content here" VerticalAlignment="Center" HorizontalAlignment="Center"></-->
|
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
using OliviaAddInPro.Helper;
|
||||||
|
|
||||||
|
|
||||||
namespace OliviaAddInPro
|
namespace OliviaAddInPro
|
||||||
|
|
@ -30,7 +31,10 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
if (DataContext is PaneLimpiezaViewModel mod)
|
if (DataContext is PaneLimpiezaViewModel mod)
|
||||||
{
|
{
|
||||||
|
if(mod.PaneSub1.CapaAbierta)
|
||||||
mod.Ejecuta(OliviaAddInPro.Services.ModosEjec.Sectoriza);
|
mod.Ejecuta(OliviaAddInPro.Services.ModosEjec.Sectoriza);
|
||||||
|
else
|
||||||
|
HelperGlobal.ponMsg("No se ha seleccionado ninguna capa de Limpieza");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -38,7 +42,10 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
if (DataContext is PaneLimpiezaViewModel mod)
|
if (DataContext is PaneLimpiezaViewModel mod)
|
||||||
{
|
{
|
||||||
|
if (mod.PaneSub1.CapaAbierta)
|
||||||
mod.Ejecuta(OliviaAddInPro.Services.ModosEjec.Planifica);
|
mod.Ejecuta(OliviaAddInPro.Services.ModosEjec.Planifica);
|
||||||
|
else
|
||||||
|
HelperGlobal.ponMsg("No se ha seleccionado ninguna capa de Limpieza");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,15 +23,15 @@
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="Button_Click">
|
<Button Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="Button_Click">
|
||||||
<Button.Background>
|
<Button.Background>
|
||||||
<ImageBrush ImageSource="openfolder.png"/>
|
<ImageBrush ImageSource="../../Images/openfolder.png"/>
|
||||||
</Button.Background>
|
</Button.Background>
|
||||||
</Button>
|
</Button>
|
||||||
<Label x:Name="label_capalimp" Content="{Binding Path=LblCapaLimp, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,0,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="3"/>
|
<Label x:Name="label_capalimp" Content="{Binding Path=LblCapaElems, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,0,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="3"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Label Content="Tipo de Tratamiento" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" FontWeight="DemiBold"/>
|
<Label Content="Tipo de Tratamiento" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" FontWeight="DemiBold"/>
|
||||||
<ComboBox x:Name="comboBox_tto" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposTto, Mode = TwoWay}" HorizontalAlignment="Left" Margin="20,0,0,0"
|
<ComboBox x:Name="comboBox_tto" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposTto, Mode = TwoWay}" HorizontalAlignment="Left" Margin="20,0,0,0"
|
||||||
VerticalAlignment="Top" Width="260" DropDownOpened="ComboBox_DropDownOpened" SelectionChanged="comboBox_tto_SelectionChanged"
|
VerticalAlignment="Top" Width="260" DropDownOpened="ComboBox_DropDownOpened" SelectionChanged="comboBox_tto_SelectionChanged"
|
||||||
SelectedIndex="{Binding Path=SelTto, Mode = TwoWay}"/>
|
SelectedIndex="{Binding Path=TipoTto, Mode = TwoWay}"/>
|
||||||
<Label Content="Ámbitos de Trabajo" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
<Label Content="Ámbitos de Trabajo" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
||||||
<ComboBox x:Name="comboBox_ambitos" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=OpsAmbs, Mode = TwoWay}" HorizontalAlignment="Left" Margin="20,0,0,0"
|
<ComboBox x:Name="comboBox_ambitos" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=OpsAmbs, Mode = TwoWay}" HorizontalAlignment="Left" Margin="20,0,0,0"
|
||||||
VerticalAlignment="Top" Width="260" SelectionChanged="comboBox_ambitos_SelectionChanged"
|
VerticalAlignment="Top" Width="260" SelectionChanged="comboBox_ambitos_SelectionChanged"
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,6 @@ namespace OliviaAddInPro
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class PaneLimpiezaSub1View : UserControl
|
public partial class PaneLimpiezaSub1View : UserControl
|
||||||
{
|
{
|
||||||
private int oldTtoSel=-1;
|
|
||||||
private int oldAmbOpSel = -1;
|
|
||||||
public PaneLimpiezaSub1View()
|
public PaneLimpiezaSub1View()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
@ -51,7 +49,10 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
label_capalimp.Content = System.IO.Path.GetFileNameWithoutExtension(capa);
|
label_capalimp.Content = System.IO.Path.GetFileNameWithoutExtension(capa);
|
||||||
if (DataContext is PaneLimpiezaSub1ViewModel mod)
|
if (DataContext is PaneLimpiezaSub1ViewModel mod)
|
||||||
mod.AbiertaCapa(capa);
|
{
|
||||||
|
if(!mod.AbiertaCapa(capa))
|
||||||
|
label_capalimp.Content = Resource1.String_selec_capa;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -71,7 +72,6 @@ namespace OliviaAddInPro
|
||||||
if (DataContext is PaneLimpiezaSub1ViewModel mod)
|
if (DataContext is PaneLimpiezaSub1ViewModel mod)
|
||||||
{
|
{
|
||||||
mod.ComboTtoSel(i);
|
mod.ComboTtoSel(i);
|
||||||
oldTtoSel = i;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -86,7 +86,6 @@ namespace OliviaAddInPro
|
||||||
if (DataContext is PaneLimpiezaSub1ViewModel mod)
|
if (DataContext is PaneLimpiezaSub1ViewModel mod)
|
||||||
{
|
{
|
||||||
mod.ComboAmbSel(i);
|
mod.ComboAmbSel(i);
|
||||||
oldAmbOpSel = i;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
<Grid>
|
<Grid>
|
||||||
<Border BorderBrush="{DynamicResource Esri_BorderBrush}" >
|
<Border BorderBrush="{DynamicResource Esri_BorderBrush}" >
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
|
|
||||||
<Label Margin="15,5,0,0" Content="Restricciones de circulación" FontWeight="DemiBold"/>
|
<Label Margin="15,5,0,0" Content="Restricciones de circulación" FontWeight="DemiBold"/>
|
||||||
<Grid Margin="0,0,0,0">
|
<Grid Margin="0,0,0,0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
|
@ -26,7 +27,7 @@
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button x:Name="button_caparestr" Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="button_caparestr_Click">
|
<Button x:Name="button_caparestr" Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="button_caparestr_Click">
|
||||||
<Button.Background>
|
<Button.Background>
|
||||||
<ImageBrush ImageSource="openfolder.png"/>
|
<ImageBrush ImageSource="../../Images/openfolder.png"/>
|
||||||
</Button.Background>
|
</Button.Background>
|
||||||
</Button>
|
</Button>
|
||||||
<Label x:Name="label_caparestr" Content="{Binding Path=LblCapaRestr, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,-33,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="2"/>
|
<Label x:Name="label_caparestr" Content="{Binding Path=LblCapaRestr, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,-33,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="2"/>
|
||||||
|
|
@ -39,7 +40,7 @@
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button x:Name="button_capaniv" Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="button_capaniv_Click">
|
<Button x:Name="button_capaniv" Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="button_capaniv_Click">
|
||||||
<Button.Background>
|
<Button.Background>
|
||||||
<ImageBrush ImageSource="openfolder.png"/>
|
<ImageBrush ImageSource="../../Images/openfolder.png"/>
|
||||||
</Button.Background>
|
</Button.Background>
|
||||||
</Button>
|
</Button>
|
||||||
<Label x:Name="label_capaniv" Content="{Binding Path=LblCapaNiv, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,-33,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="2"/>
|
<Label x:Name="label_capaniv" Content="{Binding Path=LblCapaNiv, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,-33,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="2"/>
|
||||||
|
|
@ -52,7 +53,7 @@
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button x:Name="button_capazon" Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="button_capazon_Click">
|
<Button x:Name="button_capazon" Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="button_capazon_Click">
|
||||||
<Button.Background>
|
<Button.Background>
|
||||||
<ImageBrush ImageSource="openfolder.png"/>
|
<ImageBrush ImageSource="../../Images/openfolder.png"/>
|
||||||
</Button.Background>
|
</Button.Background>
|
||||||
</Button>
|
</Button>
|
||||||
<Label x:Name="label_capazon" Content="{Binding Path=LblCapaZon, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,-33,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="2"/>
|
<Label x:Name="label_capazon" Content="{Binding Path=LblCapaZon, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,-33,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="2"/>
|
||||||
|
|
@ -65,12 +66,12 @@
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button x:Name="button_capainst" Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="button_capainst_Click">
|
<Button x:Name="button_capainst" Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="button_capainst_Click">
|
||||||
<Button.Background>
|
<Button.Background>
|
||||||
<ImageBrush ImageSource="openfolder.png"/>
|
<ImageBrush ImageSource="../../Images/openfolder.png"/>
|
||||||
</Button.Background>
|
</Button.Background>
|
||||||
</Button>
|
</Button>
|
||||||
<Label x:Name="label_capainst" Content="{Binding Path=LblCapaInst, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,-33,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="2"/>
|
<Label x:Name="label_capainst" Content="{Binding Path=LblCapaInst, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,-33,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="2"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid Margin="0,15,0,0">
|
<Grid Margin="10,15,10,0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="140"/>
|
<ColumnDefinition Width="140"/>
|
||||||
<ColumnDefinition Width="110"/>
|
<ColumnDefinition Width="110"/>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ namespace OliviaAddInPro
|
||||||
|
|
||||||
private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e)
|
private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e)
|
||||||
{
|
{
|
||||||
e.Handled = !PanelGlobal.IsValid(((TextBox)sender).Text + e.Text, 0,100);
|
e.Handled = !PanelGlobal.IsValid(((TextBox)sender).Text + e.Text, 1,100);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 611 B |
|
|
@ -28,11 +28,18 @@ namespace OliviaAddInPro
|
||||||
|
|
||||||
private void button_secto_Click(object sender, RoutedEventArgs e)
|
private void button_secto_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (DataContext is PaneLimpiezaViewModel mod)
|
||||||
|
{
|
||||||
|
mod.Ejecuta(OliviaAddInPro.Services.ModosEjec.Sectoriza);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void button_planif_Click(object sender, RoutedEventArgs e)
|
private void button_planif_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (DataContext is PaneLimpiezaViewModel mod)
|
||||||
|
{
|
||||||
|
mod.Ejecuta(OliviaAddInPro.Services.ModosEjec.Planifica);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:ui="clr-namespace:OliviaAddInPro"
|
xmlns:ui="clr-namespace:OliviaAddInPro"
|
||||||
|
xmlns:viewModel="clr-namespace:OliviaAddInPro"
|
||||||
|
xmlns:view="clr-namespace:OliviaAddInPro"
|
||||||
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
|
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="300" d:DesignWidth="300"
|
d:DesignHeight="300" d:DesignWidth="300"
|
||||||
|
|
@ -13,22 +15,14 @@
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
|
<extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
<DataTemplate DataType="{x:Type viewModel:PaneRecogidaViewModel}">
|
||||||
|
<view:PaneRecogidaView />
|
||||||
|
</DataTemplate>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Grid>
|
<ScrollViewer Height="Auto">
|
||||||
<Grid.RowDefinitions>
|
<StackPanel MinWidth="300" MinHeight="200">
|
||||||
<RowDefinition Height="Auto"/>
|
<ContentPresenter Content="{Binding CurrentPage}"></ContentPresenter>
|
||||||
<RowDefinition Height="*"/>
|
</StackPanel>
|
||||||
</Grid.RowDefinitions>
|
</ScrollViewer>
|
||||||
|
|
||||||
<DockPanel Grid.Row="0" LastChildFill="true" KeyboardNavigation.TabNavigation="Local" Height="30">
|
|
||||||
<TextBlock Grid.Column="1" Text="{Binding Heading}" Style="{DynamicResource Esri_TextBlockDockPaneHeader}">
|
|
||||||
<TextBlock.ToolTip>
|
|
||||||
<WrapPanel Orientation="Vertical" MaxWidth="300">
|
|
||||||
<TextBlock Text="{Binding Heading}" TextWrapping="Wrap"/>
|
|
||||||
</WrapPanel>
|
|
||||||
</TextBlock.ToolTip>
|
|
||||||
</TextBlock>
|
|
||||||
</DockPanel>
|
|
||||||
</Grid>
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
@ -0,0 +1,80 @@
|
||||||
|
<UserControl x:Class="OliviaAddInPro.PaneRecogidaView"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
|
||||||
|
xmlns:local="clr-namespace:OliviaAddInPro"
|
||||||
|
xmlns:localMenu="clr-namespace:OliviaAddInPro"
|
||||||
|
xmlns:viewModel="clr-namespace:OliviaAddInPro"
|
||||||
|
xmlns:view="clr-namespace:OliviaAddInPro"
|
||||||
|
xmlns:frameworkControls="clr-namespace:ArcGIS.Desktop.Framework.Controls;assembly=ArcGIS.Desktop.Framework"
|
||||||
|
xmlns:ui="clr-namespace:OliviaAddInPro"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="300" d:DesignWidth="300"
|
||||||
|
d:DataContext="{Binding Path=ui.PaneRecogidaViewModel}">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
<!--Datatemplate to view the items in the Sub Panel Indicator list box control-->
|
||||||
|
<DataTemplate x:Key="SubPanelListItem" DataType="{x:Type localMenu:OptionsMenuItem}">
|
||||||
|
<Image Stretch="Fill" Width="32" Height="32" Source="{Binding Path=ImageSource}" >
|
||||||
|
<Image.ToolTip>
|
||||||
|
<ToolTip Content="{Binding Path=OptionString}"/>
|
||||||
|
</Image.ToolTip>
|
||||||
|
</Image>
|
||||||
|
</DataTemplate>
|
||||||
|
<!--DataTemplate to view when you select an item in the sub panel list control-->
|
||||||
|
<DataTemplate DataType="{x:Type viewModel:PaneRecogidaSub1ViewModel}">
|
||||||
|
<view:PaneRecogidaSub1View/>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type viewModel:PaneLimpiezaSub2ViewModel}">
|
||||||
|
<view:PaneLimpiezaSub2View/>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type viewModel:PaneLimpiezaSub3ViewModel}">
|
||||||
|
<view:PaneLimpiezaSub3View/>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type viewModel:PaneLimpiezaSub4ViewModel}">
|
||||||
|
<view:PaneLimpiezaSub4View/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ResourceDictionary>
|
||||||
|
</UserControl.Resources>
|
||||||
|
<Grid MinHeight="200" MinWidth="300" x:Name="GridReco">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<StackPanel Grid.Row="0">
|
||||||
|
<frameworkControls:TabIndicator HorizontalAlignment="Stretch"
|
||||||
|
Margin="0,0,6,0"
|
||||||
|
HorizontalContentAlignment="Left"
|
||||||
|
ItemTemplate="{StaticResource SubPanelListItem}"
|
||||||
|
ItemsSource="{Binding OptionsMenu}"
|
||||||
|
SelectedItem="{Binding SelectedOption}">
|
||||||
|
</frameworkControls:TabIndicator>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Grid.Row="1">
|
||||||
|
<ContentPresenter Content="{Binding CurrentSubPanelPage}"/>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Grid.Row="2" Margin="0,20,0,0">
|
||||||
|
<ContentPresenter Name="PaneEjecutar">
|
||||||
|
<ContentPresenter.Content>
|
||||||
|
<StackPanel Orientation="Vertical">
|
||||||
|
<Grid Margin="0,10,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="100"/>
|
||||||
|
<ColumnDefinition Width="100"/>
|
||||||
|
<ColumnDefinition Width="100"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button x:Name="button_secto" Grid.Column="1" Style="{DynamicResource Esri_Button}" Content="Sectorizar" Margin="10,0,10,0" Click="button_secto_Click"/>
|
||||||
|
<Button x:Name="button_planif" Grid.Column="2" Style="{DynamicResource Esri_Button}" Content="Planificar" Margin="10,0,10,0" Click="button_planif_Click"/>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</ContentPresenter.Content>
|
||||||
|
</ContentPresenter>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
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;
|
||||||
|
using OliviaAddInPro.Helper;
|
||||||
|
|
||||||
|
|
||||||
|
namespace OliviaAddInPro
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for PaneRecogidaView.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class PaneRecogidaView : UserControl
|
||||||
|
{
|
||||||
|
public PaneRecogidaView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button_secto_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (DataContext is PaneRecogidaViewModel mod)
|
||||||
|
{
|
||||||
|
if (mod.PaneSub1.CapaAbierta)
|
||||||
|
mod.Ejecuta(OliviaAddInPro.Services.ModosEjec.Sectoriza);
|
||||||
|
else
|
||||||
|
HelperGlobal.ponMsg("No se ha seleccionado ninguna capa de Recogida");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button_planif_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (DataContext is PaneRecogidaViewModel mod)
|
||||||
|
{
|
||||||
|
if (mod.PaneSub1.CapaAbierta)
|
||||||
|
mod.Ejecuta(OliviaAddInPro.Services.ModosEjec.Planifica);
|
||||||
|
else
|
||||||
|
HelperGlobal.ponMsg("No se ha seleccionado ninguna capa de Recogida");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,80 @@
|
||||||
|
<UserControl x:Class="OliviaAddInPro.PaneRecogidaSub1View"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
|
||||||
|
xmlns:ui="clr-namespace:OliviaAddInPro"
|
||||||
|
mc:Ignorable="d" d:DesignWidth="300" Height="350"
|
||||||
|
d:DataContext="{Binding Path=ui.PaneRecogidaSub1ViewModel}" Loaded="UserControl_Loaded" Unloaded="UserControl_Unloaded" >
|
||||||
|
<UserControl.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
</ResourceDictionary>
|
||||||
|
</UserControl.Resources>
|
||||||
|
<StackPanel Orientation="Vertical" Height="Auto">
|
||||||
|
<Label Content="Capa de Recogida" HorizontalAlignment="Left" Margin="15,5,0,0" VerticalAlignment="Top" FontWeight="DemiBold"/>
|
||||||
|
<Grid Margin="0,5,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="45"/>
|
||||||
|
<ColumnDefinition Width="200"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="Button_Click">
|
||||||
|
<Button.Background>
|
||||||
|
<ImageBrush ImageSource="../../Images/openfolder.png"/>
|
||||||
|
</Button.Background>
|
||||||
|
</Button>
|
||||||
|
<Label x:Name="label_capareco" Content="{Binding Path=LblCapaElems, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,0,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="3"/>
|
||||||
|
</Grid>
|
||||||
|
<Label Content="Fracción" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" FontWeight="DemiBold"/>
|
||||||
|
<Grid Margin="20,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="150"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<ComboBox x:Name="comboBox_frac" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposFrac, Mode = TwoWay}" HorizontalAlignment="Left" Margin="0,0,0,0"
|
||||||
|
VerticalAlignment="Top" Width="150"
|
||||||
|
SelectedIndex="{Binding Path=TipoFrac, Mode = TwoWay}" SelectionChanged="comboBox_frac_SelectionChanged">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<ComboBoxItem IsEnabled="{Binding IsEnabled}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
<TextBox x:Name="txtBox_densCont" Width="90" ToolTip="{Binding ToolTip_TextDensCont}" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Visibility="{Binding Path=VisTextDens, Mode = TwoWay}" Grid.Column="1" Margin="10,0" TextWrapping="NoWrap" Text="{Binding Path=TextDensCont, Mode = TwoWay}" TextAlignment="Right" MaxLength="5" PreviewTextInput="txtBox_densCont_PreviewTextInput"/>
|
||||||
|
</Grid>
|
||||||
|
<Label Content="Tipo de carga" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
||||||
|
<Grid Margin="20,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="150"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<ComboBox x:Name="comboBox_tipoCarg" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposCarg, Mode = TwoWay}" HorizontalAlignment="Left" Margin="0,0,0,0"
|
||||||
|
VerticalAlignment="Top" Width="150"
|
||||||
|
SelectedIndex="{Binding Path=TipoCarg, Mode = TwoWay}" SelectionChanged="comboBox_tipoCarg_SelectionChanged"/>
|
||||||
|
<ComboBox x:Name="comboBox_tipoLat" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Visibility="{Binding Path=VisCombLate, Mode = TwoWay}" Grid.Column="1" ItemsSource="{Binding Path=TiposLate, Mode = TwoWay}" HorizontalAlignment="Left" Margin="10,0,0,0"
|
||||||
|
VerticalAlignment="Top" Width="90"
|
||||||
|
SelectedIndex="{Binding Path=TipoLate, Mode = TwoWay}" SelectionChanged="comboBox_tipoLat_SelectionChanged"/>
|
||||||
|
</Grid>
|
||||||
|
<Label Content="Tipo de vehículo" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
||||||
|
<ComboBox x:Name="comboBox_tipoVehic" IsEnabled="{Binding CapaAbierta, Mode=TwoWay}" ItemsSource="{Binding TiposVehic, Mode=TwoWay}" HorizontalAlignment="Left" Margin="20,0,0,0"
|
||||||
|
VerticalAlignment="Top" Width="150"
|
||||||
|
SelectedIndex="{Binding TipoVehic, Mode=TwoWay}" SelectionChanged="comboBox_tipoVehic_SelectionChanged"/>
|
||||||
|
<Label Content="Capacidad" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
||||||
|
<Grid Margin="20,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="80"/>
|
||||||
|
<ColumnDefinition Width="70"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<ComboBox x:Name="comboBox_tipoCapac" IsEnabled="{Binding EnabComboCapac, Mode=TwoWay}" ItemsSource="{Binding TiposCapac, Mode=TwoWay}" HorizontalAlignment="Left" Margin="0,0,0,0"
|
||||||
|
VerticalAlignment="Top" Width="75"
|
||||||
|
SelectedIndex="{Binding TipoCapac, Mode=TwoWay}" SelectionChanged="comboBox_tipoCapac_SelectionChanged"/>
|
||||||
|
<TextBox x:Name="txtBox_kgCapac" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Grid.Column="1" Margin="5,0,0,8" TextWrapping="NoWrap" Text="{Binding Path=TextKgCapac, Mode = TwoWay}" TextAlignment="Right" MaxLength="4" PreviewTextInput="txtBox_kgCapac_PreviewTextInput"/>
|
||||||
|
<Label x:Name="label_kgmax" Grid.Column="2" Content="kg máx. por viaje" Margin="0,0,0,4"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
</UserControl>
|
||||||
|
|
@ -0,0 +1,133 @@
|
||||||
|
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;
|
||||||
|
using ArcGIS.Desktop.Core;
|
||||||
|
using ArcGIS.Desktop.Internal.Framework.Controls;
|
||||||
|
using OliviaAddInPro.Helper;
|
||||||
|
|
||||||
|
namespace OliviaAddInPro
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for PaneRecogidaSub1View.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class PaneRecogidaSub1View : UserControl
|
||||||
|
{
|
||||||
|
public PaneRecogidaSub1View()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Button_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
string capa=HelperGdb.OpenFileDialog(HelperGdb.TiposOpenFileDlg.OpenFtrClassPoint);
|
||||||
|
if (!string.IsNullOrEmpty(capa))
|
||||||
|
{
|
||||||
|
label_capareco.Content = System.IO.Path.GetFileNameWithoutExtension(capa);
|
||||||
|
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
||||||
|
{
|
||||||
|
if(!mod.AbiertaCapa(capa))
|
||||||
|
label_capareco.Content = Resource1.String_selec_capa;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
label_capareco.Content = Resource1.String_selec_capa;
|
||||||
|
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
||||||
|
mod.AbiertaCapa(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UserControl_Unloaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void txtBox_kgCapac_PreviewTextInput(object sender, TextCompositionEventArgs e)
|
||||||
|
{
|
||||||
|
e.Handled = !PanelGlobal.IsValid(((TextBox)sender).Text + e.Text, 1, 10000);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void comboBox_frac_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
int i = -1;
|
||||||
|
if (sender is System.Windows.Controls.ComboBox combo)
|
||||||
|
{
|
||||||
|
i = combo.SelectedIndex;
|
||||||
|
|
||||||
|
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
||||||
|
{
|
||||||
|
mod.ComboFracSel(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void comboBox_tipoCarg_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
int i = -1;
|
||||||
|
if (sender is System.Windows.Controls.ComboBox combo)
|
||||||
|
{
|
||||||
|
i = combo.SelectedIndex;
|
||||||
|
|
||||||
|
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
||||||
|
{
|
||||||
|
mod.ComboCargSel(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void comboBox_tipoVehic_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
int i = -1;
|
||||||
|
if (sender is System.Windows.Controls.ComboBox combo)
|
||||||
|
{
|
||||||
|
i = combo.SelectedIndex;
|
||||||
|
|
||||||
|
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
||||||
|
{
|
||||||
|
mod.ComboVehicSel(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void comboBox_tipoCapac_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
int i = -1;
|
||||||
|
if (sender is System.Windows.Controls.ComboBox combo)
|
||||||
|
{
|
||||||
|
i = combo.SelectedIndex;
|
||||||
|
|
||||||
|
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
||||||
|
{
|
||||||
|
mod.ComboCapacSel(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void txtBox_densCont_PreviewTextInput(object sender, TextCompositionEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void comboBox_tipoLat_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
<UserControl x:Class="OliviaAddInPro.PaneRecogidaSub2View"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
|
||||||
|
xmlns:ui="clr-namespace:OliviaAddInPro"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="300" d:DesignWidth="300"
|
||||||
|
d:DataContext="{Binding Path=ui.PaneRecogidaSub2ViewModel}">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
</ResourceDictionary>
|
||||||
|
</UserControl.Resources>
|
||||||
|
<Grid>
|
||||||
|
<Border BorderBrush="{DynamicResource Esri_BorderBrush}" >
|
||||||
|
<StackPanel Orientation="Vertical">
|
||||||
|
<Label Margin="15,5,0,0" Content="Restricciones de circulación" FontWeight="DemiBold"/>
|
||||||
|
<Grid Margin="0,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="45"/>
|
||||||
|
<ColumnDefinition Width="200"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button x:Name="button_caparestr" Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="button_caparestr_Click">
|
||||||
|
<Button.Background>
|
||||||
|
<ImageBrush ImageSource="../../Images/openfolder.png"/>
|
||||||
|
</Button.Background>
|
||||||
|
</Button>
|
||||||
|
<Label x:Name="label_caparestr" Content="{Binding Path=LblCapaRestr, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,-33,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="2"/>
|
||||||
|
</Grid>
|
||||||
|
<Label Margin="15,0,0,0" Content="Niveles" FontWeight="DemiBold"/>
|
||||||
|
<Grid Margin="0,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="45"/>
|
||||||
|
<ColumnDefinition Width="200"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button x:Name="button_capaniv" Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="button_capaniv_Click">
|
||||||
|
<Button.Background>
|
||||||
|
<ImageBrush ImageSource="../../Images/openfolder.png"/>
|
||||||
|
</Button.Background>
|
||||||
|
</Button>
|
||||||
|
<Label x:Name="label_capaniv" Content="{Binding Path=LblCapaNiv, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,-33,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="2"/>
|
||||||
|
</Grid>
|
||||||
|
<Label Margin="15,0,0,0" Content="Zonas" FontWeight="DemiBold"/>
|
||||||
|
<Grid Margin="0,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="45"/>
|
||||||
|
<ColumnDefinition Width="200"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button x:Name="button_capazon" Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="button_capazon_Click">
|
||||||
|
<Button.Background>
|
||||||
|
<ImageBrush ImageSource="../../Images/openfolder.png"/>
|
||||||
|
</Button.Background>
|
||||||
|
</Button>
|
||||||
|
<Label x:Name="label_capazon" Content="{Binding Path=LblCapaZon, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,-33,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="2"/>
|
||||||
|
</Grid>
|
||||||
|
<Label Margin="15,0,0,0" Content="Instalación" FontWeight="DemiBold"/>
|
||||||
|
<Grid Margin="0,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="45"/>
|
||||||
|
<ColumnDefinition Width="200"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button x:Name="button_capainst" Content="" HorizontalAlignment="Left" Margin="20,3,0,0" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" Click="button_capainst_Click">
|
||||||
|
<Button.Background>
|
||||||
|
<ImageBrush ImageSource="../../Images/openfolder.png"/>
|
||||||
|
</Button.Background>
|
||||||
|
</Button>
|
||||||
|
<Label x:Name="label_capainst" Content="{Binding Path=LblCapaInst, Mode = TwoWay}" Grid.Column="1" HorizontalAlignment="Left" Margin="13,0,-33,0" VerticalAlignment="Top" Width="221" Height="30" Grid.ColumnSpan="2"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid Margin="0,15,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="140"/>
|
||||||
|
<ColumnDefinition Width="110"/>
|
||||||
|
<ColumnDefinition Width="50"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Margin="15,0,0,0" Content="Buffer de exportación"/>
|
||||||
|
<TextBox x:Name="txtBox_buffexport" Grid.Column="1" Margin="10,2,30,4" TextWrapping="Wrap" Text="{Binding Path=TxtBuffExport, Mode = TwoWay}" TextAlignment="Right" MaxLength="4" PreviewTextInput="TextBox_PreviewTextInput"/>
|
||||||
|
<Label Grid.Column="2" Content="m" Margin="0,0,0,0"/>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
|
|
@ -0,0 +1,143 @@
|
||||||
|
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;
|
||||||
|
using ArcGIS.Core.Data;
|
||||||
|
using ArcGIS.Desktop.Core;
|
||||||
|
using OliviaAddInPro.Helper;
|
||||||
|
using OliviaAddInPro.View;
|
||||||
|
using OliviaAddInPro.Model;
|
||||||
|
using ArcGIS.Core.Geometry;
|
||||||
|
using ArcGIS.Desktop.Mapping;
|
||||||
|
using ArcGIS.Desktop.Internal.Framework.Controls;
|
||||||
|
|
||||||
|
namespace OliviaAddInPro
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for PaneRecogidaSub2View.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class PaneRecogidaSub2View : UserControl
|
||||||
|
{
|
||||||
|
public PaneRecogidaSub2View()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e)
|
||||||
|
{
|
||||||
|
e.Handled = !PanelGlobal.IsValid(((TextBox)sender).Text + e.Text,0,9999);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Saca ventana para seleccionar el campo del que leer para elegir la geometría
|
||||||
|
*
|
||||||
|
private ArcGIS.Core.Geometry.Geometry SelecLeeGeom(FeatureClass fc, out string _texto, bool multisel)
|
||||||
|
{
|
||||||
|
ArcGIS.Core.Geometry.Geometry geomsal = null;
|
||||||
|
string texto = "";
|
||||||
|
|
||||||
|
if (fc != null)
|
||||||
|
{
|
||||||
|
//saca la ventana de selección de campo
|
||||||
|
ShowProWndSelectFields selfwnd = new ShowProWndSelectFields(fc, multisel);
|
||||||
|
if (selfwnd.SelFieldVals.Count > 0)
|
||||||
|
{
|
||||||
|
geomsal = HelperGdb.GetGeomSel(fc, selfwnd.SelField, selfwnd.SelFieldVals).Result;
|
||||||
|
texto = HelperGdb.TextoSal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_texto = texto;
|
||||||
|
return geomsal;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ArcGIS.Core.Geometry.Geometry AbreGeom(out string texto)
|
||||||
|
{
|
||||||
|
//inicialmente
|
||||||
|
ArcGIS.Core.Geometry.Geometry geom = null;
|
||||||
|
texto = Resource1.String_selec_capa;
|
||||||
|
|
||||||
|
//abre
|
||||||
|
FeatureClass fc = HelperGdb.OpenFtClassDialog(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon);
|
||||||
|
if (fc != null)
|
||||||
|
{
|
||||||
|
//hace geom
|
||||||
|
geom = SelecLeeGeom(fc, out texto, true);
|
||||||
|
if (geom == null && (HelperGdb.OutStr.Length > 0))
|
||||||
|
HelperGlobal.ponMsg(HelperGdb.OutStr, System.Windows.MessageBoxImage.Error);
|
||||||
|
|
||||||
|
HelperGdb.Free(fc);
|
||||||
|
}
|
||||||
|
return geom;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button_caparestr_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
string texto = "";
|
||||||
|
ArcGIS.Core.Geometry.Geometry geom = AbreGeom(out texto);
|
||||||
|
if (DataContext is PaneLimpiezaSub2ViewModel mod)
|
||||||
|
{
|
||||||
|
mod.GeomRestr = geom;
|
||||||
|
}
|
||||||
|
if (geom != null)
|
||||||
|
label_caparestr.Content = texto;
|
||||||
|
else
|
||||||
|
label_caparestr.Content =Resource1.String_selec_capa;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button_capaniv_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
string texto = "";
|
||||||
|
ArcGIS.Core.Geometry.Geometry geom = AbreGeom(out texto);
|
||||||
|
if (DataContext is PaneLimpiezaSub2ViewModel mod)
|
||||||
|
{
|
||||||
|
mod.GeomNiv = geom;
|
||||||
|
}
|
||||||
|
if (geom != null)
|
||||||
|
label_capaniv.Content = texto;
|
||||||
|
else
|
||||||
|
label_capaniv.Content = Resource1.String_selec_capa;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button_capazon_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
string texto = "";
|
||||||
|
ArcGIS.Core.Geometry.Geometry geom = AbreGeom(out texto);
|
||||||
|
if (DataContext is PaneLimpiezaSub2ViewModel mod)
|
||||||
|
{
|
||||||
|
mod.GeomZon = geom;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (geom != null)
|
||||||
|
label_capazon.Content = texto;
|
||||||
|
else
|
||||||
|
label_capazon.Content = Resource1.String_selec_capa;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button_capainst_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
string texto = "";
|
||||||
|
|
||||||
|
ArcGIS.Core.Geometry.Geometry geomsal = AbreGeom(out texto);
|
||||||
|
|
||||||
|
if ((DataContext is PaneLimpiezaSub2ViewModel mod) && geomsal != null && geomsal is MapPoint mp)
|
||||||
|
{
|
||||||
|
mod.CoordsInstal = mp.Coordinate2D;
|
||||||
|
}
|
||||||
|
if (geomsal != null)
|
||||||
|
label_capainst.Content = texto;
|
||||||
|
else
|
||||||
|
label_capainst.Content = Resource1.String_selec_capa;
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
<UserControl x:Class="OliviaAddInPro.PaneRecogidaSub4View"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
|
||||||
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"
|
||||||
|
xmlns:ui="clr-namespace:OliviaAddInPro"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="300" d:DesignWidth="300"
|
||||||
|
d:DataContext="{Binding Path=ui.PaneRecogidaSub4ViewModel}">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
</ResourceDictionary>
|
||||||
|
</UserControl.Resources>
|
||||||
|
<StackPanel Orientation="Vertical">
|
||||||
|
<Label Margin="15,5,0,0" Content="Tiempos" FontWeight="DemiBold"/>
|
||||||
|
<Grid Margin="0,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="180"/>
|
||||||
|
<ColumnDefinition Width="100"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Content="Carga y Descarga" HorizontalAlignment="Left" Margin="15,5,0,0" VerticalAlignment="Top" Width="177" Height="30" Grid.ColumnSpan="2"/>
|
||||||
|
<xctk:DateTimeUpDown Grid.Column="1" Height="20" Format="Custom" FormatString="HH 'h' mm 'm'" Value="{Binding Path=TimeCargDesc, Mode = TwoWay}" Margin="9,8,14,7"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid Margin="0,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="180"/>
|
||||||
|
<ColumnDefinition Width="100"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Content="Desplazamiento ini/fin" HorizontalAlignment="Left" Margin="15,5,0,0" VerticalAlignment="Top" Width="177" Height="30" Grid.ColumnSpan="2"/>
|
||||||
|
<xctk:DateTimeUpDown Grid.Column="1" Height="20" Format="Custom" FormatString="HH 'h' mm 'm'" Value="{Binding Path=TimeDespIniFin, Mode = TwoWay}" Margin="9,8,14,7"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid Margin="0,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="180"/>
|
||||||
|
<ColumnDefinition Width="100"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Content="Hora inicio jornada" HorizontalAlignment="Left" Margin="15,5,0,0" VerticalAlignment="Top" Width="177" Height="30" Grid.ColumnSpan="2"/>
|
||||||
|
<xctk:DateTimeUpDown Grid.Column="1" Height="20" Format="Custom" FormatString="HH 'h' mm 'm'" Value="{Binding Path=TimeIniJornada, Mode = TwoWay}" Margin="9,8,14,7"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid Margin="0,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="180"/>
|
||||||
|
<ColumnDefinition Width="100"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Content="Reducción por tráfico (%)" HorizontalAlignment="Left" Margin="15,5,0,0" VerticalAlignment="Top" Width="177" Height="30" Grid.ColumnSpan="2"/>
|
||||||
|
<TextBox Grid.Column="1" Height="20" Margin="10,8,15,7" PreviewTextInput="TextBox_PreviewTextInput" Text="{Binding Path=TextPercentTrafico, Mode = TwoWay}" TextAlignment="Right" MaxLength="3"/>
|
||||||
|
</Grid>
|
||||||
|
<Label Margin="15,5,0,0" Content="Tiempos del convenio" FontWeight="DemiBold"/>
|
||||||
|
<Grid Margin="0,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="180"/>
|
||||||
|
<ColumnDefinition Width="100"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Content="Jornada" HorizontalAlignment="Left" Margin="15,5,0,0" VerticalAlignment="Top" Width="177" Height="30" Grid.ColumnSpan="2"/>
|
||||||
|
<xctk:DateTimeUpDown Grid.Column="1" Height="20" Format="Custom" FormatString="HH 'h' mm 'm'" Value="{Binding Path=TimeJornadaConv, Mode = TwoWay}" Margin="9,8,14,7"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid Margin="0,0,0,0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="180"/>
|
||||||
|
<ColumnDefinition Width="100"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Content="Descanso personal" HorizontalAlignment="Left" Margin="15,5,0,0" VerticalAlignment="Top" Width="177" Height="30" Grid.ColumnSpan="2"/>
|
||||||
|
<xctk:DateTimeUpDown Grid.Column="1" Height="20" Format="Custom" FormatString="HH 'h' mm 'm'" Value="{Binding Path=TimeDescPers, Mode = TwoWay}" Margin="9,8,14,7"/>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</UserControl>
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
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 OliviaAddInPro
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for PaneRecogidaSub4View.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class PaneRecogidaSub4View : UserControl
|
||||||
|
{
|
||||||
|
public PaneRecogidaSub4View()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e)
|
||||||
|
{
|
||||||
|
e.Handled = !PanelGlobal.IsValid(((TextBox)sender).Text + e.Text, 0,100);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,7 @@ namespace OliviaAddInPro
|
||||||
internal class DockpaneConfigViewModel : DockPane
|
internal class DockpaneConfigViewModel : DockPane
|
||||||
{
|
{
|
||||||
private bool firstTimeShow = true;
|
private bool firstTimeShow = true;
|
||||||
|
private static bool hideTemp = false;
|
||||||
private const string _dockPaneID = "OliviaAddInPro_DockpaneConfig";
|
private const string _dockPaneID = "OliviaAddInPro_DockpaneConfig";
|
||||||
protected DockpaneConfigViewModel()
|
protected DockpaneConfigViewModel()
|
||||||
{
|
{
|
||||||
|
|
@ -43,6 +44,19 @@ namespace OliviaAddInPro
|
||||||
pane.Activate();
|
pane.Activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static void Hide_()
|
||||||
|
{
|
||||||
|
DockPane pane = FrameworkApplication.DockPaneManager.Find(_dockPaneID);
|
||||||
|
if (pane == null)
|
||||||
|
return;
|
||||||
|
hideTemp = true;
|
||||||
|
pane.Hide();
|
||||||
|
}
|
||||||
|
internal static void Reset()
|
||||||
|
{
|
||||||
|
//HAY QUE HACER QUE SE LIMPIE TODO
|
||||||
|
}
|
||||||
|
|
||||||
//The parameter passed to this method will be true if the Dockpane is being opened and it is false when you close the dockpane
|
//The parameter passed to this method will be true if the Dockpane is being opened and it is false when you close the dockpane
|
||||||
//also false the first time
|
//also false the first time
|
||||||
protected override void OnShow(bool isVisible)
|
protected override void OnShow(bool isVisible)
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,6 @@ namespace OliviaAddInPro
|
||||||
private ObservableCollection<string> opsAmbs=new ObservableCollection<string>();
|
private ObservableCollection<string> opsAmbs=new ObservableCollection<string>();
|
||||||
private int selOpAmb = -1;
|
private int selOpAmb = -1;
|
||||||
private ObservableCollection<CheckedListItem<string>> ambitos = new ObservableCollection<CheckedListItem<string>>();
|
private ObservableCollection<CheckedListItem<string>> ambitos = new ObservableCollection<CheckedListItem<string>>();
|
||||||
private bool capaAbierta = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array de variables de tipo AmbitsList para mostrar en la lista, se rellena al elegir el tipo de tratamiento
|
* Array de variables de tipo AmbitsList para mostrar en la lista, se rellena al elegir el tipo de tratamiento
|
||||||
*/
|
*/
|
||||||
|
|
@ -54,10 +52,7 @@ namespace OliviaAddInPro
|
||||||
bool[] amb_tra_gdb = null;
|
bool[] amb_tra_gdb = null;
|
||||||
private LimpiezaServ limpServ;
|
private LimpiezaServ limpServ;
|
||||||
|
|
||||||
//implementan la interfaz Limpieza
|
|
||||||
private int selTto = -1;
|
|
||||||
private bool[] ambitosSel;
|
private bool[] ambitosSel;
|
||||||
private string capaElems = "";
|
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
|
|
||||||
|
|
@ -66,13 +61,6 @@ namespace OliviaAddInPro
|
||||||
get { return Resource1.String_tto; }
|
get { return Resource1.String_tto; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private string lblCapaLimp;
|
|
||||||
public string LblCapaLimp
|
|
||||||
{
|
|
||||||
get { return lblCapaLimp; }
|
|
||||||
set { base.SetProperty(ref lblCapaLimp, value, () => LblCapaLimp); }
|
|
||||||
}
|
|
||||||
|
|
||||||
private string textVeloDespl;
|
private string textVeloDespl;
|
||||||
public string TextVeloDespl
|
public string TextVeloDespl
|
||||||
{
|
{
|
||||||
|
|
@ -126,12 +114,13 @@ namespace OliviaAddInPro
|
||||||
base.NotifyPropertyChanged("TiposTto");
|
base.NotifyPropertyChanged("TiposTto");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private int tipoTto = -1;
|
||||||
public int TipoTto
|
public int TipoTto
|
||||||
{
|
{
|
||||||
get { return selTto; }
|
get { return tipoTto; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
selTto = value;
|
tipoTto = value;
|
||||||
base.NotifyPropertyChanged("TipoTto");
|
base.NotifyPropertyChanged("TipoTto");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -171,29 +160,11 @@ namespace OliviaAddInPro
|
||||||
base.NotifyPropertyChanged("AmbitosSel");
|
base.NotifyPropertyChanged("AmbitosSel");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public bool CapaAbierta
|
|
||||||
{
|
|
||||||
get { return capaAbierta; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
capaAbierta = value;
|
|
||||||
base.NotifyPropertyChanged("CapaAbierta");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public string CapaElems
|
|
||||||
{
|
|
||||||
get { return capaElems; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
capaElems = value;
|
|
||||||
base.NotifyPropertyChanged("CapaElems");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion Properties
|
#endregion Properties
|
||||||
|
|
||||||
public PaneLimpiezaSub1ViewModel()
|
public PaneLimpiezaSub1ViewModel()
|
||||||
{
|
{
|
||||||
lblCapaLimp = Resource1.String_selec_capa;
|
LblCapaElems = Resource1.String_selec_capa;
|
||||||
timeTto = 10;
|
timeTto = 10;
|
||||||
textVeloDespl = "10";
|
textVeloDespl = "10";
|
||||||
lblUdsTimeTto = "min";
|
lblUdsTimeTto = "min";
|
||||||
|
|
@ -204,7 +175,7 @@ namespace OliviaAddInPro
|
||||||
/**
|
/**
|
||||||
* Realiza las comprobaciones para cuando se ha abierto una capa
|
* Realiza las comprobaciones para cuando se ha abierto una capa
|
||||||
*/
|
*/
|
||||||
public void AbiertaCapa(string capa)
|
public bool AbiertaCapa(string capa)
|
||||||
{
|
{
|
||||||
CapaAbierta = false;
|
CapaAbierta = false;
|
||||||
CapaElems = string.Empty;
|
CapaElems = string.Empty;
|
||||||
|
|
@ -212,12 +183,12 @@ namespace OliviaAddInPro
|
||||||
Ambitos.Clear();
|
Ambitos.Clear();
|
||||||
OliviaGlob.TipoEjec = OliviaGlob.TipoEjec | TiposEjecucion.Config; //lo reinicia, por si estaba después de planificar
|
OliviaGlob.TipoEjec = OliviaGlob.TipoEjec | TiposEjecucion.Config; //lo reinicia, por si estaba después de planificar
|
||||||
if (string.IsNullOrEmpty(capa))
|
if (string.IsNullOrEmpty(capa))
|
||||||
return;
|
return false;
|
||||||
//comprueba los campos de limpieza
|
//comprueba los campos de limpieza
|
||||||
if (!limpServ.CompruebaCamposLimp(capa))
|
if (!limpServ.CompruebaCamposLimp(capa))
|
||||||
{
|
{
|
||||||
HelperGlobal.ponMsg(HelperGdb.OutStr, System.Windows.MessageBoxImage.Warning);
|
HelperGlobal.ponMsg(limpServ.ErrStr, System.Windows.MessageBoxImage.Warning);
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
amb_tra_gdb = limpServ.BuscAmbGdb(capa);
|
amb_tra_gdb = limpServ.BuscAmbGdb(capa);
|
||||||
|
|
@ -234,11 +205,12 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
HelperGlobal.ponMsg(Resource1.String_error_elems_tabla,
|
HelperGlobal.ponMsg(Resource1.String_error_elems_tabla,
|
||||||
System.Windows.MessageBoxImage.Warning);
|
System.Windows.MessageBoxImage.Warning);
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
//hay elementos en la gdb
|
//hay elementos en la gdb
|
||||||
CapaElems = capa;
|
CapaElems = capa;
|
||||||
CapaAbierta = true;
|
CapaAbierta = true;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Realiza los cambios en los ámbitos cuando se ha seleccionado un tratamiento
|
* Realiza los cambios en los ámbitos cuando se ha seleccionado un tratamiento
|
||||||
|
|
@ -399,7 +371,7 @@ namespace OliviaAddInPro
|
||||||
if (TipoTto < (int)LimpiezaDef.TiposTto.TtoCustom)
|
if (TipoTto < (int)LimpiezaDef.TiposTto.TtoCustom)
|
||||||
{
|
{
|
||||||
//pide un array de booleanos donde es true en las posiciones de los ámbitos comunes
|
//pide un array de booleanos donde es true en las posiciones de los ámbitos comunes
|
||||||
amb_val = limpServ.DameAmbTto(selTto);
|
amb_val = limpServ.DameAmbTto(tipoTto);
|
||||||
//crea un array con el número de elementos del array anterior que sean true
|
//crea un array con el número de elementos del array anterior que sean true
|
||||||
ambs_list = new ObservableCollection<AmbitsList>();//cuenta los trues
|
ambs_list = new ObservableCollection<AmbitsList>();//cuenta los trues
|
||||||
//rellena el array apuntando los índices y los textos correspondientes a los trues
|
//rellena el array apuntando los índices y los textos correspondientes a los trues
|
||||||
|
|
@ -500,7 +472,7 @@ namespace OliviaAddInPro
|
||||||
ambitosSel = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //reinicia los ambitos seleccionados
|
ambitosSel = new bool[(int)LimpiezaDef.AmbitsTra.AmbN]; //reinicia los ambitos seleccionados
|
||||||
if (ambitos.Count == 0)
|
if (ambitos.Count == 0)
|
||||||
return false;
|
return false;
|
||||||
else if ((selOpAmb == 0) && (selTto < (int)LimpiezaDef.TiposTto.TtoPapeVaci))
|
else if ((selOpAmb == 0) && (tipoTto < (int)LimpiezaDef.TiposTto.TtoPapeVaci))
|
||||||
{
|
{
|
||||||
for (int i = 0; i < ambitos.Count; i++)
|
for (int i = 0; i < ambitos.Count; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -509,7 +481,7 @@ namespace OliviaAddInPro
|
||||||
ambitosSel[(int)((AmbitsList)ambs_list_tod_lin[i]).amb_i] = true;
|
ambitosSel[(int)((AmbitsList)ambs_list_tod_lin[i]).amb_i] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((selOpAmb == 0) && (selTto >= (int)LimpiezaDef.TiposTto.TtoPapeVaci))
|
else if ((selOpAmb == 0) && (tipoTto >= (int)LimpiezaDef.TiposTto.TtoPapeVaci))
|
||||||
{
|
{
|
||||||
for (int i = 0; i < ambitos.Count; i++)
|
for (int i = 0; i < ambitos.Count; i++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,13 @@ namespace OliviaAddInPro
|
||||||
_subPanel3ViewModel = new PaneLimpiezaSub3ViewModel();
|
_subPanel3ViewModel = new PaneLimpiezaSub3ViewModel();
|
||||||
_subPanel4ViewModel = new PaneLimpiezaSub4ViewModel();
|
_subPanel4ViewModel = new PaneLimpiezaSub4ViewModel();
|
||||||
|
|
||||||
|
|
||||||
OptionsMenu = new ObservableCollection<OptionsMenuItem>
|
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/inicio.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/zonas.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/ptosctrl.png")), Resource1.String_ctrol, _subPanel3ViewModel),
|
||||||
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/Panda32.png")), Resource1.String_tiempos, _subPanel4ViewModel)
|
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/time.png")), Resource1.String_tiempos, _subPanel4ViewModel)
|
||||||
};
|
};
|
||||||
SelectedOption = OptionsMenu[0];
|
SelectedOption = OptionsMenu[0];
|
||||||
limp = OliviaGlob.Limp;
|
limp = OliviaGlob.Limp;
|
||||||
|
|
@ -59,6 +60,10 @@ namespace OliviaAddInPro
|
||||||
CurrentSubPanelPage = value.SubPanelViewModel;
|
CurrentSubPanelPage = value.SubPanelViewModel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public PaneLimpiezaSub1ViewModel PaneSub1
|
||||||
|
{
|
||||||
|
get { return _subPanel1ViewModel; }
|
||||||
|
}
|
||||||
|
|
||||||
public bool Lee(out string err_str)
|
public bool Lee(out string err_str)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,32 @@ namespace OliviaAddInPro
|
||||||
public PaneLimpiezaSub3ViewModel _subPanel3ViewModel;
|
public PaneLimpiezaSub3ViewModel _subPanel3ViewModel;
|
||||||
public PaneLimpiezaSub4ViewModel _subPanel4ViewModel;
|
public PaneLimpiezaSub4ViewModel _subPanel4ViewModel;
|
||||||
|
|
||||||
|
private string lblCapaElems = Resource1.String_selec_capa;
|
||||||
|
public string LblCapaElems
|
||||||
|
{
|
||||||
|
get { return lblCapaElems; }
|
||||||
|
set { base.SetProperty(ref lblCapaElems, value, () => LblCapaElems); }
|
||||||
|
}
|
||||||
|
private bool capaAbierta = false;
|
||||||
|
public bool CapaAbierta
|
||||||
|
{
|
||||||
|
get { return capaAbierta; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
capaAbierta = value;
|
||||||
|
base.NotifyPropertyChanged("CapaAbierta");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private string capaElems = "";
|
||||||
|
public string CapaElems
|
||||||
|
{
|
||||||
|
get { return capaElems; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
capaElems = value;
|
||||||
|
base.NotifyPropertyChanged("CapaElems");
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion Properties
|
#endregion Properties
|
||||||
|
|
||||||
public bool LeeComun(TratamientoComun com, out string err_str)
|
public bool LeeComun(TratamientoComun com, out string err_str)
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,13 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
private bool firstTimeShow = true;
|
private bool firstTimeShow = true;
|
||||||
private static bool hideTemp = false;
|
private static bool hideTemp = false;
|
||||||
|
private PaneRecogidaViewModel _pane;
|
||||||
private const string _dockPaneID = "OliviaAddInPro_DockpaneRecogida";
|
private const string _dockPaneID = "OliviaAddInPro_DockpaneRecogida";
|
||||||
|
|
||||||
protected DockpaneRecogidaViewModel() { }
|
protected DockpaneRecogidaViewModel() {
|
||||||
|
_pane = new PaneRecogidaViewModel();
|
||||||
|
CurrentPage = _pane;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Show the DockPane.
|
/// Show the DockPane.
|
||||||
|
|
@ -48,6 +52,10 @@ namespace OliviaAddInPro
|
||||||
hideTemp = true;
|
hideTemp = true;
|
||||||
pane.Hide();
|
pane.Hide();
|
||||||
}
|
}
|
||||||
|
internal static void Reset()
|
||||||
|
{
|
||||||
|
//HAY QUE HACER QUE SE LIMPIE TODO
|
||||||
|
}
|
||||||
|
|
||||||
//The parameter passed to this method will be true if the Dockpane is being opened and it is false when you close the dockpane
|
//The parameter passed to this method will be true if the Dockpane is being opened and it is false when you close the dockpane
|
||||||
//also false the first time
|
//also false the first time
|
||||||
|
|
@ -65,7 +73,7 @@ namespace OliviaAddInPro
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Text shown near the top of the DockPane.
|
/// Text shown near the top of the DockPane.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private string _heading = "My DockPane";
|
private string _heading = Resource1.String_header_recogida;
|
||||||
public string Heading
|
public string Heading
|
||||||
{
|
{
|
||||||
get { return _heading; }
|
get { return _heading; }
|
||||||
|
|
@ -74,5 +82,15 @@ namespace OliviaAddInPro
|
||||||
SetProperty(ref _heading, value, () => Heading);
|
SetProperty(ref _heading, value, () => Heading);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private PanelViewModelBase _currentPage;
|
||||||
|
public PanelViewModelBase CurrentPage
|
||||||
|
{
|
||||||
|
get { return _currentPage; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref _currentPage, value, () => CurrentPage);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,575 @@
|
||||||
|
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;
|
||||||
|
using ArcGIS.Desktop.Internal.Layouts.Utilities;
|
||||||
|
using OliviaAddInPro.Services;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
namespace OliviaAddInPro
|
||||||
|
{
|
||||||
|
internal class PaneRecogidaSub1ViewModel : PanelViewModelBase
|
||||||
|
{
|
||||||
|
private ObservableCollection<EnabledComboBoxItem<string>> tiposFrac = new ObservableCollection<EnabledComboBoxItem<string>>();
|
||||||
|
private ObservableCollection<EnabledComboBoxItem<string>> tiposCarg = new ObservableCollection<EnabledComboBoxItem<string>>();
|
||||||
|
private ObservableCollection<EnabledComboBoxItem<string>> tiposLate = new ObservableCollection<EnabledComboBoxItem<string>>();
|
||||||
|
private ObservableCollection<string> tiposVehic = new ObservableCollection<string>();
|
||||||
|
private ObservableCollection<string> tiposCapac = new ObservableCollection<string>();
|
||||||
|
private RecogidaServ recoServ = new RecogidaServ(null); //no hace falta instancia reco aquí
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Array de booleanos enumerando si se existen en la capa seleccionada los tipos de fracción
|
||||||
|
*/
|
||||||
|
public bool[] tipos_fracc_bool = new bool[(int)RecogidaDef.TiposFracción.N - 1];
|
||||||
|
/**
|
||||||
|
* Array de booleanos enumerando si se existen en la capa seleccionada los tipos de carga
|
||||||
|
*/
|
||||||
|
public bool[] tipos_carg_bool = new bool[(int)RecogidaDef.TiposCarga.N - 1];
|
||||||
|
/**
|
||||||
|
* Array de cadenas de caracteres enumerando si se existen en la capa seleccionada los tipos de vehículos
|
||||||
|
*/
|
||||||
|
public bool[] tipos_vehic_bool = new bool[(int)RecogidaDef.TiposVehic.N];
|
||||||
|
|
||||||
|
#region Properties
|
||||||
|
|
||||||
|
public override string DisplayName
|
||||||
|
{
|
||||||
|
get { return Resource1.String_tto; }
|
||||||
|
}
|
||||||
|
public ObservableCollection<EnabledComboBoxItem<string>> TiposFrac
|
||||||
|
{
|
||||||
|
get { return tiposFrac; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
tiposFrac = value;
|
||||||
|
base.NotifyPropertyChanged("TiposFrac");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public ObservableCollection<EnabledComboBoxItem<string>> TiposCarg
|
||||||
|
{
|
||||||
|
get { return tiposCarg; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
tiposCarg = value;
|
||||||
|
base.NotifyPropertyChanged("TiposCarg");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public ObservableCollection<string> TiposVehic
|
||||||
|
{
|
||||||
|
get { return tiposVehic; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
tiposVehic = value;
|
||||||
|
base.NotifyPropertyChanged("TiposVehic");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public ObservableCollection<string> TiposCapac
|
||||||
|
{
|
||||||
|
get { return tiposCapac; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
tiposCapac = value;
|
||||||
|
base.NotifyPropertyChanged("TiposCapac");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public ObservableCollection<EnabledComboBoxItem<string>> TiposLate
|
||||||
|
{
|
||||||
|
get { return tiposLate; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
tiposLate = value;
|
||||||
|
base.NotifyPropertyChanged("TiposLate");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private int tipoFrac = -1;
|
||||||
|
public int TipoFrac
|
||||||
|
{
|
||||||
|
get { return tipoFrac; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
tipoFrac = value;
|
||||||
|
base.NotifyPropertyChanged("TipoFrac");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private int tipoCarg = -1;
|
||||||
|
public int TipoCarg
|
||||||
|
{
|
||||||
|
get { return tipoFrac; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
tipoCarg = value;
|
||||||
|
base.NotifyPropertyChanged("TipoCarg");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private int tipoVehic = -1;
|
||||||
|
public int TipoVehic
|
||||||
|
{
|
||||||
|
get { return tipoFrac; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
tipoVehic = value;
|
||||||
|
base.NotifyPropertyChanged("TipoVehic");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private int tipoCapac = -1;
|
||||||
|
public int TipoCapac
|
||||||
|
{
|
||||||
|
get { return tipoCapac; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
tipoCapac = value;
|
||||||
|
base.NotifyPropertyChanged("TipoCapac");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private int tipoLate = -1;
|
||||||
|
public int TipoLate
|
||||||
|
{
|
||||||
|
get { return tipoLate; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
tipoCapac = value;
|
||||||
|
base.NotifyPropertyChanged("TipoLate");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private string textKgCapac;
|
||||||
|
public string TextKgCapac
|
||||||
|
{
|
||||||
|
get { return textKgCapac; }
|
||||||
|
set { base.SetProperty(ref textKgCapac, value, () => TextKgCapac); }
|
||||||
|
}
|
||||||
|
private string textDensCont="";
|
||||||
|
public string TextDensCont
|
||||||
|
{
|
||||||
|
get { return textDensCont; }
|
||||||
|
set { base.SetProperty(ref textKgCapac, value, () => TextDensCont); }
|
||||||
|
}
|
||||||
|
private Visibility visTextDens = Visibility.Hidden;
|
||||||
|
public Visibility VisTextDens
|
||||||
|
{
|
||||||
|
get { return visTextDens; }
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
visTextDens = value;
|
||||||
|
base.NotifyPropertyChanged("VisTextDens");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private Visibility visCombLate = Visibility.Hidden;
|
||||||
|
public Visibility VisCombLate
|
||||||
|
{
|
||||||
|
get { return visCombLate; }
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
visCombLate = value;
|
||||||
|
base.NotifyPropertyChanged("VisCombLate");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private string toolTip_TextDensCont = Resource1.String_tooltip_textbox_denscont;
|
||||||
|
public string ToolTip_TextDensCont
|
||||||
|
{
|
||||||
|
get { return toolTip_TextDensCont; }
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
toolTip_TextDensCont = value;
|
||||||
|
base.NotifyPropertyChanged("ToolTip_TextDensCont");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private bool enabComboCapac = false;
|
||||||
|
public bool EnabComboCapac
|
||||||
|
{
|
||||||
|
get { return CapaAbierta && enabComboCapacFrac; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
enabComboCapac = value;
|
||||||
|
base.NotifyPropertyChanged("EnabComboCapac");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private bool enabComboCapacFrac
|
||||||
|
{
|
||||||
|
get { return enabComboCapacFrac; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
enabComboCapacFrac = value;
|
||||||
|
base.NotifyPropertyChanged("EnabComboCapac");
|
||||||
|
base.NotifyPropertyChanged("EnabComboCapacFrac");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* kg de carga en cada contenedor.
|
||||||
|
* Si se cogen llenos, vale -1 (los kg son densidad_cont*capac).
|
||||||
|
* Si se lee el campo, es 0 (los kg son los leídos en el campo).
|
||||||
|
* Si se pone a todos los cont lo mismo, vale esos kg
|
||||||
|
*/
|
||||||
|
private int kgCont = -1;
|
||||||
|
public int KgCont
|
||||||
|
{
|
||||||
|
get { return kgCont; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
kgCont = value;
|
||||||
|
base.NotifyPropertyChanged("KgCont");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public PaneRecogidaSub1ViewModel()
|
||||||
|
{
|
||||||
|
if (RecogidaDef.lleno)
|
||||||
|
{
|
||||||
|
KgCont = -1;
|
||||||
|
}
|
||||||
|
else if (RecogidaDef.kgrec_camp)
|
||||||
|
{
|
||||||
|
KgCont = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
KgCont = RecogidaDef.kgrec_cont;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Realiza las comprobaciones para cuando se ha abierto una capa
|
||||||
|
*/
|
||||||
|
public bool AbiertaCapa(string capa)
|
||||||
|
{
|
||||||
|
CapaAbierta = false;
|
||||||
|
CapaElems = string.Empty;
|
||||||
|
TiposFrac.Clear();
|
||||||
|
TiposCarg.Clear();
|
||||||
|
TiposVehic.Clear();
|
||||||
|
TiposCapac.Clear();
|
||||||
|
OliviaGlob.TipoEjec = OliviaGlob.TipoEjec | TiposEjecucion.Config; //lo reinicia, por si estaba después de planificar
|
||||||
|
if (string.IsNullOrEmpty(capa))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
//comprueba los campos de recogida
|
||||||
|
if (recoServ.CompruebaCamposReco(capa)>1 || (recoServ.CompruebaCamposReco(capa)==1 && RecogidaDef.kgrec_camp))
|
||||||
|
{
|
||||||
|
HelperGlobal.ponMsg(recoServ.ErrStr, System.Windows.MessageBoxImage.Warning);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//lee qué fracciones hay en la gdb
|
||||||
|
ObservableCollection<string> valores = recoServ.DameVals(capa, RecogidaDef.campos_def.cons_fracc);
|
||||||
|
if (valores==null)
|
||||||
|
{
|
||||||
|
HelperGlobal.ponMsg(recoServ.ErrStr, System.Windows.MessageBoxImage.Warning);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
rellenaFrac(valores);
|
||||||
|
|
||||||
|
//se rellena el array que se incorpora al desplegable relacionado con el tipo de basura
|
||||||
|
valores = recoServ.DameVals(capa, RecogidaDef.campos_def.cons_nomrec);
|
||||||
|
if (valores == null)
|
||||||
|
{
|
||||||
|
HelperGlobal.ponMsg(recoServ.ErrStr, System.Windows.MessageBoxImage.Warning);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
rellenaCarg(valores);
|
||||||
|
|
||||||
|
if (RecogidaDef.lleno)
|
||||||
|
{
|
||||||
|
VisTextDens = Visibility.Visible;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
VisTextDens = Visibility.Hidden;
|
||||||
|
}
|
||||||
|
TiposVehic.Clear();
|
||||||
|
for (int i = 0; i < RecogidaDef.tipos_vehic_str.Length; i++)
|
||||||
|
{
|
||||||
|
TiposVehic.Add(RecogidaDef.tipos_vehic_str[i]);
|
||||||
|
}
|
||||||
|
TiposCapac.Clear();
|
||||||
|
|
||||||
|
//hay elementos en la gdb
|
||||||
|
CapaElems = capa;
|
||||||
|
CapaAbierta = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public void rellenaFrac(ObservableCollection<string> valoresFrac)
|
||||||
|
{
|
||||||
|
//se redimensionan los arrays de nuevo por si se ha pinchado varias veces en el botón de leer tabla
|
||||||
|
System.Array.Resize(ref RecogidaDef.tipos_fracc_str, (int)RecogidaDef.TiposFracción.N - 1);
|
||||||
|
System.Array.Resize(ref tipos_fracc_bool, (int)RecogidaDef.TiposFracción.N - 1);
|
||||||
|
bool encontrado = false;
|
||||||
|
int i, j;
|
||||||
|
for (i = 0; i < valoresFrac.Count; i++)
|
||||||
|
{
|
||||||
|
//para que ponga '-' si es un campo vacío
|
||||||
|
if (valoresFrac[i] == "")
|
||||||
|
valoresFrac[i] = "-";
|
||||||
|
|
||||||
|
encontrado = false;
|
||||||
|
for (j = 0; j < (int)RecogidaDef.TiposFracción.N - 1; j++)
|
||||||
|
{
|
||||||
|
if (RecogidaDef.tipos_fracc_str[j] == valoresFrac[i])
|
||||||
|
{
|
||||||
|
tipos_fracc_bool[j] = true;
|
||||||
|
encontrado = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (encontrado == false)
|
||||||
|
{
|
||||||
|
System.Array.Resize(ref RecogidaDef.tipos_fracc_str, RecogidaDef.tipos_fracc_str.Length + 1);
|
||||||
|
System.Array.Resize(ref tipos_fracc_bool, tipos_fracc_bool.Length + 1);
|
||||||
|
RecogidaDef.tipos_fracc_str[RecogidaDef.tipos_fracc_str.Length - 1] = valoresFrac[i];
|
||||||
|
tipos_fracc_bool[tipos_fracc_bool.Length - 1] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(i=0;i< RecogidaDef.tipos_fracc_str.Length;i++)
|
||||||
|
{
|
||||||
|
TiposFrac.Add(new EnabledComboBoxItem<string>(RecogidaDef.tipos_fracc_str[i], tipos_fracc_bool[i]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void rellenaCarg(ObservableCollection<string> valores)
|
||||||
|
{
|
||||||
|
int i, j;
|
||||||
|
bool encontrado;
|
||||||
|
|
||||||
|
//se redimensionan los arrays de nuevo por si se ha pinchado varias veces en el botón de leer tabla
|
||||||
|
System.Array.Resize(ref RecogidaDef.tipos_carg_str, (int)RecogidaDef.TiposCarga.N - 1);
|
||||||
|
System.Array.Resize(ref tipos_carg_bool, (int)RecogidaDef.TiposCarga.N - 1);
|
||||||
|
|
||||||
|
for (i = 0; i < valores.Count; i++)
|
||||||
|
{
|
||||||
|
//para que ponga '-' si es un campo vacío
|
||||||
|
if (valores[i] == "")
|
||||||
|
valores[i] = "-";
|
||||||
|
|
||||||
|
encontrado = false;
|
||||||
|
for (j = 0; j < (int)RecogidaDef.TiposCarga.N - 1; j++)
|
||||||
|
{
|
||||||
|
if (RecogidaDef.tipos_carg_str[j] == valores[i])
|
||||||
|
{
|
||||||
|
tipos_carg_bool[j] = true;
|
||||||
|
encontrado = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (encontrado == false)
|
||||||
|
{
|
||||||
|
System.Array.Resize(ref RecogidaDef.tipos_carg_str, RecogidaDef.tipos_carg_str.Length + 1);
|
||||||
|
System.Array.Resize(ref tipos_carg_bool, tipos_carg_bool.Length + 1);
|
||||||
|
//reco.tipos_carg_bool[i] = false;
|
||||||
|
RecogidaDef.tipos_carg_str[RecogidaDef.tipos_carg_str.Length - 1] = valores[i];
|
||||||
|
tipos_carg_bool[tipos_carg_bool.Length - 1] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (i = 0; i < RecogidaDef.tipos_carg_str.Length; i++)
|
||||||
|
{
|
||||||
|
TiposCarg.Add(new EnabledComboBoxItem<string>(RecogidaDef.tipos_carg_str[i], tipos_carg_bool[i]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Realiza los cambios en los ámbitos cuando se ha seleccionado una fracción
|
||||||
|
*/
|
||||||
|
public void ComboFracSel(int tto)
|
||||||
|
{
|
||||||
|
if (tto < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//cuando se selecciona un item pintado en gris (que no existe en la GDB) se actúa como si no se hubiera seleccionado item
|
||||||
|
TipoFrac = tto;
|
||||||
|
if ((TipoVehic >= 0) && (TipoCarg >= 0))
|
||||||
|
{
|
||||||
|
//si también se ha seleccionado tipo de carga y de vehículo, se rellena la lista de capacidades
|
||||||
|
rellena_capac();
|
||||||
|
}
|
||||||
|
if (RecogidaDef.lleno)
|
||||||
|
{
|
||||||
|
if (TipoFrac < (int)RecogidaDef.TiposFracción.Otra)
|
||||||
|
{
|
||||||
|
TextDensCont = RecogidaDef.dens_frac_cont[TipoFrac].ToString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TextDensCont = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
HelperGlobal.ponMsg("Error al seleccionar el tipo de fracción");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Rellena la lista de capacidades de vehículos disponibles
|
||||||
|
*/
|
||||||
|
private void rellena_capac()
|
||||||
|
{
|
||||||
|
TiposCapac.Clear();
|
||||||
|
TextKgCapac = "";
|
||||||
|
if (TipoVehic >= 0 && TipoVehic < (int)RecogidaDef.TiposVehic.N &&
|
||||||
|
TipoCarg >= 0 && TipoCarg < (int)RecogidaDef.TiposCarga.N)
|
||||||
|
{
|
||||||
|
TiposCapac.Clear();
|
||||||
|
TextKgCapac="";
|
||||||
|
if (RecogidaDef.cargas_max_vehic[TipoCarg, TipoVehic].n > 0)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < RecogidaDef.cargas_max_vehic[TipoCarg, TipoVehic].n; i++)
|
||||||
|
TiposCapac.Add(RecogidaDef.cargas_max_vehic[TipoCarg, TipoVehic].vol[i] + " m3");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (TipoVehic >= 0 && TipoVehic < (int)RecogidaDef.TiposVehic.N &&
|
||||||
|
TipoCarg >= (int)RecogidaDef.TiposCarga.N)
|
||||||
|
{
|
||||||
|
if (RecogidaDef.cargas_max_vehic[(int)RecogidaDef.TiposCarga.Otra, TipoVehic].n > 0)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < RecogidaDef.cargas_max_vehic[(int)RecogidaDef.TiposCarga.Otra, TipoVehic].n; i++)
|
||||||
|
TiposCapac.Add(RecogidaDef.cargas_max_vehic[(int)RecogidaDef.TiposCarga.Otra, TipoVehic].vol[i] + " m3");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rellena la caja de texto con la capacidad en kg máxima del vehículo seleccionado
|
||||||
|
*/
|
||||||
|
private void rellena_kgmax()
|
||||||
|
{
|
||||||
|
int kgmax, off;
|
||||||
|
|
||||||
|
if (TipoVehic >= 0 && TipoVehic < (int)RecogidaDef.TiposVehic.N &&
|
||||||
|
TipoCarg >= 0 && TipoCarg < (int)RecogidaDef.TiposCarga.N &&
|
||||||
|
TipoCapac >= 0 && TipoCapac < (int)RecogidaDef.cargas_max_vehic[TipoCarg, TipoVehic].n)
|
||||||
|
{
|
||||||
|
if ((RecogidaDef.cargas_max_vehic[TipoCarg, TipoVehic].offset != null) && (TipoFrac < (int)RecogidaDef.TiposFracción.N))
|
||||||
|
off = RecogidaDef.cargas_max_vehic[TipoCarg, TipoVehic].offset[TipoCapac, TipoFrac];
|
||||||
|
else if ((RecogidaDef.cargas_max_vehic[TipoCarg, TipoVehic].offset != null) && (TipoFrac >= (int)RecogidaDef.TiposFracción.N))
|
||||||
|
off = RecogidaDef.cargas_max_vehic[TipoCarg, TipoVehic].offset[TipoCapac, (int)RecogidaDef.TiposFracción.Otra];
|
||||||
|
else
|
||||||
|
off = 0;
|
||||||
|
if (TipoFrac < (int)RecogidaDef.TiposFracción.N)
|
||||||
|
kgmax = RecogidaDef.cargas_max_vehic[TipoCarg, TipoVehic].vol[TipoCapac] * RecogidaDef.dens_frac_cami[TipoFrac] + off;
|
||||||
|
else
|
||||||
|
kgmax = RecogidaDef.cargas_max_vehic[TipoCarg, TipoVehic].vol[TipoCapac] * RecogidaDef.dens_frac_cami[(int)RecogidaDef.TiposFracción.Otra] + off;
|
||||||
|
TextKgCapac = kgmax.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (TipoVehic >= 0 && TipoVehic < (int)RecogidaDef.TiposVehic.N &&
|
||||||
|
TipoCarg >= (int)RecogidaDef.TiposCarga.N &&
|
||||||
|
TipoCapac >= 0 && TipoCapac < (int)RecogidaDef.cargas_max_vehic[(int)RecogidaDef.TiposCarga.Otra, TipoVehic].n)
|
||||||
|
{
|
||||||
|
if ((RecogidaDef.cargas_max_vehic[(int)RecogidaDef.TiposCarga.Otra, TipoVehic].offset != null) && (TipoFrac < (int)RecogidaDef.TiposFracción.N))
|
||||||
|
off = RecogidaDef.cargas_max_vehic[(int)RecogidaDef.TiposCarga.Otra, TipoVehic].offset[TipoCapac, TipoFrac];
|
||||||
|
else if ((RecogidaDef.cargas_max_vehic[(int)RecogidaDef.TiposCarga.Otra, TipoVehic].offset != null) && (TipoFrac >= (int)RecogidaDef.TiposFracción.N))
|
||||||
|
off = RecogidaDef.cargas_max_vehic[(int)RecogidaDef.TiposCarga.Otra, TipoVehic].offset[TipoCapac, (int)RecogidaDef.TiposFracción.Otra];
|
||||||
|
else
|
||||||
|
off = 0;
|
||||||
|
if (TipoFrac < (int)RecogidaDef.TiposFracción.N)
|
||||||
|
kgmax = RecogidaDef.cargas_max_vehic[(int)RecogidaDef.TiposCarga.Otra, TipoVehic].vol[TipoCapac] * RecogidaDef.dens_frac_cami[TipoFrac] + off;
|
||||||
|
else
|
||||||
|
kgmax = RecogidaDef.cargas_max_vehic[(int)RecogidaDef.TiposCarga.Otra, TipoVehic].vol[TipoCapac] * RecogidaDef.dens_frac_cami[(int)RecogidaDef.TiposFracción.Otra] + off;
|
||||||
|
TextKgCapac = kgmax.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Realiza los cambios en los ámbitos cuando se ha seleccionado un tipo de carga
|
||||||
|
*/
|
||||||
|
public void ComboCargSel(int tto)
|
||||||
|
{
|
||||||
|
if (tto < 0)
|
||||||
|
return;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
TipoCarg=tto;
|
||||||
|
|
||||||
|
if (TipoCarg == (int)RecogidaDef.TiposCarga.Lateral)
|
||||||
|
VisCombLate = Visibility.Visible;
|
||||||
|
else
|
||||||
|
visCombLate = Visibility.Hidden;
|
||||||
|
if (TipoCarg >= 0 && TipoCarg < (int)RecogidaDef.TiposCarga.N - 1)
|
||||||
|
{
|
||||||
|
//cuando se selecciona una carga contemplada en el listado origianl se habilita el comboBox de capacidad ya que sí habrá contemplado datos para tipos de cargas conocidos.
|
||||||
|
enabComboCapacFrac = true;
|
||||||
|
//textBox_t_vaciado.Text = RecogidaDef.t_vaci[TipoCarg].ToString();
|
||||||
|
if (TipoVehic >= 0)
|
||||||
|
{
|
||||||
|
//si también se ha seleccionado tipo de vehículo, se rellena la lista de capacidades
|
||||||
|
rellena_capac();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (TipoCarg >= (int)RecogidaDef.TiposCarga.N - 1)
|
||||||
|
{
|
||||||
|
//cuando se selecciona una carga no contemplada en el listado original se deshabilita el comboBox de capacidad porque no tendrá datos contemplado para ese caso
|
||||||
|
enabComboCapacFrac = false;
|
||||||
|
//textBox_t_vaciado.Text = RecogidaDef.t_vaci[(int)RecogidaDef.TiposCarga.Otra].ToString();
|
||||||
|
if (TipoVehic >= 0)
|
||||||
|
{
|
||||||
|
//si también se ha seleccionado tipo de vehículo, se rellena la lista de capacidades
|
||||||
|
rellena_capac();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
HelperGlobal.ponMsg("Error al seleccionar la carga");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Realiza los cambios en los ámbitos cuando se ha seleccionado un tipo de vehículo
|
||||||
|
*/
|
||||||
|
public void ComboVehicSel(int tto)
|
||||||
|
{
|
||||||
|
if (tto < 0)
|
||||||
|
return;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
TipoVehic = tto;
|
||||||
|
if (TipoVehic >= 0)
|
||||||
|
{
|
||||||
|
//si también se ha seleccionado tipo de carga, se rellena la lista de capacidades
|
||||||
|
rellena_capac();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
HelperGlobal.ponMsg("Error al seleccionar el tipo de vehículo");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Realiza los cambios en los ámbitos cuando se ha seleccionado un tipo de capacidad
|
||||||
|
*/
|
||||||
|
public void ComboCapacSel(int tto)
|
||||||
|
{
|
||||||
|
if (tto < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
TipoCapac = tto;
|
||||||
|
rellena_kgmax();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
HelperGlobal.ponMsg("Error al seleccionar la capacidad");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,103 @@
|
||||||
|
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);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
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 ArcGIS.Desktop.Framework.Dialogs;
|
||||||
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
|
using ArcGIS.Desktop.Mapping;
|
||||||
|
|
||||||
|
namespace OliviaAddInPro
|
||||||
|
{
|
||||||
|
public class PaneRecogidaSub2ViewModel : PanelViewModelBase
|
||||||
|
{
|
||||||
|
public PaneRecogidaSub2ViewModel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#region Properties
|
||||||
|
|
||||||
|
public override string DisplayName
|
||||||
|
{
|
||||||
|
get { return Resource1.String_zonif; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion Properties
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
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 ArcGIS.Desktop.Framework.Dialogs;
|
||||||
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
|
using ArcGIS.Desktop.Mapping;
|
||||||
|
|
||||||
|
namespace OliviaAddInPro
|
||||||
|
{
|
||||||
|
public class PaneRecogidaSub4ViewModel : PanelViewModelBase
|
||||||
|
{
|
||||||
|
public PaneRecogidaSub4ViewModel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#region Properties
|
||||||
|
|
||||||
|
public override string DisplayName
|
||||||
|
{
|
||||||
|
get { return Resource1.String_tiempos; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion Properties
|
||||||
|
}
|
||||||
|
}
|
||||||