Avances en exportación de limpieza. Modificaciones para tipos de ejecución, algunas variables globales etc.
|
|
@ -27,7 +27,7 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
if (OliviaGlob.TipoEjec == TiposEjecucion.Ninguno)
|
if (OliviaGlob.TipoEjec == TiposEjecucion.Ninguno)
|
||||||
{
|
{
|
||||||
OliviaGlob.TipoEjec = TiposEjecucion.Props;
|
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Props);
|
||||||
DockpaneConfigViewModel.Reset();
|
DockpaneConfigViewModel.Reset();
|
||||||
DockpaneConfigViewModel.Show();
|
DockpaneConfigViewModel.Show();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ namespace OliviaAddInPro
|
||||||
"Procesando", "Canceled", 100, false);
|
"Procesando", "Canceled", 100, false);
|
||||||
if (OliviaGlob.TipoEjec == TiposEjecucion.Ninguno)
|
if (OliviaGlob.TipoEjec == TiposEjecucion.Ninguno)
|
||||||
{
|
{
|
||||||
OliviaGlob.TipoEjec = TiposEjecucion.Limp;
|
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Limp);
|
||||||
OliviaGlob.Limp = new Limpieza();
|
OliviaGlob.Limp = new Limpieza();
|
||||||
DockpaneLimpiezaViewModel.Reset();
|
DockpaneLimpiezaViewModel.Reset();
|
||||||
DockpaneLimpiezaViewModel.Show();
|
DockpaneLimpiezaViewModel.Show();
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,13 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
protected override void OnClick()
|
protected override void OnClick()
|
||||||
{
|
{
|
||||||
if(OliviaGlob.TipoEjec==TiposEjecucion.Ninguno)
|
OliviaGlob.progrDialog = new ProgressDialog(
|
||||||
|
"Procesando", "Canceled", 100, false);
|
||||||
|
if (OliviaGlob.TipoEjec==TiposEjecucion.Ninguno)
|
||||||
{
|
{
|
||||||
OliviaGlob.TipoEjec = TiposEjecucion.Reco;
|
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Reco);
|
||||||
//OliviaGlob.Reco=new
|
OliviaGlob.Reco = new Recogida();
|
||||||
|
DockpaneRecogidaViewModel.Reset();
|
||||||
DockpaneRecogidaViewModel.Show();
|
DockpaneRecogidaViewModel.Show();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
12
Config.daml
|
|
@ -16,27 +16,29 @@
|
||||||
<tabs>
|
<tabs>
|
||||||
<tab id="OliviaAddInPro_Tab1" caption="Olivia Pro">
|
<tab id="OliviaAddInPro_Tab1" caption="Olivia Pro">
|
||||||
<group refID="OliviaAddInPro_Group1" />
|
<group refID="OliviaAddInPro_Group1" />
|
||||||
|
<group refID="OliviaAddInPro_Group2" />
|
||||||
</tab>
|
</tab>
|
||||||
</tabs>
|
</tabs>
|
||||||
<groups>
|
<groups>
|
||||||
<group id="OliviaAddInPro_Group1" caption="Olivia" appearsOnAddInTab="false">
|
<group id="OliviaAddInPro_Group2" caption=" " 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" />
|
||||||
|
</group>
|
||||||
|
<group id="OliviaAddInPro_Group1" caption=" " appearsOnAddInTab="false">
|
||||||
<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>
|
||||||
<!-- add your controls here -->
|
<!-- add your controls here -->
|
||||||
<button id="OliviaAddInPro_ButtonLimp" caption="Limpieza" className="ButtonLimp" loadOnClick="true" largeImage="Images/carrito.png">
|
<button id="OliviaAddInPro_ButtonLimp" caption=" Limpieza " className="ButtonLimp" loadOnClick="true" largeImage="Images/carrito2.png">
|
||||||
<tooltip heading="OLIVIA - Limpieza Viaria">
|
<tooltip heading="OLIVIA - Limpieza Viaria">
|
||||||
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_ButtonRec" caption="Recogida" className="ButtonRec" loadOnClick="true" largeImage="Images/contenedor.png">
|
<button id="OliviaAddInPro_ButtonRec" caption=" Recogida " className="ButtonRec" loadOnClick="true" largeImage="Images/reco2.png">
|
||||||
<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_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/config2.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>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -791,5 +791,76 @@ namespace OliviaAddInPro.Helper
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recorre los ámbitos lineales del shp viendo qué longitud tienen dentro de la geometría, y si
|
||||||
|
* es menos de un porcentaje, lo quitan del shp
|
||||||
|
**/
|
||||||
|
public static bool RemoveRowsGeom(string shp_path, ArcGIS.Core.Geometry.Geometry geom_zon, double porc)
|
||||||
|
{
|
||||||
|
|
||||||
|
/*int[] ids = null;
|
||||||
|
IFeature f = null;
|
||||||
|
IFeatureClass fc = null;
|
||||||
|
IGeometry geom_aux = null;
|
||||||
|
ITopologicalOperator union = null;
|
||||||
|
IPolyline poli = null;
|
||||||
|
double longi_zon = 0, longi_tot = 0;
|
||||||
|
List<int> quita = new List<int>();
|
||||||
|
int j;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ids = FunGDB.dame_ids_consulta(shp_path, ""); //consulta todos
|
||||||
|
if (ids == null)
|
||||||
|
return false;
|
||||||
|
fc = FunGDB.abre_ftclass(shp_path);
|
||||||
|
if (fc == null)
|
||||||
|
return false;
|
||||||
|
for (j = 0; j < ids.Length; j++)
|
||||||
|
{
|
||||||
|
f = fc.GetFeature(ids[j]);
|
||||||
|
geom_aux = f.Shape;
|
||||||
|
poli = (IPolyline)geom_aux;
|
||||||
|
longi_tot = poli.Length;
|
||||||
|
union = (ITopologicalOperator)geom_zon;
|
||||||
|
if (geom_aux == null)
|
||||||
|
return false;
|
||||||
|
geom_aux = union.Intersect(geom_aux, esriGeometryDimension.esriGeometry1Dimension);//se realiza la interseccion entre ámbito (linea) y nivel (poligono)
|
||||||
|
poli = (IPolyline)geom_aux;
|
||||||
|
longi_zon = poli.Length;//se consigue la longitud de ámbito (linea) que interseca con el nivel)
|
||||||
|
|
||||||
|
if ((longi_zon / longi_tot) < porc)
|
||||||
|
{
|
||||||
|
//quita esa línea
|
||||||
|
quita.Add(ids[j]);
|
||||||
|
}
|
||||||
|
FunGDB.libera(f);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FunGDB.libera(fc);
|
||||||
|
FunGDB.libera(f);
|
||||||
|
|
||||||
|
if (quita.Count > 0)
|
||||||
|
{
|
||||||
|
//borra las líneas que se han indicado
|
||||||
|
if (!FunGDB.quita_filas(shp_path, quita))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
FunGDB.libera(fc);
|
||||||
|
FunGDB.libera(f);
|
||||||
|
}*/
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 156 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
|
@ -22,7 +22,7 @@ namespace OliviaAddInPro.Model
|
||||||
/**
|
/**
|
||||||
* Tipo de tratamiento elegidos
|
* Tipo de tratamiento elegidos
|
||||||
*/
|
*/
|
||||||
public int TipoTto { get; set; } = -1;
|
//public int TipoTto { get; set; } = -1; //En la clase TratamientoComun
|
||||||
/**
|
/**
|
||||||
* Ámbitos de trabajo elegidos
|
* Ámbitos de trabajo elegidos
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -13,21 +13,22 @@ namespace OliviaAddInPro.Model
|
||||||
{
|
{
|
||||||
[Flags]
|
[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
|
public enum TiposEjecucion
|
||||||
{
|
{
|
||||||
Ninguno = 0,
|
Ninguno = 0,
|
||||||
Limp=1,
|
Limp=1,
|
||||||
Reco=2,
|
Reco=2,
|
||||||
Config = 4, //está configurando por primera vez
|
Props = 4,//está editando propiedades
|
||||||
Ejec=8,//está ejecutando por primera vez
|
Config = 8, //está configurando la ventana de limpieza o recogida por primera vez
|
||||||
Config2=16,//está configurando después de haber planificado ya al menos una primera vez
|
EjecSecto=16,//está ejecutando por primera vez
|
||||||
Ejec2=32,//está ejecutando después de haber planificado ya al menos una primera vez
|
EjecPlanif = 32,//está ejecutando después de haber planificado ya al menos una primera vez
|
||||||
Props = 64,//está editando propiedades
|
FinEjecOk = 64, //ha terminado de ejecutar Bien
|
||||||
Maqueta=128,
|
FinEjecNOk = 128,//ha terminado de ejecutar y ha habido errores
|
||||||
|
Config2 =256,//está configurando la ventana de limpieza o recogida después de haber sectorizado
|
||||||
|
//ya al menos una primera vez
|
||||||
|
//se pone este estado cuando ha terminado ya la primera vez
|
||||||
}
|
}
|
||||||
static class OliviaGlob
|
static class OliviaGlob
|
||||||
{
|
{
|
||||||
|
|
@ -50,6 +51,14 @@ namespace OliviaAddInPro.Model
|
||||||
public static string PathSimbVSM; //<Path de la galeria de estilos aplicada por VSM
|
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
|
public static string PathSimbESRI; //<Path de la galeria de estilos de ESRI
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Nombre de las capas que se van a necesitar para la exportación de datos
|
||||||
|
*/
|
||||||
|
public struct Capas
|
||||||
|
{
|
||||||
|
public static string ftclass_ejes; //<Nombre de la capa de ejes de carretera
|
||||||
|
public static string ftclass_muni; //<Nombre de la capa de municipios de TOMTOM
|
||||||
|
};
|
||||||
|
|
||||||
private static TiposEjecucion tipoEjec = TiposEjecucion.Ninguno;
|
private static TiposEjecucion tipoEjec = TiposEjecucion.Ninguno;
|
||||||
private static Limpieza limp = new Limpieza();
|
private static Limpieza limp = new Limpieza();
|
||||||
|
|
@ -88,19 +97,38 @@ namespace OliviaAddInPro.Model
|
||||||
|
|
||||||
public static bool IsLimp()
|
public static bool IsLimp()
|
||||||
{
|
{
|
||||||
return (OliviaGlob.TipoEjec & TiposEjecucion.Limp) == TiposEjecucion.Limp;
|
return HasFlagTipEjec(TiposEjecucion.Limp);
|
||||||
}
|
}
|
||||||
public static bool IsReco()
|
public static bool IsReco()
|
||||||
{
|
{
|
||||||
return (OliviaGlob.TipoEjec & TiposEjecucion.Reco) == TiposEjecucion.Reco;
|
return HasFlagTipEjec(TiposEjecucion.Reco);
|
||||||
}
|
}
|
||||||
public static bool IsProps()
|
public static bool IsProps()
|
||||||
{
|
{
|
||||||
return (OliviaGlob.TipoEjec & TiposEjecucion.Props) == TiposEjecucion.Props;
|
return HasFlagTipEjec(TiposEjecucion.Props);
|
||||||
}
|
}
|
||||||
public static bool IsConfig2()
|
public static bool IsConfig2()
|
||||||
{
|
{
|
||||||
return (OliviaGlob.TipoEjec & TiposEjecucion.Config2) == TiposEjecucion.Config2;
|
return HasFlagTipEjec(TiposEjecucion.Config2);
|
||||||
|
}
|
||||||
|
public static bool HasFlagTipEjec(TiposEjecucion flag)
|
||||||
|
{
|
||||||
|
return (OliviaGlob.TipoEjec & flag) == flag;
|
||||||
|
}
|
||||||
|
public static void SetFlagTipEjec(TiposEjecucion flag)
|
||||||
|
{
|
||||||
|
//pone el tipo de ejecución igual al flag
|
||||||
|
OliviaGlob.TipoEjec = flag;
|
||||||
|
}
|
||||||
|
public static void AddFlagTipEjec(TiposEjecucion flag)
|
||||||
|
{
|
||||||
|
//añade el flag al tipo de ejecución
|
||||||
|
OliviaGlob.TipoEjec = OliviaGlob.TipoEjec | flag;
|
||||||
|
}
|
||||||
|
public static void RemoveFlagTipEjec(TiposEjecucion flag)
|
||||||
|
{
|
||||||
|
//quita el flag al tipo de ejecución
|
||||||
|
OliviaGlob.TipoEjec = OliviaGlob.TipoEjec & ~flag;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Habilita Sh=true
|
* Habilita Sh=true
|
||||||
|
|
@ -168,10 +196,8 @@ namespace OliviaAddInPro.Model
|
||||||
|
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
//Capas, consultas y filtros GENERALES
|
//Capas, consultas y filtros GENERALES
|
||||||
/*Capas.ftclass_ejes = c.eje_via;
|
Capas.ftclass_ejes = c.eje_via;
|
||||||
Capas.ftclass_zonas = "SubNiveles";
|
Capas.ftclass_muni = c.municipios;
|
||||||
Capas.ftclass_restri = "TomTom_Q4_2015___rs";
|
|
||||||
Capas.ftclass_muni = c.municipios;*/
|
|
||||||
|
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
//Capas, consultas, atributos y filtros de LIMPIEZA
|
//Capas, consultas, atributos y filtros de LIMPIEZA
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,14 @@ namespace OliviaAddInPro.Model
|
||||||
{
|
{
|
||||||
public class TratamientoComun
|
public class TratamientoComun
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Tipo de tratamiento, en limpieza es sobre LimpiezaDef.TiposTto y en reco sobre RecogidaDef.tipos_fracc_str
|
||||||
|
*/
|
||||||
|
public int TipoTto { get; set; } = (int)LimpiezaDef.TiposTto.TtoNoDef;
|
||||||
|
/**
|
||||||
|
* String para Tipo de tratamiento, se guarda como columna en el shp
|
||||||
|
*/
|
||||||
|
public string TipoTtoStr { get; set; } = String.Empty;
|
||||||
/**
|
/**
|
||||||
* Capa de ámbitos
|
* Capa de ámbitos
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -148,6 +148,7 @@
|
||||||
<Compile Include="Model\OliviaConf.cs" />
|
<Compile Include="Model\OliviaConf.cs" />
|
||||||
<Compile Include="Model\OliviaDef.cs" />
|
<Compile Include="Model\OliviaDef.cs" />
|
||||||
<Compile Include="Services\ConfigServ.cs" />
|
<Compile Include="Services\ConfigServ.cs" />
|
||||||
|
<Compile Include="Services\ImportaResServ.cs" />
|
||||||
<Compile Include="Services\LimpiezaServ.cs" />
|
<Compile Include="Services\LimpiezaServ.cs" />
|
||||||
<Compile Include="Services\RecogidaServ.cs" />
|
<Compile Include="Services\RecogidaServ.cs" />
|
||||||
<Compile Include="ViewModel\Configuracion\DockpaneConfigViewModel.cs" />
|
<Compile Include="ViewModel\Configuracion\DockpaneConfigViewModel.cs" />
|
||||||
|
|
@ -292,11 +293,6 @@
|
||||||
<LastGenOutput>Resource1.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resource1.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<AddInContent Include="Images\carrito.png" />
|
|
||||||
<AddInContent Include="Images\contenedor.png" />
|
|
||||||
<AddInContent Include="Images\maqueta.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AddInContent Include="Images\config.png" />
|
<AddInContent Include="Images\config.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
@ -306,9 +302,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AddInContent Include="DarkImages\GenericButtonGreen32.png" />
|
<AddInContent Include="DarkImages\GenericButtonGreen32.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<AddInContent Include="Images\Tiporeco.png" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="View\OliviaIconPro16.png" />
|
<Resource Include="View\OliviaIconPro16.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
@ -327,6 +320,13 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Images\openfolder.png" />
|
<Resource Include="Images\openfolder.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<AddInContent Include="Images\config2.png" />
|
||||||
|
<AddInContent Include="Images\reco2.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<AddInContent Include="Images\carrito2.png" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!--
|
<!--
|
||||||
PackageAction can be:
|
PackageAction can be:
|
||||||
|
|
|
||||||
|
|
@ -74,9 +74,35 @@ namespace OliviaAddInPro.Services
|
||||||
cps.Value = 80;
|
cps.Value = 80;
|
||||||
|
|
||||||
if (!fue_mal)
|
if (!fue_mal)
|
||||||
fue_mal = Ejecuta(modo, cps, out ErrStr);
|
fue_mal = Exporta(modo, cps, out ErrStr); //Falta pasar el filtro espacial
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (!fue_mal)
|
||||||
|
{
|
||||||
|
OliviaGlob.Paths.PathData = OliviaGlob.Paths.DirData + com.NombreShpExport;
|
||||||
|
//hace intersecciones espaciales en caso de ámbitos lineales para quitar los que tienen más parte fuera de la zona que dentro
|
||||||
|
if (geom_export != null &&
|
||||||
|
(OliviaGlob.IsReco() || (OliviaGlob.IsLimp() && (com.TipoTto < (int)LimpiezaDef.TiposTto.TtoPapeVaci))))
|
||||||
|
{
|
||||||
|
//FALTA RELLENAR
|
||||||
|
if (!HelperGdb.RemoveRowsGeom(OliviaGlob.Paths.PathData, geom_export, 0.4))
|
||||||
|
{
|
||||||
|
ErrStr = "Error al quitar los ámbitos que sobresalen";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//comprueba que no se haya quedado sin ámbitos
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
//amplia la geom para englobar las instalaciones
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
//exporta la red navegable
|
||||||
|
|
||||||
|
//guarda los nombres del shape
|
||||||
|
OliviaGlob.Paths.PathNW = OliviaGlob.Paths.DirData + com.NombreShpExportNw;
|
||||||
|
|
||||||
return fue_mal;
|
return fue_mal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -86,54 +112,52 @@ namespace OliviaAddInPro.Services
|
||||||
public Geometry GetGeomAmbitsExport(CancelableProgressorSource cps)
|
public Geometry GetGeomAmbitsExport(CancelableProgressorSource cps)
|
||||||
{
|
{
|
||||||
Geometry geomAux = null;
|
Geometry geomAux = null;
|
||||||
|
Geometry geomAmbits = null;
|
||||||
|
|
||||||
ErrStr = string.Empty;
|
ErrStr = string.Empty;
|
||||||
FeatureClass fc = HelperGdb.GetFtClass(com.CapaElems);
|
FeatureClass fc = HelperGdb.GetFtClass(com.CapaElems);
|
||||||
QueryFilter filtro = new QueryFilter { WhereClause = com.ConsultaAmbs };
|
|
||||||
if (fc == null)
|
if (fc == null)
|
||||||
{
|
{
|
||||||
ErrStr = "No se ha podido abrir la clase " + com.CapaElems;
|
ErrStr = "No se ha podido abrir la clase " + com.CapaElems;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
//Primero hace la geometría de los ámbitos que cumplen la consulta
|
|
||||||
geomAux = HelperGdb.GetGeomConvexHull(fc, filtro, cps).Result;
|
//Hace la intersección de zonas y niveles
|
||||||
|
geomAux = null;
|
||||||
|
if (com.GeomNiv != null || com.GeomZon != null)
|
||||||
|
{
|
||||||
|
geomAux = HelperGdb.IntersectGeom(com.GeomNiv, com.GeomZon);
|
||||||
|
if (geomAux == null)
|
||||||
|
{
|
||||||
|
ErrStr = "Error al intersecar zonas y/o niveles.";
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (geomAux.IsEmpty)
|
||||||
|
{
|
||||||
|
ErrStr = "No existen ámbitos en la intersección entre zonas y/o niveles.";
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//comprueba que, en el caso de ejes de vía, hayan metido polígono de exportación
|
||||||
|
if ((geomAux == null) && (com.CapaElems == OliviaGlob.Capas.ftclass_ejes))
|
||||||
|
{
|
||||||
|
ErrStr = "Al emplear ejes de calle como ámbitos es necesario indicar polígono de exportación";
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
cps.Value = 30;
|
||||||
|
|
||||||
|
//prepara el filtro con consulta y espacial
|
||||||
|
SpatialQueryFilter filtro = CreaFiltro(com.ConsultaAmbs, geomAux);
|
||||||
|
|
||||||
|
//Ahora hace la geometría de los ámbitos que cumplen la consulta
|
||||||
|
geomAmbits = HelperGdb.GetGeomConvexHull(fc, filtro, cps).Result;
|
||||||
if (geomAux == null || geomAux.IsEmpty)
|
if (geomAux == null || geomAux.IsEmpty)
|
||||||
{
|
{
|
||||||
ErrStr = "No se ha podido generar geometría de los ámbitos" + com.ConsultaAmbs + HelperGdb.OutStr;
|
ErrStr = "No se ha podido generar geometría de los ámbitos" + com.ConsultaAmbs + HelperGdb.OutStr;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
geomAux = geomAmbits;
|
||||||
cps.Value = 60;
|
cps.Value = 60;
|
||||||
//Hace la intersección de dicha geometría con las zonas
|
|
||||||
if (com.GeomZon != null)
|
|
||||||
{
|
|
||||||
geomAux = HelperGdb.IntersectGeom(geomAux, com.GeomZon);
|
|
||||||
if (geomAux == null)
|
|
||||||
{
|
|
||||||
ErrStr = "Error al intersecar con las zonas.";
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if(geomAux.IsEmpty)
|
|
||||||
{
|
|
||||||
ErrStr = "No existen ámbitos en la intersección con las zonas.";
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cps.Value = 70;
|
|
||||||
//Hace la intersección de la geometría con los niveles
|
|
||||||
if (com.GeomNiv != null)
|
|
||||||
{
|
|
||||||
geomAux = HelperGdb.IntersectGeom(geomAux, com.GeomNiv);
|
|
||||||
if (geomAux == null)
|
|
||||||
{
|
|
||||||
ErrStr = "Error al intersecar con los niveles.";
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (geomAux.IsEmpty)
|
|
||||||
{
|
|
||||||
ErrStr = "No existen ámbitos en la intersección con los niveles.";
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cps.Value = 75;
|
|
||||||
//le quita las restricciones
|
//le quita las restricciones
|
||||||
if (com.GeomRestr != null)
|
if (com.GeomRestr != null)
|
||||||
{
|
{
|
||||||
|
|
@ -144,6 +168,7 @@ namespace OliviaAddInPro.Services
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cps.Value = 75;
|
||||||
HelperGdb.Free(fc);
|
HelperGdb.Free(fc);
|
||||||
return geomAux;
|
return geomAux;
|
||||||
}
|
}
|
||||||
|
|
@ -179,15 +204,11 @@ namespace OliviaAddInPro.Services
|
||||||
/**
|
/**
|
||||||
* Exporta y lanza proceso y ventana de proceso
|
* Exporta y lanza proceso y ventana de proceso
|
||||||
*/
|
*/
|
||||||
public bool Ejecuta(ModosEjec modo, CancelableProgressorSource cps, out string msg)
|
public bool Exporta(ModosEjec modo, CancelableProgressorSource cps, out string msg)
|
||||||
{
|
{
|
||||||
msg = "";
|
msg = "";
|
||||||
//exporta los datos de entrada
|
//exporta los datos de entrada
|
||||||
return HelperGdb.ExportShp(com.CapaElems, filtroEspacial, com.NombreShpExport, OliviaGlob.Paths.DirData, cps, out msg);
|
return HelperGdb.ExportShp(com.CapaElems, filtroEspacial, com.NombreShpExport, OliviaGlob.Paths.DirData, cps, out msg);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Lee la capa que se ha seleccionzdo de recogida y se comprueba que contiene los campos necesarios
|
* Lee la capa que se ha seleccionzdo de recogida y se comprueba que contiene los campos necesarios
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.IO;
|
||||||
|
using OliviaAddInPro.Model;
|
||||||
|
using OliviaAddInPro.Helper;
|
||||||
|
|
||||||
|
namespace OliviaAddInPro.Services
|
||||||
|
{
|
||||||
|
class ImportaResServ
|
||||||
|
{
|
||||||
|
//se le llama cuando ha terminado el proceso de ejecución en Olivia Tasks
|
||||||
|
//puede haber ido bien, haberse cancelado, etc. En función de ello se realizan
|
||||||
|
//unas tareas u otras
|
||||||
|
public void FinProceso()
|
||||||
|
{
|
||||||
|
bool mal = true;
|
||||||
|
string err = "";
|
||||||
|
|
||||||
|
if (OliviaGlob.HasFlagTipEjec(TiposEjecucion.FinEjecOk)) //ha terminado bien
|
||||||
|
{
|
||||||
|
if (OliviaGlob.HasFlagTipEjec(TiposEjecucion.EjecSecto)) //Ha terminado bien la sectorización
|
||||||
|
{
|
||||||
|
/*if (gdb.import_secto_ini())
|
||||||
|
{
|
||||||
|
mal = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mal = true;
|
||||||
|
err = gdb.err_st;
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
else if (OliviaGlob.HasFlagTipEjec(TiposEjecucion.EjecPlanif)) //Ha terminado bien la planificación
|
||||||
|
{
|
||||||
|
/*guarda_csv();
|
||||||
|
if (gdb.import_planif())
|
||||||
|
{
|
||||||
|
mal = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mal = true;
|
||||||
|
err = gdb.err_st;
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
//actualiza los flags
|
||||||
|
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.FinEjecOk);
|
||||||
|
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config2);
|
||||||
|
}
|
||||||
|
else if(OliviaGlob.HasFlagTipEjec(TiposEjecucion.FinEjecNOk)) //ha habido error
|
||||||
|
{
|
||||||
|
/*mal = true;
|
||||||
|
err = progr_eje.err_str;*/
|
||||||
|
//actualiza los flags
|
||||||
|
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.FinEjecNOk);
|
||||||
|
}
|
||||||
|
|
||||||
|
borra_files();
|
||||||
|
if (mal)
|
||||||
|
{
|
||||||
|
HelperGlobal.ponMsg(err, System.Windows.MessageBoxImage.Error);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
OliviaGlob.ShowHidePane(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Borra los archivos exportados para el proceso
|
||||||
|
*/
|
||||||
|
public static void borra_files()
|
||||||
|
{
|
||||||
|
string[] list = null;
|
||||||
|
string capa_principal = System.IO.Path.GetFileNameWithoutExtension(OliviaGlob.Paths.PathData);
|
||||||
|
string capa_principal_nw = System.IO.Path.GetFileNameWithoutExtension(OliviaGlob.Paths.PathNW);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (capa_principal == null)
|
||||||
|
return;
|
||||||
|
list = Directory.GetFiles(OliviaGlob.Paths.DirData, capa_principal + "*");
|
||||||
|
if (list.Length > 0)
|
||||||
|
{
|
||||||
|
foreach (string f in list)
|
||||||
|
{
|
||||||
|
if (System.IO.Path.GetExtension(f) == ".lock")
|
||||||
|
continue;
|
||||||
|
File.Delete(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (capa_principal_nw == null)
|
||||||
|
return;
|
||||||
|
list = Directory.GetFiles(OliviaGlob.Paths.DirData, capa_principal_nw + "*");
|
||||||
|
if (list.Length > 0)
|
||||||
|
{
|
||||||
|
foreach (string f in list)
|
||||||
|
{
|
||||||
|
File.Delete(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
HelperGlobal.ponMsg(ex.Message, System.Windows.MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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="None" Width="32" Height="32" Source="{Binding Path=ImageSource}" >
|
<Image Stretch="Fill" Width="24" Height="24" Source="{Binding Path=ImageSource}" >
|
||||||
<Image.ToolTip>
|
<Image.ToolTip>
|
||||||
<ToolTip Content="{Binding Path=OptionString}"/>
|
<ToolTip Content="{Binding Path=OptionString}"/>
|
||||||
</Image.ToolTip>
|
</Image.ToolTip>
|
||||||
|
|
|
||||||
|
|
@ -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="Fill" Width="24" Height="24" Source="{Binding Path=ImageSource}" >
|
||||||
<Image.ToolTip>
|
<Image.ToolTip>
|
||||||
<ToolTip Content="{Binding Path=OptionString}"/>
|
<ToolTip Content="{Binding Path=OptionString}"/>
|
||||||
</Image.ToolTip>
|
</Image.ToolTip>
|
||||||
|
|
|
||||||
|
|
@ -34,14 +34,19 @@
|
||||||
<ColumnDefinition Width="150"/>
|
<ColumnDefinition Width="150"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<ComboBox x:Name="comboBox_frac" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposFrac}" HorizontalAlignment="Left" Margin="0,0,0,0"
|
<ComboBox x:Name="comboBox_frac" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposFrac}" HorizontalAlignment="Left" Margin="0,0,0,0" Width="150"
|
||||||
VerticalAlignment="Top" Width="150"
|
SelectionChanged="comboBox_frac_SelectionChanged" SelectedIndex="{Binding Path=TipoFrac, Mode = TwoWay}"
|
||||||
SelectionChanged="comboBox_frac_SelectionChanged" SelectedIndex="{Binding Path=TipoFrac, Mode = TwoWay}" >
|
DisplayMemberPath="Item">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemContainerStyle>
|
||||||
|
<Style TargetType="{x:Type ComboBoxItem}">
|
||||||
|
<Setter Property="IsEnabled" Value="{Binding IsEnabled}"/>
|
||||||
|
</Style>
|
||||||
|
</ComboBox.ItemContainerStyle>
|
||||||
|
<!--ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<ComboBoxItem IsEnabled="{Binding IsEnabled}" Content="{Binding Path=Item}"/>
|
<ComboBoxItem IsEnabled="{Binding IsEnabled}" Content="{Binding Path=Item}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</-->
|
||||||
</ComboBox>
|
</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"/>
|
<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>
|
</Grid>
|
||||||
|
|
@ -53,12 +58,18 @@
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<ComboBox x:Name="comboBox_tipoCarg" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposCarg}" HorizontalAlignment="Left" Margin="0,0,0,0"
|
<ComboBox x:Name="comboBox_tipoCarg" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposCarg}" HorizontalAlignment="Left" Margin="0,0,0,0"
|
||||||
VerticalAlignment="Top" Width="150"
|
VerticalAlignment="Top" Width="150"
|
||||||
SelectionChanged="comboBox_tipoCarg_SelectionChanged" SelectedIndex="{Binding Path=TipoCarg, Mode = TwoWay}" >
|
SelectionChanged="comboBox_tipoCarg_SelectionChanged" SelectedIndex="{Binding Path=TipoCarg, Mode = TwoWay}"
|
||||||
<ComboBox.ItemTemplate>
|
DisplayMemberPath="Item">
|
||||||
|
<ComboBox.ItemContainerStyle>
|
||||||
|
<Style TargetType="{x:Type ComboBoxItem}">
|
||||||
|
<Setter Property="IsEnabled" Value="{Binding IsEnabled}"/>
|
||||||
|
</Style>
|
||||||
|
</ComboBox.ItemContainerStyle>
|
||||||
|
<!--ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<ComboBoxItem IsEnabled="{Binding IsEnabled}" Content="{Binding Path=Item}"/>
|
<ComboBoxItem IsEnabled="{Binding IsEnabled}" Content="{Binding Path=Item}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</-->
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<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"
|
<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"
|
VerticalAlignment="Top" Width="90"
|
||||||
|
|
|
||||||
|
|
@ -71,10 +71,11 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
i = combo.SelectedIndex;
|
i = combo.SelectedIndex;
|
||||||
|
|
||||||
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
if (i >= 0 && DataContext is PaneRecogidaSub1ViewModel mod)
|
||||||
{
|
{
|
||||||
if (!mod.ComboFracSel(i))
|
mod.ComboFracSel(i);
|
||||||
combo.SelectedIndex = -1;
|
/*if (!mod.ComboFracSel(i))
|
||||||
|
combo.SelectedIndex = -1;*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -87,10 +88,11 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
i = combo.SelectedIndex;
|
i = combo.SelectedIndex;
|
||||||
|
|
||||||
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
if (i>=0 && DataContext is PaneRecogidaSub1ViewModel mod)
|
||||||
{
|
{
|
||||||
if(!mod.ComboCargSel(i))
|
mod.ComboCargSel(i);
|
||||||
combo.SelectedIndex = -1;
|
/*if (!mod.ComboCargSel(i))
|
||||||
|
combo.SelectedIndex = -1;*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -102,7 +104,7 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
i = combo.SelectedIndex;
|
i = combo.SelectedIndex;
|
||||||
|
|
||||||
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
if (i >= 0 && DataContext is PaneRecogidaSub1ViewModel mod)
|
||||||
{
|
{
|
||||||
mod.ComboVehicSel(i);
|
mod.ComboVehicSel(i);
|
||||||
}
|
}
|
||||||
|
|
@ -116,7 +118,7 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
i = combo.SelectedIndex;
|
i = combo.SelectedIndex;
|
||||||
|
|
||||||
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
if (i >= 0 && DataContext is PaneRecogidaSub1ViewModel mod)
|
||||||
{
|
{
|
||||||
mod.ComboCapacSel(i);
|
mod.ComboCapacSel(i);
|
||||||
}
|
}
|
||||||
|
|
@ -135,7 +137,7 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
i = combo.SelectedIndex;
|
i = combo.SelectedIndex;
|
||||||
|
|
||||||
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
if (i >= 0 && DataContext is PaneRecogidaSub1ViewModel mod)
|
||||||
{
|
{
|
||||||
mod.ComboLatSel(i);
|
mod.ComboLatSel(i);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ namespace OliviaAddInPro
|
||||||
if (isVisible == false && !firstTimeShow)
|
if (isVisible == false && !firstTimeShow)
|
||||||
{
|
{
|
||||||
//avisa de cerrar la ventana
|
//avisa de cerrar la ventana
|
||||||
OliviaGlob.TipoEjec = TiposEjecucion.Ninguno;
|
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Ninguno);
|
||||||
}
|
}
|
||||||
if (firstTimeShow)
|
if (firstTimeShow)
|
||||||
firstTimeShow = false;
|
firstTimeShow = false;
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ namespace OliviaAddInPro
|
||||||
if (isVisible == false && !firstTimeShow && !hideTemp)
|
if (isVisible == false && !firstTimeShow && !hideTemp)
|
||||||
{
|
{
|
||||||
//avisa de cerrar la ventana
|
//avisa de cerrar la ventana
|
||||||
OliviaGlob.TipoEjec = TiposEjecucion.Ninguno;
|
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Ninguno);
|
||||||
}
|
}
|
||||||
if (firstTimeShow)
|
if (firstTimeShow)
|
||||||
firstTimeShow = false;
|
firstTimeShow = false;
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ namespace OliviaAddInPro
|
||||||
CapaElems = string.Empty;
|
CapaElems = string.Empty;
|
||||||
OpsAmbs.Clear();
|
OpsAmbs.Clear();
|
||||||
Ambitos.Clear();
|
Ambitos.Clear();
|
||||||
OliviaGlob.TipoEjec = OliviaGlob.TipoEjec | TiposEjecucion.Config; //lo reinicia, por si estaba después de planificar
|
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config); //lo reinicia, por si estaba después de planificar
|
||||||
if (string.IsNullOrEmpty(capa))
|
if (string.IsNullOrEmpty(capa))
|
||||||
return false;
|
return false;
|
||||||
//comprueba los campos de limpieza
|
//comprueba los campos de limpieza
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ namespace OliviaAddInPro
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
limp.TipoTto = _subPanel1ViewModel.TipoTto;
|
limp.TipoTto = _subPanel1ViewModel.TipoTto;
|
||||||
|
limp.TipoTtoStr = LimpiezaDef.tto_gdb[_subPanel1ViewModel.TipoTto];
|
||||||
//lee el/los ámbito seleccionado
|
//lee el/los ámbito seleccionado
|
||||||
if (!_subPanel1ViewModel.lee_ambitos())
|
if (!_subPanel1ViewModel.lee_ambitos())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ namespace OliviaAddInPro
|
||||||
if (isVisible == false && !firstTimeShow && !hideTemp)
|
if (isVisible == false && !firstTimeShow && !hideTemp)
|
||||||
{
|
{
|
||||||
//avisa de cerrar la ventana
|
//avisa de cerrar la ventana
|
||||||
OliviaGlob.TipoEjec = TiposEjecucion.Ninguno;
|
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Ninguno);
|
||||||
}
|
}
|
||||||
if (firstTimeShow)
|
if (firstTimeShow)
|
||||||
firstTimeShow = false;
|
firstTimeShow = false;
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ namespace OliviaAddInPro
|
||||||
get { return tipoLate; }
|
get { return tipoLate; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
tipoCapac = value;
|
tipoLate = value;
|
||||||
base.NotifyPropertyChanged("TipoLate");
|
base.NotifyPropertyChanged("TipoLate");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -273,7 +273,7 @@ namespace OliviaAddInPro
|
||||||
TiposCarg.Clear();
|
TiposCarg.Clear();
|
||||||
TiposVehic.Clear();
|
TiposVehic.Clear();
|
||||||
TiposCapac.Clear();
|
TiposCapac.Clear();
|
||||||
OliviaGlob.TipoEjec = OliviaGlob.TipoEjec | TiposEjecucion.Config; //lo reinicia, por si estaba después de planificar
|
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config); //lo reinicia, por si estaba después de planificar
|
||||||
if (string.IsNullOrEmpty(capa))
|
if (string.IsNullOrEmpty(capa))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,8 @@ namespace OliviaAddInPro
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
reco.CapaElems = _subPanel1ViewModel.CapaElems;
|
reco.CapaElems = _subPanel1ViewModel.CapaElems;
|
||||||
|
reco.TipoTto = reco.TipoFrac;
|
||||||
|
reco.TipoTtoStr= RecogidaDef.tipos_fracc_str[reco.TipoFrac];
|
||||||
//lee la fracción
|
//lee la fracción
|
||||||
reco.TipoFrac = _subPanel1ViewModel.TipoFrac;
|
reco.TipoFrac = _subPanel1ViewModel.TipoFrac;
|
||||||
if (reco.TipoFrac == -1)
|
if (reco.TipoFrac == -1)
|
||||||
|
|
|
||||||