Compare commits
77 Commits
Configurac
...
develop
| Author | SHA1 | Date |
|---|---|---|
|
|
6e7c7f787c | |
|
|
002d3edd17 | |
|
|
f6435a0de9 | |
|
|
895d4e89f0 | |
|
|
e834cdfb57 | |
|
|
2b91905abb | |
|
|
a4fe3bb805 | |
|
|
c7f8bb403a | |
|
|
c2f857ba48 | |
|
|
0f9a21eddc | |
|
|
114abcccc2 | |
|
|
407d06bf00 | |
|
|
a056f6d78b | |
|
|
dd2c58667d | |
|
|
31ded359f6 | |
|
|
6ed9074bf8 | |
|
|
39757fce61 | |
|
|
8081d00bbe | |
|
|
23cd733c9b | |
|
|
66c092ecf6 | |
|
|
41c197b5ea | |
|
|
4def578f68 | |
|
|
94b1b7c56b | |
|
|
26d1bce550 | |
|
|
89ae0cce42 | |
|
|
84f9eee9b5 | |
|
|
c9c25b77c4 | |
|
|
20a1ac9fd4 | |
|
|
e80a95251a | |
|
|
28cdbeeab5 | |
|
|
83d5231ab4 | |
|
|
3ffe6c3de4 | |
|
|
a728cf770f | |
|
|
7f0671935b | |
|
|
f29b52f995 | |
|
|
663e6f058f | |
|
|
8de6d7682e | |
|
|
828eff60c1 | |
|
|
b4bdeed856 | |
|
|
7fd093c49e | |
|
|
21811c212b | |
|
|
8e89563851 | |
|
|
d5d52a2d78 | |
|
|
b9af14a188 | |
|
|
fe3e58ed2c | |
|
|
1f4c7cd7df | |
|
|
4694f56861 | |
|
|
43f2592915 | |
|
|
52f5993ce1 | |
|
|
ba8e0579be | |
|
|
a0164e6bb4 | |
|
|
e2ec0d2dc6 | |
|
|
9e8f4e6d25 | |
|
|
d267229f9e | |
|
|
7ab639b800 | |
|
|
7f824052a3 | |
|
|
32fd195c94 | |
|
|
835fbf3f96 | |
|
|
d9e0cc8a1d | |
|
|
00182b5260 | |
|
|
e9f888b921 | |
|
|
bac4c6abf0 | |
|
|
e6be0f2aa4 | |
|
|
32959793ad | |
|
|
3110a03174 | |
|
|
1f50e37fe1 | |
|
|
a1d381ccbd | |
|
|
24e0cd9697 | |
|
|
7a768e20e9 | |
|
|
bf95769ffd | |
|
|
472beaae01 | |
|
|
398f3afbe8 | |
|
|
8c3589370d | |
|
|
2e87fb3240 | |
|
|
297d960b90 | |
|
|
04cc22e6f4 | |
|
|
1c1e4c95aa |
Binary file not shown.
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
using ArcGIS.Core.CIM;
|
||||
using ArcGIS.Core.Data;
|
||||
using ArcGIS.Core.Geometry;
|
||||
|
|
@ -18,6 +19,7 @@ using ArcGIS.Desktop.Framework.Threading.Tasks;
|
|||
using ArcGIS.Desktop.Mapping;
|
||||
using OliviaAddInPro.Helper;
|
||||
using OliviaAddInPro.Model;
|
||||
using Button = ArcGIS.Desktop.Framework.Contracts.Button;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
|
|
@ -25,9 +27,11 @@ namespace OliviaAddInPro
|
|||
{
|
||||
protected override void OnClick()
|
||||
{
|
||||
if (OliviaGlob.TipoEjec == TiposEjecucion.Ninguno)
|
||||
if (OliviaGlob.TipoView == TiposEjecucion.Ninguno)
|
||||
{
|
||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Props);
|
||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Props);
|
||||
|
||||
DockpaneConfigViewModel.Reset();
|
||||
DockpaneConfigViewModel.Show();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,24 +27,29 @@ namespace OliviaAddInPro
|
|||
{
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
if (OliviaGlob.TipoEjec == TiposEjecucion.Ninguno)
|
||||
if (OliviaGlob.TipoView == TiposEjecucion.Ninguno)
|
||||
{
|
||||
///Comprueba que existe la red navegable configurada
|
||||
|
||||
if (HelperGdb.GetGdb(OliviaGlob.Paths.PathGdbNw).Result == null)
|
||||
if (!OliviaGlob.CompruebaNwYCampos())
|
||||
{
|
||||
HelperGlobal.ponMsg("No encuentra Gdb de red navegable, cambie Configuración: " + HelperGdb.OutStr,
|
||||
HelperGlobal.ponMsg("No se encuentra red navegable, cambie Configuración: " + HelperGdb.OutStr,
|
||||
System.Windows.MessageBoxImage.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Limp);
|
||||
if(OliviaGlob.Limp==null)
|
||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Limp);
|
||||
|
||||
if (OliviaGlob.Limp==null)
|
||||
OliviaGlob.Limp = new Limpieza();
|
||||
DockpaneLimpiezaViewModel.Reset();
|
||||
DockpaneLimpiezaViewModel.Show();
|
||||
}
|
||||
}
|
||||
else if(OliviaGlob.ViewIsProps())
|
||||
{
|
||||
HelperGlobal.ponMsg(Resource1.String_estaenprops, System.Windows.MessageBoxImage.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
HelperGlobal.ponMsg(Resource1.String_existe_ejec, System.Windows.MessageBoxImage.Warning);
|
||||
|
|
|
|||
|
|
@ -25,23 +25,29 @@ namespace OliviaAddInPro
|
|||
{
|
||||
protected override void OnClick()
|
||||
{
|
||||
if (OliviaGlob.TipoEjec==TiposEjecucion.Ninguno)
|
||||
if (OliviaGlob.TipoView == TiposEjecucion.Ninguno)
|
||||
{
|
||||
///Comprueba que existe la red navegable configurada
|
||||
if (HelperGdb.GetGdb(OliviaGlob.Paths.PathGdbNw).Result == null)
|
||||
if (!OliviaGlob.CompruebaNwYCampos())
|
||||
{
|
||||
HelperGlobal.ponMsg("No encuentra Gdb de red navegable, cambie Configuración: " + HelperGdb.OutStr,
|
||||
HelperGlobal.ponMsg("No se encuentra red navegable, cambie Configuración: " + HelperGdb.OutStr,
|
||||
System.Windows.MessageBoxImage.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Reco);
|
||||
if(OliviaGlob.Reco==null)
|
||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Reco);
|
||||
|
||||
if (OliviaGlob.Reco==null)
|
||||
OliviaGlob.Reco = new Recogida();
|
||||
DockpaneRecogidaViewModel.Reset();
|
||||
DockpaneRecogidaViewModel.Show();
|
||||
}
|
||||
}
|
||||
else if (OliviaGlob.ViewIsProps())
|
||||
{
|
||||
HelperGlobal.ponMsg(Resource1.String_estaenprops, System.Windows.MessageBoxImage.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
HelperGlobal.ponMsg(Resource1.String_existe_ejec, System.Windows.MessageBoxImage.Warning);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace OliviaAddIn
|
|||
//devuelve -1 si no se ha podido crear socket
|
||||
//0 si no se puede conectar
|
||||
//1 si conectado
|
||||
public bool conecta(string ip, int puerto)
|
||||
public bool conecta(string ip, int puerto, string ip_local="")
|
||||
{
|
||||
termina();
|
||||
try
|
||||
|
|
@ -39,7 +39,7 @@ namespace OliviaAddIn
|
|||
return false;
|
||||
try
|
||||
{
|
||||
return str_socket_conecta(sc, ip, puerto) != 0;
|
||||
return str_socket_conecta(sc, ip, puerto, ip_local) != 0;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
@ -116,25 +116,25 @@ namespace OliviaAddIn
|
|||
}
|
||||
}
|
||||
//funciones auxiliares------------------------------
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
unsafe public static extern IntPtr str_socket_crea();
|
||||
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
unsafe public static extern int str_socket_conecta(IntPtr soc, String ip, int puerto);
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
unsafe public static extern int str_socket_conecta(IntPtr soc, String ip, int puerto, String ip_local=null);
|
||||
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
unsafe public static extern int str_socket_envia(IntPtr soc, String txt);
|
||||
unsafe public static extern int str_socket_envia(IntPtr soc, String txt);//solo este
|
||||
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
unsafe public static extern int str_socket_recive(IntPtr soc);
|
||||
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
unsafe public static extern void str_socket_dame_buf(IntPtr soc, StringBuilder buf);
|
||||
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
unsafe public static extern void str_socket_dame_error(IntPtr soc, StringBuilder error);//llamar con 1024 de espacio
|
||||
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||
unsafe public static extern void str_socket_borra(IntPtr soc);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
17
Config.daml
17
Config.daml
|
|
@ -1,11 +1,12 @@
|
|||
<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">
|
||||
<AddInInfo id="{10742570-cf59-42f2-bea2-2a38002a06ee}" version="1.0" desktopVersion="2.8.29751">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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">
|
||||
<AddInInfo id="{10742570-cf59-42f2-bea2-2a38002a06ee}" version="3.2" desktopVersion="3.0.3.36057">
|
||||
<Name>OliviaAddInPro</Name>
|
||||
<Description>AddIn de Optimización de la Limpieza Viaria para ArcGIs Pro</Description>
|
||||
<Image>Images\AddinDesktop32.png</Image>
|
||||
<Author>VSM</Author>
|
||||
<Company>VSM - Narvaling</Company>
|
||||
<Date>08/07/2021 12:28:02, 2021</Date>
|
||||
<Date>18/04/2023 12:00:00, 2023</Date>
|
||||
<Subject>Framework</Subject>
|
||||
<!-- Note subject can be one or more of these topics:
|
||||
Content, Framework, Editing, Geodatabase, Geometry, Geoprocessing, Layouts, Map Authoring, Map Exploration -->
|
||||
|
|
@ -16,7 +17,7 @@
|
|||
<tabs>
|
||||
<tab id="OliviaAddInPro_Tab1" caption="Olivia Pro">
|
||||
<group refID="OliviaAddInPro_Group1" />
|
||||
<group refID="OliviaAddInPro_Group2" />
|
||||
<group refID="OliviaAddInPro_Group2" />
|
||||
</tab>
|
||||
</tabs>
|
||||
<groups>
|
||||
|
|
@ -24,9 +25,9 @@
|
|||
<button refID="OliviaAddInPro_ButtonLimp" size="large" />
|
||||
<button refID="OliviaAddInPro_ButtonRec" size="large" />
|
||||
</group>
|
||||
<group id="OliviaAddInPro_Group1" caption=" " appearsOnAddInTab="false">
|
||||
<button refID="OliviaAddInPro_ButtonConfig" size="large" />
|
||||
</group>
|
||||
<group id="OliviaAddInPro_Group1" caption=" " appearsOnAddInTab="false">
|
||||
<button refID="OliviaAddInPro_ButtonConfig" size="large" />
|
||||
</group>
|
||||
</groups>
|
||||
<controls>
|
||||
<!-- add your controls here -->
|
||||
|
|
@ -38,7 +39,7 @@
|
|||
<tooltip heading="OLIVIA - Recogida de Residuos">
|
||||
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/config2.png">
|
||||
<button id="OliviaAddInPro_ButtonConfig" caption="Configuración" className="ButtonConfig" loadOnClick="true" largeImage="Images/config2_olv.png">
|
||||
<tooltip heading="OLIVIA - Configuración">
|
||||
Add-In de ArcGIS Pro para la herramienta de optimización de la limpieza viaria, OLIVIA<disabledText /></tooltip>
|
||||
</button>
|
||||
|
|
|
|||
1674
Helper/HelperGdb.cs
1674
Helper/HelperGdb.cs
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -9,6 +9,7 @@ using ArcGIS.Desktop.Framework.Dialogs;
|
|||
using System.Windows;
|
||||
using System.IO;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using OliviaAddInPro.Model.contract;
|
||||
|
||||
namespace OliviaAddInPro.Helper
|
||||
{
|
||||
|
|
@ -85,22 +86,25 @@ namespace OliviaAddInPro.Helper
|
|||
|
||||
public class MyCancelableProgressorSource
|
||||
{
|
||||
public CancelableProgressorSource _ProgrSrc;
|
||||
public MyCancelableProgressorSource(ProgressDialog prodlg)
|
||||
public IprocessManager _ProgrSrc;
|
||||
public MyCancelableProgressorSource(IprocessManager prodlg)
|
||||
{
|
||||
_ProgrSrc = new CancelableProgressorSource(prodlg);
|
||||
_ProgrSrc.Max = 100;
|
||||
_ProgrSrc = prodlg;
|
||||
_ProgrSrc.Inicia();
|
||||
}
|
||||
public void Init(string stat)
|
||||
{
|
||||
_ProgrSrc.Value = 0;
|
||||
_ProgrSrc.Status = stat;
|
||||
_ProgrSrc.SetProgress(0);
|
||||
_ProgrSrc.SetProceso(stat);
|
||||
}
|
||||
public void IncMessage(uint inc, string mes)
|
||||
public void IncMessage(uint inc, string mes=null)
|
||||
{
|
||||
if ((_ProgrSrc.Value + inc) < _ProgrSrc.Max)
|
||||
_ProgrSrc.Value += inc;
|
||||
_ProgrSrc.Message = mes;
|
||||
var prog = _ProgrSrc.GetProgress() + inc;
|
||||
if (prog > 100)
|
||||
prog = 100;
|
||||
_ProgrSrc.SetProgress(prog);
|
||||
if(!string.IsNullOrEmpty(mes))
|
||||
_ProgrSrc.SetEstado(mes);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html >
|
||||
<html>
|
||||
<head />
|
||||
<body>
|
||||
<h2>Migration Status Report</h2>
|
||||
<p>Migrate project: D:\desa\v2019\OliviaAddInPro\OliviaAddInPro.csproj</p>
|
||||
<h3>OliviaAddInPro.csproj</h3>
|
||||
<ul>project folder: <a href="D:\desa\v2019\OliviaAddInPro\" target="_new">D:\desa\v2019\OliviaAddInPro\</a></ul>
|
||||
<ul>language: CS</ul>
|
||||
<p style="color:Red;font-weight:bold">Warning: this project [D:\desa\v2019\OliviaAddInPro\] contains References to 'ArcGIS.Core', but the HintPath tag is wrong or missing. Use the 'Pro Fix References utility' before migrating this project.</p>
|
||||
<ul>project type: NonArcGIS</ul>
|
||||
<ul>project has WPF: PresentationFramework</ul>
|
||||
<p style="color:Red;font-weight:bold">Note: project might contain NuGets in packages.config, please check all NuGets for the most up-to-date .NET variant and if needed, replace with a NuGet that supports .NET 6.</p>
|
||||
<p style="color:Red;font-weight:bold">Note: please check all NuGets for the most up-to-date .NET variant and if needed, replace with a NuGet that supports .NET 6.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
Migration Status Report
|
||||
Migrate project: D:\desa\v2019\OliviaAddInPro\OliviaAddInPro.csproj
|
||||
OliviaAddInPro.csproj
|
||||
project folder:
|
||||
D:\desa\v2019\OliviaAddInPro\
|
||||
D:\desa\v2019\OliviaAddInPro\
|
||||
language: CS
|
||||
Warning: this project [D:\desa\v2019\OliviaAddInPro\] contains References to 'ArcGIS.Core', but the HintPath tag is wrong or missing. Use the 'Pro Fix References utility' before migrating this project.
|
||||
project type: NonArcGIS
|
||||
project has WPF: PresentationFramework
|
||||
Note: project might contain NuGets in packages.config, please check all NuGets for the most up-to-date .NET variant and if needed, replace with a NuGet that supports .NET 6.
|
||||
Note: please check all NuGets for the most up-to-date .NET variant and if needed, replace with a NuGet that supports .NET 6.
|
||||
|
|
@ -10,6 +10,8 @@ namespace OliviaAddInPro.Model
|
|||
//*************************************************************************************
|
||||
//Enums y structs generales
|
||||
public static int BuffExport = 1000;
|
||||
//public static int MaxCaracteresBBDD = 10;
|
||||
|
||||
/**
|
||||
* Nombre de los campos de la cartografía de la red navegable que se consultan para la exportación
|
||||
*/
|
||||
|
|
@ -31,11 +33,18 @@ namespace OliviaAddInPro.Model
|
|||
public static string atr_pedes; //<Atributo del campo FOW que indica peatonal
|
||||
};
|
||||
|
||||
public class TareaRes
|
||||
/**
|
||||
* Campos comunes a la capa de entidades
|
||||
*/
|
||||
public struct CamposCom
|
||||
{
|
||||
public bool Errores { get; set; }
|
||||
public object data { get; set; }
|
||||
public string msg { get; set; }
|
||||
public static string camp_oid; //<Campo de la tabla de entidades que indica el objectid
|
||||
public static string consulta_sector; //<Campo de la tabla donde se guarda info de sector
|
||||
public static string consulta_secuen; //<Campo de la tabla donde se guarda info de secuencia
|
||||
public static double giro_max;
|
||||
public static double desv_max;
|
||||
public static double desv_max_abs;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,10 +20,6 @@ namespace OliviaAddInPro.Model
|
|||
{
|
||||
//**********************************************
|
||||
//Se recogen en PaneLimpiezaSub1
|
||||
/**
|
||||
* Tipo de tratamiento elegidos
|
||||
*/
|
||||
//public int TipoTto { get; set; } = -1; //En la clase TratamientoComun
|
||||
/**
|
||||
* Ámbitos de trabajo elegidos
|
||||
*/
|
||||
|
|
@ -40,9 +36,18 @@ namespace OliviaAddInPro.Model
|
|||
* Instancia para las funciones de exportación y demás
|
||||
*/
|
||||
|
||||
public LimpiezaServ Serv { get; set; } = null;
|
||||
public LimpiezaServ Serv
|
||||
{
|
||||
get
|
||||
{
|
||||
return (LimpiezaServ)ServCom;
|
||||
}
|
||||
set
|
||||
{
|
||||
ServCom = value;
|
||||
}
|
||||
}
|
||||
public LanzaLimpSrv LanzaSrv { get; set; } = null;
|
||||
public ProcesoEjecServ ProceSrv { get; set; } = null;
|
||||
|
||||
/**
|
||||
* Ancho de vía, en metros
|
||||
|
|
@ -52,44 +57,123 @@ namespace OliviaAddInPro.Model
|
|||
{
|
||||
Serv = new LimpiezaServ(this);
|
||||
LanzaSrv = new LanzaLimpSrv();
|
||||
ProceSrv = new ProcesoEjecServ();
|
||||
ProgrSrc = new MyCancelableProgressorSource(OliviaGlob.progrDialog);
|
||||
}
|
||||
|
||||
public TareaRes Ejecuta(ModosEjec modo)
|
||||
public override Respuesta<TiposEjecucion> Ejecuta(ModosEjec modo)
|
||||
{
|
||||
TareaRes res = null;
|
||||
/////////////////////////////
|
||||
|
||||
Respuesta<bool> res = new Respuesta<bool> { Value=false};
|
||||
Respuesta<TiposEjecucion> res2 = new Respuesta<TiposEjecucion> (){ Value = TiposEjecucion.FinEjecNOk };
|
||||
res = Serv.Ejecuta(modo);
|
||||
if (!res.Errores)
|
||||
if (res.Value)
|
||||
{
|
||||
var res1=LanzaSrv.ejec(this, modo, TipoTtoStr);
|
||||
if (!res1.HasError)
|
||||
res=LanzaSrv.ejec(this, modo, TipoTtoStr);
|
||||
if (res.Value)
|
||||
{
|
||||
var conf = ConfigServ.Serv.Leer();
|
||||
ProceSrv.Puerto = conf.Puerto;
|
||||
ProceSrv.Ip = conf.Ip;
|
||||
|
||||
res1 = ProceSrv.start(LanzaSrv.str_cfg, ProgrSrc._ProgrSrc);
|
||||
}
|
||||
|
||||
if (res1.HasError)
|
||||
{
|
||||
res.Errores = true;
|
||||
res.msg = "";
|
||||
res1.Error.ForEach(e=> res.msg+=e+".\n ");
|
||||
ProceSrv.ConfigConex();
|
||||
res2 = ProceSrv.start(LanzaSrv.str_cfg, ProgrSrc._ProgrSrc);
|
||||
if(!LanzaSrv.EsperaProcess(GeneralDef.NombOlvTasks))
|
||||
res2.Error.Add("No se ha podido cerrar oliviaTask.");
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
public async void EjecutaAsync(ModosEjec modo, Action<TareaRes> ffin)
|
||||
{
|
||||
await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
|
||||
if (res.HasError)
|
||||
{
|
||||
var res = Ejecuta(modo);
|
||||
ffin(res);
|
||||
return res;
|
||||
});
|
||||
res2.Error.AddRange(res.Error);
|
||||
}
|
||||
return res2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Descodifica el nombre del sahpefile de entrada identificando el tipo de tratamiento y los ámbitos de trabajo
|
||||
*/
|
||||
public override void decode_gdb(string shapefile, out string tratamiento, out string ambitos)
|
||||
{
|
||||
int aux, auxl, mbito, indice, tratamient;
|
||||
string auxili, ambi, auxi;
|
||||
|
||||
indice = shapefile.IndexOf("_");
|
||||
indice = indice + 2;//para saltarse la T que va antes del identificador del tipo de tratamiento
|
||||
auxili = shapefile.Substring(indice, 2);
|
||||
tratamient = Convert.ToInt32(auxili);
|
||||
tratamiento = LimpiezaDef.tto_gdb[tratamient];
|
||||
indice = shapefile.IndexOf("_", indice);
|
||||
indice = indice + 2;//para saltarse la A que va antes del identificador de los ámbitos que intervienen
|
||||
aux = shapefile.IndexOf("_", indice);
|
||||
auxl = aux - indice;
|
||||
auxi = "";
|
||||
while (auxl > 0)
|
||||
{
|
||||
ambi = shapefile.Substring(indice, 2);
|
||||
mbito = Convert.ToInt32(ambi);
|
||||
indice = indice + 2;
|
||||
auxl = auxl - 2;
|
||||
if (auxl != 0)
|
||||
auxi = auxi + LimpiezaDef.ambs_gdb[mbito] + "_";
|
||||
else
|
||||
auxi = auxi + LimpiezaDef.ambs_gdb[mbito];
|
||||
}
|
||||
ambitos = LimpiezaDef.preftto_gdb[tratamient] + "_" + auxi;
|
||||
|
||||
//quita los espacios
|
||||
tratamiento = tratamiento.Replace(" ", "_");
|
||||
ambitos = ambitos.Replace(" ", "_");
|
||||
|
||||
auxi = shapefile;
|
||||
//para poner la zona cuando es seleccionada
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
indice = auxi.LastIndexOf("_");
|
||||
auxi = auxi.Substring(0, indice);
|
||||
}
|
||||
auxl = indice - aux;
|
||||
if (auxl > 0)
|
||||
{
|
||||
auxili = shapefile.Substring(aux, auxl);
|
||||
ambitos = ambitos + auxili;
|
||||
|
||||
aux = indice; //para coger el timestamp
|
||||
}
|
||||
|
||||
//concatena el timestamp
|
||||
ambitos = ambitos + shapefile.Substring(aux);
|
||||
|
||||
}
|
||||
/**
|
||||
* Devuelve los campos característicos de la capa
|
||||
*/
|
||||
public override string[] GetCampos(string capa=null)
|
||||
{
|
||||
string[] camps=null;
|
||||
var capa_ = !string.IsNullOrEmpty(capa) ? capa : CapaElems;
|
||||
if (string.IsNullOrEmpty(capa_))
|
||||
{
|
||||
ErrStr = "Error al comprobar campos en la capa.";
|
||||
return camps;
|
||||
}
|
||||
GeometryType tipo = HelperGdb.GetGeomType(capa_);
|
||||
if (tipo == GeometryType.Polyline)
|
||||
{
|
||||
int NCAMPS = 5;
|
||||
camps = new string[NCAMPS];
|
||||
camps[0] = LimpiezaDef.Campos.consulta_entidad;
|
||||
camps[1] = LimpiezaDef.Campos.consulta_mecan;
|
||||
camps[2] = LimpiezaDef.Campos.consulta_observ;
|
||||
camps[3] = LimpiezaDef.Campos.consulta_anch_tip;
|
||||
camps[4] = LimpiezaDef.Campos.consulta_tipolo;
|
||||
}
|
||||
else if (tipo == GeometryType.Point)//es mobiliario, con el tipo vale
|
||||
{
|
||||
int NCAMPS = 1;
|
||||
camps = new string[NCAMPS];
|
||||
camps[0] = LimpiezaDef.Campos.consulta_entidad;
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrStr = "Error al comprobar campos en la capa.";
|
||||
}
|
||||
|
||||
return camps;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@ namespace OliviaAddInPro.Model
|
|||
public static string consulta_observ; //<Campo a consultar de la capa de limpieza, observaciones
|
||||
public static string consulta_anch_tip; //<Campo a consultar de la capa de limpieza, ancho tipo
|
||||
public static string consulta_tipolo; //<Campo a consultar de la capa de limpieza, tipología
|
||||
public static string consulta_sector; //<Campo a consultar de la capa planificada, sector
|
||||
public static string consulta_secuen; //<Campo a consultar de la capa planificada, planificacion
|
||||
};
|
||||
/**
|
||||
* Nombre de los atributos (de las capas) sobre los que se realizarán consultas para la limpieza
|
||||
|
|
@ -93,6 +91,8 @@ namespace OliviaAddInPro.Model
|
|||
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 reduc_traf; //<Porcent de reducción por tráfico
|
||||
public static bool igno_ais;
|
||||
public static int ancho_viaM; //<Ancho de vía máximo admitido
|
||||
public static int ancho_viam; //<Ancho de vía mínimo admitido
|
||||
public static int ancho_via; //<Ancho de vía establecido
|
||||
|
|
@ -136,14 +136,11 @@ namespace OliviaAddInPro.Model
|
|||
};
|
||||
public struct OtrosParam
|
||||
{
|
||||
public static double giro_max;
|
||||
public static double anch_peat;
|
||||
public static double anch_ace;
|
||||
public static double anch_aplin;
|
||||
public static double anch_apbat;
|
||||
public static double anch_bordlib;
|
||||
public static double desv_max;
|
||||
public static double desv_max_abs;
|
||||
};
|
||||
//*************************************************************************************
|
||||
//Enums globales limpieza
|
||||
|
|
|
|||
1889
Model/OliviaConf.cs
1889
Model/OliviaConf.cs
File diff suppressed because it is too large
Load Diff
|
|
@ -51,8 +51,8 @@ namespace OliviaAddInPro.Model
|
|||
public const int ProgrMax = 100;
|
||||
public const int ProgrStep = 5;
|
||||
public const int ParamN = 5;
|
||||
public const int ParamLimpN = 37;
|
||||
public const int ParamRecoN = 40;
|
||||
public const int ParamLimpN = 52;
|
||||
public const int ParamRecoN = 50;
|
||||
/*
|
||||
* Define el separador entre parámetros de la llamada al proceso oliviatasks
|
||||
*/
|
||||
|
|
@ -60,7 +60,6 @@ namespace OliviaAddInPro.Model
|
|||
public const string EjecGeoProgName = "olivia";
|
||||
public const string EjecGeoParamIgual = ":";
|
||||
public const string NombOlvTasks = "OliviaTasks";
|
||||
public const string NombColSector = "SECTOR";
|
||||
/**
|
||||
* Define el nombre del grupo de propiedades generales
|
||||
*/
|
||||
|
|
@ -522,14 +521,24 @@ namespace OliviaAddInPro.Model
|
|||
/**
|
||||
* Nombre de los campos que lee en limpieza
|
||||
*/
|
||||
public const string GTO_girmax ="Giro_max_vehiculo";
|
||||
public const string GTO_anch_peat ="Ancho_peat_def";
|
||||
public const string GTO_anch_ace = "Ancho_acera_def";
|
||||
public const string GTO_anch_aplin = "Ancho_ap_lin_def";
|
||||
public const string GTO_anch_apbat = "Ancho_ap_bat_def";
|
||||
public const string GTO_anch_bordlib = "Ancho_bord_lib_def";
|
||||
public const string GTO_desv_max = "Desv_max";
|
||||
//común
|
||||
public const string GTO_girmax = "Giro_max_vehiculo";
|
||||
public const string GTO_desv_max = "Desv_max_rel";
|
||||
public const string GTO_desv_max_abs = "Desv_max_abs";
|
||||
public const string GTO_camp_objectid = "Camp_objectid";
|
||||
public const string GTO_camp_sector = "Camp_sector";
|
||||
public const string GTO_camp_secuencia = "Camp_secuencia";
|
||||
//mima
|
||||
public const string GTO_mima_xmin = "Coor_mima_xmin";
|
||||
public const string GTO_mima_xmax = "Coor_mima_xmax";
|
||||
public const string GTO_mima_ymin = "Coor_mima_ymin";
|
||||
public const string GTO_mima_ymax = "Coor_mima_ymax";
|
||||
|
||||
/**
|
||||
* Define el nombre para mandar a oliviatasks la configuración
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -9,6 +9,11 @@ using ArcGIS.Core.Geometry;
|
|||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using OliviaAddInPro.Helper;
|
||||
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace OliviaAddInPro.Model
|
||||
{
|
||||
[Flags]
|
||||
|
|
@ -30,6 +35,7 @@ namespace OliviaAddInPro.Model
|
|||
//ya al menos una primera vez
|
||||
//se pone este estado cuando ha terminado ya la primera vez
|
||||
}
|
||||
|
||||
static class OliviaGlob
|
||||
{
|
||||
/**
|
||||
|
|
@ -40,16 +46,22 @@ namespace OliviaAddInPro.Model
|
|||
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 PathManualOlivia; //<Path del Manual de Olivia
|
||||
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
|
||||
|
||||
//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 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
|
||||
|
||||
//paths import
|
||||
public static string PathGdbImport; //<Path de la gdb en la que se guardan los resultados
|
||||
public static string PathDatasetImport; //<Path del dataset en la que se guardan los resultados
|
||||
public static string PathGuardCsv; //<Path para guardar CSV de la planificación
|
||||
};
|
||||
public struct Conexion
|
||||
{
|
||||
|
|
@ -66,7 +78,7 @@ namespace OliviaAddInPro.Model
|
|||
*/
|
||||
public static int TiempoOutSocket;
|
||||
};
|
||||
/**
|
||||
/**
|
||||
* Nombre de las capas que se van a necesitar para la exportación de datos
|
||||
*/
|
||||
public struct Capas
|
||||
|
|
@ -85,6 +97,10 @@ namespace OliviaAddInPro.Model
|
|||
get { return tipoEjec; }
|
||||
set { tipoEjec = value; }
|
||||
}
|
||||
|
||||
public static TiposEjecucion TipoView
|
||||
{ get; set; }
|
||||
|
||||
public static Limpieza Limp
|
||||
{
|
||||
get { return limp; }
|
||||
|
|
@ -95,18 +111,30 @@ namespace OliviaAddInPro.Model
|
|||
get { return reco; }
|
||||
set { reco = value; }
|
||||
}
|
||||
public static EjecServ Serv { get; } = new EjecServ();
|
||||
public static SpatialReference SpatRef { get; set; } = null;
|
||||
public static ProgressDialog progrDialog { get; set; } = null;
|
||||
public static MarchandoUnaDe progrDialog { get; set; } = null;
|
||||
#endregion Properties
|
||||
|
||||
public static void Inicia()
|
||||
{
|
||||
tipoEjec = TiposEjecucion.Ninguno;
|
||||
TipoView= TiposEjecucion.Ninguno;
|
||||
|
||||
Respuesta<bool> resp = coge_ip();
|
||||
if (!resp.Value && resp.HasError)
|
||||
{
|
||||
HelperGlobal.ponMsg(resp.Error.First());
|
||||
}
|
||||
resp = comprueba_dlls();
|
||||
if (!resp.Value && resp.HasError)
|
||||
{
|
||||
HelperGlobal.ponMsg(resp.Error.First());
|
||||
}
|
||||
|
||||
IniDefault();
|
||||
LimpiezaDef.iniciaLimpDef();
|
||||
RecogidaDef.iniciaRecoDef();
|
||||
progrDialog = new ProgressDialog("Procesando", Resource1.String_cancel_progreso, 100, false);
|
||||
progrDialog = new MarchandoUnaDe();
|
||||
limp = new Limpieza();
|
||||
reco = new Recogida();
|
||||
SpatRef = ArcGIS.Core.Geometry.SpatialReferenceBuilder.CreateSpatialReference(GeneralDef.SpatRefDef);
|
||||
|
|
@ -147,6 +175,39 @@ namespace OliviaAddInPro.Model
|
|||
//quita el flag al tipo de ejecución
|
||||
OliviaGlob.TipoEjec = OliviaGlob.TipoEjec & ~flag;
|
||||
}
|
||||
|
||||
|
||||
public static bool ViewIsLimp()
|
||||
{
|
||||
return ViewIsHasFlagTipEjec(TiposEjecucion.Limp);
|
||||
}
|
||||
public static bool ViewIsReco()
|
||||
{
|
||||
return ViewIsHasFlagTipEjec(TiposEjecucion.Reco);
|
||||
}
|
||||
public static bool ViewIsProps()
|
||||
{
|
||||
return ViewIsHasFlagTipEjec(TiposEjecucion.Props);
|
||||
}
|
||||
public static bool ViewIsHasFlagTipEjec(TiposEjecucion flag)
|
||||
{
|
||||
return (OliviaGlob.TipoView & flag) == flag;
|
||||
}
|
||||
public static void ViewSetFlagTipEjec(TiposEjecucion flag)
|
||||
{
|
||||
//pone el tipo de ejecución igual al flag
|
||||
OliviaGlob.TipoView = flag;
|
||||
}
|
||||
public static void ViewAddFlagTipEjec(TiposEjecucion flag)
|
||||
{
|
||||
//añade el flag al tipo de ejecución
|
||||
OliviaGlob.TipoView = OliviaGlob.TipoEjec | flag;
|
||||
}
|
||||
public static void ViewRemoveFlagTipEjec(TiposEjecucion flag)
|
||||
{
|
||||
//quita el flag al tipo de ejecución
|
||||
OliviaGlob.TipoView = OliviaGlob.TipoEjec & ~flag;
|
||||
}
|
||||
/**
|
||||
* Habilita Sh=true
|
||||
* o Deshabilita sh=false
|
||||
|
|
@ -159,10 +220,13 @@ namespace OliviaAddInPro.Model
|
|||
if (sh)
|
||||
{
|
||||
DockpaneLimpiezaViewModel.Show();
|
||||
//SetFlagTipEjec(TiposEjecucion.Limp);
|
||||
ViewSetFlagTipEjec(TiposEjecucion.Limp);
|
||||
}
|
||||
else
|
||||
{
|
||||
DockpaneLimpiezaViewModel.Hide_();
|
||||
|
||||
}
|
||||
}
|
||||
else if (OliviaGlob.IsReco())
|
||||
|
|
@ -170,37 +234,196 @@ namespace OliviaAddInPro.Model
|
|||
if (sh)
|
||||
{
|
||||
DockpaneRecogidaViewModel.Show();
|
||||
//SetFlagTipEjec(TiposEjecucion.Reco);
|
||||
ViewSetFlagTipEjec(TiposEjecucion.Reco);
|
||||
}
|
||||
else
|
||||
{
|
||||
DockpaneRecogidaViewModel.Hide_();
|
||||
}
|
||||
}
|
||||
else if(OliviaGlob.IsProps())
|
||||
else if (OliviaGlob.IsProps())
|
||||
{
|
||||
if (sh)
|
||||
{
|
||||
DockpaneConfigViewModel.Show();
|
||||
SetFlagTipEjec(TiposEjecucion.Props);
|
||||
ViewSetFlagTipEjec(TiposEjecucion.Props);
|
||||
}
|
||||
else
|
||||
{
|
||||
DockpaneConfigViewModel.Hide_();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//SetFlagTipEjec(TiposEjecucion.Ninguno);
|
||||
ViewSetFlagTipEjec(TiposEjecucion.Ninguno);
|
||||
}
|
||||
if (!sh)
|
||||
ViewSetFlagTipEjec(TiposEjecucion.Ninguno);
|
||||
}
|
||||
|
||||
/**
|
||||
* Comprueba que está configurada la red navegable e incluye los campos necesarios
|
||||
*/
|
||||
public static bool CompruebaNwYCampos()
|
||||
{
|
||||
ArcGIS.Core.Data.FeatureClass ft = HelperGdb.GetFtClass(OliviaGlob.Paths.PathGdbNw);
|
||||
if (ft == null)
|
||||
return false;
|
||||
HelperGdb.Free(ft);
|
||||
int NCAMPS = 4;
|
||||
string[] camps;
|
||||
camps = new string[NCAMPS];
|
||||
camps[0] = ComunDef.CamposNW.cons_onew;
|
||||
camps[1] = ComunDef.CamposNW.cons_kph;
|
||||
camps[2] = ComunDef.CamposNW.cons_name;
|
||||
camps[3] = ComunDef.CamposNW.cons_fow;
|
||||
return HelperGdb.CheckFileds(OliviaGlob.Paths.PathGdbNw, camps) == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Comprueba que no es null y existe
|
||||
*/
|
||||
public static bool CompruebaExistePath(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
return false;
|
||||
if(Directory.Exists(path))
|
||||
return true;
|
||||
//no existe directorio, mira el anterior
|
||||
if (!Directory.Exists(Path.GetPathRoot(path)))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Devuelve una lista de las ips locales
|
||||
*/
|
||||
public static string[] dame_local_ips()
|
||||
{
|
||||
IPHostEntry host;
|
||||
List<string> host_str = new List<string>();
|
||||
|
||||
if (!System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
host = Dns.GetHostEntry(Dns.GetHostName());
|
||||
foreach (var ip in host.AddressList)
|
||||
{
|
||||
if (ip.AddressFamily == AddressFamily.InterNetwork)
|
||||
{
|
||||
host_str.Add(ip.ToString());
|
||||
}
|
||||
}
|
||||
return host_str.ToArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Coge la ip local para la comunicación con OliviaTask
|
||||
*/
|
||||
static Respuesta<bool> coge_ip()
|
||||
{
|
||||
Respuesta<bool> resp = new Respuesta<bool>();
|
||||
try
|
||||
{
|
||||
string[] ips = OliviaGlob.dame_local_ips();
|
||||
/*if (ips != null && ips.Length > 0)
|
||||
Conexion.Ip = ips[0];
|
||||
else
|
||||
Conexion.Ip = "127.0.0.1";*/
|
||||
Conexion.Ip = "127.0.0.1";
|
||||
resp.Value = true;
|
||||
return resp;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
resp.Error.Add("Error al leer IP local");
|
||||
resp.Value = false;
|
||||
return resp;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* La primera vez copia las dlls necesarias en el directorio del arcmap
|
||||
*/
|
||||
static Respuesta<bool> comprueba_dlls()
|
||||
{
|
||||
Respuesta<bool> resp = new Respuesta<bool>();
|
||||
string path_dll_dest = null, dll = null;
|
||||
try
|
||||
{
|
||||
//comprueba utiles.dll
|
||||
dll = "utiles.dll";
|
||||
|
||||
//path_dll_dest = Path.Combine(System.IO.Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName), dll);
|
||||
//path_dll_dest = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, dll);
|
||||
//path_dll_dest = Path.Combine(System.Reflection.Assembly.GetExecutingAssembly().Location, dll);
|
||||
//path_dll_dest = Path.Combine(System.Windows.Application.Current.StartupUri.AbsoluteUri, dll);
|
||||
//path_dll_dest=System.Reflection.Assembly.GetEntryAssembly().CodeBase;
|
||||
//path_dll_dest = System.Reflection.AssemblyName.GetAssemblyName();
|
||||
path_dll_dest = Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location), dll);
|
||||
if (!File.Exists(path_dll_dest))
|
||||
{
|
||||
resp.Error.Add("No se encuentran las librerías necesarias, compruebe la instalación");
|
||||
resp.Value = false;
|
||||
return resp;
|
||||
}
|
||||
resp.Value = true;
|
||||
return resp;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
resp.Error.Add("Error al comprobar las dll");
|
||||
resp.Value = false;
|
||||
return resp;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Abre el pdf del manual de ayuda
|
||||
*/
|
||||
public static void OpenManual()
|
||||
{
|
||||
string[] archivos = null;
|
||||
|
||||
try
|
||||
{
|
||||
if (!File.Exists(OliviaGlob.Paths.PathManualOlivia))
|
||||
HelperGlobal.ponMsg("No se encuentra el archivo " + OliviaGlob.Paths.PathManualOlivia);
|
||||
else
|
||||
{
|
||||
Process.Start(new ProcessStartInfo(OliviaGlob.Paths.PathManualOlivia) { UseShellExecute = true });
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
HelperGlobal.ponMsg("Error al abrir el manual de ayuda " + OliviaGlob.Paths.PathManualOlivia + " "+ex.Message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Inicializa los nombres por defecto de las variables, para debug por si no hay instalador
|
||||
*/
|
||||
public static void IniDefault()
|
||||
{
|
||||
var c = ConfigServ.Serv.Leer();
|
||||
Paths.PathCfg = c.path_cfg_aux;
|
||||
Paths.PathWork = c.path_work;
|
||||
Paths.PathExeOlivia = c.path_exe;
|
||||
Paths.PathManualOlivia = c.path_manual;
|
||||
Paths.DirData = c.path_data;
|
||||
Paths.PathTemp = c.path_temp;
|
||||
c.PathCartela = c.PathCartela;
|
||||
|
||||
Paths.PathGdbImport = c.Path_Gdb_Import;
|
||||
Paths.PathDatasetImport = c.Path_Dataset_Import;
|
||||
Paths.PathGuardCsv = c.Path_Guarda_Csv;
|
||||
|
||||
HelperGlobal.create_folder(Paths.DirData);
|
||||
HelperGlobal.create_folder(Paths.PathTemp);
|
||||
|
||||
|
|
@ -209,7 +432,7 @@ namespace OliviaAddInPro.Model
|
|||
Paths.PathSimbVSM = c.PathSimbVSM;
|
||||
Paths.PathSimbESRI = c.PathSimbESRI;
|
||||
Conexion.Puerto = c.Puerto;
|
||||
Conexion.Ip = c.Ip;
|
||||
//Conexion.Ip = c.Ip; //la lee en el momento
|
||||
Conexion.TiempoOutSocket = c.TiempoOutSocket;
|
||||
|
||||
///////////////////////////////////////
|
||||
|
|
@ -224,8 +447,6 @@ namespace OliviaAddInPro.Model
|
|||
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;
|
||||
|
|
@ -270,6 +491,8 @@ namespace OliviaAddInPro.Model
|
|||
LimpiezaDef.Parametros.t_descansom = c.t_descanso_min;
|
||||
LimpiezaDef.Parametros.t_descanso = c.t_descanso;
|
||||
LimpiezaDef.Parametros.h_inicio = c.hora_inicio;
|
||||
LimpiezaDef.Parametros.reduc_traf = c.reduc_traf;
|
||||
LimpiezaDef.Parametros.igno_ais = c.Igno_ais;
|
||||
LimpiezaDef.Parametros.ancho_viaM = c.ancho_via_max;
|
||||
LimpiezaDef.Parametros.ancho_viam = c.ancho_via_min;
|
||||
LimpiezaDef.Parametros.ancho_via = c.ancho_via;
|
||||
|
|
@ -311,15 +534,11 @@ namespace OliviaAddInPro.Model
|
|||
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
|
||||
|
||||
|
|
@ -357,13 +576,13 @@ namespace OliviaAddInPro.Model
|
|||
RecogidaDef.Parametros.t_descM = c.t_descarga_max;
|
||||
RecogidaDef.Parametros.t_descm = c.t_descarga_min;
|
||||
RecogidaDef.Parametros.t_desc = c.t_descarga;
|
||||
RecogidaDef.Parametros.t_convM = c.R_t_convenio_max;
|
||||
RecogidaDef.Parametros.t_convm = c.R_t_convenio_min;
|
||||
RecogidaDef.Parametros.t_conv = c.R_t_convenio;
|
||||
RecogidaDef.Parametros.t_descansoM = c.R_t_descanso_max;
|
||||
RecogidaDef.Parametros.t_descansom = c.R_t_descanso_min;
|
||||
RecogidaDef.Parametros.t_descanso = c.R_t_descanso;
|
||||
RecogidaDef.Parametros.h_inicio = c.R_hora_inicio;
|
||||
RecogidaDef.Parametros.t_convM = c.t_convenio_max;
|
||||
RecogidaDef.Parametros.t_convm = c.t_convenio_min;
|
||||
RecogidaDef.Parametros.t_conv = c.t_convenio;
|
||||
RecogidaDef.Parametros.t_descansoM = c.t_descanso_max;
|
||||
RecogidaDef.Parametros.t_descansom = c.t_descanso_min;
|
||||
RecogidaDef.Parametros.t_descanso = c.t_descanso;
|
||||
RecogidaDef.Parametros.h_inicio = c.hora_inicio;
|
||||
RecogidaDef.Parametros.dens_vehi_org = c.dens_vehi_org;
|
||||
RecogidaDef.Parametros.dens_vehi_res = c.dens_vehi_res;
|
||||
RecogidaDef.Parametros.dens_vehi_env = c.dens_vehi_env;
|
||||
|
|
@ -411,6 +630,13 @@ namespace OliviaAddInPro.Model
|
|||
ComunDef.AtributosNW.atr_N = c.atr_N;
|
||||
ComunDef.AtributosNW.atr_pedes = c.atr_pedes;
|
||||
|
||||
ComunDef.CamposCom.camp_oid = c.id;
|
||||
ComunDef.CamposCom.consulta_sector = c.consulta_sector;
|
||||
ComunDef.CamposCom.consulta_secuen = c.consulta_secuen;
|
||||
ComunDef.CamposCom.giro_max = c.Giro_max_vehiculo;
|
||||
ComunDef.CamposCom.desv_max = c.Desv_max;
|
||||
ComunDef.CamposCom.desv_max_abs = c.Desv_max_abs;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ using OliviaAddInPro.Services;
|
|||
using ArcGIS.Core.Geometry;
|
||||
using static OliviaAddInPro.Model.ComunDef;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using OliviaAddInPro.Services.LanzaSrv;
|
||||
|
||||
namespace OliviaAddInPro.Model
|
||||
{
|
||||
|
|
@ -68,31 +69,130 @@ namespace OliviaAddInPro.Model
|
|||
get;
|
||||
set;
|
||||
}
|
||||
public RecogidaServ Serv { get; set; } = null;
|
||||
public RecogidaServ Serv
|
||||
{
|
||||
get
|
||||
{
|
||||
return (RecogidaServ)ServCom;
|
||||
}
|
||||
set
|
||||
{
|
||||
ServCom = value;
|
||||
}
|
||||
}
|
||||
public LanzaRecoSrv LanzaSrv { get; set; } = null;
|
||||
public Recogida()
|
||||
{
|
||||
Serv = new RecogidaServ(this);
|
||||
ProgrSrc = new MyCancelableProgressorSource(OliviaGlob.progrDialog);
|
||||
LanzaSrv = new LanzaRecoSrv();
|
||||
}
|
||||
|
||||
|
||||
public TareaRes Ejecuta(ModosEjec modo)
|
||||
public override Respuesta<TiposEjecucion> Ejecuta(ModosEjec modo)
|
||||
{
|
||||
TareaRes res = null;
|
||||
Respuesta<bool> res = new Respuesta<bool> { Value = false };
|
||||
Respuesta<TiposEjecucion> res2 = new Respuesta<TiposEjecucion>() { Value = TiposEjecucion.FinEjecNOk };
|
||||
res = Serv.Ejecuta(modo);
|
||||
return res;
|
||||
|
||||
}
|
||||
public async void EjecutaAsync(ModosEjec modo, Action<TareaRes> ffin)
|
||||
{
|
||||
await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
|
||||
if (res.Value)
|
||||
{
|
||||
var res = Ejecuta(modo);
|
||||
ffin(res);
|
||||
return res;
|
||||
res = LanzaSrv.ejec(this, modo, TipoTtoStr);
|
||||
if (res.Value)
|
||||
{
|
||||
ProceSrv.ConfigConex();
|
||||
res2 = ProceSrv.start(LanzaSrv.str_cfg, ProgrSrc._ProgrSrc);
|
||||
if (!LanzaSrv.EsperaProcess(GeneralDef.NombOlvTasks))
|
||||
res2.Error.Add("No se ha podido cerrar oliviaTask.");
|
||||
}
|
||||
}
|
||||
if (res.HasError)
|
||||
{
|
||||
res2.Error.AddRange(res.Error);
|
||||
}
|
||||
return res2;
|
||||
}
|
||||
|
||||
});
|
||||
/**
|
||||
* Descodifica el nombre del sahpefile de entrada identificando el tipo de fracción y la carga para la recogida de residuos
|
||||
*/
|
||||
public override void decode_gdb(string shapefile, out string fraccion, out string carga)
|
||||
{
|
||||
int aux, auxl, carg, indice, fracc;
|
||||
string auxili, fra, auxi;
|
||||
|
||||
indice = shapefile.IndexOf("_");
|
||||
indice = indice + 2;//para saltarse la F que va antes del identificador del tipo de fracción
|
||||
auxili = shapefile.Substring(indice, 2);
|
||||
fracc = Convert.ToInt32(auxili);
|
||||
fraccion = RecogidaDef.tipos_fracc_str[fracc];
|
||||
indice = shapefile.IndexOf("_", indice);
|
||||
indice = indice + 2;//para saltarse la C que va antes del identificador de los tipos de carga de los vehículos
|
||||
aux = shapefile.IndexOf("_", indice);
|
||||
|
||||
auxi = "";
|
||||
|
||||
fra = shapefile.Substring(indice, 2);
|
||||
carg = Convert.ToInt32(fra);
|
||||
|
||||
carga = RecogidaDef.tipos_fracc_str[fracc] + "_" + RecogidaDef.tipos_carg_str[carg];
|
||||
|
||||
//quita los espacios
|
||||
fraccion = fraccion.Replace(" ", "_");
|
||||
carga = carga.Replace(" ", "_");
|
||||
////////////////////////
|
||||
|
||||
auxi = shapefile;
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
indice = auxi.LastIndexOf("_");
|
||||
auxi = auxi.Substring(0, indice);
|
||||
}
|
||||
auxl = indice - aux;
|
||||
if (auxl > 0)
|
||||
{
|
||||
auxili = shapefile.Substring(aux, auxl);
|
||||
carga = carga + auxili;
|
||||
|
||||
aux = indice; //para coger el timestamp
|
||||
}
|
||||
|
||||
//concatena el timestamp
|
||||
carga = carga + shapefile.Substring(aux);
|
||||
}
|
||||
|
||||
/**
|
||||
* Devuelve los campos característicos de la capa
|
||||
*/
|
||||
public override string[] GetCampos(string capa=null)
|
||||
{
|
||||
string[] camps = {
|
||||
//RecogidaDef.campos_def.cons_id,
|
||||
RecogidaDef.campos_def.cons_nomrec,
|
||||
RecogidaDef.campos_def.cons_lateral ,
|
||||
RecogidaDef.campos_def.cons_fracc,
|
||||
RecogidaDef.campos_def.cons_capac,
|
||||
RecogidaDef.campos_def.cons_uds,
|
||||
RecogidaDef.campos_def.cons_kgrec };
|
||||
return camps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rellena el array de filtros en base a la config
|
||||
*/
|
||||
public void RellenaFiltrosReco()
|
||||
{
|
||||
//se rellena el array de filtros
|
||||
RecogidaDef.filtro_str = new string[RecogidaDef.tipos_fracc_str.Length + RecogidaDef.tipos_carg_str.Length];
|
||||
for (int i = 0; i < RecogidaDef.tipos_fracc_str.Length; i++)
|
||||
{
|
||||
//se comprueba que tipo de fracción se ha seleccionado. Si se ha seleccionado una fracción sin nombre (el campo en la capa es NULL, y en el comboBox de fracciiones aparece como "-") hay que modificar el filtro
|
||||
if (RecogidaDef.tipos_fracc_str[i] == "-")
|
||||
RecogidaDef.filtro_str[i] = RecogidaDef.campos_def.cons_fracc + " IS NULL";
|
||||
else
|
||||
RecogidaDef.filtro_str[i] = RecogidaDef.campos_def.cons_fracc + "= '" + RecogidaDef.tipos_fracc_str[i] + "'";
|
||||
}
|
||||
for (int i = RecogidaDef.tipos_fracc_str.Length; i < RecogidaDef.filtro_str.Length; i++)
|
||||
{
|
||||
RecogidaDef.filtro_str[i] = RecogidaDef.campos_def.cons_nomrec + "= '" + RecogidaDef.tipos_carg_str[i - RecogidaDef.tipos_fracc_str.Length] + "'";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,105 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using OliviaAddInPro.Helper;
|
||||
using OliviaAddInPro.Services;
|
||||
using ArcGIS.Core.Geometry;
|
||||
using static OliviaAddInPro.Model.ComunDef;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using OliviaAddInPro.Services.LanzaSrv;
|
||||
|
||||
namespace OliviaAddInPro.Model
|
||||
{
|
||||
class Recogida : TratamientoComun
|
||||
{
|
||||
//**********************************************
|
||||
//Se recogen en PaneRecogidaSub1
|
||||
/**
|
||||
* Tipo de fracción
|
||||
*/
|
||||
public int TipoFrac { get; set; } = -1;
|
||||
/**
|
||||
* Tipo de fracción
|
||||
*/
|
||||
public string TipoFracStr { get; set; } = string.Empty;
|
||||
/**
|
||||
* Tipo de carga
|
||||
*/
|
||||
public int TipoCarg { get; set; } = -1;
|
||||
/**
|
||||
* Tipo de carga
|
||||
*/
|
||||
public string TipoCargStr { get; set; } = string.Empty;
|
||||
/**
|
||||
* Tipo de Vehículo
|
||||
*/
|
||||
public int TipoVehic { get; set; } = -1;
|
||||
/**
|
||||
* Tipo de Lateralidad
|
||||
*/
|
||||
public int TipoLate { get; set; } = -1;
|
||||
/**
|
||||
* kg capac camión
|
||||
*/
|
||||
public int KgMaxVehic { get; set; } = 0;
|
||||
/**
|
||||
* dens contenedor
|
||||
*/
|
||||
public int DensCont { get; set; } = 0;
|
||||
/**
|
||||
* Tiempo de vaciado del contenedor, en seg
|
||||
*/
|
||||
public int TVaciCont { get; set; } = 0;
|
||||
/**
|
||||
* kg de carga en cada contenedor
|
||||
*/
|
||||
public int KgCont { get; set; } = 0;
|
||||
/**
|
||||
* grados en º de giro del vehículo
|
||||
*/
|
||||
public int GiroVehic { get; set; } = 0;
|
||||
|
||||
/*
|
||||
*
|
||||
* */
|
||||
public double AnchoVehiculo
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public RecogidaServ Serv { get; set; } = null;
|
||||
public LanzaRecoSrv LanzaSrv { get; set; } = null;
|
||||
public Recogida()
|
||||
{
|
||||
Serv = new RecogidaServ(this);
|
||||
<<<<<<< HEAD
|
||||
LanzaSrv = new LanzaRecoSrv();
|
||||
=======
|
||||
ProgrSrc = new MyCancelableProgressorSource(OliviaGlob.progrDialog.GetViewModel());
|
||||
>>>>>>> Gerardo/MarchandoUnaDe
|
||||
}
|
||||
|
||||
public override Respuesta<TiposEjecucion> Ejecuta(ModosEjec modo)
|
||||
{
|
||||
Respuesta<bool> res = new Respuesta<bool> { Value = false };
|
||||
Respuesta<TiposEjecucion> res2 = new Respuesta<TiposEjecucion>() { Value = TiposEjecucion.FinEjecNOk };
|
||||
res = Serv.Ejecuta(modo);
|
||||
if (res.Value)
|
||||
{
|
||||
res = LanzaSrv.ejec(this, modo, TipoTtoStr);
|
||||
if (res.Value)
|
||||
{
|
||||
ProceSrv.ConfigConex();
|
||||
res2 = ProceSrv.start(LanzaSrv.str_cfg, ProgrSrc._ProgrSrc);
|
||||
}
|
||||
}
|
||||
if (res.HasError)
|
||||
{
|
||||
res2.Error.AddRange(res.Error);
|
||||
}
|
||||
return res2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6,6 +6,12 @@ using System.Threading.Tasks;
|
|||
using ArcGIS.Core.Geometry;
|
||||
using ArcGIS.Desktop.Internal.Layouts.Utilities;
|
||||
using OliviaAddInPro.Helper;
|
||||
using OliviaAddInPro.Model.contract;
|
||||
using OliviaAddInPro.Services;
|
||||
using static OliviaAddInPro.Model.ComunDef;
|
||||
using ArcGIS.Core.CIM;
|
||||
using ArcGIS.Core.Data;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace OliviaAddInPro.Model
|
||||
{
|
||||
|
|
@ -23,6 +29,10 @@ namespace OliviaAddInPro.Model
|
|||
* Capa de ámbitos
|
||||
*/
|
||||
public string CapaElems { get; set; } = string.Empty;
|
||||
/**
|
||||
* Capa de ámbitos después de haber planificado
|
||||
*/
|
||||
public string CapaPlanif { get; set; } = string.Empty;
|
||||
/**
|
||||
* Nombre dle shp exportado de datos
|
||||
*/
|
||||
|
|
@ -93,7 +103,7 @@ namespace OliviaAddInPro.Model
|
|||
/**
|
||||
* Porcentaje de tráfico que se estima, ya que si no los vehículos irían siempre a la velocida máxima permitida por la vía
|
||||
*/
|
||||
public int Trafico { get; set; } = 80;
|
||||
public int Trafico { get; set; } = LimpiezaDef.Parametros.reduc_traf;
|
||||
/**
|
||||
* Número de puntos de control
|
||||
*/
|
||||
|
|
@ -105,7 +115,11 @@ namespace OliviaAddInPro.Model
|
|||
/**
|
||||
* Ignorar o noelementos aislados
|
||||
*/
|
||||
public bool IgnoAis { get; set; } = true;
|
||||
public bool IgnoAis { get; set; } = LimpiezaDef.Parametros.igno_ais;
|
||||
/**
|
||||
* Coordenadas Min y Max de la red navegable
|
||||
*/
|
||||
public Envelope MimaNw { get; set; } = null;
|
||||
/**
|
||||
* Almacena la consulta para exportar los ámbitos
|
||||
*/
|
||||
|
|
@ -116,20 +130,200 @@ namespace OliviaAddInPro.Model
|
|||
private string err_str = string.Empty;
|
||||
public string ErrStr
|
||||
{
|
||||
get {
|
||||
get
|
||||
{
|
||||
/*string val = string.Empty;
|
||||
val.CopyFrom(err_str);
|
||||
err_str = string.Empty;
|
||||
return val; */
|
||||
return err_str;
|
||||
}
|
||||
set { err_str = value;}
|
||||
set { err_str = value; }
|
||||
}
|
||||
|
||||
private ObservableCollection<string> nombCamposOrig = new ObservableCollection<string>();
|
||||
private IReadOnlyList<ArcGIS.Core.Data.Field> camposOrig = null;
|
||||
/**
|
||||
* Para la ventana de progreso
|
||||
*/
|
||||
public MyCancelableProgressorSource ProgrSrc;
|
||||
public MyCancelableProgressorSource ProgrSrc { get; set; } = null;
|
||||
public ProcesoEjecServ ProceSrv { get; set; } = null;
|
||||
public FinProcServ FinProceSrv { get; set; } = null;
|
||||
public EjecServ ServCom { get; set; } = null;
|
||||
|
||||
public TratamientoComun()
|
||||
{
|
||||
ProgrSrc = new MyCancelableProgressorSource(OliviaGlob.progrDialog.GetViewModel());
|
||||
ProceSrv = new ProcesoEjecServ();
|
||||
FinProceSrv = new FinProcServ();
|
||||
}
|
||||
|
||||
public void ComienzaEjec(OliviaAddInPro.Services.ModosEjec modo)
|
||||
{
|
||||
//muestra progreso
|
||||
OliviaGlob.progrDialog.Show();
|
||||
//oculta la ventana
|
||||
OliviaGlob.ShowHidePane(false);
|
||||
//comienza ejecución
|
||||
Action<Respuesta<TiposEjecucion>, TratamientoComun> ac = FinProceSrv.finEjecuta;
|
||||
//pone los flags
|
||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.Config);
|
||||
if (modo == ModosEjec.Sectoriza)
|
||||
OliviaGlob.AddFlagTipEjec(TiposEjecucion.EjecSecto);
|
||||
else if (modo == ModosEjec.Planifica || modo == ModosEjec.SoloPlanifica)
|
||||
OliviaGlob.AddFlagTipEjec(TiposEjecucion.EjecPlanif);
|
||||
//llama ejecuta
|
||||
EjecutaAsync(modo, ac);
|
||||
}
|
||||
public async void EjecutaAsync(ModosEjec modo, Action<Respuesta<TiposEjecucion>, TratamientoComun> ffin)
|
||||
{
|
||||
await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
|
||||
{
|
||||
var res = Ejecuta(modo);
|
||||
ffin(res, this);
|
||||
return res;
|
||||
});
|
||||
|
||||
}
|
||||
public virtual Respuesta<TiposEjecucion> Ejecuta(ModosEjec modo)
|
||||
{
|
||||
Respuesta<TiposEjecucion> res = new Respuesta<TiposEjecucion>() { Value = TiposEjecucion.FinEjecNOk };
|
||||
res.Error.Add("No implementado");
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Descodifica el nombre del sahpefile de entrada identificando el tipo de tratamiento y los ámbitos de trabajo
|
||||
*/
|
||||
public virtual void decode_gdb(string shapefile, out string tratamiento, out string ambitos)
|
||||
{
|
||||
tratamiento = string.Empty;
|
||||
ambitos = string.Empty;
|
||||
}
|
||||
/**
|
||||
* Devuelve los campos característicos de Limpieza o Recogida
|
||||
*/
|
||||
public virtual string[] GetCampos(string capa=null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Restaura el nombre original del campo si se ha truncado a 10 car al exportar a shp
|
||||
*/
|
||||
public virtual string[] GetCamposOrig()
|
||||
{
|
||||
string[] camps = null;
|
||||
|
||||
if (nombCamposOrig.Count > 0)
|
||||
{
|
||||
camps = new string[nombCamposOrig.Count];
|
||||
for (int i=0;i<nombCamposOrig.Count;i++)
|
||||
{
|
||||
camps[i] = nombCamposOrig[i];
|
||||
}
|
||||
}
|
||||
|
||||
return camps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restaura el nombre original del campo si se ha truncado a 10 car al exportar a shp
|
||||
*/
|
||||
public Respuesta<bool> RestauraNomCampos(string nombFtClass)
|
||||
{
|
||||
int LENGTHCAMPSHP = 10;
|
||||
Respuesta<bool> resp = new Respuesta<bool> { Value = false };
|
||||
FeatureClass fc = HelperGdb.GetFtClassSync(nombFtClass);
|
||||
if (fc == null)
|
||||
return resp;
|
||||
////////////////////////////////////////////////////////
|
||||
if (camposOrig == null || camposOrig.Count==0)
|
||||
{
|
||||
HelperGdb.Free(fc);
|
||||
return resp;
|
||||
}
|
||||
|
||||
ObservableCollection<string> fields = HelperGdb.GetFieldsSync(fc);
|
||||
HelperGdb.Free(fc);
|
||||
if (fields == null)
|
||||
{
|
||||
HelperGdb.Free(fc);
|
||||
return resp;
|
||||
}
|
||||
try
|
||||
{
|
||||
int i = 0;
|
||||
int indx;
|
||||
string campTrunc = string.Empty;
|
||||
for (i = 0; i < camposOrig.Count; i++)
|
||||
{
|
||||
if (camposOrig[i].Name.Length <= LENGTHCAMPSHP)
|
||||
continue;
|
||||
if (EstaRepeNomb(fields, camposOrig[i].Name))
|
||||
continue;
|
||||
campTrunc = camposOrig[i].Name.Substring(0, LENGTHCAMPSHP);
|
||||
//si tiene más de 10 caracteres, lo ha truncado al exportar
|
||||
//busca el nombre actual del campo en la fc
|
||||
indx = fields.IndexOf(campTrunc);
|
||||
if (indx < 0)
|
||||
break;
|
||||
if (!HelperGdb.RenameFieldSync(nombFtClass, campTrunc, camposOrig[i].Name, camposOrig[i].AliasName))
|
||||
break;
|
||||
}
|
||||
if (i < camposOrig.Count)
|
||||
{
|
||||
resp.Error.Add("Error en el campo " + camposOrig[i].Name);
|
||||
}
|
||||
else
|
||||
resp.Value = true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
HelperGdb.Free(fc);
|
||||
return resp;
|
||||
}
|
||||
|
||||
private bool EstaRepeNomb(ObservableCollection<string> fields, string nomb)
|
||||
{
|
||||
foreach( string fnomb in fields)
|
||||
{
|
||||
if (string.Compare(fnomb, nomb, true)==0)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Guarda el nombre de los campos originales para luego restaurarlos
|
||||
*/
|
||||
public void GuardaNombCamposOrig(string pathFtClass)
|
||||
{
|
||||
FeatureClass fc = HelperGdb.GetFtClassSync(pathFtClass);
|
||||
if (fc != null)
|
||||
{
|
||||
nombCamposOrig = HelperGdb.GetFieldsSync(fc);
|
||||
}
|
||||
else
|
||||
nombCamposOrig = new ObservableCollection<string>();
|
||||
HelperGdb.Free(fc);
|
||||
}
|
||||
/**
|
||||
* Guarda el nombre de los campos originales para luego restaurarlos
|
||||
*/
|
||||
public void GuardaCamposOrig(string pathFtClass)
|
||||
{
|
||||
FeatureClass fc = HelperGdb.GetFtClassSync(pathFtClass);
|
||||
if (fc != null)
|
||||
{
|
||||
camposOrig = HelperGdb.GetFieldsSyncEx(fc);
|
||||
}
|
||||
else
|
||||
camposOrig = null;
|
||||
HelperGdb.Free(fc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OliviaAddInPro.Model.contract
|
||||
{
|
||||
public interface IprocessManager
|
||||
{
|
||||
void SetProceso(string proceso);
|
||||
void SetEstado(string estado);//estado del proceso
|
||||
void SetTextBtn(string textbtn);
|
||||
void SetProgress(double progresPorcent);
|
||||
double GetProgress();
|
||||
bool Getcancelled();
|
||||
void Setcancelled();
|
||||
void Inicia();
|
||||
void PonBarColorVerde();
|
||||
void PonBarColorRojo();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,379 +1,153 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{10742570-CF59-42F2-BEA2-2A38002A06EE}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>OliviaAddInPro</RootNamespace>
|
||||
<AssemblyName>OliviaAddInPro</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ArcGISFolder>$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISPro', 'InstallDir', null, RegistryView.Registry64))</ArcGISFolder>
|
||||
<ArcGISFolder Condition="'$(ArcGISFolder)' == ''">$(registry:HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro@InstallDir)</ArcGISFolder>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<StartAction>Program</StartAction>
|
||||
<StartProgram>$(ArcGISFolder)\bin\ArcGISPro.exe</StartProgram>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<StartAction>Program</StartAction>
|
||||
<StartProgram>$(ArcGISFolder)\bin\ArcGISPro.exe</StartProgram>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<NoWarn>CA1416</NoWarn>
|
||||
<UseWPF>true</UseWPF>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="ArcGIS.Desktop.Framework">
|
||||
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Framework.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Core">
|
||||
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Core.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Core">
|
||||
<HintPath>$(ArcGISFolder)\bin\Extensions\Core\ArcGIS.Desktop.Core.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Mapping">
|
||||
<HintPath>$(ArcGISFolder)\bin\Extensions\Mapping\ArcGIS.Desktop.Mapping.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Catalog">
|
||||
<HintPath>$(ArcGISFolder)\bin\Extensions\Catalog\ArcGIS.Desktop.Catalog.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Editing">
|
||||
<HintPath>$(ArcGISFolder)\bin\Extensions\Editing\ArcGIS.Desktop.Editing.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Extensions">
|
||||
<HintPath>$(ArcGISFolder)\bin\Extensions\DesktopExtensions\ArcGIS.Desktop.Extensions.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.GeoProcessing">
|
||||
<HintPath>$(ArcGISFolder)\bin\Extensions\GeoProcessing\ArcGIS.Desktop.GeoProcessing.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Layouts">
|
||||
<HintPath>$(ArcGISFolder)\bin\Extensions\Layout\ArcGIS.Desktop.Layouts.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Shared.Wpf">
|
||||
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Shared.Wpf.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Ribbon.Wpf">
|
||||
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Ribbon.Wpf.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.DataGrid.Contrib.Wpf">
|
||||
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.DataGrid.Contrib.Wpf.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Resources">
|
||||
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Resources.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Resources">
|
||||
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Resources.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ESRI.ArcGIS.ItemIndex">
|
||||
<HintPath>$(ArcGISFolder)\bin\ESRI.ArcGIS.ItemIndex.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xceed.Wpf.Toolkit">
|
||||
<HintPath>..\wpftoolkit-master\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit\bin\Release\Xceed.Wpf.Toolkit.dll</HintPath>
|
||||
</Reference>
|
||||
<Compile Remove=".git\**" />
|
||||
<EmbeddedResource Remove=".git\**" />
|
||||
<None Remove=".git\**" />
|
||||
<Page Remove=".git\**" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="Config.daml" />
|
||||
<AddInContent Include="Images\AddInDesktop16.png" />
|
||||
<AddInContent Include="Images\AddInDesktop32.png" />
|
||||
<AddInContent Include="DarkImages\AddInDesktop16.png" />
|
||||
<AddInContent Include="DarkImages\AddInDesktop32.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Button\ButtonConfig.cs" />
|
||||
<Compile Include="Button\ButtonLimp.cs" />
|
||||
<Compile Include="Button\ButtonMaq.cs" />
|
||||
<Compile Include="Button\ButtonRec.cs" />
|
||||
<Compile Include="Conexion\Cstr_socket.cs" />
|
||||
<Compile Include="Helper\EnabledComboBoxItem.cs" />
|
||||
<Compile Include="Helper\CheckedListItem.cs" />
|
||||
<Compile Include="Helper\HelperGdb.cs" />
|
||||
<Compile Include="Helper\HelperGlobal.cs" />
|
||||
<Compile Include="Model\ComunDef.cs" />
|
||||
<Compile Include="Model\ESRI.ArcGIS.Geometry.esriSRProjCS4Type.cs" />
|
||||
<Compile Include="Model\Recogida.cs" />
|
||||
<Compile Include="Model\RecogidaDef.cs" />
|
||||
<Compile Include="Model\Respuesta.cs" />
|
||||
<Compile Include="Model\TratamientoComun.cs" />
|
||||
<Compile Include="Model\Limpieza.cs" />
|
||||
<Compile Include="Model\LimpiezaDef.cs" />
|
||||
<Compile Include="Services\EjecServ.cs" />
|
||||
<Compile Include="Model\OliviaConf.cs" />
|
||||
<Compile Include="Model\OliviaDef.cs" />
|
||||
<Compile Include="Services\ConfigServ.cs" />
|
||||
<Compile Include="Services\ImportaResServ.cs" />
|
||||
<Compile Include="Services\LanzaSrv\LanzaLimpSrv.cs" />
|
||||
<Compile Include="Services\LanzaSrv\LanzaOlvServ.cs" />
|
||||
<Compile Include="Services\LanzaSrv\LanzaRecoSrv.cs" />
|
||||
<Compile Include="Services\LimpiezaServ.cs" />
|
||||
<Compile Include="Services\ProcesoEjecServ.cs" />
|
||||
<Compile Include="Services\RecogidaServ.cs" />
|
||||
<Compile Include="ViewModel\Configuracion\DockpaneConfigViewModel.cs" />
|
||||
<Compile Include="ViewModel\Configuracion\PaneConfigViewModel.cs" />
|
||||
<Compile Include="ViewModel\OptionsMenuItem.cs" />
|
||||
<Compile Include="ViewModel\PaneEjecutarViewModel.cs" />
|
||||
<Compile Include="ViewModel\Limpieza\PaneLimpiezaSub4ViewModel.cs" />
|
||||
<Compile Include="ViewModel\Limpieza\PaneLimpiezaSub3ViewModel.cs" />
|
||||
<Compile Include="ViewModel\Limpieza\PaneLimpiezaSub2ViewModel.cs" />
|
||||
<Compile Include="ViewModel\Limpieza\PaneLimpiezaViewModel.cs" />
|
||||
<Compile Include="ViewModel\PanelViewModelBase.cs" />
|
||||
<Compile Include="ViewModel\Recogida\PaneRecogidaSub1ViewModel.cs" />
|
||||
<Compile Include="View\Configuracion\PropertyGridFilePickerLine.xaml.cs">
|
||||
<DependentUpon>PropertyGridFilePickerLine.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Configuracion\PropertyGridFilePickerGDB.xaml.cs">
|
||||
<DependentUpon>PropertyGridFilePickerGDB.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<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">
|
||||
<DependentUpon>DockPaneConfig.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Configuracion\PaneConfigView.xaml.cs">
|
||||
<DependentUpon>PaneConfigView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\PaneEjecutar.xaml.cs">
|
||||
<DependentUpon>PaneEjecutar.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Limpieza\PaneLimpiezaSub4.xaml.cs">
|
||||
<DependentUpon>PaneLimpiezaSub4.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Limpieza\PaneLimpiezaSub3.xaml.cs">
|
||||
<DependentUpon>PaneLimpiezaSub3.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Limpieza\PaneLimpiezaSub2.xaml.cs">
|
||||
<DependentUpon>PaneLimpiezaSub2.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Limpieza\PaneLimpiezaSub1.xaml.cs">
|
||||
<DependentUpon>PaneLimpiezaSub1.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewModel\Limpieza\PaneLimpiezaSub1ViewModel.cs" />
|
||||
<Compile Include="View\Limpieza\PaneLimpieza.xaml.cs">
|
||||
<DependentUpon>PaneLimpieza.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Limpieza\DockpaneLimpieza.xaml.cs">
|
||||
<DependentUpon>DockpaneLimpieza.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewModel\Limpieza\DockpaneLimpiezaViewModel.cs" />
|
||||
<Compile Include="View\Recogida\DockpaneRecogida.xaml.cs">
|
||||
<DependentUpon>DockpaneRecogida.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewModel\Recogida\DockpaneRecogidaViewModel.cs" />
|
||||
<Compile Include="Module1.cs" />
|
||||
<Compile Include="Model\OliviaGlob.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resource1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resource1.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\ProWndSelectFields.xaml.cs">
|
||||
<DependentUpon>ProWndSelectFields.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewModel\ShowProWndSelectFields.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="DarkImages\GenericButtonBlue16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="DarkImages\GenericButtonBlue32.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="Images\OliviaIconPro16.png" />
|
||||
<AddInContent Include="Images\OliviaIconPro32.png" />
|
||||
<Content Include="Config.daml" />
|
||||
<Content Include="Images\AddInDesktop16.png" />
|
||||
<Content Include="Images\AddInDesktop32.png" />
|
||||
<Content Include="DarkImages\AddInDesktop16.png" />
|
||||
<Content Include="DarkImages\AddInDesktop32.png" />
|
||||
<Content Include="DarkImages\GenericButtonBlue16.png" />
|
||||
<Content Include="DarkImages\GenericButtonBlue32.png" />
|
||||
<Content Include="Images\OliviaIconPro16.png" />
|
||||
<Content Include="Images\OliviaIconPro32.png" />
|
||||
<Content Include="DarkImages\GenericButtonPurple16.png" />
|
||||
<Content Include="DarkImages\GenericButtonPurple32.png" />
|
||||
<Content Include="DarkImages\GenericButtonGreen16.png" />
|
||||
<Content Include="DarkImages\GenericButtonGreen32.png" />
|
||||
<Content Include="Images\reco2.png" />
|
||||
<Content Include="Images\carrito2.png" />
|
||||
<Content Include="Images\config2_olv.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="OliviaIconPro.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\Configuracion\PropertyGridFilePickerLine.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Configuracion\PropertyGridFilePickerGDB.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<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">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Configuracion\PaneConfigView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\PaneEjecutar.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Limpieza\PaneLimpiezaSub4.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Limpieza\PaneLimpiezaSub3.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Limpieza\PaneLimpiezaSub2.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Limpieza\PaneLimpiezaSub1.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Limpieza\PaneLimpieza.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Limpieza\DockpaneLimpieza.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Recogida\DockpaneRecogida.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\ProWndSelectFields.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="DarkImages\GenericButtonPurple16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="DarkImages\GenericButtonPurple32.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resource1.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resource1.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="Images\config.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="DarkImages\GenericButtonGreen16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="DarkImages\GenericButtonGreen32.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="View\OliviaIconPro16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="View\OliviaIconPro.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</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" />
|
||||
<Resource Include="Images\help16Pro.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="Images\config2.png" />
|
||||
<AddInContent Include="Images\reco2.png" />
|
||||
<PackageReference Include="DotNetProjects.Extended.Wpf.Toolkit" Version="5.0.103" />
|
||||
<PackageReference Include="Microsoft.WindowsAPICodePack.Shell" Version="1.1.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<Reference Include="ArcGIS.Desktop.Framework">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Framework.dll</HintPath>
|
||||
<CopyLocal>false</CopyLocal>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Core">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Core.dll</HintPath>
|
||||
<CopyLocal>false</CopyLocal>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Core">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\Core\ArcGIS.Desktop.Core.dll</HintPath>
|
||||
<CopyLocal>false</CopyLocal>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Layouts">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\Layout\ArcGIS.Desktop.Layouts.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Mapping">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\Mapping\ArcGIS.Desktop.Mapping.dll</HintPath>
|
||||
<CopyLocal>false</CopyLocal>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Catalog">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\Catalog\ArcGIS.Desktop.Catalog.dll</HintPath>
|
||||
<CopyLocal>false</CopyLocal>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Shared.Wpf">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Shared.Wpf.dll</HintPath>
|
||||
<CopyLocal>false</CopyLocal>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Editing">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\Editing\ArcGIS.Desktop.Editing.dll</HintPath>
|
||||
<CopyLocal>false</CopyLocal>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Extensions">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\DesktopExtensions\ArcGIS.Desktop.Extensions.dll</HintPath>
|
||||
<CopyLocal>false</CopyLocal>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="Images\carrito2.png" />
|
||||
<None Include="packages.config" />
|
||||
<None Include=".gitignore" />
|
||||
<None Include="Backup-2.x.zip" />
|
||||
<None Include="OliviaAddInPro.csproj.bak" />
|
||||
<None Include="OliviaAddInPro.csproj.user" />
|
||||
<None Include="OliviaIconPro.ico" />
|
||||
<None Include="Images\config2_.png" />
|
||||
<None Include="Images\config2_olv - copia.png" />
|
||||
<None Include="Images\config_old.png" />
|
||||
<None Include="Images\genericproperties32.png" />
|
||||
<None Include="Images\help16Pro.png" />
|
||||
<None Include="Images\masking32.png" />
|
||||
<None Include="Images\OliviaIconPro.ico" />
|
||||
<None Include="Images\OliviaIconPro32Web.png" />
|
||||
<None Include="Images\open32.png" />
|
||||
<None Include="Images\openfolder.png" />
|
||||
<None Include="Images\openfolder32.png" />
|
||||
<None Include="Images\time32.png" />
|
||||
<None Include="Model\OliviaGlob.cs.bak" />
|
||||
<None Include="Model\Recogida.cs.bak" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\.signature.p7s" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\LICENSE.md" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\Newtonsoft.Json.13.0.1.nupkg" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\packageIcon.png" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\net20\Newtonsoft.Json.dll" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\net20\Newtonsoft.Json.xml" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\net35\Newtonsoft.Json.dll" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\net35\Newtonsoft.Json.xml" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\net40\Newtonsoft.Json.dll" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\net40\Newtonsoft.Json.xml" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.xml" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\netstandard1.0\Newtonsoft.Json.dll" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\netstandard1.0\Newtonsoft.Json.xml" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\netstandard1.3\Newtonsoft.Json.dll" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\netstandard1.3\Newtonsoft.Json.xml" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\netstandard2.0\Newtonsoft.Json.dll" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\netstandard2.0\Newtonsoft.Json.xml" />
|
||||
<None Include="Resources\inicio.png" />
|
||||
<None Include="Resources\inicio24.png" />
|
||||
<None Include="Resources\ptosctrl.png" />
|
||||
<None Include="Resources\ptosctrl24.png" />
|
||||
<None Include="Resources\time.png" />
|
||||
<None Include="Resources\time24.png" />
|
||||
<None Include="Resources\zonas.png" />
|
||||
<None Include="Resources\zonas24.png" />
|
||||
<None Include="Services\ProcesoEjecServ.cs.bak" />
|
||||
<None Include="View\OliviaIconPro.ico" />
|
||||
<None Include="View\OliviaIconPro16.png" />
|
||||
<None Include="View\Recogida\old\PaneRecogidaSub2.xaml.NotUsed" />
|
||||
<None Include="View\Recogida\old\PaneRecogidaSub2.xaml.cs.NotUsed" />
|
||||
<None Include="View\Recogida\old\PaneRecogidaSub4.xaml.NotUsed" />
|
||||
<None Include="View\Recogida\old\PaneRecogidaSub4.xaml.cs.NotUsed" />
|
||||
<None Include="ViewModel\Limpieza\PaneLimpiezaViewModel.cs.bak" />
|
||||
<None Include="ViewModel\Recogida\old\PaneRecogidaSub2ViewModel.cs.NotUsed" />
|
||||
<None Include="ViewModel\Recogida\old\PaneRecogidaSub4ViewModel.cs.NotUsed" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!--
|
||||
PackageAction can be:
|
||||
BuildDefault: ArcGIS Pro is required. An esriAddinX package is created and copied to ArcGIS Pro add-in folder.
|
||||
BuildZipPostProcess: ArcGIS Pro install is NOT required to build the add-in. An esriAddinX package is created in your output folder.
|
||||
BuildNoPostProcess: ArcGIS Pro install is NOT required to build the add-in. An esriAddinX package is NOT created.
|
||||
-->
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PackageAction>BuildDefault</PackageAction>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PackageAction>BuildDefault</PackageAction>
|
||||
</PropertyGroup>
|
||||
<UsingTask AssemblyFile="$(ArcGISFolder)\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.PackageAddIn" />
|
||||
<UsingTask AssemblyFile="$(ArcGISFolder)\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.CleanAddIn" />
|
||||
<UsingTask AssemblyFile="$(ArcGISFolder)\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.ConvertToRelativePath" />
|
||||
<!--<Import Project="Esri.ArcGISPro.Extensions.targets" Condition="Exists('Esri.ArcGISPro.Extensions.targets')" />-->
|
||||
<Import Project="$(ArcGISFolder)\bin\Esri.ProApp.SDK.Desktop.targets" Condition="Exists('$(ArcGISFolder)\bin\Esri.ProApp.SDK.Desktop.targets') AND !Exists('Esri.ArcGISPro.Extensions.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<!--<Target Name="BeforeBuild">
|
||||
<Error Text="C:\Users\Elena\AppData\Local\Programs\ArcGIS\Pro\bin\Esri.ProApp.SDK.Desktop.targets not found." Condition="!Exists('C:\Users\Elena\AppData\Local\Programs\ArcGIS\Pro\bin\Esri.ProApp.SDK.Desktop.targets') AND !Exists('Esri.ArcGISPro.Extensions.targets')" />
|
||||
</Target>-->
|
||||
<ItemGroup>
|
||||
<Compile Update="Resource1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resource1.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="C:\Program Files\ArcGIS\Pro\bin\Esri.ProApp.SDK.Desktop.targets" Condition="Exists('C:\Program Files\ArcGIS\Pro\bin\Esri.ProApp.SDK.Desktop.targets') AND !Exists('Esri.ArcGISPro.Extensions.targets')" />
|
||||
</Project>
|
||||
|
|
@ -1,344 +1,156 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{10742570-CF59-42F2-BEA2-2A38002A06EE}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>OliviaAddInPro</RootNamespace>
|
||||
<AssemblyName>OliviaAddInPro</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ArcGISFolder>$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISPro', 'InstallDir', null, RegistryView.Registry64))</ArcGISFolder>
|
||||
<ArcGISFolder Condition="'$(ArcGISFolder)' == ''">$(registry:HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro@InstallDir)</ArcGISFolder>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<StartAction>Program</StartAction>
|
||||
<StartProgram>$(ArcGISFolder)\bin\ArcGISPro.exe</StartProgram>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<StartAction>Program</StartAction>
|
||||
<StartProgram>$(ArcGISFolder)\bin\ArcGISPro.exe</StartProgram>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<NoWarn>CA1416</NoWarn>
|
||||
<UseWPF>true</UseWPF>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="ArcGIS.Desktop.Framework">
|
||||
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Framework.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Core">
|
||||
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Core.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Core">
|
||||
<HintPath>$(ArcGISFolder)\bin\Extensions\Core\ArcGIS.Desktop.Core.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Mapping">
|
||||
<HintPath>$(ArcGISFolder)\bin\Extensions\Mapping\ArcGIS.Desktop.Mapping.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Catalog">
|
||||
<HintPath>$(ArcGISFolder)\bin\Extensions\Catalog\ArcGIS.Desktop.Catalog.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Editing">
|
||||
<HintPath>$(ArcGISFolder)\bin\Extensions\Editing\ArcGIS.Desktop.Editing.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Extensions">
|
||||
<HintPath>$(ArcGISFolder)\bin\Extensions\DesktopExtensions\ArcGIS.Desktop.Extensions.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.GeoProcessing">
|
||||
<HintPath>$(ArcGISFolder)\bin\Extensions\GeoProcessing\ArcGIS.Desktop.GeoProcessing.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Layouts">
|
||||
<HintPath>$(ArcGISFolder)\bin\Extensions\Layout\ArcGIS.Desktop.Layouts.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Shared.Wpf">
|
||||
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Shared.Wpf.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Ribbon.Wpf">
|
||||
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Ribbon.Wpf.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.DataGrid.Contrib.Wpf">
|
||||
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.DataGrid.Contrib.Wpf.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Resources">
|
||||
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Resources.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Resources">
|
||||
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Resources.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ESRI.ArcGIS.ItemIndex">
|
||||
<HintPath>$(ArcGISFolder)\bin\ESRI.ArcGIS.ItemIndex.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xceed.Wpf.Toolkit">
|
||||
<HintPath>..\wpftoolkit-master\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit\bin\Release\Xceed.Wpf.Toolkit.dll</HintPath>
|
||||
</Reference>
|
||||
<Compile Remove=".git\**" />
|
||||
<EmbeddedResource Remove=".git\**" />
|
||||
<None Remove=".git\**" />
|
||||
<Page Remove=".git\**" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="Config.daml" />
|
||||
<AddInContent Include="Images\AddInDesktop16.png" />
|
||||
<AddInContent Include="Images\AddInDesktop32.png" />
|
||||
<AddInContent Include="DarkImages\AddInDesktop16.png" />
|
||||
<AddInContent Include="DarkImages\AddInDesktop32.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Button\ButtonConfig.cs" />
|
||||
<Compile Include="Button\ButtonLimp.cs" />
|
||||
<Compile Include="Button\ButtonMaq.cs" />
|
||||
<Compile Include="Button\ButtonRec.cs" />
|
||||
<Compile Include="Conexion\Cstr_socket.cs" />
|
||||
<Compile Include="Helper\EnabledComboBoxItem.cs" />
|
||||
<Compile Include="Helper\CheckedListItem.cs" />
|
||||
<Compile Include="Helper\HelperGdb.cs" />
|
||||
<Compile Include="Helper\HelperGlobal.cs" />
|
||||
<Compile Include="Model\ComunDef.cs" />
|
||||
<Compile Include="Model\ESRI.ArcGIS.Geometry.esriSRProjCS4Type.cs" />
|
||||
<Compile Include="Model\Recogida.cs" />
|
||||
<Compile Include="Model\RecogidaDef.cs" />
|
||||
<Compile Include="Model\Respuesta.cs" />
|
||||
<Compile Include="Model\TratamientoComun.cs" />
|
||||
<Compile Include="Model\Limpieza.cs" />
|
||||
<Compile Include="Model\LimpiezaDef.cs" />
|
||||
<Compile Include="Services\EjecServ.cs" />
|
||||
<Compile Include="Model\OliviaConf.cs" />
|
||||
<Compile Include="Model\OliviaDef.cs" />
|
||||
<Compile Include="Services\ConfigServ.cs" />
|
||||
<<<<<<< HEAD
|
||||
<Compile Include="Services\LanzaSrv\LanzaLimpSrv.cs" />
|
||||
<Compile Include="Services\LanzaSrv\LanzaOlvServ.cs" />
|
||||
<Compile Include="Services\LanzaSrv\LanzaRecoSrv.cs" />
|
||||
=======
|
||||
<Compile Include="Services\ImportaResServ.cs" />
|
||||
>>>>>>> Elena/reco
|
||||
<Compile Include="Services\LimpiezaServ.cs" />
|
||||
<Compile Include="Services\RecogidaServ.cs" />
|
||||
<Compile Include="ViewModel\Configuracion\DockpaneConfigViewModel.cs" />
|
||||
<Compile Include="ViewModel\Configuracion\PaneConfigViewModel.cs" />
|
||||
<Compile Include="ViewModel\OptionsMenuItem.cs" />
|
||||
<Compile Include="ViewModel\PaneEjecutarViewModel.cs" />
|
||||
<Compile Include="ViewModel\Limpieza\PaneLimpiezaSub4ViewModel.cs" />
|
||||
<Compile Include="ViewModel\Limpieza\PaneLimpiezaSub3ViewModel.cs" />
|
||||
<Compile Include="ViewModel\Limpieza\PaneLimpiezaSub2ViewModel.cs" />
|
||||
<Compile Include="ViewModel\Limpieza\PaneLimpiezaViewModel.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">
|
||||
<DependentUpon>DockPaneConfig.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Configuracion\PaneConfigView.xaml.cs">
|
||||
<DependentUpon>PaneConfigView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\PaneEjecutar.xaml.cs">
|
||||
<DependentUpon>PaneEjecutar.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Limpieza\PaneLimpiezaSub4.xaml.cs">
|
||||
<DependentUpon>PaneLimpiezaSub4.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Limpieza\PaneLimpiezaSub3.xaml.cs">
|
||||
<DependentUpon>PaneLimpiezaSub3.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Limpieza\PaneLimpiezaSub2.xaml.cs">
|
||||
<DependentUpon>PaneLimpiezaSub2.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Limpieza\PaneLimpiezaSub1.xaml.cs">
|
||||
<DependentUpon>PaneLimpiezaSub1.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewModel\Limpieza\PaneLimpiezaSub1ViewModel.cs" />
|
||||
<Compile Include="View\Limpieza\PaneLimpieza.xaml.cs">
|
||||
<DependentUpon>PaneLimpieza.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Limpieza\DockpaneLimpieza.xaml.cs">
|
||||
<DependentUpon>DockpaneLimpieza.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewModel\Limpieza\DockpaneLimpiezaViewModel.cs" />
|
||||
<Compile Include="View\Recogida\DockpaneRecogida.xaml.cs">
|
||||
<DependentUpon>DockpaneRecogida.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewModel\Recogida\DockpaneRecogidaViewModel.cs" />
|
||||
<Compile Include="Module1.cs" />
|
||||
<Compile Include="Model\OliviaGlob.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resource1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resource1.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\ProWndSelectFields.xaml.cs">
|
||||
<DependentUpon>ProWndSelectFields.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewModel\ShowProWndSelectFields.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="DarkImages\GenericButtonBlue16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="DarkImages\GenericButtonBlue32.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="Images\OliviaIconPro16.png" />
|
||||
<AddInContent Include="Images\OliviaIconPro32.png" />
|
||||
<Content Include="Config.daml" />
|
||||
<Content Include="Images\AddInDesktop16.png" />
|
||||
<Content Include="Images\AddInDesktop32.png" />
|
||||
<Content Include="DarkImages\AddInDesktop16.png" />
|
||||
<Content Include="DarkImages\AddInDesktop32.png" />
|
||||
<Content Include="DarkImages\GenericButtonBlue16.png" />
|
||||
<Content Include="DarkImages\GenericButtonBlue32.png" />
|
||||
<Content Include="Images\OliviaIconPro16.png" />
|
||||
<Content Include="Images\OliviaIconPro32.png" />
|
||||
<Content Include="DarkImages\GenericButtonPurple16.png" />
|
||||
<Content Include="DarkImages\GenericButtonPurple32.png" />
|
||||
<Content Include="DarkImages\GenericButtonGreen16.png" />
|
||||
<Content Include="DarkImages\GenericButtonGreen32.png" />
|
||||
<Content Include="Images\reco2.png" />
|
||||
<Content Include="Images\carrito2.png" />
|
||||
<Content Include="Images\config2_olv.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="OliviaIconPro.ico" />
|
||||
</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">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Configuracion\PaneConfigView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\PaneEjecutar.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Limpieza\PaneLimpiezaSub4.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Limpieza\PaneLimpiezaSub3.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Limpieza\PaneLimpiezaSub2.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Limpieza\PaneLimpiezaSub1.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Limpieza\PaneLimpieza.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Limpieza\DockpaneLimpieza.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Recogida\DockpaneRecogida.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\ProWndSelectFields.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="DarkImages\GenericButtonPurple16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="DarkImages\GenericButtonPurple32.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resource1.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resource1.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="Images\config.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="DarkImages\GenericButtonGreen16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="DarkImages\GenericButtonGreen32.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="View\OliviaIconPro16.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="View\OliviaIconPro.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</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" />
|
||||
<Resource Include="Images\help16Pro.png" />
|
||||
</ItemGroup>
|
||||
<<<<<<< HEAD
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DotNetProjects.Extended.Wpf.Toolkit" Version="5.0.103" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<Reference Include="ArcGIS.Desktop.Framework">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Framework.dll</HintPath>
|
||||
<CopyLocal>false</CopyLocal>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Core">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Core.dll</HintPath>
|
||||
<CopyLocal>false</CopyLocal>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Core">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\Core\ArcGIS.Desktop.Core.dll</HintPath>
|
||||
<CopyLocal>false</CopyLocal>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Layouts">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\Layout\ArcGIS.Desktop.Layouts.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Mapping">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\Mapping\ArcGIS.Desktop.Mapping.dll</HintPath>
|
||||
<CopyLocal>false</CopyLocal>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Catalog">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\Catalog\ArcGIS.Desktop.Catalog.dll</HintPath>
|
||||
<CopyLocal>false</CopyLocal>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Shared.Wpf">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Shared.Wpf.dll</HintPath>
|
||||
<CopyLocal>false</CopyLocal>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Editing">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\Editing\ArcGIS.Desktop.Editing.dll</HintPath>
|
||||
<CopyLocal>false</CopyLocal>
|
||||
</Reference>
|
||||
<Reference Include="ArcGIS.Desktop.Extensions">
|
||||
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\DesktopExtensions\ArcGIS.Desktop.Extensions.dll</HintPath>
|
||||
<CopyLocal>false</CopyLocal>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<None Include=".gitignore" />
|
||||
<None Include="Backup-2.x.zip" />
|
||||
<None Include="OliviaAddInPro.csproj.bak" />
|
||||
<None Include="OliviaAddInPro.csproj.user" />
|
||||
<None Include="OliviaIconPro.ico" />
|
||||
<None Include="Images\config2_.png" />
|
||||
<None Include="Images\config2_olv - copia.png" />
|
||||
<None Include="Images\config_old.png" />
|
||||
<None Include="Images\genericproperties32.png" />
|
||||
<None Include="Images\help16Pro.png" />
|
||||
<None Include="Images\masking32.png" />
|
||||
<None Include="Images\OliviaIconPro.ico" />
|
||||
<None Include="Images\OliviaIconPro32Web.png" />
|
||||
<None Include="Images\open32.png" />
|
||||
<None Include="Images\openfolder.png" />
|
||||
<None Include="Images\openfolder32.png" />
|
||||
<None Include="Images\time32.png" />
|
||||
<None Include="Model\OliviaGlob.cs.bak" />
|
||||
<None Include="Model\Recogida.cs.bak" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\.signature.p7s" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\LICENSE.md" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\Newtonsoft.Json.13.0.1.nupkg" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\packageIcon.png" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\net20\Newtonsoft.Json.dll" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\net20\Newtonsoft.Json.xml" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\net35\Newtonsoft.Json.dll" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\net35\Newtonsoft.Json.xml" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\net40\Newtonsoft.Json.dll" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\net40\Newtonsoft.Json.xml" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.xml" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\netstandard1.0\Newtonsoft.Json.dll" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\netstandard1.0\Newtonsoft.Json.xml" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\netstandard1.3\Newtonsoft.Json.dll" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\netstandard1.3\Newtonsoft.Json.xml" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\netstandard2.0\Newtonsoft.Json.dll" />
|
||||
<None Include="packages\Newtonsoft.Json.13.0.1\lib\netstandard2.0\Newtonsoft.Json.xml" />
|
||||
<None Include="Resources\inicio.png" />
|
||||
<None Include="Resources\inicio24.png" />
|
||||
<None Include="Resources\ptosctrl.png" />
|
||||
<None Include="Resources\ptosctrl24.png" />
|
||||
<None Include="Resources\time.png" />
|
||||
<None Include="Resources\time24.png" />
|
||||
<None Include="Resources\zonas.png" />
|
||||
<None Include="Resources\zonas24.png" />
|
||||
<None Include="Services\ProcesoEjecServ.cs.bak" />
|
||||
<None Include="View\OliviaIconPro.ico" />
|
||||
<None Include="View\OliviaIconPro16.png" />
|
||||
<None Include="View\Recogida\old\PaneRecogidaSub2.xaml.NotUsed" />
|
||||
<None Include="View\Recogida\old\PaneRecogidaSub2.xaml.cs.NotUsed" />
|
||||
<None Include="View\Recogida\old\PaneRecogidaSub4.xaml.NotUsed" />
|
||||
<None Include="View\Recogida\old\PaneRecogidaSub4.xaml.cs.NotUsed" />
|
||||
<None Include="ViewModel\Limpieza\PaneLimpiezaViewModel.cs.bak" />
|
||||
<None Include="ViewModel\Recogida\old\PaneRecogidaSub2ViewModel.cs.NotUsed" />
|
||||
<None Include="ViewModel\Recogida\old\PaneRecogidaSub4ViewModel.cs.NotUsed" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="Resource1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resource1.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="C:\Program Files\ArcGIS\Pro\bin\Esri.ProApp.SDK.Desktop.targets" Condition="Exists('C:\Program Files\ArcGIS\Pro\bin\Esri.ProApp.SDK.Desktop.targets') AND !Exists('Esri.ArcGISPro.Extensions.targets')" />
|
||||
=======
|
||||
<ItemGroup>
|
||||
<AddInContent Include="Images\config2.png" />
|
||||
<AddInContent Include="Images\reco2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AddInContent Include="Images\carrito2.png" />
|
||||
</ItemGroup>
|
||||
>>>>>>> Elena/reco
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!--
|
||||
PackageAction can be:
|
||||
|
|
@ -352,12 +164,17 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PackageAction>BuildDefault</PackageAction>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<UsingTask AssemblyFile="$(ArcGISFolder)\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.PackageAddIn" />
|
||||
<UsingTask AssemblyFile="$(ArcGISFolder)\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.CleanAddIn" />
|
||||
<UsingTask AssemblyFile="$(ArcGISFolder)\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.ConvertToRelativePath" />
|
||||
<!--<Import Project="Esri.ArcGISPro.Extensions.targets" Condition="Exists('Esri.ArcGISPro.Extensions.targets')" />-->
|
||||
<Import Project="$(ArcGISFolder)\bin\Esri.ProApp.SDK.Desktop.targets" Condition="Exists('$(ArcGISFolder)\bin\Esri.ProApp.SDK.Desktop.targets') AND !Exists('Esri.ArcGISPro.Extensions.targets')" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
|
@ -368,4 +185,5 @@
|
|||
<!--<Target Name="BeforeBuild">
|
||||
<Error Text="C:\Users\Elena\AppData\Local\Programs\ArcGIS\Pro\bin\Esri.ProApp.SDK.Desktop.targets not found." Condition="!Exists('C:\Users\Elena\AppData\Local\Programs\ArcGIS\Pro\bin\Esri.ProApp.SDK.Desktop.targets') AND !Exists('Esri.ArcGISPro.Extensions.targets')" />
|
||||
</Target>-->
|
||||
>>>>>>> origin/develop
|
||||
</Project>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30011.22
|
||||
|
|
@ -8,13 +8,25 @@ EndProject
|
|||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Release|x64.Build.0 = Release|Any CPU
|
||||
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyTitle("OliviaAddInPro")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Acme")]
|
||||
[assembly: AssemblyCompany("VSM - Narvaling")]
|
||||
[assembly: AssemblyProduct("OliviaAddInPro")]
|
||||
[assembly: AssemblyCopyright("Copyright © Acme 2021")]
|
||||
[assembly: AssemblyCopyright("Copyright © VSM 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("3.2.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.2.0.0")]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"profiles": {
|
||||
"OliviaAddInPro": {
|
||||
"commandName": "Executable",
|
||||
"executablePath": "C:\\Program Files\\ArcGIS\\Pro\\bin\\ArcGISPro.exe"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -96,6 +96,15 @@ namespace OliviaAddInPro {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Busca una cadena traducida similar a Se debe cerrar la configuración antes de comenzar una ejecución..
|
||||
/// </summary>
|
||||
internal static string String_estaenprops {
|
||||
get {
|
||||
return ResourceManager.GetString("String_estaenprops", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Busca una cadena traducida similar a Ya existe una ejecución en marcha.
|
||||
/// </summary>
|
||||
|
|
@ -105,6 +114,15 @@ namespace OliviaAddInPro {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Busca una cadena traducida similar a La ejecución ha finalizado con éxito..
|
||||
/// </summary>
|
||||
internal static string String_exito {
|
||||
get {
|
||||
return ResourceManager.GetString("String_exito", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Busca una cadena traducida similar a OLIVIA | Configuración.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -129,9 +129,15 @@
|
|||
<data name="String_error_elems_tabla" xml:space="preserve">
|
||||
<value>No se ha encontrado ningún elemento en la tabla que cumpla con los criterios seleccionados.</value>
|
||||
</data>
|
||||
<data name="String_estaenprops" xml:space="preserve">
|
||||
<value>Se debe cerrar la configuración antes de comenzar una ejecución.</value>
|
||||
</data>
|
||||
<data name="String_existe_ejec" xml:space="preserve">
|
||||
<value>Ya existe una ejecución en marcha</value>
|
||||
</data>
|
||||
<data name="String_exito" xml:space="preserve">
|
||||
<value>La ejecución ha finalizado con éxito.</value>
|
||||
</data>
|
||||
<data name="String_header_Config" xml:space="preserve">
|
||||
<value>OLIVIA | Configuración</value>
|
||||
</data>
|
||||
|
|
|
|||
|
|
@ -12,10 +12,12 @@ namespace OliviaAddInPro.Services
|
|||
{
|
||||
class ConfigServ
|
||||
{
|
||||
private static string pathConfigDef = "C:\\Olivia\\olv.conf";
|
||||
private static string pathConfigDef = "C:\\Olivia";
|
||||
private static ConfigServ configServ=null;
|
||||
private static string nameDirWork = "%dir_work%";
|
||||
public const string OlvRegKey = "SOFTWARE\\Narvaling\\Olivia";
|
||||
public const string OlvRegKey = "SOFTWARE\\Narvaling\\Olivia_3_1";
|
||||
public const string OlvRegName = "workdir";
|
||||
public const string OlvConfigName = "olv.conf";
|
||||
|
||||
public static ConfigServ Serv
|
||||
{
|
||||
|
|
@ -28,10 +30,12 @@ namespace OliviaAddInPro.Services
|
|||
|
||||
public OliviaConf Leer()
|
||||
{
|
||||
OliviaConf res = null;
|
||||
OliviaConf res = Default();
|
||||
try
|
||||
{
|
||||
res= JsonConvert.DeserializeObject<OliviaConf>(File.ReadAllText(GetPathConfig()));
|
||||
var path_cfg = GetPathConfig();
|
||||
path_cfg = Path.Combine(path_cfg, OlvConfigName);
|
||||
res = JsonConvert.DeserializeObject<OliviaConf>(File.ReadAllText(path_cfg));
|
||||
}catch(Exception e)
|
||||
{
|
||||
var ee = e;
|
||||
|
|
@ -40,6 +44,12 @@ namespace OliviaAddInPro.Services
|
|||
if(res==null)
|
||||
res = Default();
|
||||
|
||||
//pilla la IP
|
||||
if(res.Ip.CompareTo("0.0.0.0")==0)
|
||||
{
|
||||
//coge la IP local
|
||||
res.Ip = OliviaGlob.Conexion.Ip;
|
||||
}
|
||||
|
||||
res.PathGdbGen = pon_path_absoluto(res.PathGdbGen, res.path_work);
|
||||
res.PathSimbVSM = pon_path_absoluto(res.PathSimbVSM, res.path_work);
|
||||
|
|
@ -49,16 +59,26 @@ namespace OliviaAddInPro.Services
|
|||
|
||||
|
||||
res.path_exe = pon_path_absoluto(res.path_exe, res.path_work);
|
||||
res.path_manual = pon_path_absoluto(res.path_manual, res.path_work);
|
||||
//chapa
|
||||
if (res.path_manual.Contains("Manual_Olivia_3_0.pdf"))
|
||||
res.path_manual.Replace("Manual_Olivia_3_0.pdf", "Manual_Olivia.pdf");
|
||||
//////////////
|
||||
res.path_temp = pon_path_absoluto(res.path_temp, res.path_work);
|
||||
res.path_data = pon_path_absoluto(res.path_data, res.path_work);
|
||||
res.path_cfg_aux = @"%dir_work%cfg.ini";
|
||||
res.path_cfg_aux = pon_path_absoluto(res.path_cfg_aux, res.path_work);
|
||||
return res;
|
||||
}
|
||||
|
||||
public void Guardar(OliviaConf conf)
|
||||
public Respuesta<bool> Guardar(OliviaConf conf)
|
||||
{
|
||||
Respuesta<bool> resp = new Respuesta<bool> { Value = true };
|
||||
conf.path_exe = pon_path_relativo(conf.path_exe, conf.path_work);
|
||||
conf.path_manual = pon_path_relativo(conf.path_manual, conf.path_work);
|
||||
conf.path_temp = pon_path_relativo(conf.path_temp, conf.path_work);
|
||||
conf.path_data = pon_path_relativo(conf.path_data, conf.path_work);
|
||||
conf.path_cfg_aux = pon_path_relativo(conf.path_cfg_aux, conf.path_work);
|
||||
|
||||
conf.PathGdbGen = pon_path_relativo(conf.PathGdbGen, conf.path_work);
|
||||
conf.PathSimbVSM = pon_path_relativo(conf.PathSimbVSM, conf.path_work);
|
||||
|
|
@ -66,17 +86,31 @@ namespace OliviaAddInPro.Services
|
|||
conf.PathCartela = pon_path_relativo(conf.PathCartela, conf.path_work);
|
||||
conf.Path_Eje_via = pon_path_relativo(conf.Path_Eje_via, conf.path_work);
|
||||
|
||||
string jsonString = JsonConvert.SerializeObject(conf);
|
||||
File.WriteAllText(GetPathConfig(), jsonString);
|
||||
try
|
||||
{
|
||||
string jsonString = JsonConvert.SerializeObject(conf);
|
||||
var path_cfg = GetPathConfig();
|
||||
path_cfg = Path.Combine(path_cfg, OlvConfigName);
|
||||
File.WriteAllText(path_cfg, jsonString);
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
resp.Error.Add("Error al guardar archivo: " + ex.Message);
|
||||
resp.Value = false;
|
||||
}
|
||||
|
||||
conf.path_exe = pon_path_absoluto(conf.path_exe, conf.path_work);
|
||||
conf.path_cfg_aux = pon_path_absoluto(conf.path_cfg_aux, conf.path_work);
|
||||
conf.path_temp = pon_path_absoluto(conf.path_temp, conf.path_work);
|
||||
conf.path_manual = pon_path_absoluto(conf.path_manual, conf.path_work);
|
||||
conf.path_data = pon_path_absoluto(conf.path_data, conf.path_work);
|
||||
conf.PathGdbGen = pon_path_absoluto(conf.PathGdbGen, conf.path_work);
|
||||
conf.PathSimbVSM = pon_path_absoluto(conf.PathSimbVSM, conf.path_work);
|
||||
conf.PathSimbESRI = pon_path_absoluto(conf.PathSimbESRI, conf.path_work);
|
||||
conf.PathCartela = pon_path_absoluto(conf.PathCartela, conf.path_work);
|
||||
conf.Path_Eje_via = pon_path_absoluto(conf.Path_Eje_via, conf.path_work);
|
||||
|
||||
return resp;
|
||||
}
|
||||
/**
|
||||
* cambia la carpeta referida a directorio de trabajo por los caracteres OliviaDirWork (%dir_work%)
|
||||
|
|
@ -109,7 +143,7 @@ namespace OliviaAddInPro.Services
|
|||
str = null;
|
||||
if (rkprg.ValueCount > 0)
|
||||
{
|
||||
str = (String)rkprg.GetValue("path_cfg");
|
||||
str = (String)rkprg.GetValue(OlvRegName);
|
||||
if (!string.IsNullOrEmpty(str))
|
||||
return str;
|
||||
}
|
||||
|
|
@ -125,6 +159,7 @@ namespace OliviaAddInPro.Services
|
|||
var path = GetPathConfig();
|
||||
if(!string.IsNullOrEmpty(path))
|
||||
{
|
||||
path = Path.Combine(path, OlvConfigName);
|
||||
c.path_work = Path.GetDirectoryName(path) + "\\";
|
||||
}
|
||||
|
||||
|
|
@ -143,14 +178,21 @@ namespace OliviaAddInPro.Services
|
|||
c.consulta_sector = "SECTOR";
|
||||
c.consulta_secuen = "SECUENCIA";
|
||||
|
||||
c.Igno_ais = true;
|
||||
|
||||
//c.red_carreteras = @"%dir_work%Datos\gdbs\TomTom_Q4_2015.gdb";
|
||||
c.puerto = 19995;
|
||||
c.Puerto = 19995;
|
||||
c.buffer_export = 1000;
|
||||
|
||||
c.path_exe=@"%dir_work%bin\OliviaTasks.exe";
|
||||
c.path_manual= @"%dir_work%Manual_Olivia.pdf";
|
||||
c.path_temp = @"%dir_work%temp\";
|
||||
c.path_data=@"%dir_work%data\";
|
||||
c.Path_Eje_via = @"%dir_work%Datos\gdbs\TomTom_Q4_2015.gdb\TomTom_Q4_2015___nw";
|
||||
c.Path_Eje_via = "";
|
||||
c.Path_Gdb_Import = "";
|
||||
c.Path_Guarda_Csv = "";
|
||||
c.Path_Dataset_Import = "";
|
||||
c.path_cfg_aux = @"%dir_work%cfg.ini";
|
||||
/*c.eje_via = "TomTom_Q4_2015___nw";
|
||||
c.municipios = "TomTom_Q4_2015___a8";*/
|
||||
|
||||
|
|
@ -224,6 +266,7 @@ namespace OliviaAddInPro.Services
|
|||
c.t_carga_desc=40;
|
||||
c.t_descanso=30;
|
||||
c.hora_inicio=420; //ES UNA HORA, SON LOS MINUTOS DESDE LAS 00, PERO TIENE QUE APARECER CON FORMATO DE TIME 07:30, POR EJEMPLO
|
||||
c.reduc_traf = 80;
|
||||
c.ancho_via=2;
|
||||
c.t_tratamiento_BarMan=2900;
|
||||
c.t_tratamiento_BarManMant=2900;
|
||||
|
|
@ -255,6 +298,7 @@ namespace OliviaAddInPro.Services
|
|||
c.v_desp_BalMix=15;
|
||||
c.v_desp_BL=5;
|
||||
c.v_desp_CH=15;
|
||||
//son 0 porque van según la velocidad de la vía
|
||||
c.v_desp_VPap=0;
|
||||
c.v_desp_LPap=0;
|
||||
c.v_desp_LC=0;
|
||||
|
|
@ -262,23 +306,14 @@ namespace OliviaAddInPro.Services
|
|||
c.v_desp_LPip=0;
|
||||
c.v_desp_LS=0;
|
||||
|
||||
c.Giro_max_vehiculo=175.0000000;
|
||||
c.Ancho_peat_def=6.0000000;
|
||||
c.Ancho_acera_def=1.5000000;
|
||||
c.Ancho_ap_lin_def=2.0000000;
|
||||
c.Ancho_ap_bat_def=4.0000000;
|
||||
c.Ancho_bord_lib_def=1.5000000;
|
||||
c.Desv_max=0.1500000;
|
||||
c.Desv_max_abs=1800.0000000;
|
||||
|
||||
//Reco
|
||||
c.id= "OBJECTID";
|
||||
c.id= "ID";
|
||||
c.nomrec= "NOMB_TIP_REC";
|
||||
c.lateralidad= "LATERALIDAD";
|
||||
c.frac= "FRACCION";
|
||||
c.capac= "CAPACIDAD";
|
||||
c.uds= "UNIDADES";
|
||||
c.kgrec= "KGRECO";
|
||||
c.kgrec= "Kg_Recog";
|
||||
c.kgrec_val=200;
|
||||
c.is_lleno=false;
|
||||
c.is_campo=false;
|
||||
|
|
@ -314,9 +349,6 @@ namespace OliviaAddInPro.Services
|
|||
c.R_t_descanso_min = 0;
|
||||
c.t_llega_sale=5;
|
||||
c.t_descarga=40;
|
||||
c.R_t_convenio = 480;
|
||||
c.R_t_descanso = 30;
|
||||
c.R_hora_inicio = 420; //ES UNA HORA, SON LOS MINUTOS DESDE LAS 00, PERO TIENE QUE APARECER CON FORMATO DE TIME 07:30, POR EJEMPLO
|
||||
c.dens_vehi_org=500;
|
||||
c.dens_vehi_res=500;
|
||||
c.dens_vehi_env=120;
|
||||
|
|
@ -339,7 +371,7 @@ namespace OliviaAddInPro.Services
|
|||
c.t_vaci_lateral=90;
|
||||
c.t_vaci_superior=180;
|
||||
c.t_vaci_bilateral=100;
|
||||
c.t_vaci_bolseo=5;
|
||||
c.t_vaci_bolseo=5*60;
|
||||
c.t_vaci_lavado=60;
|
||||
c.t_vaci_otra=60;
|
||||
c.kgmax_max=20000;
|
||||
|
|
@ -355,6 +387,16 @@ namespace OliviaAddInPro.Services
|
|||
c.atr_FT="FT";
|
||||
c.atr_N = "N";
|
||||
c.atr_pedes="14";
|
||||
|
||||
c.Ancho_peat_def = 6.0000000;
|
||||
c.Ancho_acera_def = 1.5000000;
|
||||
c.Ancho_ap_lin_def = 2.0000000;
|
||||
c.Ancho_ap_bat_def = 4.0000000;
|
||||
c.Ancho_bord_lib_def = 1.5000000;
|
||||
c.Giro_max_vehiculo = 175.0000000;
|
||||
c.Desv_max = 0.1500000;
|
||||
c.Desv_max_abs = 1800.0000000;
|
||||
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,292 @@
|
|||
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;
|
||||
using System.Windows;
|
||||
|
||||
namespace OliviaAddInPro.Services
|
||||
{
|
||||
public class FinProcServ
|
||||
{
|
||||
public void finEjecuta(Respuesta<TiposEjecucion> res, TratamientoComun inst)
|
||||
{
|
||||
Application.Current.Dispatcher.BeginInvoke(new Action<Respuesta<TiposEjecucion>, TratamientoComun>((p, v) => finEjecuta2(p, v)),res,inst);
|
||||
|
||||
}
|
||||
|
||||
public void finEjecuta2(Respuesta<TiposEjecucion> res, TratamientoComun inst)
|
||||
{
|
||||
String msg = string.Empty;
|
||||
String msg_err = "Errores en el proceso de importación de resultados";
|
||||
var resp2 = new Respuesta<string> { Value = string.Empty };
|
||||
|
||||
var resp = new Respuesta<string> { Value = string.Empty };
|
||||
bool mal = false;
|
||||
try
|
||||
{
|
||||
//gestiona los flags, el estado de finok o finnok va en res.Vale
|
||||
if (res.HasError)
|
||||
{
|
||||
msg = res.Error.First();
|
||||
mal = true;
|
||||
//actualiza los flags
|
||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.FinEjecNOk);
|
||||
}
|
||||
else
|
||||
{
|
||||
inst.ProgrSrc.Init("Importando resultados");
|
||||
//actualiza los flags
|
||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.FinEjecOk);
|
||||
//importa resultados
|
||||
string FtClssName = "";
|
||||
resp = IniImport(out FtClssName);
|
||||
if (resp.HasError)
|
||||
{
|
||||
msg = resp.Error.First();
|
||||
mal = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<bool>)(() =>
|
||||
{
|
||||
string GdbFileName = resp.Value;
|
||||
string nombAmbitos = string.Empty;
|
||||
if (OliviaGlob.HasFlagTipEjec(TiposEjecucion.EjecSecto)) //Ha terminado bien la sectorización
|
||||
{
|
||||
//actualiza los flags
|
||||
//OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.EjecSecto);
|
||||
//acciones de importación
|
||||
resp2 = inst.ServCom.ImportSecto(GdbFileName, FtClssName);
|
||||
}
|
||||
else if (OliviaGlob.HasFlagTipEjec(TiposEjecucion.EjecPlanif)) //Ha terminado bien la planificación
|
||||
{
|
||||
//actualiza los flags
|
||||
//OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.EjecPlanif);
|
||||
//guarda csv
|
||||
//GuardaCsv(inst); en finEjecuta3
|
||||
//acciones de importación
|
||||
resp2 = inst.ServCom.ImportPlanif(GdbFileName, FtClssName);
|
||||
|
||||
}
|
||||
Application.Current.Dispatcher.BeginInvoke(new Action<Respuesta<string>, Respuesta<string>, bool, string, TratamientoComun>((p, v, x, u, w) => finEjecuta3(p, v, x, u, w)), resp, resp2, mal, msg, inst);
|
||||
return true;
|
||||
}));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
msg = msg_err + ": "+msg+": "+ex.Message;
|
||||
mal = true;
|
||||
}
|
||||
if (mal)
|
||||
{
|
||||
//actualiza los flags
|
||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.EjecPlanif);
|
||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.EjecSecto);
|
||||
|
||||
HelperGlobal.ponMsg(msg);
|
||||
OliviaGlob.progrDialog.Hide();
|
||||
//muestra la ventana
|
||||
OliviaGlob.ShowHidePane(true);
|
||||
var task = ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
|
||||
{
|
||||
//borra los archivos que le toca borrar
|
||||
BorraFiles();
|
||||
});
|
||||
}
|
||||
}
|
||||
public void finEjecuta3(Respuesta<string> resp, Respuesta<string> resp2,bool mal, string msg, TratamientoComun inst)
|
||||
{
|
||||
|
||||
String msg_err = "Errores en el proceso de importación de resultados";
|
||||
if (!mal)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(resp2.Value))
|
||||
{
|
||||
//quita modo config2
|
||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.Config2);
|
||||
if (resp2.HasError)
|
||||
{
|
||||
msg = resp2.Error.First();
|
||||
}
|
||||
else
|
||||
msg = msg_err;
|
||||
mal = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
//actualiza la capa de la que tiene que leer ahora para planificar
|
||||
inst.CapaPlanif = resp2.Value;
|
||||
//pone modo config2
|
||||
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config2);
|
||||
if (OliviaGlob.HasFlagTipEjec(TiposEjecucion.EjecPlanif)) //Ha terminado bien la planificación
|
||||
{
|
||||
//guarda csv
|
||||
GuardaCsv(inst,resp2.Value);
|
||||
}
|
||||
msg = Resource1.String_exito;
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
msg = msg_err + ": " + msg + ": " + ex.Message;
|
||||
mal = true;
|
||||
}
|
||||
}
|
||||
//actualiza los flags
|
||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.EjecPlanif);
|
||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.EjecSecto);
|
||||
///////////////////////////////////////////////////
|
||||
HelperGlobal.ponMsg(msg);
|
||||
OliviaGlob.progrDialog.Hide();
|
||||
//muestra la ventana
|
||||
OliviaGlob.ShowHidePane(true);
|
||||
var task = ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
|
||||
{
|
||||
//borra los archivos que le toca borrar
|
||||
BorraFiles();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Borra los archivos exportados para el proceso
|
||||
*/
|
||||
public static void BorraFiles()
|
||||
{
|
||||
string[] list = null;
|
||||
string capa_principal, capa_principal_nw;
|
||||
if (!string.IsNullOrEmpty(OliviaGlob.Paths.PathData))
|
||||
capa_principal = System.IO.Path.GetFileNameWithoutExtension(OliviaGlob.Paths.PathData);
|
||||
else
|
||||
capa_principal = null;
|
||||
if (!string.IsNullOrEmpty(OliviaGlob.Paths.PathNW))
|
||||
capa_principal_nw = System.IO.Path.GetFileNameWithoutExtension(OliviaGlob.Paths.PathNW);
|
||||
else
|
||||
capa_principal_nw = null;
|
||||
|
||||
try
|
||||
{
|
||||
if (capa_principal != null && HelperGdb.CloseLayer(capa_principal))
|
||||
{
|
||||
list = System.IO.Directory.GetFiles(OliviaGlob.Paths.DirData, capa_principal + "*");
|
||||
if (list.Length > 0)
|
||||
{
|
||||
foreach (string f in list)
|
||||
{
|
||||
if (System.IO.Path.GetExtension(f) == ".lock")
|
||||
continue;
|
||||
System.IO.File.Delete(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (capa_principal_nw != null && HelperGdb.CloseLayer(capa_principal_nw))
|
||||
{
|
||||
list = System.IO.Directory.GetFiles(OliviaGlob.Paths.DirData, capa_principal_nw + "*");
|
||||
if (list.Length > 0)
|
||||
{
|
||||
foreach (string f in list)
|
||||
{
|
||||
if (System.IO.Path.GetExtension(f) == ".lock")
|
||||
continue;
|
||||
System.IO.File.Delete(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Permite guardar el archivo CSV que contiene la secuencia que se ha llevado a cabo en las rutas en la planificación.
|
||||
*/
|
||||
public static void GuardaCsv(TratamientoComun inst, string pathImport)
|
||||
{
|
||||
string auxi, nombre = null;
|
||||
string[] nameDokL;
|
||||
string DirData = System.IO.Path.GetDirectoryName(OliviaGlob.Paths.PathData);
|
||||
nameDokL = Directory.GetFiles(DirData,
|
||||
System.IO.Path.GetFileNameWithoutExtension(OliviaGlob.Paths.PathData) + inst.ServCom.NAME_CSV + ".*");
|
||||
|
||||
string Title = "Directorio para guardar Secuencia de la Planificación";
|
||||
string Filter = "Secuencia en formato CSV (*.csv)|*.csv";
|
||||
inst.decode_gdb(System.IO.Path.GetFileNameWithoutExtension(OliviaGlob.Paths.PathData),
|
||||
out auxi, out nombre);
|
||||
if (!string.IsNullOrEmpty(pathImport))
|
||||
{
|
||||
nombre = System.IO.Path.GetFileNameWithoutExtension(pathImport);
|
||||
}
|
||||
//string Path = HelperGdb.SaveFileDlg(Title, DirData, inst.ServCom.EXT_CSV, Filter);
|
||||
string Path = string.Empty;
|
||||
if (OliviaGlob.CompruebaExistePath(OliviaGlob.Paths.PathGuardCsv))
|
||||
Path = OliviaGlob.Paths.PathGuardCsv;
|
||||
else
|
||||
//Path = HelperGdb.SaveFileDlg(Title, DirData, null, ArcGIS.Desktop.Catalog.ItemFilters.Folders);
|
||||
Path = HelperGdb.FolderBrowseDlg(Title, DirData);
|
||||
if (string.IsNullOrEmpty(Path) || Path.Length == 0)
|
||||
{
|
||||
bool ok = HelperGlobal.ponMsg("Se va a perder el archivo que contiene la secuencia en planificación, ¿está seguro?",
|
||||
MessageBoxImage.Question,"OLIVIA",MessageBoxButton.YesNo);
|
||||
if (!ok)
|
||||
GuardaCsv(inst, pathImport);
|
||||
}
|
||||
else
|
||||
{
|
||||
var FileName = System.IO.Path.Combine(Path, nombre);
|
||||
FileName += inst.ServCom.EXT_CSV;
|
||||
if (File.Exists(FileName))
|
||||
File.Delete(FileName);
|
||||
File.Move(nameDokL[0], FileName);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Inicializa la importación
|
||||
*/
|
||||
public Respuesta<string> IniImport(out string FtClssName)
|
||||
{
|
||||
var res = new Respuesta<string>() { Value = string.Empty };
|
||||
FtClssName = string.Empty;
|
||||
//Lanza ventana para elegir gdb a la que importar resultados
|
||||
string GdbFileName="";
|
||||
if (OliviaGlob.CompruebaExistePath(OliviaGlob.Paths.PathGdbImport))
|
||||
GdbFileName = OliviaGlob.Paths.PathGdbImport;
|
||||
else
|
||||
{
|
||||
bool sal = true;
|
||||
do
|
||||
{
|
||||
sal = true;
|
||||
//repite por si se ha equivocado hasta que elige la gdb
|
||||
GdbFileName = HelperGdb.OpenFileDialog(HelperGdb.TiposOpenFileDlg.OpenGdb, "", "Seleccionar GDB a la que importar los resultados");
|
||||
|
||||
if (string.IsNullOrEmpty(GdbFileName))
|
||||
sal = HelperGlobal.ponMsg("¿Desea cancelar el proceso de importación?",
|
||||
MessageBoxImage.Question, "OLIVIA", MessageBoxButton.YesNo);
|
||||
} while (!sal);
|
||||
}
|
||||
if (string.IsNullOrEmpty(GdbFileName) || !Directory.Exists(GdbFileName))
|
||||
{
|
||||
res.Error.Add("Se ha cancelado la importación de resultados. Se cancela la elección de GDB.");
|
||||
return res;
|
||||
}
|
||||
res.Value = GdbFileName;
|
||||
|
||||
if (string.IsNullOrEmpty(OliviaGlob.Paths.PathDatasetImport))
|
||||
{ //ahora pide elegir nombre de ftclass
|
||||
FtClssName = HelperGdb.SaveFileDlg("Seleccione ubicación e introduzca nombre de Feature Class a importar", GdbFileName, null, ArcGIS.Desktop.Catalog.ItemFilters.FeatureClasses_All);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -28,15 +28,6 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
|||
return res;
|
||||
}
|
||||
|
||||
OliviaGlob.TipoEjec = TiposEjecucion.Limp;//OliviaDef.GeneralDef.TiposOliv.OlivLimp;
|
||||
/*
|
||||
if (!OliviaGlob.gdb_limp.exporta(limp, modo == (int)Ejecuta.ModosEjec.Planif))
|
||||
{
|
||||
res.Error.Add(OliviaGlob.gdb_limp.err_st;
|
||||
res.Value = false;
|
||||
return res;
|
||||
}
|
||||
*/
|
||||
//configura el string de opciones
|
||||
if (!configura_ops_geo(limp, modo))
|
||||
{
|
||||
|
|
@ -45,8 +36,6 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
|||
return res;
|
||||
}
|
||||
|
||||
//this.limp = limp;
|
||||
|
||||
//Llama al ejecuta del padre
|
||||
return base.ejec(NombreTratamiento);
|
||||
|
||||
|
|
@ -87,10 +76,10 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
|||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_trafic + GeneralDef.EjecGeoParamIgual + limp.Trafico + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_npt + GeneralDef.EjecGeoParamIgual + limp.NPtosCtrl + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_sec + GeneralDef.EjecGeoParamIgual + limp.NSect + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GL_anc + GeneralDef.EjecGeoParamIgual + limp.AnchoVia + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GL_anc + GeneralDef.EjecGeoParamIgual + limp.AnchoVia+ " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_coox + GeneralDef.EjecGeoParamIgual + limp.CoordsInstal.X + " " +//coordenadas
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_cooy + GeneralDef.EjecGeoParamIgual + limp.CoordsInstal.Y + " " +//coordenadas
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_ais + GeneralDef.EjecGeoParamIgual + (limp.IgnoAis?1:0) + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_ais + GeneralDef.EjecGeoParamIgual + (limp.IgnoAis ? 1 : 0) + " " +
|
||||
//campos del dbf de limpieza para leer
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GAA_obser + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Campos.consulta_observ + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GAA_anch_tip + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Campos.consulta_anch_tip + " " +
|
||||
|
|
@ -102,7 +91,19 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
|||
GeneralDef.EjecGeoParamSep + GeneralDef.GAL_acera + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Atributos.atr_acera + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GAL_peat + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Atributos.atr_peat + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GAL_ap_lin + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Atributos.atr_ap_lin + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GAL_ap_bat + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Atributos.atr_ap_bat + " ";
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GAL_ap_bat + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Atributos.atr_ap_bat + " " +
|
||||
//campos de anchos de entidades de limpieza
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_anch_peat + GeneralDef.EjecGeoParamIgual + LimpiezaDef.OtrosParam.anch_peat+ " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_anch_ace + GeneralDef.EjecGeoParamIgual + LimpiezaDef.OtrosParam.anch_ace + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_anch_aplin + GeneralDef.EjecGeoParamIgual + LimpiezaDef.OtrosParam.anch_aplin + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_anch_apbat + GeneralDef.EjecGeoParamIgual + LimpiezaDef.OtrosParam.anch_apbat + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_anch_bordlib + GeneralDef.EjecGeoParamIgual + LimpiezaDef.OtrosParam.anch_bordlib + " " +
|
||||
//mima de la nw
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_mima_xmin + GeneralDef.EjecGeoParamIgual + limp.MimaNw.XMin + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_mima_xmax + GeneralDef.EjecGeoParamIgual + limp.MimaNw.XMax + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_mima_ymin + GeneralDef.EjecGeoParamIgual + limp.MimaNw.YMin + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_mima_ymax + GeneralDef.EjecGeoParamIgual + limp.MimaNw.YMax + " ";
|
||||
|
||||
|
||||
base.str_cfg = str;
|
||||
|
||||
|
|
|
|||
|
|
@ -43,20 +43,14 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
|||
NombreTratamiento = NTratamiento;
|
||||
add_cfg_comun();
|
||||
|
||||
//lanza ventana marchando que lanza proceso en bucle para actualizar barra progreso
|
||||
//OliviaGlob.progr_eje = new ProgresoEjec();
|
||||
|
||||
//lanza proceso OliviaTask
|
||||
var res = lanza();
|
||||
if (!res.Value)
|
||||
{
|
||||
res.Error.Add("Error al arrancar OliviaTask (programa de procesado de datos): No ha arrancado correctamente la instancia OliviaTask");
|
||||
res.Value = true;
|
||||
return res;
|
||||
}
|
||||
|
||||
//OliviaGlob.progr_eje.start(str_cfg);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
@ -79,7 +73,16 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
|||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_strtto + GeneralDef.EjecGeoParamIgual + NombreTratamiento + " " +
|
||||
//paths de archivos
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pd + GeneralDef.EjecGeoParamIgual + OliviaGlob.Paths.PathData + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pn + GeneralDef.EjecGeoParamIgual + OliviaGlob.Paths.PathNW + " ";
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pn + GeneralDef.EjecGeoParamIgual + OliviaGlob.Paths.PathNW + " " +
|
||||
//nombres de cols de sector y secuencia
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_camp_sector + GeneralDef.EjecGeoParamIgual + ComunDef.CamposCom.consulta_sector + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_camp_secuencia + GeneralDef.EjecGeoParamIgual + ComunDef.CamposCom.consulta_secuen + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_camp_objectid + GeneralDef.EjecGeoParamIgual + ComunDef.CamposCom.camp_oid + " " +
|
||||
//giro max y desv
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_girmax + GeneralDef.EjecGeoParamIgual + ComunDef.CamposCom.giro_max + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_desv_max + GeneralDef.EjecGeoParamIgual + ComunDef.CamposCom.desv_max + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_desv_max_abs + GeneralDef.EjecGeoParamIgual + ComunDef.CamposCom.desv_max_abs + " ";
|
||||
//LimpiezaDef.Campos.consulta_sector;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -94,15 +97,21 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
|||
|
||||
try
|
||||
{
|
||||
int tipoEjec=-1;
|
||||
if (OliviaGlob.IsLimp())
|
||||
tipoEjec = 0;
|
||||
else if (OliviaGlob.IsReco())
|
||||
tipoEjec = 1;
|
||||
//van ParamN parámetros, sin incluir, si se añaden, incrementar ParamN
|
||||
args = GeneralDef.EjecGeoParamSep + GeneralDef.GG_tipo + GeneralDef.EjecGeoParamIgual + (((int)OliviaGlob.TipoEjec)-1).ToString() + " " +
|
||||
args = GeneralDef.EjecGeoParamSep + GeneralDef.GG_tipo + GeneralDef.EjecGeoParamIgual + tipoEjec.ToString() + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_ip + GeneralDef.EjecGeoParamIgual + OliviaGlob.Conexion.Ip + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_port + GeneralDef.EjecGeoParamIgual + OliviaGlob.Conexion.Puerto + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_tout + GeneralDef.EjecGeoParamIgual + OliviaGlob.Conexion.TiempoOutSocket + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pt + GeneralDef.EjecGeoParamIgual + OliviaGlob.Paths.PathTemp + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pcfg + GeneralDef.EjecGeoParamIgual + OliviaGlob.Paths.PathCfg + " ";
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pcfg + GeneralDef.EjecGeoParamIgual + "";
|
||||
|
||||
pfi = new ProcessStartInfo(OliviaGlob.Paths.PathExeOlivia, args);
|
||||
pfi.UseShellExecute = false;
|
||||
System.Diagnostics.Process.Start(pfi);
|
||||
|
||||
//comprueba que haya arrancado OliviaTask
|
||||
|
|
@ -179,5 +188,38 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
|||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Comprueba si OliviaTask ha salido y le espera durante T seg. Si no, para la tarea
|
||||
* return true si ha terminado, false si no
|
||||
*/
|
||||
public bool EsperaProcess(string nombproc)
|
||||
{
|
||||
bool esta_geo = true;
|
||||
Process[] pg;
|
||||
|
||||
//le da 5 seg de margen para que se cierre
|
||||
pg = Is_process(nombproc, 5, false);
|
||||
esta_geo = (pg != null);
|
||||
|
||||
if (esta_geo)
|
||||
{
|
||||
//mata a la fuerza la tarea
|
||||
try
|
||||
{
|
||||
for (int i = 0; i < pg.Length; i++)
|
||||
{
|
||||
pg[i].Kill();
|
||||
if (pg[i].WaitForExit(500))
|
||||
esta_geo = false;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
esta_geo = false;
|
||||
}
|
||||
}
|
||||
return !esta_geo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
|||
return res;
|
||||
}
|
||||
|
||||
//OliviaGlob.tip_oliv = OliviaDef.GeneralDef.TiposOliv.OlivResi;
|
||||
OliviaGlob.TipoEjec = TiposEjecucion.Reco;//OliviaDef.GeneralDef.TiposOliv.OlivResi;
|
||||
/*if (!OliviaGlob.gdb_reco.exporta(reco, modo == (int)Ejecuta.ModosEjec.Planif))
|
||||
{
|
||||
err_str = OliviaGlob.gdb_reco.err_st;
|
||||
|
|
@ -63,7 +61,7 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
|||
else if (modo == ModosEjec.SoloPlanifica)
|
||||
modo_str = GeneralDef.SockConfTodo;
|
||||
var conf = ConfigServ.Serv.Leer();
|
||||
//van ParamLimpN parámetros, sin incluir "CONFIGURACION", si se añaden, incrementar ParamLimpN
|
||||
//van ParamLimpN parámetros, sin incluir "CONFIGURACION", si se añaden, incrementar ParamRecoN
|
||||
str = GeneralDef.EjecGeoParamSep + modo_str + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_camp_cap + GeneralDef.EjecGeoParamIgual + conf.capac + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_kgM + GeneralDef.EjecGeoParamIgual + reco.KgMaxVehic + " " +
|
||||
|
|
@ -81,19 +79,24 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
|||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_trafic + GeneralDef.EjecGeoParamIgual + reco.Trafico + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_npt + GeneralDef.EjecGeoParamIgual + reco.NPtosCtrl + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_sec + GeneralDef.EjecGeoParamIgual + reco.NSect + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_anc + GeneralDef.EjecGeoParamIgual + reco.AnchoVehiculo + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_anc + GeneralDef.EjecGeoParamIgual + reco.AnchoVehiculo+ " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_gir + GeneralDef.EjecGeoParamIgual + reco.GiroVehic + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_coox + GeneralDef.EjecGeoParamIgual + reco.CoordsInstal.X + " " +//coordenadas
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_cooy + GeneralDef.EjecGeoParamIgual + reco.CoordsInstal.Y + " " +//coordenadas
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_descx + GeneralDef.EjecGeoParamIgual + reco.CoordsPlanta.X + " " +//coordenadas
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_descy + GeneralDef.EjecGeoParamIgual + reco.CoordsPlanta.Y + " " +//coordenadas
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_id + GeneralDef.EjecGeoParamIgual + 0 + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_url + GeneralDef.EjecGeoParamIgual + 0 + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_fecha + GeneralDef.EjecGeoParamIgual + 0 + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_fechaf + GeneralDef.EjecGeoParamIgual + 0 + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_modo + GeneralDef.EjecGeoParamIgual + 0 + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_id + GeneralDef.EjecGeoParamIgual + "0 " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_url + GeneralDef.EjecGeoParamIgual + "0 " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_fecha + GeneralDef.EjecGeoParamIgual + "0 " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_fechaf + GeneralDef.EjecGeoParamIgual + "0 " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_modo + GeneralDef.EjecGeoParamIgual + "0 " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_ais + GeneralDef.EjecGeoParamIgual + (reco.IgnoAis?1:0) + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_lateral + GeneralDef.EjecGeoParamIgual + reco.TipoLate + " ";
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_lateral + GeneralDef.EjecGeoParamIgual + reco.TipoLate + " " +
|
||||
//mima de la nw
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_mima_xmin + GeneralDef.EjecGeoParamIgual + reco.MimaNw.XMin + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_mima_xmax + GeneralDef.EjecGeoParamIgual + reco.MimaNw.XMax + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_mima_ymin + GeneralDef.EjecGeoParamIgual + reco.MimaNw.YMin + " " +
|
||||
GeneralDef.EjecGeoParamSep + GeneralDef.GTO_mima_ymax + GeneralDef.EjecGeoParamIgual + reco.MimaNw.YMax + " ";
|
||||
|
||||
base.str_cfg = str;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
using ArcGIS.Core.Data;
|
||||
/*using ArcGIS.Core.Data;
|
||||
using ArcGIS.Core.Geometry;
|
||||
using ArcGIS.Core.Internal.CIM;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;*/
|
||||
using OliviaAddInPro.Helper;
|
||||
using OliviaAddInPro.Model;
|
||||
using System;
|
||||
|
|
@ -20,6 +20,8 @@ namespace OliviaAddInPro.Services
|
|||
|
||||
public LimpiezaServ(Limpieza _limp)
|
||||
{
|
||||
if (_limp == null)
|
||||
_limp = OliviaGlob.Limp;
|
||||
limp = _limp;
|
||||
}
|
||||
/**
|
||||
|
|
@ -27,13 +29,11 @@ namespace OliviaAddInPro.Services
|
|||
* Modo 0, sectorizar
|
||||
* Modo 1, planificar
|
||||
*/
|
||||
public TareaRes Ejecuta(ModosEjec modo)
|
||||
public Respuesta<bool> Ejecuta(ModosEjec modo)
|
||||
{
|
||||
var res = new TareaRes()
|
||||
var res = new Respuesta<bool>()
|
||||
{
|
||||
Errores = false,
|
||||
data = null,
|
||||
msg = ""
|
||||
Value = false
|
||||
};
|
||||
MyCancelableProgressorSource cps = limp.ProgrSrc;
|
||||
|
||||
|
|
@ -43,8 +43,7 @@ namespace OliviaAddInPro.Services
|
|||
ErrStr = string.Empty;
|
||||
if (!PreparaConsulta(out nombFileAmbs))
|
||||
{
|
||||
res.msg= "No se ha seleccionado una consulta válida" + limp.ConsultaAmbs;
|
||||
res.Errores = true;
|
||||
res.Error.Add("No se ha seleccionado una consulta válida" + limp.ConsultaAmbs);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
@ -53,13 +52,19 @@ namespace OliviaAddInPro.Services
|
|||
|
||||
string msg = "";
|
||||
//comienza ejecucion
|
||||
if(!LanzaEjec(modo, out msg))
|
||||
if(!ExportaEjec(modo, out msg))
|
||||
{
|
||||
res.Errores = true;
|
||||
res.msg = msg;
|
||||
res.Error.Add(msg);
|
||||
//cierra y borra las capas si le ha dado tiempo a exportar
|
||||
FinProcServ.BorraFiles();
|
||||
return res;
|
||||
}
|
||||
|
||||
//cierra las capas que se han abierto durante la exportación
|
||||
CierraCapas();
|
||||
|
||||
res.Value = true;
|
||||
|
||||
return res;
|
||||
|
||||
}
|
||||
|
|
@ -108,7 +113,7 @@ namespace OliviaAddInPro.Services
|
|||
{
|
||||
//NO SE USA AQUÍ, ESTÁ EN EJECSERV
|
||||
//si ha importado no hace falta que compruebe, seguro que las tiene
|
||||
if (OliviaGlob.IsConfig2())
|
||||
if (OliviaGlob.IsConfig2() && ComprCamposPlanif(limp.CapaElems))
|
||||
return true;
|
||||
//no ha importado, comprueba capa
|
||||
if (ComprCamposPlanif(limp.CapaElems))
|
||||
|
|
@ -146,15 +151,14 @@ namespace OliviaAddInPro.Services
|
|||
*/
|
||||
public bool CompruebaCamposLimp(string pathCapa)
|
||||
{
|
||||
int NCAMPS = 5;
|
||||
string[] camps;
|
||||
camps = new string[NCAMPS];
|
||||
camps[0] = LimpiezaDef.Campos.consulta_entidad;
|
||||
camps[1] = LimpiezaDef.Campos.consulta_mecan;
|
||||
camps[2] = LimpiezaDef.Campos.consulta_observ;
|
||||
camps[3] = LimpiezaDef.Campos.consulta_anch_tip;
|
||||
camps[4] = LimpiezaDef.Campos.consulta_tipolo;
|
||||
return CompruebaCampos(pathCapa, camps)==0;
|
||||
string[] camps = limp.GetCampos(pathCapa);
|
||||
int res = 1;
|
||||
if ((camps == null) || (HelperGdb.CheckFileds(pathCapa, camps) != 0))
|
||||
{
|
||||
ErrStr = HelperGdb.OutStr;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Lee la gdb y devuelve el array de ámbitos en función de si hay en la gdb o no
|
||||
|
|
@ -162,7 +166,7 @@ namespace OliviaAddInPro.Services
|
|||
public bool[] BuscAmbGdb(string pathCapa)
|
||||
{
|
||||
string consulta;
|
||||
int numero_lin;
|
||||
long numero_lin;
|
||||
bool[] amb_gdb = new bool[(int)LimpiezaDef.AmbitsTra.AmbN];//se inician a false
|
||||
string ftclass;
|
||||
|
||||
|
|
@ -211,5 +215,6 @@ namespace OliviaAddInPro.Services
|
|||
}
|
||||
return amb_com;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using OliviaAddIn;
|
||||
using OliviaAddInPro.Model;
|
||||
using OliviaAddInPro.Model.contract;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
|
@ -13,9 +14,9 @@ namespace OliviaAddInPro.Services
|
|||
public class ProcesoEjecServ
|
||||
{
|
||||
Cstr_socket soc = null;
|
||||
int m_out;
|
||||
int m_miliseconds;
|
||||
int m_tm_progr;
|
||||
int m_out=0;
|
||||
int m_miliseconds=200;
|
||||
int m_tm_progr=1000;
|
||||
int modo_fin = 0;
|
||||
bool cancela = false;
|
||||
bool cancela_fin = false;
|
||||
|
|
@ -28,7 +29,7 @@ namespace OliviaAddInPro.Services
|
|||
string tarea = "";
|
||||
public string err_str = "";
|
||||
double x, y;
|
||||
CancelableProgressorSource cps;
|
||||
IprocessManager cps;
|
||||
enum TiposActu
|
||||
{
|
||||
ActuMal,
|
||||
|
|
@ -50,10 +51,21 @@ namespace OliviaAddInPro.Services
|
|||
{
|
||||
|
||||
}
|
||||
public Respuesta<bool> start(string cfg, CancelableProgressorSource cps)
|
||||
public Respuesta<TiposEjecucion> start(string cfg, IprocessManager cps)
|
||||
{
|
||||
this.cps = cps;
|
||||
soc = new Cstr_socket();
|
||||
|
||||
try
|
||||
{
|
||||
soc = new Cstr_socket();
|
||||
}
|
||||
catch
|
||||
|
||||
{
|
||||
var resp = new Respuesta<TiposEjecucion>() { Value = TiposEjecucion.FinEjecNOk };
|
||||
resp.Error.Add("Error al crear conexión con olivia task (no se pudo crear socket)");
|
||||
return resp;
|
||||
}
|
||||
|
||||
str_cfg = cfg;
|
||||
/*
|
||||
|
|
@ -61,18 +73,28 @@ namespace OliviaAddInPro.Services
|
|||
{
|
||||
run();
|
||||
};*/
|
||||
return run();
|
||||
var res = run();
|
||||
try
|
||||
{
|
||||
soc.termina();
|
||||
}
|
||||
catch
|
||||
{
|
||||
res.Error.Add("Error al cerrar la conexion con olivia task (no se pudo cerrar el socket)");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
private Respuesta<bool> run()
|
||||
private Respuesta<TiposEjecucion> run()
|
||||
{
|
||||
int nint = 0;
|
||||
int nint_max = 10;
|
||||
int nint_max = 5;
|
||||
bool sal = false;
|
||||
bool first_send_cfg = true;
|
||||
bool fin = false;
|
||||
int lastprog = 0;
|
||||
var res = new Respuesta<bool>() { Value = false };
|
||||
|
||||
var res = new Respuesta<TiposEjecucion>() { Value = TiposEjecucion.FinEjecNOk };
|
||||
cps.SetProceso("Procesando Datos");
|
||||
cps.SetProgress(0);
|
||||
try
|
||||
{
|
||||
do
|
||||
|
|
@ -87,7 +109,7 @@ namespace OliviaAddInPro.Services
|
|||
if (nint >= nint_max)
|
||||
{
|
||||
res.Error.Add("Error en la comunicación con OliviaTask");
|
||||
var act = new Respuesta<TiposActu>() { Value = TiposActu.ActuMal };
|
||||
var act = new Respuesta<TiposActu>() { Value = TiposActu.ActuFinNOk };
|
||||
act.Error.AddRange(res.Error);
|
||||
actualiza(act);
|
||||
sal = true;
|
||||
|
|
@ -96,10 +118,14 @@ namespace OliviaAddInPro.Services
|
|||
nint++;
|
||||
}
|
||||
else
|
||||
{
|
||||
first_send_cfg = false;
|
||||
nint = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (cps.Progressor.CancellationToken.IsCancellationRequested) //mira a ver si ha cancelado el usuario
|
||||
int result = Environment.TickCount & Int32.MaxValue; //para que el tickcount no sea negativo
|
||||
if (cps.Getcancelled()) //mira a ver si ha cancelado el usuario
|
||||
{
|
||||
//se ha cancelado, lo envía al OliviaTask
|
||||
envia_cancel();
|
||||
|
|
@ -109,15 +135,29 @@ namespace OliviaAddInPro.Services
|
|||
{
|
||||
cancela_permu = false;
|
||||
}
|
||||
if(!fin) //si no ha finalizado normal, el usuario lo ha cancelado
|
||||
res.Error.Add("Proceso Cancelado por el usuario");
|
||||
}
|
||||
else if (!first_send_cfg && ((Math.Abs(Environment.TickCount) - lastprog) >= m_tm_progr) && !fin) //en caso normal, todo va bien, pide el progreso y la tarea
|
||||
else if (!first_send_cfg && ((result - lastprog) >= m_tm_progr) && !fin) //en caso normal, todo va bien, pide el progreso y la tarea
|
||||
{
|
||||
//solo pide la programación cada m_tm_progr milis
|
||||
var pp = pide_progr();
|
||||
if (pp .Value> TiposActu.ActuFinOk)
|
||||
if (pp.Value> TiposActu.ActuFinOk)
|
||||
fin = true;
|
||||
if(pp.HasError)
|
||||
{
|
||||
if (nint >= nint_max)
|
||||
{
|
||||
res.Error.Add(pp.Error.FirstOrDefault());
|
||||
sal = true;
|
||||
}
|
||||
else
|
||||
nint++;
|
||||
}
|
||||
if (pp.Value == TiposActu.ActuFinNOk)
|
||||
res.Error.Add("Finalizado proceso con fallos");
|
||||
actualiza(pp);
|
||||
lastprog = Environment.TickCount;
|
||||
lastprog = result;
|
||||
}
|
||||
|
||||
} while (!sal);
|
||||
|
|
@ -130,7 +170,7 @@ namespace OliviaAddInPro.Services
|
|||
return res;
|
||||
}
|
||||
if (!res.HasError)
|
||||
res.Value = true;
|
||||
res.Value = TiposEjecucion.FinEjecOk;
|
||||
return res;
|
||||
}
|
||||
//funciones auxiliares----------------------------------------
|
||||
|
|
@ -138,7 +178,7 @@ namespace OliviaAddInPro.Services
|
|||
{
|
||||
if (!conectado)
|
||||
{
|
||||
if (!soc.conecta(Ip, Puerto))
|
||||
if (!soc.conecta(Ip, Puerto, Ip))
|
||||
{
|
||||
conectado = false;
|
||||
return false;
|
||||
|
|
@ -388,6 +428,7 @@ namespace OliviaAddInPro.Services
|
|||
{
|
||||
pon_progr(100);
|
||||
pon_texto("Finalizado proceso con éxito");
|
||||
pon_textBtn("Finalizar");
|
||||
break;
|
||||
}
|
||||
case TiposActu.ActuFinNOk:
|
||||
|
|
@ -395,18 +436,21 @@ namespace OliviaAddInPro.Services
|
|||
pon_progr(100);
|
||||
err_str = "Finalizado proceso con fallos\n" + tarea;
|
||||
pon_texto(err_str);
|
||||
pon_textBtn("Finalizar");
|
||||
break;
|
||||
}
|
||||
case TiposActu.ActuSect:
|
||||
{
|
||||
pon_progr(100);
|
||||
pon_texto("Finalizada sectorización\n" + tarea);
|
||||
pon_textBtn("Finalizar");
|
||||
break;
|
||||
}
|
||||
case TiposActu.ActuPlan:
|
||||
{
|
||||
pon_progr(100);
|
||||
pon_texto("Finalizada planificación\n" + tarea);
|
||||
pon_textBtn("Finalizar");
|
||||
break;
|
||||
}
|
||||
case TiposActu.ActuPermu:
|
||||
|
|
@ -441,8 +485,13 @@ namespace OliviaAddInPro.Services
|
|||
*/
|
||||
private void pon_texto(String txt)
|
||||
{
|
||||
cps.Message = txt;
|
||||
cps.SetEstado(txt);
|
||||
}
|
||||
private void pon_textBtn(String txt)
|
||||
{
|
||||
cps.SetTextBtn(txt);
|
||||
}
|
||||
|
||||
/*
|
||||
* Para poder actualizar la barra de progreso hay que llamar a invoke
|
||||
* porque está desde otro thread
|
||||
|
|
@ -452,6 +501,7 @@ namespace OliviaAddInPro.Services
|
|||
{
|
||||
//cps.Status
|
||||
}
|
||||
|
||||
/*
|
||||
* Para poder actualizar la barra de progreso hay que llamar a invoke
|
||||
* porque está desde otro thread
|
||||
|
|
@ -463,14 +513,24 @@ namespace OliviaAddInPro.Services
|
|||
|
||||
|
||||
if ((actu == TiposActu.ActuMal) || (actu == TiposActu.ActuFinNOk))
|
||||
cps.Status = "Proceso Finalizado con errores.";
|
||||
cps.SetProceso("Proceso Finalizado con errores.");
|
||||
else if(actu == TiposActu.ActuFinOk)
|
||||
cps.Status = "Proceso Finalizado.";
|
||||
cps.SetProceso("Proceso Finalizado.");
|
||||
|
||||
if (actu > TiposActu.ActuFinOk)
|
||||
cps.Status = "Calculando...";
|
||||
if ((actu == TiposActu.ActuPermu) && !cancela)
|
||||
cps.Status = "Calculando Permutaciones..."; ;
|
||||
if ((actu == TiposActu.ActuMal) || (actu == TiposActu.ActuFinNOk))
|
||||
cps.PonBarColorRojo();
|
||||
else
|
||||
cps.PonBarColorVerde();
|
||||
|
||||
/*if (actu > TiposActu.ActuFinOk)
|
||||
cps.SetEstado("Calculando...");
|
||||
if ((actu == TiposActu.ActuPermu) && !cancela)
|
||||
cps.SetEstado("Calculando Permutaciones...");
|
||||
|
||||
if (actu > TiposActu.ActuFinOk)
|
||||
button_canc.Text = "Finalizar";
|
||||
if ((actu == TiposActu.ActuPermu) && !cancela)
|
||||
button_canc.Text = "Parar permu.";*/
|
||||
}
|
||||
/*
|
||||
* Para poder actualizar la barra de progreso hay que llamar a invoke
|
||||
|
|
@ -479,7 +539,15 @@ namespace OliviaAddInPro.Services
|
|||
*/
|
||||
private void pon_progr(int pro)
|
||||
{
|
||||
cps.Value = (uint)pro;
|
||||
cps.SetProgress( pro);
|
||||
}
|
||||
|
||||
//configura los parámetros de la conexión
|
||||
public void ConfigConex()
|
||||
{
|
||||
var conf = ConfigServ.Serv.Leer();
|
||||
Puerto = conf.Puerto;
|
||||
Ip = conf.Ip;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,511 @@
|
|||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using OliviaAddIn;
|
||||
using OliviaAddInPro.Model;
|
||||
using OliviaAddInPro.Model.contract;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OliviaAddInPro.Services
|
||||
{
|
||||
public class ProcesoEjecServ
|
||||
{
|
||||
Cstr_socket soc = null;
|
||||
int m_out=0;
|
||||
int m_miliseconds=200;
|
||||
int m_tm_progr=1000;
|
||||
int modo_fin = 0;
|
||||
bool cancela = false;
|
||||
bool cancela_fin = false;
|
||||
bool conectado = false;
|
||||
bool permu = false;
|
||||
bool cancela_permu = false;
|
||||
int progr = 0;
|
||||
string args = "";
|
||||
string str_cfg = "";
|
||||
string tarea = "";
|
||||
public string err_str = "";
|
||||
double x, y;
|
||||
IprocessManager cps;
|
||||
enum TiposActu
|
||||
{
|
||||
ActuMal,
|
||||
ActuNoActu,
|
||||
ActuBien,
|
||||
ActuPermu,
|
||||
ActuMulti,
|
||||
ActuFinOk,
|
||||
ActuSect,
|
||||
ActuPlan,
|
||||
ActuFinNOk,
|
||||
ActuN,
|
||||
}
|
||||
|
||||
public string Ip { get; set; }
|
||||
public int Puerto { get; set; }
|
||||
|
||||
public ProcesoEjecServ()
|
||||
{
|
||||
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
public Respuesta<TiposEjecucion> start(string cfg, CancelableProgressorSource cps)
|
||||
=======
|
||||
public Respuesta<bool> start(string cfg, IprocessManager cps)
|
||||
>>>>>>> Gerardo/MarchandoUnaDe
|
||||
{
|
||||
this.cps = cps;
|
||||
soc = new Cstr_socket();
|
||||
|
||||
str_cfg = cfg;
|
||||
/*
|
||||
await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
|
||||
{
|
||||
run();
|
||||
};*/
|
||||
return run();
|
||||
}
|
||||
private Respuesta<TiposEjecucion> run()
|
||||
{
|
||||
int nint = 0;
|
||||
int nint_max = 5;
|
||||
bool sal = false;
|
||||
bool first_send_cfg = true;
|
||||
bool fin = false;
|
||||
int lastprog = 0;
|
||||
var res = new Respuesta<TiposEjecucion>() { Value = TiposEjecucion.FinEjecNOk };
|
||||
|
||||
try
|
||||
{
|
||||
do
|
||||
{
|
||||
Thread.Sleep(m_miliseconds);
|
||||
|
||||
if (first_send_cfg)//a continuación envía la configuración
|
||||
{
|
||||
Thread.Sleep(500);
|
||||
if (!envia_cfg())
|
||||
{
|
||||
if (nint >= nint_max)
|
||||
{
|
||||
res.Error.Add("Error en la comunicación con OliviaTask");
|
||||
var act = new Respuesta<TiposActu>() { Value = TiposActu.ActuFinNOk };
|
||||
act.Error.AddRange(res.Error);
|
||||
actualiza(act);
|
||||
sal = true;
|
||||
}
|
||||
else
|
||||
nint++;
|
||||
}
|
||||
else
|
||||
{
|
||||
first_send_cfg = false;
|
||||
nint = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (cps.Getcancelled()) //mira a ver si ha cancelado el usuario
|
||||
{
|
||||
//se ha cancelado, lo envía al OliviaTask
|
||||
envia_cancel();
|
||||
if (!cancela_permu)
|
||||
sal = true;
|
||||
else
|
||||
{
|
||||
cancela_permu = false;
|
||||
}
|
||||
}
|
||||
else if (!first_send_cfg && ((Math.Abs(Environment.TickCount) - lastprog) >= m_tm_progr) && !fin) //en caso normal, todo va bien, pide el progreso y la tarea
|
||||
{
|
||||
//solo pide la programación cada m_tm_progr milis
|
||||
var pp = pide_progr();
|
||||
if (pp .Value> TiposActu.ActuFinOk)
|
||||
fin = true;
|
||||
if(pp.HasError)
|
||||
{
|
||||
if (nint >= nint_max)
|
||||
{
|
||||
res.Error.Add(pp.Error.FirstOrDefault());
|
||||
sal = true;
|
||||
}
|
||||
else
|
||||
nint++;
|
||||
}
|
||||
actualiza(pp);
|
||||
lastprog = Environment.TickCount;
|
||||
}
|
||||
|
||||
} while (!sal);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
res.Error.Add(e.Message);
|
||||
//MessageBox.Show("Error durante el proceso.", "Olivia", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return res;
|
||||
}
|
||||
if (!res.HasError)
|
||||
res.Value = TiposEjecucion.FinEjecOk;
|
||||
return res;
|
||||
}
|
||||
//funciones auxiliares----------------------------------------
|
||||
private bool conecta()
|
||||
{
|
||||
if (!conectado)
|
||||
{
|
||||
if (!soc.conecta(Ip, Puerto))
|
||||
{
|
||||
conectado = false;
|
||||
return false;
|
||||
}
|
||||
conectado = true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Envía la información de la configuración por socket a OliviaTask
|
||||
*/
|
||||
public bool envia_cfg()
|
||||
{
|
||||
string args;
|
||||
|
||||
try
|
||||
{
|
||||
if (!conecta())
|
||||
return false;
|
||||
|
||||
if (str_cfg == null || str_cfg.Length == 0)
|
||||
return false;
|
||||
|
||||
if (!soc.envia(str_cfg))
|
||||
{
|
||||
conectado = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
args = soc.recibe();
|
||||
if ((args.Length == 0) || (args != GeneralDef.SockConfOk))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Pide por socket la información de sectorización a OliviaTask
|
||||
*/
|
||||
private bool pide_sect()
|
||||
{
|
||||
//pide sectorización porque ya ha sido avisado de que ha terminado
|
||||
try
|
||||
{
|
||||
if (!conecta())
|
||||
return false;
|
||||
|
||||
//pide secto
|
||||
if (!soc.envia(GeneralDef.SockSect))
|
||||
{
|
||||
conectado = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
//recibe sectorización
|
||||
args = soc.recibe();
|
||||
if (args.Length == 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Pide por socket la información de progreso a OliviaTask
|
||||
* Devuelve 0 si ha ido mal, 1 si ha ido bien, 2 si ha recibido que hay que pedir sectorización
|
||||
*/
|
||||
private Respuesta<TiposActu> pide_progr()
|
||||
{
|
||||
TiposActu tt;
|
||||
int i;
|
||||
var res = new Respuesta<TiposActu> { Value = TiposActu.ActuMal };
|
||||
//pide progreso y tarea por la que va
|
||||
try
|
||||
{
|
||||
if (!conecta())
|
||||
{
|
||||
res.Error.Add("Error en la comunicación con OliviaTask");
|
||||
return res;
|
||||
}
|
||||
|
||||
//pide progreso
|
||||
if (!soc.envia(GeneralDef.SockProgr))
|
||||
{
|
||||
conectado = false;
|
||||
res.Error.Add("Error en la comunicación con OliviaTask");
|
||||
return res;
|
||||
}
|
||||
|
||||
//recibe progreso
|
||||
args = soc.recibe();
|
||||
if (args.Length == 0)
|
||||
{
|
||||
res.Value = TiposActu.ActuNoActu;
|
||||
return res;
|
||||
}
|
||||
|
||||
//comprueba progreso
|
||||
try
|
||||
{
|
||||
progr = Convert.ToInt32(args);
|
||||
if (progr < 0 || progr > GeneralDef.ProgrMax)
|
||||
{
|
||||
res.Value = TiposActu.ActuNoActu;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
res.Value = TiposActu.ActuNoActu;
|
||||
return res;
|
||||
}
|
||||
|
||||
//pide tarea
|
||||
if (!soc.envia(GeneralDef.SockTarea))
|
||||
{
|
||||
res.Error.Add( "");
|
||||
return res;
|
||||
}
|
||||
|
||||
//recibe tarea
|
||||
args = soc.recibe();
|
||||
if (args.Length == 0)
|
||||
{
|
||||
res.Error.Add("Error recibe tarea mal");
|
||||
return res;
|
||||
}
|
||||
if (args == "0") //se ha mezclado el progreso, vuelve a recibir la tarea
|
||||
args = soc.recibe();
|
||||
if (args.Length == 0)
|
||||
{
|
||||
res.Error.Add("Error recibe tarea mal");
|
||||
return res;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
tt = TiposActu.ActuBien;
|
||||
//comprueba tarea
|
||||
if (args.StartsWith(GeneralDef.SockSectFin))
|
||||
{
|
||||
i = GeneralDef.SockSectFin.Length;
|
||||
tt = TiposActu.ActuSect;
|
||||
}
|
||||
else if (args.StartsWith(GeneralDef.SockPlanFin))
|
||||
{
|
||||
i = GeneralDef.SockPlanFin.Length;
|
||||
tt = TiposActu.ActuPlan;
|
||||
}
|
||||
else if (args.StartsWith(GeneralDef.SockFinOk))
|
||||
{
|
||||
i = GeneralDef.SockFinOk.Length;
|
||||
tt = TiposActu.ActuFinOk;
|
||||
}
|
||||
else if (args.StartsWith(GeneralDef.SockFinNOk))
|
||||
{
|
||||
i = GeneralDef.SockFinNOk.Length;
|
||||
tt = TiposActu.ActuFinNOk;
|
||||
}
|
||||
else if (args.Contains("permutaciones"))
|
||||
{
|
||||
tt = TiposActu.ActuPermu;
|
||||
}
|
||||
else if (args.Contains("multitask"))
|
||||
{
|
||||
tt = TiposActu.ActuMulti;
|
||||
}
|
||||
modo_fin = (int)tt;
|
||||
|
||||
tarea = args.Substring(i);
|
||||
res.Value = tt;
|
||||
return res;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
res.Error.Add("Error al preguntar por el progreso.");
|
||||
return res;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Envía a OliviaTask la orden de cancelar el proceso
|
||||
*/
|
||||
private Respuesta<bool> envia_cancel()
|
||||
{
|
||||
var res = new Respuesta<bool> { Value = false };
|
||||
try
|
||||
{
|
||||
if (!conectado)
|
||||
return res;
|
||||
|
||||
//envía cancel
|
||||
if (!soc.envia(GeneralDef.SockCanc))
|
||||
return res;
|
||||
|
||||
//recibe respuesta
|
||||
args = soc.recibe();
|
||||
if (args.Length == 0)
|
||||
return res;
|
||||
|
||||
//comprueba que ok
|
||||
if (args != GeneralDef.SockCancOk)
|
||||
return res;
|
||||
res.Value = true;
|
||||
return res;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
res.Error.Add("Error al cancelar el progreso.");
|
||||
res.Value = false;
|
||||
//MessageBox.Show("Error al cancelar el progreso.", "Olivia", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Actualiza la barra de progreso
|
||||
* bool fallo_soc : indica si ha habido fallo en el socket
|
||||
*/
|
||||
private void actualiza(Respuesta<TiposActu> actu)
|
||||
{
|
||||
try
|
||||
{
|
||||
permu = false;
|
||||
//actualiza la barra de tarea y el texto
|
||||
switch (actu.Value)
|
||||
{
|
||||
case TiposActu.ActuBien:
|
||||
{
|
||||
pon_progr(progr);
|
||||
pon_texto(tarea);
|
||||
break;
|
||||
}
|
||||
case TiposActu.ActuMal:
|
||||
{
|
||||
if (actu.HasError)
|
||||
pon_texto(actu.Error.FirstOrDefault());
|
||||
else
|
||||
pon_texto(tarea);
|
||||
break;
|
||||
}
|
||||
case TiposActu.ActuFinOk:
|
||||
{
|
||||
pon_progr(100);
|
||||
pon_texto("Finalizado proceso con éxito");
|
||||
break;
|
||||
}
|
||||
case TiposActu.ActuFinNOk:
|
||||
{
|
||||
pon_progr(100);
|
||||
err_str = "Finalizado proceso con fallos\n" + tarea;
|
||||
pon_texto(err_str);
|
||||
break;
|
||||
}
|
||||
case TiposActu.ActuSect:
|
||||
{
|
||||
pon_progr(100);
|
||||
pon_texto("Finalizada sectorización\n" + tarea);
|
||||
break;
|
||||
}
|
||||
case TiposActu.ActuPlan:
|
||||
{
|
||||
pon_progr(100);
|
||||
pon_texto("Finalizada planificación\n" + tarea);
|
||||
break;
|
||||
}
|
||||
case TiposActu.ActuPermu:
|
||||
{
|
||||
permu = true;
|
||||
pon_texto(tarea);
|
||||
//pon_estilo(ProgressBarStyle.Marquee);
|
||||
break;
|
||||
}
|
||||
case TiposActu.ActuMulti:
|
||||
{
|
||||
pon_texto(tarea);
|
||||
//pon_estilo(ProgressBarStyle.Marquee);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return;
|
||||
}
|
||||
/*
|
||||
if (actu != TiposActu.ActuPermu && actu != TiposActu.ActuMulti)
|
||||
pon_estilo(ProgressBarStyle.Continuous);*/
|
||||
pon_barstate(actu.Value);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//MessageBox.Show("Error al actualizar el progreso.", "Olivia", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Para poder actualizar el texto de la ventana de progreso hay que llamar a invoke
|
||||
* porque está desde otro thread
|
||||
*/
|
||||
private void pon_texto(String txt)
|
||||
{
|
||||
cps.SetEstado(txt);
|
||||
}
|
||||
/*
|
||||
* Para poder actualizar la barra de progreso hay que llamar a invoke
|
||||
* porque está desde otro thread
|
||||
* Actualiza el tipo de progreso y el texto
|
||||
*/
|
||||
private void pon_estilo()
|
||||
{
|
||||
//cps.Status
|
||||
}
|
||||
/*
|
||||
* Para poder actualizar la barra de progreso hay que llamar a invoke
|
||||
* porque está desde otro thread
|
||||
* Actualiza el estilo para indicar que ha habido error
|
||||
*/
|
||||
private void pon_barstate(TiposActu actu)
|
||||
{
|
||||
int col = 1;
|
||||
|
||||
|
||||
if ((actu == TiposActu.ActuMal) || (actu == TiposActu.ActuFinNOk))
|
||||
cps.SetProceso("Proceso Finalizado con errores.");
|
||||
else if(actu == TiposActu.ActuFinOk)
|
||||
cps.SetProceso("Proceso Finalizado.");
|
||||
|
||||
if (actu > TiposActu.ActuFinOk)
|
||||
cps.SetEstado("Calculando...");
|
||||
if ((actu == TiposActu.ActuPermu) && !cancela)
|
||||
cps.SetEstado("Calculando Permutaciones...");
|
||||
}
|
||||
/*
|
||||
* Para poder actualizar la barra de progreso hay que llamar a invoke
|
||||
* porque está desde otro thread
|
||||
* Actualiza el progreso
|
||||
*/
|
||||
private void pon_progr(int pro)
|
||||
{
|
||||
cps.SetProgress( pro);
|
||||
}
|
||||
|
||||
//configura los parámetros de la conexión
|
||||
public void ConfigConex()
|
||||
{
|
||||
var conf = ConfigServ.Serv.Leer();
|
||||
Puerto = conf.Puerto;
|
||||
Ip = conf.Ip;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -17,8 +17,9 @@ namespace OliviaAddInPro.Services
|
|||
|
||||
public RecogidaServ(Recogida _reco)
|
||||
{
|
||||
if (_reco == null)
|
||||
_reco = OliviaGlob.Reco;
|
||||
reco = _reco;
|
||||
RellenaFiltrosReco();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -27,22 +28,24 @@ namespace OliviaAddInPro.Services
|
|||
*/
|
||||
public int CompruebaCamposReco(string pathCapa)
|
||||
{
|
||||
int NCAMPS = 6;
|
||||
int NCAMPS = 5;
|
||||
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);
|
||||
|
||||
camps[0] = RecogidaDef.campos_def.cons_fracc;
|
||||
camps[1] = RecogidaDef.campos_def.cons_nomrec;
|
||||
camps[2] = RecogidaDef.campos_def.cons_lateral;
|
||||
camps[3] = RecogidaDef.campos_def.cons_uds;
|
||||
camps[4] = RecogidaDef.campos_def.cons_kgrec;
|
||||
//camps[5] = RecogidaDef.campos_def.cons_id;
|
||||
int compCamp = HelperGdb.CheckFileds(pathCapa, camps);
|
||||
ErrStr = HelperGdb.OutStr;
|
||||
if (compCamp == 0)
|
||||
return 0;
|
||||
else if (compCamp == 1 && ErrStr.Contains(RecogidaDef.campos_def.cons_kgrec))
|
||||
else if (compCamp == 1 && HelperGdb.OutStr.Contains(RecogidaDef.campos_def.cons_kgrec)) //le falta el de kg recogida, que igual no le hace falta
|
||||
return 1;
|
||||
else
|
||||
return 2;
|
||||
return 2; //error o le falta 1 que no es el de kg reco o más
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -61,13 +64,11 @@ namespace OliviaAddInPro.Services
|
|||
* Modo 0, sectorizar
|
||||
* Modo 1, planificar
|
||||
*/
|
||||
public TareaRes Ejecuta(ModosEjec modo)
|
||||
public Respuesta<bool> Ejecuta(ModosEjec modo)
|
||||
{
|
||||
var res = new TareaRes()
|
||||
var res = new Respuesta<bool>()
|
||||
{
|
||||
Errores = false,
|
||||
data = null,
|
||||
msg = ""
|
||||
Value = false
|
||||
};
|
||||
|
||||
com = (TratamientoComun)reco;
|
||||
|
|
@ -78,24 +79,33 @@ namespace OliviaAddInPro.Services
|
|||
|
||||
if (!PreparaConsulta(out nombFileAmbs))
|
||||
{
|
||||
res.msg = "No se ha seleccionado una consulta válida" + reco.ConsultaAmbs;
|
||||
res.Errores = true;
|
||||
res.Error.Add("No se ha seleccionado una consulta válida" + reco.ConsultaAmbs);
|
||||
return res;
|
||||
}
|
||||
if (com.ProgrSrc._ProgrSrc.Getcancelled())
|
||||
{
|
||||
res.Error.Add(Resource1.String_cancel_progreso);
|
||||
return res;
|
||||
}
|
||||
|
||||
//Prepara nombre
|
||||
//Pone nombre al shape en función de los ámbitos, el tratamiento, y los polígonos + timestamp
|
||||
reco.NombreShpExp_PrefTto = nombFileAmbs + DameStrPoligs();
|
||||
|
||||
string msg = "";
|
||||
//comienza ejecucion
|
||||
if (!LanzaEjec(modo, out msg))
|
||||
if (!ExportaEjec(modo, out msg))
|
||||
{
|
||||
res.Errores = true;
|
||||
res.msg = msg;
|
||||
res.Error.Add(msg);
|
||||
return res;
|
||||
}
|
||||
|
||||
if (com.ProgrSrc._ProgrSrc.Getcancelled())
|
||||
{
|
||||
res.Error.Add(Resource1.String_cancel_progreso);
|
||||
return res;
|
||||
}
|
||||
//cierra las capas que se han abierto durante la exportación
|
||||
CierraCapas();
|
||||
res.Value = true;
|
||||
return res;
|
||||
|
||||
}
|
||||
|
|
@ -147,25 +157,5 @@ namespace OliviaAddInPro.Services
|
|||
return consulta;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rellena el array de filtros en base a la config
|
||||
*/
|
||||
public void RellenaFiltrosReco()
|
||||
{
|
||||
//se rellena el array de filtros
|
||||
RecogidaDef.filtro_str = new string[RecogidaDef.tipos_fracc_str.Length + RecogidaDef.tipos_carg_str.Length];
|
||||
for (int i = 0; i < RecogidaDef.tipos_fracc_str.Length; i++)
|
||||
{
|
||||
//se comprueba que tipo de fracción se ha seleccionado. Si se ha seleccionado una fracción sin nombre (el campo en la capa es NULL, y en el comboBox de fracciiones aparece como "-") hay que modificar el filtro
|
||||
if (RecogidaDef.tipos_fracc_str[i] == "-")
|
||||
RecogidaDef.filtro_str[i] = RecogidaDef.campos_def.cons_fracc + " IS NULL";
|
||||
else
|
||||
RecogidaDef.filtro_str[i] = RecogidaDef.campos_def.cons_fracc + "= '" + RecogidaDef.tipos_fracc_str[i] + "'";
|
||||
}
|
||||
for (int i = RecogidaDef.tipos_fracc_str.Length; i < RecogidaDef.filtro_str.Length; i++)
|
||||
{
|
||||
RecogidaDef.filtro_str[i] = RecogidaDef.campos_def.cons_nomrec + "= '" + RecogidaDef.tipos_carg_str[i - RecogidaDef.tipos_fracc_str.Length] + "'";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
<Window x:Class="OliviaAddInPro.MarchandoUnaDe"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="clr-namespace:OliviaAddInPro"
|
||||
xmlns:local="clr-namespace:OliviaAddInPro"
|
||||
mc:Ignorable="d"
|
||||
Title="Olivia" Height="227" Width="449"
|
||||
d:DataContext="{Binding Path=ui.MarchandoUnaDeViewModel}"
|
||||
WindowStartupLocation="CenterOwner" Icon="../OliviaIconPro.ico"
|
||||
ResizeMode="NoResize">
|
||||
<Grid>
|
||||
<Label Content="{Binding TextProceso}" HorizontalAlignment="Left" Margin="30,10,0,0" VerticalAlignment="Top" Width="350" Height="26"/>
|
||||
<ProgressBar Minimum="0" Maximum="100" HorizontalAlignment="Left" Value="{Binding Progreso, UpdateSourceTrigger=PropertyChanged}" Height="20" Margin="29,40,0,0" VerticalAlignment="Top" Width="350" Foreground="{Binding ColorBar}">
|
||||
</ProgressBar>
|
||||
<Grid HorizontalAlignment="Left" Margin="30,70,0,0" VerticalAlignment="Top" Width="350" Height="70">
|
||||
<ScrollViewer MaxHeight="70" >
|
||||
<TextBlock Text="{Binding TextEstado}" TextWrapping="WrapWithOverflow" />
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
<Button Content="{Binding TextBtn}" HorizontalAlignment="Left" Margin="304,155,0,0" VerticalAlignment="Top" Width="75" IsEnabled ="{Binding EnabBtn}" Click="Button_Click"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
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.Shapes;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
/// <summary>
|
||||
/// Lógica de interacción para MarchandoUnaDe.xaml
|
||||
/// </summary>
|
||||
public partial class MarchandoUnaDe : Window
|
||||
{
|
||||
public MarchandoUnaDe()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = new MarchandoUnaDeViewModel();
|
||||
//WindowStyle = WindowStyle.None;
|
||||
}
|
||||
|
||||
public MarchandoUnaDeViewModel GetViewModel()
|
||||
{
|
||||
if (DataContext is MarchandoUnaDeViewModel m)
|
||||
return m;
|
||||
return null;
|
||||
}
|
||||
|
||||
protected override void OnClosing(CancelEventArgs e)
|
||||
{
|
||||
GetViewModel().Cancelado = true;
|
||||
base.OnClosing(e);
|
||||
e.Cancel = true;
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
GetViewModel().CancelaOperacion();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -17,11 +17,14 @@
|
|||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Content="Guardar" Grid.Column="0" VerticalAlignment="Top" Width="75" Style="{DynamicResource Esri_Button}" Click="OnGuardar"/>
|
||||
<Button Content="Resetear" Grid.Column="1" VerticalAlignment="Top" Width="75" Style="{DynamicResource Esri_Button}" Click="OnRefres"/>
|
||||
<Button Content="Releer Config." Grid.Column="1" VerticalAlignment="Top" Style="{DynamicResource Esri_Button}" Click="OnRefres"/>
|
||||
</Grid>
|
||||
<xctk:PropertyGrid x:Name="Configuracion" SelectedObject="{Binding Configuracion}" HorizontalAlignment="Stretch">
|
||||
<!-- Only the following properties will be displayed in the PropertyGrid -->
|
||||
|
||||
<xctk:PropertyGrid x:Name="Configuracion" SelectedObject="{Binding Configuracion}" HorizontalAlignment="Stretch" PropertyValueChanged="Configuracion_PropertyValueChanged" ShowDescriptionByTooltip="True">
|
||||
<xctk:PropertyGrid.CategoryGroupHeaderTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Background="{DynamicResource Esri_BackgroundPressedBrush}" Foreground="{DynamicResource Esri_TextStyleDefaultBrush}"/>
|
||||
</DataTemplate>
|
||||
</xctk:PropertyGrid.CategoryGroupHeaderTemplate>
|
||||
</xctk:PropertyGrid>
|
||||
</StackPanel>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ namespace OliviaAddInPro
|
|||
public PaneConfigView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
private void OnGuardar(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
|
@ -43,6 +42,12 @@ namespace OliviaAddInPro
|
|||
mod.OnRefres();
|
||||
}
|
||||
|
||||
|
||||
private void Configuracion_PropertyValueChanged(object sender, Xceed.Wpf.Toolkit.PropertyGrid.PropertyValueChangedEventArgs e)
|
||||
{
|
||||
if (DataContext is PaneConfigViewModel mod)
|
||||
{
|
||||
mod.hay_cambios = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
<UserControl x:Class="OliviaAddInPro.View.Configuracion.PropertyGridFilePickerDataset"
|
||||
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:local="clr-namespace:OliviaAddInPro.View.Configuracion"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
x:Name="TheControl">
|
||||
<DockPanel>
|
||||
<Button x:Name="PickFileButton" Content="…" Click="PickFileButton_Click" DockPanel.Dock="Right" Width="15" />
|
||||
<TextBox Text="{Binding ElementName=TheControl, Path=Value}" />
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
using Microsoft.Win32;
|
||||
using OliviaAddInPro.Helper;
|
||||
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 Xceed.Wpf.Toolkit.PropertyGrid;
|
||||
using Xceed.Wpf.Toolkit.PropertyGrid.Editors;
|
||||
using static OliviaAddInPro.Helper.HelperGdb;
|
||||
|
||||
namespace OliviaAddInPro.View.Configuracion
|
||||
{
|
||||
/// <summary>
|
||||
/// Lógica de interacción para PropertyGridFilePicker.xaml
|
||||
/// </summary>
|
||||
public partial class PropertyGridFilePickerDataset : ITypeEditor
|
||||
{
|
||||
public PropertyGridFilePickerDataset()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public string Value
|
||||
{
|
||||
get { return (string)GetValue(ValueProperty); }
|
||||
set { SetValue(ValueProperty, value); }
|
||||
}
|
||||
|
||||
// Using a DependencyProperty as the backing store for Value. This enables animation, styling, binding, etc...
|
||||
public static readonly DependencyProperty ValueProperty =
|
||||
DependencyProperty.Register("Value", typeof(string), typeof(PropertyGridFilePickerDataset), new PropertyMetadata(null));
|
||||
|
||||
|
||||
|
||||
public FrameworkElement ResolveEditor(PropertyItem propertyItem)
|
||||
{
|
||||
Binding binding = new Binding("Value");
|
||||
binding.Source = propertyItem;
|
||||
binding.Mode = propertyItem.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay;
|
||||
BindingOperations.SetBinding(this, ValueProperty, binding);
|
||||
return this;
|
||||
}
|
||||
|
||||
private void PickFileButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OpenFileDialog fd = new OpenFileDialog();
|
||||
var st = HelperGdb.OpenFileDialog(TiposOpenFileDlg.OpenDataset, Value);
|
||||
if (!string.IsNullOrEmpty(st))
|
||||
{
|
||||
Value = st;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<UserControl x:Class="OliviaAddInPro.View.Configuracion.PropertyGridFilePickerFolder"
|
||||
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:local="clr-namespace:OliviaAddInPro.View.Configuracion"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
x:Name="TheControl">
|
||||
<DockPanel>
|
||||
<Button x:Name="PickFileButton" Content="…" Click="PickFileButton_Click" DockPanel.Dock="Right" Width="15" />
|
||||
<TextBox Text="{Binding ElementName=TheControl, Path=Value}" />
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
using Microsoft.Win32;
|
||||
using OliviaAddInPro.Helper;
|
||||
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 Xceed.Wpf.Toolkit.PropertyGrid;
|
||||
using Xceed.Wpf.Toolkit.PropertyGrid.Editors;
|
||||
using static OliviaAddInPro.Helper.HelperGdb;
|
||||
|
||||
namespace OliviaAddInPro.View.Configuracion
|
||||
{
|
||||
/// <summary>
|
||||
/// Lógica de interacción para PropertyGridFilePicker.xaml
|
||||
/// </summary>
|
||||
public partial class PropertyGridFilePickerFolder : ITypeEditor
|
||||
{
|
||||
public PropertyGridFilePickerFolder()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public string Value
|
||||
{
|
||||
get { return (string)GetValue(ValueProperty); }
|
||||
set { SetValue(ValueProperty, value); }
|
||||
}
|
||||
|
||||
// Using a DependencyProperty as the backing store for Value. This enables animation, styling, binding, etc...
|
||||
public static readonly DependencyProperty ValueProperty =
|
||||
DependencyProperty.Register("Value", typeof(string), typeof(PropertyGridFilePickerFolder), new PropertyMetadata(null));
|
||||
|
||||
|
||||
|
||||
public FrameworkElement ResolveEditor(PropertyItem propertyItem)
|
||||
{
|
||||
Binding binding = new Binding("Value");
|
||||
binding.Source = propertyItem;
|
||||
binding.Mode = propertyItem.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay;
|
||||
BindingOperations.SetBinding(this, ValueProperty, binding);
|
||||
return this;
|
||||
}
|
||||
|
||||
private void PickFileButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OpenFileDialog fd = new OpenFileDialog();
|
||||
//var st = HelperGdb.SaveFileDlg("Seleccione carpeta", null, null, ArcGIS.Desktop.Catalog.ItemFilters.Folders);
|
||||
var st = HelperGdb.FolderBrowseDlg("Seleccione carpeta", null);
|
||||
if (!string.IsNullOrEmpty(st))
|
||||
{
|
||||
Value = st;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -43,6 +43,7 @@ namespace OliviaAddInPro.View.Configuracion
|
|||
|
||||
public FrameworkElement ResolveEditor(PropertyItem propertyItem)
|
||||
{
|
||||
|
||||
Binding binding = new Binding("Value");
|
||||
binding.Source = propertyItem;
|
||||
binding.Mode = propertyItem.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay;
|
||||
|
|
|
|||
|
|
@ -60,4 +60,29 @@ namespace OliviaAddInPro.View.Configuracion
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class DateTimePickerEditor : Xceed.Wpf.Toolkit.DateTimePicker, ITypeEditor
|
||||
{
|
||||
public DateTimePickerEditor()
|
||||
{
|
||||
Format = Xceed.Wpf.Toolkit.DateTimeFormat.Custom;
|
||||
FormatString = "HH 'h' mm 'm'";
|
||||
//TimePickerVisibility = System.Windows.Visibility.Collapsed;
|
||||
ShowButtonSpinner = true;
|
||||
AutoCloseCalendar = false;
|
||||
ShowDropDownButton = false;
|
||||
TextAlignment = TextAlignment.Left;
|
||||
AutoClipTimeParts = true;
|
||||
}
|
||||
|
||||
public FrameworkElement ResolveEditor(PropertyItem propertyItem)
|
||||
{
|
||||
Binding binding = new Binding("Value");
|
||||
binding.Source = propertyItem;
|
||||
binding.Mode = propertyItem.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay;
|
||||
|
||||
BindingOperations.SetBinding(this, ValueProperty, binding);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@
|
|||
SelectedItem="{Binding SelectedOption}">
|
||||
</frameworkControls:TabIndicator>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1">
|
||||
<ContentPresenter Content="{Binding CurrentSubPanelPage}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1">
|
||||
<ContentPresenter Content="{Binding CurrentSubPanelPage}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="2" Margin="0,20,0,0">
|
||||
<ContentPresenter Name="PaneEjecutar">
|
||||
<ContentPresenter.Content>
|
||||
|
|
@ -77,5 +77,12 @@
|
|||
</ContentPresenter.Content>
|
||||
</ContentPresenter>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="3" Margin="0,70,10,0">
|
||||
<Button x:Name="button_help" Content="" Margin="274,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" RenderTransformOrigin="16.875,0.375" Click="button_help_Click">
|
||||
<Button.Background>
|
||||
<ImageBrush ImageSource="../../Images/help16Pro.png"/>
|
||||
</Button.Background>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ using System.Windows.Media.Imaging;
|
|||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using OliviaAddInPro.Helper;
|
||||
using OliviaAddInPro.Model;
|
||||
|
||||
|
||||
namespace OliviaAddInPro
|
||||
|
|
@ -49,5 +50,10 @@ namespace OliviaAddInPro
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
private void button_help_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OliviaGlob.OpenManual();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<CheckBox x:Name="checkBox_sentidocirc" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}"
|
||||
Content="Respeta el sentido de circulación" IsChecked="{Binding RespSentCirc}" HorizontalAlignment="Left" Margin="20,5,0,0" VerticalAlignment="Top"/>
|
||||
Content="Respeta el sentido de circulación" IsChecked="{Binding RespCirc}" HorizontalAlignment="Left" Margin="20,5,0,0" VerticalAlignment="Top"/>
|
||||
|
||||
<Grid Margin="0,5,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace OliviaAddInPro
|
|||
private void button_caparestr_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string texto = "";
|
||||
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto);
|
||||
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto, "", true);
|
||||
if (DataContext is PaneLimpiezaSub2ViewModel mod)
|
||||
{
|
||||
mod.GeomRestr = geom;
|
||||
|
|
@ -55,7 +55,7 @@ namespace OliviaAddInPro
|
|||
private void button_capaniv_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string texto = "";
|
||||
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto);
|
||||
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto, "", true);
|
||||
if (DataContext is PaneLimpiezaSub2ViewModel mod)
|
||||
{
|
||||
mod.GeomNiv = geom;
|
||||
|
|
@ -69,7 +69,7 @@ namespace OliviaAddInPro
|
|||
private void button_capazon_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string texto = "";
|
||||
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto);
|
||||
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto, "", true);
|
||||
if (DataContext is PaneLimpiezaSub2ViewModel mod)
|
||||
{
|
||||
mod.GeomZon = geom;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<ComboBox Margin="10,5,9.6,0"
|
||||
ItemsSource="{Binding Path=Fields}" Name="comboBoxFields" SelectedItem="{Binding Path=SelField, Mode = TwoWay}" SelectedIndex="{Binding Path=SelIndx, Mode = TwoWay}" SelectionChanged="comboBoxFields_SelectionChanged"/>
|
||||
<Label Margin="15,0,0,0" Content="Atributo"/>
|
||||
<ListBox Margin="10,5,9.6,0" Height="127" ItemsSource="{Binding Path=Attributes}" Name="listBoxAttributes" SelectionMode="{Binding SelMode}"/>
|
||||
<ListBox Margin="10,5,9.6,0" Height="127" ItemsSource="{Binding Path=Attributes}" Name="listBoxAttributes" SelectionMode="{Binding SelMode}" MouseDoubleClick="listBoxAttributes_MouseDoubleClick"/>
|
||||
<Button Margin="167,25,9.6,0" Content="Aceptar" Opacity="0.75" Click="Button_Click"/>
|
||||
</StackPanel>
|
||||
</controls:ProWindow>
|
||||
|
|
@ -77,5 +77,11 @@ namespace OliviaAddInPro.View
|
|||
else
|
||||
DialogResult = false;
|
||||
}
|
||||
|
||||
private void listBoxAttributes_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
ok = true;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,18 +63,25 @@
|
|||
<ContentPresenter Name="PaneEjecutar">
|
||||
<ContentPresenter.Content>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Grid Margin="0,10,0,0" Height="40 ">
|
||||
<Grid Margin="0,10,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="30"/>
|
||||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition Width="120"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button x:Name="button_secto" Grid.Column="1" Height="40 " Style="{DynamicResource Esri_Button}" Content="Sectorizar y Planif" Margin="10,0,10,0" Click="button_secto_Click" FontStretch="Condensed"/>
|
||||
<Button x:Name="button_planif" Grid.Column="2" Height="40 " Style="{DynamicResource Esri_Button}" Content="Solo Planificar" Margin="10,0,10,0" Click="button_planif_Click"/>
|
||||
<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>
|
||||
<StackPanel Grid.Row="3" Margin="0,70,10,0">
|
||||
<Button x:Name="button_help" Content="" Margin="0,0,0,0" HorizontalAlignment="Right" VerticalAlignment="Top" Width="16" Height="16" BorderThickness="0" RenderTransformOrigin="16.875,0.375" Click="button_help_Click">
|
||||
<Button.Background>
|
||||
<ImageBrush ImageSource="../../Images/help16Pro.png"/>
|
||||
</Button.Background>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
|
|||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using OliviaAddInPro.Helper;
|
||||
|
||||
using OliviaAddInPro.Model;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
|
|
@ -49,5 +49,10 @@ namespace OliviaAddInPro
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
private void button_help_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OliviaGlob.OpenManual();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ComboBox x:Name="comboBox_frac" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposFrac}" HorizontalAlignment="Left" Margin="0,0,0,0" Width="150"
|
||||
SelectionChanged="comboBox_frac_SelectionChanged" SelectedIndex="{Binding Path=TipoFrac, Mode = TwoWay}"
|
||||
|
|
@ -48,7 +49,8 @@
|
|||
</DataTemplate>
|
||||
</-->
|
||||
</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="60" 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="8" PreviewTextInput="txtBox_densCont_PreviewTextInput"/>
|
||||
<Label x:Name="label_densCont" Grid.Column="2" Content="kg/m3" Margin="0,-1,0,0" Visibility="{Binding Path=VisTextDens, Mode = TwoWay}"/>
|
||||
</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">
|
||||
|
|
@ -89,7 +91,7 @@
|
|||
<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}" SelectionChanged="comboBox_tipoCapac_SelectionChanged"/>
|
||||
<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="4" 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"/>
|
||||
</Grid>
|
||||
<Label Content="Tiempo de vaciado de contenedor" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
||||
|
|
@ -98,7 +100,7 @@
|
|||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Margin="0,0,0,8" TextWrapping="NoWrap" Text="{Binding Path=TextTVaci, Mode = TwoWay}" TextAlignment="Right" MaxLength="3" PreviewTextInput="TextBox_PreviewTextInput"/>
|
||||
<TextBox IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Margin="0,0,0,8" TextWrapping="NoWrap" Text="{Binding Path=TextTVaci, Mode = TwoWay}" TextAlignment="Right" MaxLength="4" PreviewTextInput="TextBox_PreviewTextInput"/>
|
||||
<Label Grid.Column="1" Content="seg." Margin="0,-3,0,8"/>
|
||||
</Grid>
|
||||
<Label Margin="15,0,0,0" Content="Planta de descarga" FontWeight="DemiBold"/>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,134 @@
|
|||
using ArcGIS.Desktop.Framework.Contracts;
|
||||
using OliviaAddInPro.Model.contract;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
public class MarchandoUnaDeViewModel : PropertyChangedBase, IprocessManager
|
||||
{
|
||||
string[] barColors = {"Green","Red","Yellow" };
|
||||
enum barColorNum
|
||||
{
|
||||
BarColorsVerde=0,
|
||||
BarColorsRojo,
|
||||
BarColorsAmarillo
|
||||
}
|
||||
public MarchandoUnaDeViewModel()
|
||||
{
|
||||
Cancelado = false;
|
||||
textBtn = "Cancelar";
|
||||
enabBtn = true;
|
||||
colorBar = System.Windows.Media.Brushes.Green;
|
||||
}
|
||||
public bool Cancelado { get; set; }
|
||||
|
||||
private string textProceso;
|
||||
public string TextProceso
|
||||
{
|
||||
get { return textProceso; }
|
||||
set { base.SetProperty(ref textProceso, value, () => TextProceso); }
|
||||
}
|
||||
|
||||
private string textEstado;
|
||||
public string TextEstado
|
||||
{
|
||||
get { return textEstado; }
|
||||
set { base.SetProperty(ref textEstado, value, () => TextEstado); }
|
||||
}
|
||||
private string textBtn;
|
||||
public string TextBtn
|
||||
{
|
||||
get { return textBtn; }
|
||||
set { base.SetProperty(ref textBtn, value, () => TextBtn); }
|
||||
}
|
||||
|
||||
private bool enabBtn;
|
||||
public bool EnabBtn
|
||||
{
|
||||
get { return enabBtn; }
|
||||
set { base.SetProperty(ref enabBtn, value, () => EnabBtn); }
|
||||
}
|
||||
|
||||
private double progreso;
|
||||
public double Progreso
|
||||
{
|
||||
get { return progreso; }
|
||||
set { base.SetProperty(ref progreso, value, () => Progreso); }
|
||||
}
|
||||
|
||||
private System.Windows.Media.Brush colorBar;
|
||||
public System.Windows.Media.Brush ColorBar
|
||||
{
|
||||
get { return colorBar; }
|
||||
set { base.SetProperty(ref colorBar, value, () => ColorBar);
|
||||
}
|
||||
}
|
||||
|
||||
void IprocessManager.SetProceso(string proceso)
|
||||
{
|
||||
TextProceso = proceso;
|
||||
}
|
||||
void IprocessManager.Inicia()
|
||||
{
|
||||
Cancelado = false;
|
||||
TextBtn = "Cancelar";
|
||||
EnabBtn = true;
|
||||
ColorBar = System.Windows.Media.Brushes.Green;
|
||||
|
||||
}
|
||||
void IprocessManager.SetEstado(string estado)
|
||||
{
|
||||
TextEstado = estado;
|
||||
}
|
||||
void IprocessManager.SetTextBtn(string textbtn)
|
||||
{
|
||||
TextBtn = textbtn;
|
||||
}
|
||||
void IprocessManager.SetProgress(double progresPorcent)
|
||||
{
|
||||
Progreso = progresPorcent;
|
||||
}
|
||||
|
||||
double IprocessManager.GetProgress()
|
||||
{
|
||||
return Progreso;
|
||||
}
|
||||
|
||||
bool IprocessManager.Getcancelled()
|
||||
{
|
||||
return Cancelado;
|
||||
}
|
||||
|
||||
void IprocessManager.Setcancelled()
|
||||
{
|
||||
CancelaOperacion();
|
||||
}
|
||||
public void CancelaOperacion()
|
||||
{
|
||||
if(textBtn== "Cancelar")
|
||||
TextProceso = "Cancelando proceso";
|
||||
else
|
||||
TextProceso = "Proceso finalizado.";
|
||||
Cancelado = true;
|
||||
|
||||
//deshabilita el botón
|
||||
EnabBtn = false;
|
||||
}
|
||||
void IprocessManager.PonBarColorVerde()
|
||||
{
|
||||
ColorBar = System.Windows.Media.Brushes.Green;
|
||||
}
|
||||
void IprocessManager.PonBarColorRojo()
|
||||
{
|
||||
Progreso = 100;
|
||||
ColorBar = System.Windows.Media.Brushes.Red;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -18,6 +18,8 @@ using ArcGIS.Desktop.Framework.Threading.Tasks;
|
|||
using ArcGIS.Desktop.Mapping;
|
||||
using OliviaAddInPro.Model;
|
||||
using OliviaAddInPro.View;
|
||||
using OliviaAddInPro.Helper;
|
||||
using OliviaAddInPro.Services;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
|
|
@ -26,9 +28,11 @@ namespace OliviaAddInPro
|
|||
private bool firstTimeShow = true;
|
||||
private static bool hideTemp = false;
|
||||
private const string _dockPaneID = "OliviaAddInPro_DockpaneConfig";
|
||||
PaneConfigViewModel paneConfig;
|
||||
protected DockpaneConfigViewModel()
|
||||
{
|
||||
_currentPage = new PaneConfigViewModel();
|
||||
paneConfig = new PaneConfigViewModel();
|
||||
_currentPage = (PanelViewModelBase) paneConfig;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -43,7 +47,10 @@ namespace OliviaAddInPro
|
|||
|
||||
pane.Activate();
|
||||
}
|
||||
|
||||
protected override void OnHidden()
|
||||
{
|
||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Ninguno);
|
||||
}
|
||||
internal static void Hide_()
|
||||
{
|
||||
DockPane pane = FrameworkApplication.DockPaneManager.Find(_dockPaneID);
|
||||
|
|
@ -64,7 +71,18 @@ namespace OliviaAddInPro
|
|||
if (isVisible == false && !firstTimeShow)
|
||||
{
|
||||
//avisa de cerrar la ventana
|
||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Ninguno);
|
||||
//OliviaGlob.SetFlagTipEjec(TiposEjecucion.Ninguno);
|
||||
if (paneConfig!=null && paneConfig.hay_cambios)
|
||||
{
|
||||
var guardar = HelperGlobal.ponMsg("¿Desea guardar los cambios antes de salir?", System.Windows.MessageBoxImage.Information, "OLIVIA", System.Windows.MessageBoxButton.YesNo);
|
||||
if (guardar)
|
||||
{
|
||||
Respuesta<bool> resp = ConfigServ.Serv.Guardar(paneConfig.Configuracion);
|
||||
if (!resp.Value)
|
||||
HelperGlobal.ponMsg(resp.Error.First());
|
||||
}
|
||||
paneConfig.hay_cambios = false;
|
||||
}
|
||||
}
|
||||
if (firstTimeShow)
|
||||
firstTimeShow = false;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using OliviaAddInPro.Helper;
|
||||
using OliviaAddInPro.Model;
|
||||
using OliviaAddInPro.Services;
|
||||
|
||||
|
|
@ -19,6 +20,8 @@ namespace OliviaAddInPro
|
|||
OnRefres();
|
||||
}
|
||||
|
||||
public bool hay_cambios = false;
|
||||
|
||||
|
||||
public override string DisplayName
|
||||
{
|
||||
|
|
@ -39,12 +42,18 @@ namespace OliviaAddInPro
|
|||
|
||||
public void OnGuardar()
|
||||
{
|
||||
ConfigServ.Serv.Guardar(Configuracion);
|
||||
Respuesta<bool> resp = ConfigServ.Serv.Guardar(Configuracion);
|
||||
if (!resp.Value)
|
||||
HelperGlobal.ponMsg(resp.Error.First());
|
||||
else
|
||||
HelperGlobal.ponMsg("Se ha guardado la configuración");
|
||||
hay_cambios = false;
|
||||
}
|
||||
|
||||
public void OnRefres()
|
||||
{
|
||||
Configuracion = ConfigServ.Serv.Leer();
|
||||
hay_cambios = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,15 +63,13 @@ namespace OliviaAddInPro
|
|||
//The parameter passed to this method will be true if the Dockpane is being opened and it is false when you close the dockpane
|
||||
protected override void OnShow(bool isVisible)
|
||||
{
|
||||
if (isVisible == false && !firstTimeShow && !hideTemp)
|
||||
{
|
||||
//avisa de cerrar la ventana
|
||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Ninguno);
|
||||
}
|
||||
if (firstTimeShow)
|
||||
firstTimeShow = false;
|
||||
}
|
||||
|
||||
protected override void OnHidden()
|
||||
{
|
||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Ninguno);
|
||||
}
|
||||
/// <summary>
|
||||
/// Text shown near the top of the DockPane.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -193,13 +193,12 @@ namespace OliviaAddInPro
|
|||
public PaneLimpiezaSub1ViewModel()
|
||||
{
|
||||
LblCapaElems = Resource1.String_selec_capa;
|
||||
timeTto = 10;
|
||||
textVeloDespl = "10";
|
||||
timeTto = 0;
|
||||
textVeloDespl = "";
|
||||
lblUdsTimeTto = "min";
|
||||
lblUdsVeloDespl = "km/h";
|
||||
limpServ = new LimpiezaServ(null); //no hace falta instancia limp
|
||||
textAnchoVia = LimpiezaDef.Parametros.ancho_via.ToString();
|
||||
|
||||
}
|
||||
/**
|
||||
* Realiza las comprobaciones para cuando se ha abierto una capa
|
||||
|
|
@ -210,8 +209,12 @@ namespace OliviaAddInPro
|
|||
CapaElems = string.Empty;
|
||||
OpsAmbs.Clear();
|
||||
Ambitos.Clear();
|
||||
TipoTto = -1;
|
||||
VisTextAnchoVia = System.Windows.Visibility.Hidden;
|
||||
TextVeloDespl = "";
|
||||
cambia_tiempo_tto();
|
||||
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config); //lo reinicia, por si estaba después de planificar
|
||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.Config2);
|
||||
if (string.IsNullOrEmpty(capa))
|
||||
return false;
|
||||
//comprueba los campos de limpieza
|
||||
|
|
@ -220,7 +223,7 @@ namespace OliviaAddInPro
|
|||
HelperGlobal.ponMsg(limpServ.ErrStr, System.Windows.MessageBoxImage.Warning);
|
||||
return false;
|
||||
}
|
||||
|
||||
LimpiezaDef.forma_filtros();
|
||||
amb_tra_gdb = limpServ.BuscAmbGdb(capa);
|
||||
bool hay_alguno = false;
|
||||
foreach (bool b in amb_tra_gdb)
|
||||
|
|
@ -338,13 +341,13 @@ namespace OliviaAddInPro
|
|||
//permite visualizar los elementos del ancho de vía que se activará cuando se seleccione la opción genérica de ejes de calle siempre y cuando el tiempo de tratamiento sea en ml/h
|
||||
if (UdsTTto != (int)GeneralDef.OlvTiposTto.OlvTipTtoM2h_eje)
|
||||
{
|
||||
VisTextAnchoVia = System.Windows.Visibility.Visible;
|
||||
VisTextAnchoVia = System.Windows.Visibility.Visible;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
VisTextAnchoVia = System.Windows.Visibility.Hidden;
|
||||
}
|
||||
VisTextAnchoVia = System.Windows.Visibility.Hidden;
|
||||
}
|
||||
/*if (((TipoTto == (int)LimpiezaDef.TiposTto.TtoBaldMecCalz) && (SelOpAmb >= 2)) ||
|
||||
((TipoTto == (int)LimpiezaDef.TiposTto.TtoCaidaHoja) && (SelOpAmb >= 2)))
|
||||
EnableListBoxAmb = false; //si uno de los ámbitos es "eje de calle" no se puede combinar con los demás ámbitos
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ using ArcGIS.Desktop.Framework.Contracts;
|
|||
using ArcGIS.Desktop.Framework.Dialogs;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using ArcGIS.Desktop.Mapping;
|
||||
using OliviaAddInPro.Model;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
|
|
@ -23,7 +24,7 @@ namespace OliviaAddInPro
|
|||
{
|
||||
numPtosCtrl = numSect = 3;
|
||||
checkAjustSect = checkSectAuto = false;
|
||||
checkIgnoAis = true;
|
||||
checkIgnoAis = LimpiezaDef.Parametros.igno_ais;
|
||||
enableNSect = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ using ArcGIS.Desktop.Framework.Contracts;
|
|||
using ArcGIS.Desktop.Framework.Dialogs;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using ArcGIS.Desktop.Mapping;
|
||||
using OliviaAddInPro.Model;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
|
|
@ -21,12 +22,12 @@ namespace OliviaAddInPro
|
|||
{
|
||||
public PaneLimpiezaSub4ViewModel()
|
||||
{
|
||||
textPercentTrafico = 80;
|
||||
timeCargDesc = 40;
|
||||
timeDespIniFin = 25;
|
||||
timeIniJornada = 7 * 60 + 30;
|
||||
timeJornadaConv = 8 * 60;
|
||||
timeDescPers = 30;
|
||||
textPercentTrafico = LimpiezaDef.Parametros.reduc_traf;
|
||||
timeCargDesc = LimpiezaDef.Parametros.t_cardesc;
|
||||
timeDespIniFin = LimpiezaDef.Parametros.t_desp;
|
||||
timeIniJornada = LimpiezaDef.Parametros.h_inicio;
|
||||
timeJornadaConv = LimpiezaDef.Parametros.t_conv;
|
||||
timeDescPers = LimpiezaDef.Parametros.t_descanso;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,15 +8,16 @@ using System.Threading.Tasks;
|
|||
using System.Windows.Media.Imaging;
|
||||
using OliviaAddInPro.Helper;
|
||||
using static OliviaAddInPro.Model.ComunDef;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using ArcGIS.Desktop.Framework.Contracts;
|
||||
//using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
//using ArcGIS.Desktop.Framework.Contracts;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
class PaneLimpiezaViewModel : PanelViewModelBase
|
||||
{
|
||||
private PaneLimpiezaSub1ViewModel _subPanel1ViewModel;
|
||||
Limpieza limp;
|
||||
|
||||
public MarchandoUnaDe marchando;
|
||||
public PaneLimpiezaViewModel()
|
||||
{
|
||||
_subPanel1ViewModel = new PaneLimpiezaSub1ViewModel();
|
||||
|
|
@ -79,6 +80,11 @@ namespace OliviaAddInPro
|
|||
return false;
|
||||
}
|
||||
limp.CapaElems = _subPanel1ViewModel.CapaElems;
|
||||
//pone que la capa de elementos es la red navegable, que es la que va a exportar
|
||||
if (_subPanel1ViewModel.SelOpAmb == 1)
|
||||
{
|
||||
limp.CapaElems = OliviaGlob.Paths.PathGdbNw;
|
||||
}
|
||||
|
||||
//lee el tipo tto
|
||||
if (_subPanel1ViewModel.TipoTto == (int)LimpiezaDef.TiposTto.TtoNoDef)
|
||||
|
|
@ -108,16 +114,19 @@ namespace OliviaAddInPro
|
|||
limp.RespCirc = _subPanel1ViewModel.RespCirc;
|
||||
|
||||
//lee velo de desplazamiento
|
||||
int vv = -1;
|
||||
if((!HelperGlobal.Str2Int(_subPanel1ViewModel.TextVeloDespl, out vv)) && (_subPanel1ViewModel.TextVeloDespl!=Resource1.String_velo_nodef))
|
||||
int vv = 0;
|
||||
if (string.Compare(_subPanel1ViewModel.TextVeloDespl, Resource1.String_velo_nodef) != 0)
|
||||
{
|
||||
err_str = "Error al leer la velocidad de desplazamiento";
|
||||
return false;
|
||||
}
|
||||
if ((vv == 0) || (vv > LimpiezaDef.Parametros.v_despM) || (vv < LimpiezaDef.Parametros.v_despm))
|
||||
{
|
||||
err_str = "La velocidad de desplazamiento no está dentro de los límites configurados";
|
||||
return false;
|
||||
if (!HelperGlobal.Str2Int(_subPanel1ViewModel.TextVeloDespl, out vv))
|
||||
{
|
||||
err_str = "Error al leer la velocidad de desplazamiento";
|
||||
return false;
|
||||
}
|
||||
if ((vv == 0) || (vv > LimpiezaDef.Parametros.v_despM) || (vv < LimpiezaDef.Parametros.v_despm))
|
||||
{
|
||||
err_str = "La velocidad de desplazamiento no está dentro de los límites configurados";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
limp.VDespl = vv;
|
||||
|
||||
|
|
@ -168,29 +177,30 @@ namespace OliviaAddInPro
|
|||
/**
|
||||
* Acciones para comenzar ejecución
|
||||
*/
|
||||
public void Ejecuta(OliviaAddInPro.Services.ModosEjec modo)
|
||||
public void Ejecuta(OliviaAddInPro.Services.ModosEjec modo)
|
||||
{
|
||||
string err = "";
|
||||
|
||||
|
||||
OliviaGlob.progrDialog.Show();
|
||||
|
||||
if (!Lee(out err))
|
||||
{
|
||||
HelperGlobal.ponMsg(err);
|
||||
return;
|
||||
}
|
||||
//marchando
|
||||
OliviaGlob.Limp.ProgrSrc = new MyCancelableProgressorSource(OliviaGlob.progrDialog.GetViewModel());
|
||||
|
||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetProceso("");
|
||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetEstado("");
|
||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetProgress(0);
|
||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetTextBtn("Cancelar");
|
||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.PonBarColorVerde();
|
||||
|
||||
//oculta la ventana
|
||||
OliviaGlob.ShowHidePane(false);
|
||||
|
||||
OliviaGlob.limp.ComienzaEjec(modo);
|
||||
|
||||
Action<TareaRes> ac = finEjecuta;
|
||||
OliviaGlob.Limp.EjecutaAsync(modo, ac);
|
||||
}
|
||||
public void finEjecuta(TareaRes res)
|
||||
{
|
||||
OliviaGlob.progrDialog.Hide();
|
||||
if (res.Errores)
|
||||
{
|
||||
HelperGlobal.ponMsg(res.msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,12 +10,14 @@ using OliviaAddInPro.Helper;
|
|||
using static OliviaAddInPro.Model.ComunDef;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using ArcGIS.Desktop.Framework.Contracts;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
class PaneLimpiezaViewModel : PanelViewModelBase
|
||||
{
|
||||
private PaneLimpiezaSub1ViewModel _subPanel1ViewModel;
|
||||
|
||||
Limpieza limp;
|
||||
public MarchandoUnaDe marchando;
|
||||
public PaneLimpiezaViewModel()
|
||||
{
|
||||
_subPanel1ViewModel = new PaneLimpiezaSub1ViewModel();
|
||||
|
|
@ -31,7 +33,7 @@ namespace OliviaAddInPro
|
|||
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/time.png")), Resource1.String_tiempos, _subPanel4ViewModel)
|
||||
};
|
||||
SelectedOption = OptionsMenu[0];
|
||||
// OliviaGlob.limp = OliviaGlob.Limp;
|
||||
limp = OliviaGlob.Limp;
|
||||
}
|
||||
public override string DisplayName
|
||||
{
|
||||
|
|
@ -77,7 +79,12 @@ namespace OliviaAddInPro
|
|||
err_str = "No se ha seleccionado ninguna Capa de Limpieza";
|
||||
return false;
|
||||
}
|
||||
OliviaGlob.limp.CapaElems = _subPanel1ViewModel.CapaElems;
|
||||
limp.CapaElems = _subPanel1ViewModel.CapaElems;
|
||||
//pone que la capa de elementos es la red navegable, que es la que va a exportar
|
||||
if (_subPanel1ViewModel.SelOpAmb == 1)
|
||||
{
|
||||
limp.CapaElems = OliviaGlob.Paths.PathGdbNw;
|
||||
}
|
||||
|
||||
//lee el tipo tto
|
||||
if (_subPanel1ViewModel.TipoTto == (int)LimpiezaDef.TiposTto.TtoNoDef)
|
||||
|
|
@ -85,31 +92,26 @@ namespace OliviaAddInPro
|
|||
err_str = "No se ha seleccionado ningún Tipo de Tratamiento";
|
||||
return false;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
OliviaGlob.limp.TipoTto = _subPanel1ViewModel.TipoTto;
|
||||
|
||||
=======
|
||||
limp.TipoTto = _subPanel1ViewModel.TipoTto;
|
||||
limp.TipoTtoStr = LimpiezaDef.tto_gdb[_subPanel1ViewModel.TipoTto];
|
||||
>>>>>>> Elena/reco
|
||||
//lee el/los ámbito seleccionado
|
||||
if (!_subPanel1ViewModel.lee_ambitos())
|
||||
{
|
||||
err_str = "No se ha seleccionado ningún Ámbito de trabajo";
|
||||
return false;
|
||||
}
|
||||
OliviaGlob.limp.AmbitosSel = _subPanel1ViewModel.AmbitosSel;
|
||||
limp.AmbitosSel = _subPanel1ViewModel.AmbitosSel;
|
||||
int i = 0;
|
||||
for (i = 0; i < OliviaGlob.limp.AmbitosSel.Length; i++)
|
||||
if (OliviaGlob.limp.AmbitosSel[i])
|
||||
for (i = 0; i < limp.AmbitosSel.Length; i++)
|
||||
if (limp.AmbitosSel[i])
|
||||
break;
|
||||
if(i>= OliviaGlob.limp.AmbitosSel.Length)
|
||||
if(i>= limp.AmbitosSel.Length)
|
||||
{
|
||||
err_str = "No se ha seleccionado ningún Ámbito de trabajo";
|
||||
return false;
|
||||
}
|
||||
//lee si respeta circulacion
|
||||
OliviaGlob.limp.RespCirc = _subPanel1ViewModel.RespCirc;
|
||||
limp.RespCirc = _subPanel1ViewModel.RespCirc;
|
||||
|
||||
//lee velo de desplazamiento
|
||||
int vv = -1;
|
||||
|
|
@ -123,7 +125,7 @@ namespace OliviaAddInPro
|
|||
err_str = "La velocidad de desplazamiento no está dentro de los límites configurados";
|
||||
return false;
|
||||
}
|
||||
OliviaGlob.limp.VDespl = vv;
|
||||
limp.VDespl = vv;
|
||||
|
||||
//lee tiempo de tto
|
||||
if ((_subPanel1ViewModel.TimeTto == 0) ||
|
||||
|
|
@ -132,11 +134,31 @@ namespace OliviaAddInPro
|
|||
err_str = "El tiempo de tratamiento no está dentro de los límites configurados";
|
||||
return false;
|
||||
}
|
||||
OliviaGlob.limp.Ttto = _subPanel1ViewModel.TimeTto;
|
||||
OliviaGlob.limp.UdsTTto = _subPanel1ViewModel.UdsTTto;
|
||||
limp.Ttto = _subPanel1ViewModel.TimeTto;
|
||||
limp.UdsTTto = _subPanel1ViewModel.UdsTTto;
|
||||
|
||||
//lee el ancho medio de la vía si está visible (se ha seleccionado la opción genérica Eje de calles)
|
||||
limp.AnchoVia = LimpiezaDef.Parametros.ancho_via;
|
||||
if (_subPanel1ViewModel.VisTextAnchoVia == System.Windows.Visibility.Visible)
|
||||
{
|
||||
try
|
||||
{
|
||||
limp.AnchoVia = Convert.ToDouble(_subPanel1ViewModel.TextAnchoVia);
|
||||
if ((limp.AnchoVia == 0) || (limp.AnchoVia > LimpiezaDef.Parametros.ancho_viaM) || (limp.AnchoVia < LimpiezaDef.Parametros.ancho_viam))
|
||||
{
|
||||
err_str = "El ancho de la vía no está dentro de los límites configurados";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (FormatException)
|
||||
{
|
||||
err_str = "El formato introducido para el ancho de la vía no es válido.";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//lee las propiedades comunes a recogida
|
||||
if (!LeeComun(OliviaGlob.limp,out err_str))
|
||||
if (!LeeComun(limp,out err_str))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -155,28 +177,32 @@ namespace OliviaAddInPro
|
|||
public void Ejecuta(OliviaAddInPro.Services.ModosEjec modo)
|
||||
{
|
||||
string err = "";
|
||||
<<<<<<< HEAD
|
||||
//comprueba datos de la ventana
|
||||
=======
|
||||
//marchando
|
||||
|
||||
|
||||
OliviaGlob.Limp.ProgrSrc = new MyCancelableProgressorSource(OliviaGlob.progrDialog.GetViewModel());
|
||||
OliviaGlob.progrDialog.Show();
|
||||
var progSrc = new CancelableProgressorSource(OliviaGlob.progrDialog);
|
||||
|
||||
//oculta la ventana
|
||||
OliviaGlob.ShowHidePane(false);
|
||||
|
||||
>>>>>>> Gerardo/MarchandoUnaDe
|
||||
if (!Lee(out err))
|
||||
{
|
||||
HelperGlobal.ponMsg(err);
|
||||
return;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
OliviaGlob.Limp.ComienzaEjec(modo);
|
||||
=======
|
||||
|
||||
Action<TareaRes> ac = finEjecuta;
|
||||
OliviaGlob.Limp.EjecutaAsync(modo, progSrc, ac);
|
||||
}
|
||||
public void finEjecuta(TareaRes res)
|
||||
{
|
||||
OliviaGlob.progrDialog.Hide();
|
||||
if (res.Errores)
|
||||
{
|
||||
HelperGlobal.ponMsg(res.msg);
|
||||
}
|
||||
Action<TareaRes> ac = OliviaGlob.finEjecuta;
|
||||
OliviaGlob.Limp.EjecutaAsync(modo, ac);
|
||||
|
||||
>>>>>>> Gerardo/MarchandoUnaDe
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
//using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using OliviaAddInPro.Model;
|
||||
using OliviaAddInPro.Helper;
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,10 @@ namespace OliviaAddInPro
|
|||
hideTemp = false;
|
||||
pane.Activate();
|
||||
}
|
||||
|
||||
protected override void OnHidden()
|
||||
{
|
||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Ninguno);
|
||||
}
|
||||
internal static void Hide_()
|
||||
{
|
||||
DockPane pane = FrameworkApplication.DockPaneManager.Find(_dockPaneID);
|
||||
|
|
@ -64,7 +67,7 @@ namespace OliviaAddInPro
|
|||
if (isVisible == false && !firstTimeShow && !hideTemp)
|
||||
{
|
||||
//avisa de cerrar la ventana
|
||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Ninguno);
|
||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Ninguno);
|
||||
}
|
||||
if (firstTimeShow)
|
||||
firstTimeShow = false;
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ namespace OliviaAddInPro
|
|||
public string TextDensCont
|
||||
{
|
||||
get { return textDensCont; }
|
||||
set { base.SetProperty(ref textKgCapac, value, () => TextDensCont); }
|
||||
set { base.SetProperty(ref textDensCont, value, () => TextDensCont); }
|
||||
}
|
||||
private Visibility visTextDens = Visibility.Hidden;
|
||||
public Visibility VisTextDens
|
||||
|
|
@ -274,11 +274,13 @@ namespace OliviaAddInPro
|
|||
TiposVehic.Clear();
|
||||
TiposCapac.Clear();
|
||||
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config); //lo reinicia, por si estaba después de planificar
|
||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.Config2);
|
||||
if (string.IsNullOrEmpty(capa))
|
||||
return false;
|
||||
|
||||
//comprueba los campos de recogida
|
||||
if (recoServ.CompruebaCamposReco(capa)>1 || (recoServ.CompruebaCamposReco(capa)==1 && RecogidaDef.kgrec_camp))
|
||||
int camp = recoServ.CompruebaCamposReco(capa);
|
||||
if (camp>1 || (camp==1 && RecogidaDef.kgrec_camp))
|
||||
{
|
||||
HelperGlobal.ponMsg(recoServ.ErrStr, System.Windows.MessageBoxImage.Warning);
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -94,6 +94,9 @@ namespace OliviaAddInPro
|
|||
err_str = "";
|
||||
try
|
||||
{
|
||||
//Rellena el array de filtros
|
||||
reco.RellenaFiltrosReco();
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
///Lee el panel 1
|
||||
if (!_subPanel1ViewModel.CapaAbierta || string.IsNullOrEmpty(_subPanel1ViewModel.CapaElems))
|
||||
|
|
@ -120,7 +123,7 @@ namespace OliviaAddInPro
|
|||
try
|
||||
{
|
||||
reco.DensCont = Convert.ToInt32(_subPanel1ViewModel.TextDensCont);
|
||||
if (reco.DensCont <= 0 || reco.DensCont > 100)
|
||||
if (reco.DensCont <= 0 || reco.DensCont > 1000)
|
||||
{
|
||||
err_str = "El valor introducido para la densidad del contenedor no es válido.";
|
||||
return false;
|
||||
|
|
@ -196,7 +199,7 @@ namespace OliviaAddInPro
|
|||
err_str = "El formato introducido para el tiempo de vaciado no es válido.";
|
||||
return false;
|
||||
}
|
||||
//revisa las coordenadas de la planta de instalación
|
||||
//revisa las coordenadas de la planta de descarga
|
||||
reco.CoordsPlanta = _subPanel1ViewModel.CoordsPlanta;
|
||||
if (reco.CoordsPlanta.Equals(new Coordinate2D(0, 0)))
|
||||
{
|
||||
|
|
@ -204,6 +207,13 @@ namespace OliviaAddInPro
|
|||
return false;
|
||||
}
|
||||
|
||||
//revisa coordenadas de instalación
|
||||
if (_subPanel2ViewModel.CoordsInstal.Equals(new Coordinate2D(0, 0)))
|
||||
{
|
||||
err_str = "No se ha seleccionado instalación de salida/llegada";
|
||||
return false;
|
||||
}
|
||||
|
||||
//lee las propiedades comunes a recogida
|
||||
if (!LeeComun(reco, out err_str))
|
||||
{
|
||||
|
|
@ -224,24 +234,24 @@ namespace OliviaAddInPro
|
|||
public void Ejecuta(OliviaAddInPro.Services.ModosEjec modo)
|
||||
{
|
||||
string err = "";
|
||||
OliviaGlob.progrDialog.Show();
|
||||
//comprueba datos de la ventana
|
||||
if (!Lee(out err))
|
||||
{
|
||||
HelperGlobal.ponMsg(err);
|
||||
return;
|
||||
}
|
||||
//marchando
|
||||
OliviaGlob.Reco.ProgrSrc = new MyCancelableProgressorSource(OliviaGlob.progrDialog.GetViewModel());
|
||||
|
||||
Action<TareaRes> ac = finEjecuta;
|
||||
OliviaGlob.Reco.EjecutaAsync(modo, ac);
|
||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetProceso("");
|
||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetEstado("");
|
||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetProgress(0);
|
||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetTextBtn("Cancelar");
|
||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.PonBarColorVerde();
|
||||
//oculta la ventana
|
||||
OliviaGlob.ShowHidePane(false);
|
||||
|
||||
}
|
||||
public void finEjecuta(TareaRes res)
|
||||
{
|
||||
OliviaGlob.progrDialog.Hide();
|
||||
if (res.Errores)
|
||||
{
|
||||
HelperGlobal.ponMsg(res.msg);
|
||||
}
|
||||
OliviaGlob.Reco.ComienzaEjec(modo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue