Compare commits
No commits in common. "9273611e3f3a5fb22db06be54f8bf252a2344a44" and "dcc3040ceffed29bfcb8af20289ef46c41d2a7a5" have entirely different histories.
9273611e3f
...
dcc3040cef
|
|
@ -673,7 +673,7 @@ namespace OliviaAddInPro.Helper
|
||||||
public static ArcGIS.Core.Data.SpatialQueryFilter CreateFiler(string consulta, ArcGIS.Core.Geometry.Geometry geom, SpatialRelationship rel = SpatialRelationship.Contains)
|
public static ArcGIS.Core.Data.SpatialQueryFilter CreateFiler(string consulta, ArcGIS.Core.Geometry.Geometry geom, SpatialRelationship rel = SpatialRelationship.Contains)
|
||||||
{
|
{
|
||||||
ArcGIS.Core.Data.SpatialQueryFilter filt = null;
|
ArcGIS.Core.Data.SpatialQueryFilter filt = null;
|
||||||
if (geom != null && !geom.IsEmpty)
|
if (geom != null)
|
||||||
{
|
{
|
||||||
SpatialQueryFilter filtSpat = new SpatialQueryFilter
|
SpatialQueryFilter filtSpat = new SpatialQueryFilter
|
||||||
{
|
{
|
||||||
|
|
@ -1445,7 +1445,7 @@ namespace OliviaAddInPro.Helper
|
||||||
if (!System.IO.Directory.Exists(outpath))
|
if (!System.IO.Directory.Exists(outpath))
|
||||||
System.IO.Directory.CreateDirectory(outpath);
|
System.IO.Directory.CreateDirectory(outpath);
|
||||||
FeatureClass fc = null;
|
FeatureClass fc = null;
|
||||||
bool debug = true;
|
bool debug = false;
|
||||||
/////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////
|
||||||
//Prepara una where_clause con las entidades que cumplen el filtro
|
//Prepara una where_clause con las entidades que cumplen el filtro
|
||||||
//Abre la featureclass
|
//Abre la featureclass
|
||||||
|
|
@ -1467,13 +1467,9 @@ namespace OliviaAddInPro.Helper
|
||||||
//Añade a la lista los ids que cumplen el filtro espacial
|
//Añade a la lista los ids que cumplen el filtro espacial
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var aux = fc.Select(filter, SelectionType.ObjectID, SelectionOption.Normal);
|
ids = fc.Select(filter, SelectionType.ObjectID, SelectionOption.Normal).GetObjectIDs().ToList();
|
||||||
var aux2 = aux.GetObjectIDs();
|
|
||||||
//ids = fc.Select(filter, SelectionType.ObjectID, SelectionOption.Normal).GetObjectIDs().ToList();
|
|
||||||
ids = aux2.ToList();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
OutStr = "Error al seleccionar IDs. "+ex.Message;
|
OutStr = "Error al seleccionar IDs. "+ex.Message;
|
||||||
ids = new List<long>();
|
ids = new List<long>();
|
||||||
|
|
@ -1494,8 +1490,6 @@ namespace OliviaAddInPro.Helper
|
||||||
OutStr = "Error al aplicar filtro espacial en exportación: "+ OutStr;
|
OutStr = "Error al aplicar filtro espacial en exportación: "+ OutStr;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (debug)
|
|
||||||
HelperGlobal.ponMsg("Número de líneas a exportar "+ids.Count);
|
|
||||||
/////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////
|
||||||
if (cps.Getcancelled())
|
if (cps.Getcancelled())
|
||||||
{
|
{
|
||||||
|
|
@ -1505,8 +1499,7 @@ namespace OliviaAddInPro.Helper
|
||||||
//convierte la lista de ids a string para la clause de la forma
|
//convierte la lista de ids a string para la clause de la forma
|
||||||
//(id1, id2, id3..)
|
//(id1, id2, id3..)
|
||||||
string whereClause = GetWhereClauseFromIds(ids,fc.GetDefinition().GetObjectIDField());
|
string whereClause = GetWhereClauseFromIds(ids,fc.GetDefinition().GetObjectIDField());
|
||||||
if (debug)
|
|
||||||
HelperGlobal.ponMsg(whereClause);
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
///Exporta
|
///Exporta
|
||||||
string[] args = { pathLayerIn, outpath, nameShp, whereClause };
|
string[] args = { pathLayerIn, outpath, nameShp, whereClause };
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,8 @@ namespace OliviaAddInPro.Model
|
||||||
//*************************************************************************************
|
//*************************************************************************************
|
||||||
//Enums y structs generales
|
//Enums y structs generales
|
||||||
public static int BuffExport = 1000;
|
public static int BuffExport = 1000;
|
||||||
|
|
||||||
//public static int MaxCaracteresBBDD = 10;
|
//public static int MaxCaracteresBBDD = 10;
|
||||||
public static OliviaConfMV configMV; //configuracion para modos de viaje
|
|
||||||
/**
|
/**
|
||||||
* Nombre de los campos de la cartografía de la red navegable que se consultan para la exportación
|
* Nombre de los campos de la cartografía de la red navegable que se consultan para la exportación
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -66,8 +66,6 @@ namespace OliviaAddInPro.Model
|
||||||
Respuesta<bool> res = new Respuesta<bool> { Value=false};
|
Respuesta<bool> res = new Respuesta<bool> { Value=false};
|
||||||
Respuesta<TiposEjecucion> res2 = new Respuesta<TiposEjecucion> (){ Value = TiposEjecucion.FinEjecNOk };
|
Respuesta<TiposEjecucion> res2 = new Respuesta<TiposEjecucion> (){ Value = TiposEjecucion.FinEjecNOk };
|
||||||
Serv.TipoMv = TipoMV;
|
Serv.TipoMv = TipoMV;
|
||||||
|
|
||||||
|
|
||||||
res = Serv.Ejecuta(modo);
|
res = Serv.Ejecuta(modo);
|
||||||
if (res.Value)
|
if (res.Value)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,6 @@ namespace OliviaAddInPro.Model
|
||||||
{
|
{
|
||||||
public OliviaConfMV()
|
public OliviaConfMV()
|
||||||
{
|
{
|
||||||
nombre = "default";
|
|
||||||
filtro_omitir = "";
|
|
||||||
campo_prioridad = "0";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string nombre { get; set; }
|
public string nombre { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -253,7 +253,7 @@ namespace OliviaAddInPro.Services
|
||||||
//a todos los ámbitos y la instalación, ampliada un buffer, mayor si hay
|
//a todos los ámbitos y la instalación, ampliada un buffer, mayor si hay
|
||||||
//restricciones de circulación
|
//restricciones de circulación
|
||||||
geom_export = HelperGdb.BufferGeom(geom_export, com.BuffExport).Value;
|
geom_export = HelperGdb.BufferGeom(geom_export, com.BuffExport).Value;
|
||||||
if (geom_export == null || geom_export.IsEmpty)
|
if (geom_export == null)
|
||||||
{
|
{
|
||||||
ErrStr = "Error al añadir buffer a la geometría";
|
ErrStr = "Error al añadir buffer a la geometría";
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -340,13 +340,7 @@ namespace OliviaAddInPro.Services
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
///
|
///
|
||||||
//Hace el filtro con la geometría final
|
//Hace el filtro con la geometría final
|
||||||
//ComunDef.configMV
|
filtroEspacial = HelperGdb.CreateFiler(String.Empty, geom_export);
|
||||||
var where = String.Empty;
|
|
||||||
if (!String.IsNullOrEmpty(ComunDef.configMV.filtro_omitir))
|
|
||||||
{
|
|
||||||
where = "not(" + ComunDef.configMV.filtro_omitir + ")";
|
|
||||||
}
|
|
||||||
filtroEspacial = HelperGdb.CreateFiler(where, geom_export);
|
|
||||||
if (filtroEspacial == null)
|
if (filtroEspacial == null)
|
||||||
{
|
{
|
||||||
ErrStr = "Error al crear el filtro de exportacion de la red navegable";
|
ErrStr = "Error al crear el filtro de exportacion de la red navegable";
|
||||||
|
|
@ -375,13 +369,10 @@ namespace OliviaAddInPro.Services
|
||||||
ErrStr = Resource1.String_cancel_progreso;
|
ErrStr = Resource1.String_cancel_progreso;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
com.ProgrSrc.IncMessage(10, "Termina de exportar red navegable");//60%
|
|
||||||
|
|
||||||
com.NombreShpExportNw_C = PREF_NAME_EXPORT_NW_CONJ + fechaHora + EXT_SHP;
|
com.NombreShpExportNw_C = PREF_NAME_EXPORT_NW_CONJ + fechaHora + EXT_SHP;
|
||||||
OliviaGlob.Paths.PathNW_c = OliviaGlob.Paths.DirData + com.NombreShpExportNw_C;
|
OliviaGlob.Paths.PathNW_c = OliviaGlob.Paths.DirData + com.NombreShpExportNw_C;
|
||||||
if (ComunDef.CamposNW.config.revisa_conjunciones)
|
if (ComunDef.CamposNW.config.revisa_conjunciones)
|
||||||
{
|
{
|
||||||
com.ProgrSrc.IncMessage(10, "Revisando conjunciones de la red");//60%
|
|
||||||
if (!HelperGdb.ExportShp2(OliviaGlob.Paths.PathGdbNw_conj, filtroEspacial, com.NombreShpExportNw_C, OliviaGlob.Paths.DirData, com.ProgrSrc._ProgrSrc, spatRefData, 100))
|
if (!HelperGdb.ExportShp2(OliviaGlob.Paths.PathGdbNw_conj, filtroEspacial, com.NombreShpExportNw_C, OliviaGlob.Paths.DirData, com.ProgrSrc._ProgrSrc, spatRefData, 100))
|
||||||
{
|
{
|
||||||
ErrStr = "Error al exportar la red navegable: " + HelperGdb.OutStr;
|
ErrStr = "Error al exportar la red navegable: " + HelperGdb.OutStr;
|
||||||
|
|
@ -395,8 +386,7 @@ namespace OliviaAddInPro.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
//prepara campos estandar
|
//prepara campos estandar
|
||||||
com.ProgrSrc.IncMessage(10, "Estandarizando campos de la red");//60%
|
if(!EstandarizaCamposNW(OliviaGlob.Paths.DirData+com.NombreShpExportNw))
|
||||||
if (!EstandarizaCamposNW(OliviaGlob.Paths.DirData+com.NombreShpExportNw))
|
|
||||||
{
|
{
|
||||||
ErrStr = "Error al estandarizar campos red navegable: " + HelperGdb.OutStr;
|
ErrStr = "Error al estandarizar campos red navegable: " + HelperGdb.OutStr;
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -483,7 +473,7 @@ namespace OliviaAddInPro.Services
|
||||||
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_ele_f, ComunDef.CamposNW.config.campo_elevacion_from))
|
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_ele_f, ComunDef.CamposNW.config.campo_elevacion_from))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_evit, ComunDef.configMV.campo_prioridad))
|
if (!HelperGdb.CalculateFieldsSync(pathNW, ComunDef.CamposNW.cons_evit, "0"))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
using ArcGIS.Core.Geometry;
|
using ArcGIS.Core.Geometry;
|
||||||
using ArcGIS.Core.Internal.CIM;
|
using ArcGIS.Core.Internal.CIM;
|
||||||
using ArcGIS.Desktop.Framework.Threading.Tasks;*/
|
using ArcGIS.Desktop.Framework.Threading.Tasks;*/
|
||||||
using ActiproSoftware.Windows.Extensions;
|
|
||||||
using OliviaAddInPro.Helper;
|
using OliviaAddInPro.Helper;
|
||||||
using OliviaAddInPro.Model;
|
using OliviaAddInPro.Model;
|
||||||
using System;
|
using System;
|
||||||
|
|
@ -33,15 +32,6 @@ namespace OliviaAddInPro.Services
|
||||||
*/
|
*/
|
||||||
public Respuesta<bool> Ejecuta(ModosEjec modo)
|
public Respuesta<bool> Ejecuta(ModosEjec modo)
|
||||||
{
|
{
|
||||||
var modos_viaje = ConfigServ.Serv.Leer().ListaMV;
|
|
||||||
if (modos_viaje != null && modos_viaje.Count > TipoMv)
|
|
||||||
{
|
|
||||||
ComunDef.configMV = modos_viaje[TipoMv];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ComunDef.configMV = new OliviaConfMV();
|
|
||||||
}
|
|
||||||
var res = new Respuesta<bool>()
|
var res = new Respuesta<bool>()
|
||||||
{
|
{
|
||||||
Value = false
|
Value = false
|
||||||
|
|
@ -84,7 +74,7 @@ namespace OliviaAddInPro.Services
|
||||||
{
|
{
|
||||||
nombFileAmbs = string.Empty;
|
nombFileAmbs = string.Empty;
|
||||||
limp.ConsultaAmbs = DameAmbsConsulta(out nombFileAmbs);
|
limp.ConsultaAmbs = DameAmbsConsulta(out nombFileAmbs);
|
||||||
if (null==limp.ConsultaAmbs)
|
if (string.IsNullOrEmpty(limp.ConsultaAmbs))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -120,11 +110,9 @@ namespace OliviaAddInPro.Services
|
||||||
{
|
{
|
||||||
|
|
||||||
var conf=ConfigServ.Serv.Leer();
|
var conf=ConfigServ.Serv.Leer();
|
||||||
var res = new ObservableCollection<string>();
|
if(conf.ListaMV==null || conf.ListaMV.Count<=0 )
|
||||||
if (conf.ListaMV==null || conf.ListaMV.Count<=0 )
|
return new ObservableCollection<string>();
|
||||||
return res;
|
return (ObservableCollection<string>)conf.ListaMV.Select(c => c.nombre);
|
||||||
res.AddRange(conf.ListaMV.Select(c => c.nombre));
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Comprueba lo necesario para ver si hay campos para la planificación
|
* Comprueba lo necesario para ver si hay campos para la planificación
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,8 @@
|
||||||
<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=TipoTto, Mode = TwoWay}"/>
|
SelectedIndex="{Binding Path=TipoTto, Mode = TwoWay}"/>
|
||||||
<Label Content="Modos de viaje" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" 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_mv" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposMv, 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_mv_SelectionChanged"
|
|
||||||
SelectedIndex="{Binding Path=TipoMv, Mode = TwoWay}"/>
|
|
||||||
<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=tiposMv, 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"
|
||||||
SelectedIndex="{Binding Path=SelOpAmb, Mode = TwoWay}"/>
|
SelectedIndex="{Binding Path=SelOpAmb, Mode = TwoWay}"/>
|
||||||
<ListBox x:Name="listBox_ambitos" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=Ambitos, Mode = TwoWay}" HorizontalAlignment="Left" Height="100"
|
<ListBox x:Name="listBox_ambitos" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=Ambitos, Mode = TwoWay}" HorizontalAlignment="Left" Height="100"
|
||||||
|
|
|
||||||
|
|
@ -80,20 +80,7 @@ namespace OliviaAddInPro
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
private void comboBox_mv_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
||||||
{
|
|
||||||
int i = -1;
|
|
||||||
if (sender is System.Windows.Controls.ComboBox combo)
|
|
||||||
{
|
|
||||||
i = combo.SelectedIndex;
|
|
||||||
|
|
||||||
if (DataContext is PaneLimpiezaSub1ViewModel mod)
|
|
||||||
{
|
|
||||||
mod.ComboMvSel(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
private void comboBox_ambitos_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void comboBox_ambitos_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
int i = -1;
|
int i = -1;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
|
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
|
||||||
xmlns:ui="clr-namespace:OliviaAddInPro"
|
xmlns:ui="clr-namespace:OliviaAddInPro"
|
||||||
mc:Ignorable="d" d:DesignWidth="300" Height="422"
|
mc:Ignorable="d" d:DesignWidth="300" Height="390"
|
||||||
d:DataContext="{Binding Path=ui.PaneRecogidaSub1ViewModel}" Loaded="UserControl_Loaded" Unloaded="UserControl_Unloaded" >
|
d:DataContext="{Binding Path=ui.PaneRecogidaSub1ViewModel}" Loaded="UserControl_Loaded" Unloaded="UserControl_Unloaded" >
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
|
|
@ -94,10 +94,6 @@
|
||||||
<TextBox x:Name="txtBox_kgCapac" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Grid.Column="1" Margin="5,0,0,3" TextWrapping="NoWrap" Text="{Binding Path=TextKgCapac, Mode = TwoWay}" TextAlignment="Right" MaxLength="8" PreviewTextInput="txtBox_kgCapac_PreviewTextInput"/>
|
<TextBox x:Name="txtBox_kgCapac" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Grid.Column="1" Margin="5,0,0,3" TextWrapping="NoWrap" Text="{Binding Path=TextKgCapac, Mode = TwoWay}" TextAlignment="Right" MaxLength="8" PreviewTextInput="txtBox_kgCapac_PreviewTextInput"/>
|
||||||
<Label x:Name="label_kgmax" Grid.Column="2" Content="kg máx. por viaje" Margin="0,-1,0,0"/>
|
<Label x:Name="label_kgmax" Grid.Column="2" Content="kg máx. por viaje" Margin="0,-1,0,0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Label Content="Modos de viaje" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" FontWeight="DemiBold"/>
|
|
||||||
<ComboBox x:Name="comboBox_mv" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposMv, Mode = TwoWay}" HorizontalAlignment="Left" Margin="20,0,0,0"
|
|
||||||
VerticalAlignment="Top" Width="260" SelectionChanged="comboBox_mv_SelectionChanged"
|
|
||||||
SelectedIndex="{Binding Path=TipoMv, Mode = TwoWay}"/>
|
|
||||||
<Label Content="Tiempo de vaciado de contenedor" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
<Label Content="Tiempo de vaciado de contenedor" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
||||||
<Grid Margin="20,0,0,0">
|
<Grid Margin="20,0,0,0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
|
|
||||||
|
|
@ -110,20 +110,7 @@ namespace OliviaAddInPro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void comboBox_mv_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.ComboMvSel(i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
private void comboBox_tipoCapac_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void comboBox_tipoCapac_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
int i = -1;
|
int i = -1;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
|
|
||||||
private ObservableCollection<string> tiposTto = new ObservableCollection<string>(LimpiezaDef.tipos_tto_str);
|
private ObservableCollection<string> tiposTto = new ObservableCollection<string>(LimpiezaDef.tipos_tto_str);
|
||||||
private ObservableCollection<string> tiposMv = new ObservableCollection<string>();
|
|
||||||
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>>();
|
||||||
|
|
@ -115,25 +114,6 @@ namespace OliviaAddInPro
|
||||||
base.NotifyPropertyChanged("TiposTto");
|
base.NotifyPropertyChanged("TiposTto");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public ObservableCollection<string> TiposMv
|
|
||||||
{
|
|
||||||
get { return tiposMv; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
tiposMv = value;
|
|
||||||
base.NotifyPropertyChanged("TiposMv");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private int tipoMv = -1;
|
|
||||||
public int TipoMv
|
|
||||||
{
|
|
||||||
get { return tipoMv; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
tipoMv = value;
|
|
||||||
base.NotifyPropertyChanged("TipoMv");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private int tipoTto = -1;
|
private int tipoTto = -1;
|
||||||
public int TipoTto
|
public int TipoTto
|
||||||
{
|
{
|
||||||
|
|
@ -219,8 +199,6 @@ namespace OliviaAddInPro
|
||||||
lblUdsVeloDespl = "km/h";
|
lblUdsVeloDespl = "km/h";
|
||||||
limpServ = new LimpiezaServ(null); //no hace falta instancia limp
|
limpServ = new LimpiezaServ(null); //no hace falta instancia limp
|
||||||
textAnchoVia = LimpiezaDef.Parametros.ancho_via.ToString();
|
textAnchoVia = LimpiezaDef.Parametros.ancho_via.ToString();
|
||||||
tiposMv = limpServ.GetNombreModosViajes();
|
|
||||||
tipoMv = -1;
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Realiza las comprobaciones para cuando se ha abierto una capa
|
* Realiza las comprobaciones para cuando se ha abierto una capa
|
||||||
|
|
@ -267,14 +245,10 @@ namespace OliviaAddInPro
|
||||||
CapaAbierta = true;
|
CapaAbierta = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public void ComboMvSel(int tto)
|
/**
|
||||||
{
|
* Realiza los cambios en los ámbitos cuando se ha seleccionado un tratamiento
|
||||||
tipoMv = tto;
|
*/
|
||||||
}
|
public void ComboTtoSel(int tto)
|
||||||
/**
|
|
||||||
* Realiza los cambios en los ámbitos cuando se ha seleccionado un tratamiento
|
|
||||||
*/
|
|
||||||
public void ComboTtoSel(int tto)
|
|
||||||
{
|
{
|
||||||
if (tto < 0)
|
if (tto < 0)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -92,8 +92,6 @@ namespace OliviaAddInPro
|
||||||
err_str = "No se ha seleccionado ningún Tipo de Tratamiento";
|
err_str = "No se ha seleccionado ningún Tipo de Tratamiento";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
limp.TipoMV = _subPanel1ViewModel.TipoMv;
|
|
||||||
|
|
||||||
limp.TipoTto = _subPanel1ViewModel.TipoTto;
|
limp.TipoTto = _subPanel1ViewModel.TipoTto;
|
||||||
limp.TipoTtoStr = LimpiezaDef.tto_gdb[_subPanel1ViewModel.TipoTto];
|
limp.TipoTtoStr = LimpiezaDef.tto_gdb[_subPanel1ViewModel.TipoTto];
|
||||||
//lee el/los ámbito seleccionado
|
//lee el/los ámbito seleccionado
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ namespace OliviaAddInPro
|
||||||
private ObservableCollection<string> tiposVehic = new ObservableCollection<string>();
|
private ObservableCollection<string> tiposVehic = new ObservableCollection<string>();
|
||||||
private ObservableCollection<string> tiposCapac = new ObservableCollection<string>();
|
private ObservableCollection<string> tiposCapac = new ObservableCollection<string>();
|
||||||
private RecogidaServ recoServ = new RecogidaServ(null); //no hace falta instancia reco aquí
|
private RecogidaServ recoServ = new RecogidaServ(null); //no hace falta instancia reco aquí
|
||||||
private ObservableCollection<string> tiposMv = new ObservableCollection<string>();
|
|
||||||
/**
|
/**
|
||||||
* Array de booleanos enumerando si se existen en la capa seleccionada los tipos de fracción
|
* Array de booleanos enumerando si se existen en la capa seleccionada los tipos de fracción
|
||||||
*/
|
*/
|
||||||
|
|
@ -47,29 +47,6 @@ namespace OliviaAddInPro
|
||||||
public bool[] tipos_vehic_bool = new bool[(int)RecogidaDef.TiposVehic.N];
|
public bool[] tipos_vehic_bool = new bool[(int)RecogidaDef.TiposVehic.N];
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
public ObservableCollection<string> TiposMv
|
|
||||||
{
|
|
||||||
get { return tiposMv; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
tiposMv = value;
|
|
||||||
base.NotifyPropertyChanged("TiposMv");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private int tipoMv = -1;
|
|
||||||
public int TipoMv
|
|
||||||
{
|
|
||||||
get { return tipoMv; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
tipoMv = value;
|
|
||||||
base.NotifyPropertyChanged("TipoMv");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public void ComboMvSel(int tto)
|
|
||||||
{
|
|
||||||
tipoMv = tto;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string DisplayName
|
public override string DisplayName
|
||||||
{
|
{
|
||||||
|
|
@ -284,7 +261,6 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
KgCont = RecogidaDef.kgrec_cont;
|
KgCont = RecogidaDef.kgrec_cont;
|
||||||
}
|
}
|
||||||
tiposMv = new LimpiezaServ(null).GetNombreModosViajes();
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Realiza las comprobaciones para cuando se ha abierto una capa
|
* Realiza las comprobaciones para cuando se ha abierto una capa
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,6 @@ namespace OliviaAddInPro
|
||||||
err_str = "No se ha seleccionado ningún Tipo de Fracción";
|
err_str = "No se ha seleccionado ningún Tipo de Fracción";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
reco.TipoMV = _subPanel1ViewModel.TipoMv;
|
|
||||||
reco.TipoFracStr = RecogidaDef.tipos_fracc_str[reco.TipoFrac];
|
reco.TipoFracStr = RecogidaDef.tipos_fracc_str[reco.TipoFrac];
|
||||||
reco.TipoTto = reco.TipoFrac;
|
reco.TipoTto = reco.TipoFrac;
|
||||||
reco.TipoTtoStr = RecogidaDef.tipos_fracc_str[reco.TipoFrac];
|
reco.TipoTtoStr = RecogidaDef.tipos_fracc_str[reco.TipoFrac];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue