Compare commits
1 Commits
develop
...
Configurac
| Author | SHA1 | Date |
|---|---|---|
|
|
f973a2c5e2 |
BIN
Backup-2.x.zip
BIN
Backup-2.x.zip
Binary file not shown.
|
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Controls;
|
|
||||||
using ArcGIS.Core.CIM;
|
using ArcGIS.Core.CIM;
|
||||||
using ArcGIS.Core.Data;
|
using ArcGIS.Core.Data;
|
||||||
using ArcGIS.Core.Geometry;
|
using ArcGIS.Core.Geometry;
|
||||||
|
|
@ -19,7 +18,6 @@ using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
using ArcGIS.Desktop.Mapping;
|
using ArcGIS.Desktop.Mapping;
|
||||||
using OliviaAddInPro.Helper;
|
using OliviaAddInPro.Helper;
|
||||||
using OliviaAddInPro.Model;
|
using OliviaAddInPro.Model;
|
||||||
using Button = ArcGIS.Desktop.Framework.Contracts.Button;
|
|
||||||
|
|
||||||
namespace OliviaAddInPro
|
namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
|
|
@ -27,11 +25,9 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
protected override void OnClick()
|
protected override void OnClick()
|
||||||
{
|
{
|
||||||
if (OliviaGlob.TipoView == TiposEjecucion.Ninguno)
|
if (OliviaGlob.TipoEjec == TiposEjecucion.Ninguno)
|
||||||
{
|
{
|
||||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Props);
|
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Props);
|
||||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Props);
|
|
||||||
|
|
||||||
DockpaneConfigViewModel.Reset();
|
DockpaneConfigViewModel.Reset();
|
||||||
DockpaneConfigViewModel.Show();
|
DockpaneConfigViewModel.Show();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,29 +27,24 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
if (OliviaGlob.TipoView == TiposEjecucion.Ninguno)
|
if (OliviaGlob.TipoEjec == TiposEjecucion.Ninguno)
|
||||||
{
|
{
|
||||||
///Comprueba que existe la red navegable configurada
|
///Comprueba que existe la red navegable configurada
|
||||||
if (!OliviaGlob.CompruebaNwYCampos())
|
|
||||||
|
if (HelperGdb.GetGdb(OliviaGlob.Paths.PathGdbNw).Result == null)
|
||||||
{
|
{
|
||||||
HelperGlobal.ponMsg("No se encuentra red navegable, cambie Configuración: " + HelperGdb.OutStr,
|
HelperGlobal.ponMsg("No encuentra Gdb de red navegable, cambie Configuración: " + HelperGdb.OutStr,
|
||||||
System.Windows.MessageBoxImage.Warning);
|
System.Windows.MessageBoxImage.Warning);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Limp);
|
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Limp);
|
||||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Limp);
|
if(OliviaGlob.Limp==null)
|
||||||
|
|
||||||
if (OliviaGlob.Limp==null)
|
|
||||||
OliviaGlob.Limp = new Limpieza();
|
OliviaGlob.Limp = new Limpieza();
|
||||||
DockpaneLimpiezaViewModel.Reset();
|
DockpaneLimpiezaViewModel.Reset();
|
||||||
DockpaneLimpiezaViewModel.Show();
|
DockpaneLimpiezaViewModel.Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(OliviaGlob.ViewIsProps())
|
|
||||||
{
|
|
||||||
HelperGlobal.ponMsg(Resource1.String_estaenprops, System.Windows.MessageBoxImage.Warning);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
HelperGlobal.ponMsg(Resource1.String_existe_ejec, System.Windows.MessageBoxImage.Warning);
|
HelperGlobal.ponMsg(Resource1.String_existe_ejec, System.Windows.MessageBoxImage.Warning);
|
||||||
|
|
|
||||||
|
|
@ -25,29 +25,23 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
protected override void OnClick()
|
protected override void OnClick()
|
||||||
{
|
{
|
||||||
if (OliviaGlob.TipoView == TiposEjecucion.Ninguno)
|
if (OliviaGlob.TipoEjec==TiposEjecucion.Ninguno)
|
||||||
{
|
{
|
||||||
///Comprueba que existe la red navegable configurada
|
///Comprueba que existe la red navegable configurada
|
||||||
if (!OliviaGlob.CompruebaNwYCampos())
|
if (HelperGdb.GetGdb(OliviaGlob.Paths.PathGdbNw).Result == null)
|
||||||
{
|
{
|
||||||
HelperGlobal.ponMsg("No se encuentra red navegable, cambie Configuración: " + HelperGdb.OutStr,
|
HelperGlobal.ponMsg("No encuentra Gdb de red navegable, cambie Configuración: " + HelperGdb.OutStr,
|
||||||
System.Windows.MessageBoxImage.Warning);
|
System.Windows.MessageBoxImage.Warning);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Reco);
|
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Reco);
|
||||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Reco);
|
if(OliviaGlob.Reco==null)
|
||||||
|
|
||||||
if (OliviaGlob.Reco==null)
|
|
||||||
OliviaGlob.Reco = new Recogida();
|
OliviaGlob.Reco = new Recogida();
|
||||||
DockpaneRecogidaViewModel.Reset();
|
DockpaneRecogidaViewModel.Reset();
|
||||||
DockpaneRecogidaViewModel.Show();
|
DockpaneRecogidaViewModel.Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (OliviaGlob.ViewIsProps())
|
|
||||||
{
|
|
||||||
HelperGlobal.ponMsg(Resource1.String_estaenprops, System.Windows.MessageBoxImage.Warning);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
HelperGlobal.ponMsg(Resource1.String_existe_ejec, System.Windows.MessageBoxImage.Warning);
|
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
|
//devuelve -1 si no se ha podido crear socket
|
||||||
//0 si no se puede conectar
|
//0 si no se puede conectar
|
||||||
//1 si conectado
|
//1 si conectado
|
||||||
public bool conecta(string ip, int puerto, string ip_local="")
|
public bool conecta(string ip, int puerto)
|
||||||
{
|
{
|
||||||
termina();
|
termina();
|
||||||
try
|
try
|
||||||
|
|
@ -39,7 +39,7 @@ namespace OliviaAddIn
|
||||||
return false;
|
return false;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return str_socket_conecta(sc, ip, puerto, ip_local) != 0;
|
return str_socket_conecta(sc, ip, puerto) != 0;
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|
@ -116,25 +116,25 @@ namespace OliviaAddIn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//funciones auxiliares------------------------------
|
//funciones auxiliares------------------------------
|
||||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
[DllImport("utiles.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||||
unsafe public static extern IntPtr str_socket_crea();
|
unsafe public static extern IntPtr str_socket_crea();
|
||||||
|
|
||||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
[DllImport("utiles.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||||
unsafe public static extern int str_socket_conecta(IntPtr soc, String ip, int puerto, String ip_local=null);
|
unsafe public static extern int str_socket_conecta(IntPtr soc, String ip, int puerto);
|
||||||
|
|
||||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
||||||
unsafe public static extern int str_socket_envia(IntPtr soc, String txt);//solo este
|
unsafe public static extern int str_socket_envia(IntPtr soc, String txt);
|
||||||
|
|
||||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
[DllImport("utiles.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||||
unsafe public static extern int str_socket_recive(IntPtr soc);
|
unsafe public static extern int str_socket_recive(IntPtr soc);
|
||||||
|
|
||||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
[DllImport("utiles.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||||
unsafe public static extern void str_socket_dame_buf(IntPtr soc, StringBuilder buf);
|
unsafe public static extern void str_socket_dame_buf(IntPtr soc, StringBuilder buf);
|
||||||
|
|
||||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
[DllImport("utiles.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||||
unsafe public static extern void str_socket_dame_error(IntPtr soc, StringBuilder error);//llamar con 1024 de espacio
|
unsafe public static extern void str_socket_dame_error(IntPtr soc, StringBuilder error);//llamar con 1024 de espacio
|
||||||
|
|
||||||
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
|
[DllImport("utiles.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||||
unsafe public static extern void str_socket_borra(IntPtr soc);
|
unsafe public static extern void str_socket_borra(IntPtr soc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
21
Config.daml
21
Config.daml
|
|
@ -1,12 +1,11 @@
|
||||||
<?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">
|
||||||
<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">
|
||||||
<AddInInfo id="{10742570-cf59-42f2-bea2-2a38002a06ee}" version="3.2" desktopVersion="3.0.3.36057">
|
|
||||||
<Name>OliviaAddInPro</Name>
|
<Name>OliviaAddInPro</Name>
|
||||||
<Description>AddIn de Optimización de la Limpieza Viaria para ArcGIs Pro</Description>
|
<Description>AddIn de Optimización de la Limpieza Viaria para ArcGIs Pro</Description>
|
||||||
<Image>Images\AddinDesktop32.png</Image>
|
<Image>Images\AddinDesktop32.png</Image>
|
||||||
<Author>VSM</Author>
|
<Author>VSM</Author>
|
||||||
<Company>VSM - Narvaling</Company>
|
<Company>VSM - Narvaling</Company>
|
||||||
<Date>18/04/2023 12:00:00, 2023</Date>
|
<Date>08/07/2021 12:28:02, 2021</Date>
|
||||||
<Subject>Framework</Subject>
|
<Subject>Framework</Subject>
|
||||||
<!-- Note subject can be one or more of these topics:
|
<!-- Note subject can be one or more of these topics:
|
||||||
Content, Framework, Editing, Geodatabase, Geometry, Geoprocessing, Layouts, Map Authoring, Map Exploration -->
|
Content, Framework, Editing, Geodatabase, Geometry, Geoprocessing, Layouts, Map Authoring, Map Exploration -->
|
||||||
|
|
@ -17,17 +16,17 @@
|
||||||
<tabs>
|
<tabs>
|
||||||
<tab id="OliviaAddInPro_Tab1" caption="Olivia Pro">
|
<tab id="OliviaAddInPro_Tab1" caption="Olivia Pro">
|
||||||
<group refID="OliviaAddInPro_Group1" />
|
<group refID="OliviaAddInPro_Group1" />
|
||||||
<group refID="OliviaAddInPro_Group2" />
|
<group refID="OliviaAddInPro_Group2" />
|
||||||
</tab>
|
</tab>
|
||||||
</tabs>
|
</tabs>
|
||||||
<groups>
|
<groups>
|
||||||
<group id="OliviaAddInPro_Group2" caption=" " appearsOnAddInTab="false">
|
<group id="OliviaAddInPro_Group2" caption=" " appearsOnAddInTab="false">
|
||||||
<button refID="OliviaAddInPro_ButtonLimp" size="large" />
|
<button refID="OliviaAddInPro_ButtonLimp" size="large" />
|
||||||
<button refID="OliviaAddInPro_ButtonRec" size="large" />
|
<button refID="OliviaAddInPro_ButtonRec" size="large" />
|
||||||
</group>
|
|
||||||
<group id="OliviaAddInPro_Group1" caption=" " appearsOnAddInTab="false">
|
|
||||||
<button refID="OliviaAddInPro_ButtonConfig" size="large" />
|
|
||||||
</group>
|
</group>
|
||||||
|
<group id="OliviaAddInPro_Group1" caption=" " appearsOnAddInTab="false">
|
||||||
|
<button refID="OliviaAddInPro_ButtonConfig" size="large" />
|
||||||
|
</group>
|
||||||
</groups>
|
</groups>
|
||||||
<controls>
|
<controls>
|
||||||
<!-- add your controls here -->
|
<!-- add your controls here -->
|
||||||
|
|
@ -39,10 +38,10 @@
|
||||||
<tooltip heading="OLIVIA - Recogida de Residuos">
|
<tooltip heading="OLIVIA - Recogida de Residuos">
|
||||||
Add-In de ArcGIS Pro para la herramienta de optimización de la limpieza viaria, OLIVIA<disabledText /></tooltip>
|
Add-In de ArcGIS Pro para la herramienta de optimización de la limpieza viaria, OLIVIA<disabledText /></tooltip>
|
||||||
</button>
|
</button>
|
||||||
<button id="OliviaAddInPro_ButtonConfig" caption="Configuración" className="ButtonConfig" loadOnClick="true" largeImage="Images/config2_olv.png">
|
<button id="OliviaAddInPro_ButtonConfig" caption="Configuración" className="ButtonConfig" loadOnClick="true" largeImage="Images/config2.png">
|
||||||
<tooltip heading="OLIVIA - Configuración">
|
<tooltip heading="OLIVIA - Configuración">
|
||||||
Add-In de ArcGIS Pro para la herramienta de optimización de la limpieza viaria, OLIVIA<disabledText /></tooltip>
|
Add-In de ArcGIS Pro para la herramienta de optimización de la limpieza viaria, OLIVIA<disabledText /></tooltip>
|
||||||
</button>
|
</button>
|
||||||
</controls>
|
</controls>
|
||||||
<dockPanes>
|
<dockPanes>
|
||||||
<dockPane id="OliviaAddInPro_DockpaneLimpieza" caption="OLIVIA | Limpieza" className="DockpaneLimpiezaViewModel" dock="group" dockWith="esri_core_contentsDockPane">
|
<dockPane id="OliviaAddInPro_DockpaneLimpieza" caption="OLIVIA | Limpieza" className="DockpaneLimpiezaViewModel" dock="group" dockWith="esri_core_contentsDockPane">
|
||||||
|
|
|
||||||
1724
Helper/HelperGdb.cs
1724
Helper/HelperGdb.cs
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -9,7 +9,6 @@ using ArcGIS.Desktop.Framework.Dialogs;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
using OliviaAddInPro.Model.contract;
|
|
||||||
|
|
||||||
namespace OliviaAddInPro.Helper
|
namespace OliviaAddInPro.Helper
|
||||||
{
|
{
|
||||||
|
|
@ -86,25 +85,22 @@ namespace OliviaAddInPro.Helper
|
||||||
|
|
||||||
public class MyCancelableProgressorSource
|
public class MyCancelableProgressorSource
|
||||||
{
|
{
|
||||||
public IprocessManager _ProgrSrc;
|
public CancelableProgressorSource _ProgrSrc;
|
||||||
public MyCancelableProgressorSource(IprocessManager prodlg)
|
public MyCancelableProgressorSource(ProgressDialog prodlg)
|
||||||
{
|
{
|
||||||
_ProgrSrc = prodlg;
|
_ProgrSrc = new CancelableProgressorSource(prodlg);
|
||||||
_ProgrSrc.Inicia();
|
_ProgrSrc.Max = 100;
|
||||||
}
|
}
|
||||||
public void Init(string stat)
|
public void Init(string stat)
|
||||||
{
|
{
|
||||||
_ProgrSrc.SetProgress(0);
|
_ProgrSrc.Value = 0;
|
||||||
_ProgrSrc.SetProceso(stat);
|
_ProgrSrc.Status = stat;
|
||||||
}
|
}
|
||||||
public void IncMessage(uint inc, string mes=null)
|
public void IncMessage(uint inc, string mes)
|
||||||
{
|
{
|
||||||
var prog = _ProgrSrc.GetProgress() + inc;
|
if ((_ProgrSrc.Value + inc) < _ProgrSrc.Max)
|
||||||
if (prog > 100)
|
_ProgrSrc.Value += inc;
|
||||||
prog = 100;
|
_ProgrSrc.Message = mes;
|
||||||
_ProgrSrc.SetProgress(prog);
|
|
||||||
if(!string.IsNullOrEmpty(mes))
|
|
||||||
_ProgrSrc.SetEstado(mes);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB |
|
|
@ -1,16 +0,0 @@
|
||||||
<!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>
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
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,8 +10,6 @@ namespace OliviaAddInPro.Model
|
||||||
//*************************************************************************************
|
//*************************************************************************************
|
||||||
//Enums y structs generales
|
//Enums y structs generales
|
||||||
public static int BuffExport = 1000;
|
public static int BuffExport = 1000;
|
||||||
//public static int MaxCaracteresBBDD = 10;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nombre de los campos de la cartografía de la red navegable que se consultan para la exportación
|
* Nombre de los campos de la cartografía de la red navegable que se consultan para la exportación
|
||||||
*/
|
*/
|
||||||
|
|
@ -33,18 +31,11 @@ namespace OliviaAddInPro.Model
|
||||||
public static string atr_pedes; //<Atributo del campo FOW que indica peatonal
|
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 static string camp_oid; //<Campo de la tabla de entidades que indica el objectid
|
public bool Errores { get; set; }
|
||||||
public static string consulta_sector; //<Campo de la tabla donde se guarda info de sector
|
public object data { get; set; }
|
||||||
public static string consulta_secuen; //<Campo de la tabla donde se guarda info de secuencia
|
public string msg { get; set; }
|
||||||
public static double giro_max;
|
|
||||||
public static double desv_max;
|
|
||||||
public static double desv_max_abs;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,11 @@ namespace OliviaAddInPro.Model
|
||||||
public class Limpieza : TratamientoComun
|
public class Limpieza : TratamientoComun
|
||||||
{
|
{
|
||||||
//**********************************************
|
//**********************************************
|
||||||
//Se recogen en PaneLimpiezaSub1
|
//Se recogen en PaneLimpiezaSub1
|
||||||
|
/**
|
||||||
|
* Tipo de tratamiento elegidos
|
||||||
|
*/
|
||||||
|
//public int TipoTto { get; set; } = -1; //En la clase TratamientoComun
|
||||||
/**
|
/**
|
||||||
* Ámbitos de trabajo elegidos
|
* Ámbitos de trabajo elegidos
|
||||||
*/
|
*/
|
||||||
|
|
@ -36,18 +40,9 @@ namespace OliviaAddInPro.Model
|
||||||
* Instancia para las funciones de exportación y demás
|
* Instancia para las funciones de exportación y demás
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public LimpiezaServ Serv
|
public LimpiezaServ Serv { get; set; } = null;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return (LimpiezaServ)ServCom;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
ServCom = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public LanzaLimpSrv LanzaSrv { get; set; } = null;
|
public LanzaLimpSrv LanzaSrv { get; set; } = null;
|
||||||
|
public ProcesoEjecServ ProceSrv { get; set; } = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ancho de vía, en metros
|
* Ancho de vía, en metros
|
||||||
|
|
@ -56,124 +51,45 @@ namespace OliviaAddInPro.Model
|
||||||
public Limpieza()
|
public Limpieza()
|
||||||
{
|
{
|
||||||
Serv = new LimpiezaServ(this);
|
Serv = new LimpiezaServ(this);
|
||||||
LanzaSrv = new LanzaLimpSrv();
|
LanzaSrv = new LanzaLimpSrv();
|
||||||
|
ProceSrv = new ProcesoEjecServ();
|
||||||
|
ProgrSrc = new MyCancelableProgressorSource(OliviaGlob.progrDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Respuesta<TiposEjecucion> Ejecuta(ModosEjec modo)
|
public TareaRes 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);
|
res = Serv.Ejecuta(modo);
|
||||||
if (res.Value)
|
if (!res.Errores)
|
||||||
{
|
{
|
||||||
res=LanzaSrv.ejec(this, modo, TipoTtoStr);
|
var res1=LanzaSrv.ejec(this, modo, TipoTtoStr);
|
||||||
if (res.Value)
|
if (!res1.HasError)
|
||||||
{
|
{
|
||||||
ProceSrv.ConfigConex();
|
var conf = ConfigServ.Serv.Leer();
|
||||||
res2 = ProceSrv.start(LanzaSrv.str_cfg, ProgrSrc._ProgrSrc);
|
ProceSrv.Puerto = conf.Puerto;
|
||||||
if(!LanzaSrv.EsperaProcess(GeneralDef.NombOlvTasks))
|
ProceSrv.Ip = conf.Ip;
|
||||||
res2.Error.Add("No se ha podido cerrar oliviaTask.");
|
|
||||||
|
res1 = ProceSrv.start(LanzaSrv.str_cfg, ProgrSrc._ProgrSrc);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (res1.HasError)
|
||||||
|
{
|
||||||
|
res.Errores = true;
|
||||||
|
res.msg = "";
|
||||||
|
res1.Error.ForEach(e=> res.msg+=e+".\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (res.HasError)
|
return res;
|
||||||
{
|
|
||||||
res2.Error.AddRange(res.Error);
|
|
||||||
}
|
|
||||||
return res2;
|
|
||||||
}
|
}
|
||||||
|
public async void EjecutaAsync(ModosEjec modo, Action<TareaRes> ffin)
|
||||||
/**
|
|
||||||
* 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;
|
await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
|
||||||
string auxili, ambi, auxi;
|
{
|
||||||
|
var res = Ejecuta(modo);
|
||||||
|
ffin(res);
|
||||||
|
return res;
|
||||||
|
});
|
||||||
|
|
||||||
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,6 +37,8 @@ namespace OliviaAddInPro.Model
|
||||||
public static string consulta_observ; //<Campo a consultar de la capa de limpieza, observaciones
|
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_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_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
|
* Nombre de los atributos (de las capas) sobre los que se realizarán consultas para la limpieza
|
||||||
|
|
@ -91,8 +93,6 @@ namespace OliviaAddInPro.Model
|
||||||
public static int t_descansom; //<Tiempo de descanso mínimo admitido
|
public static int t_descansom; //<Tiempo de descanso mínimo admitido
|
||||||
public static int t_descanso; //<Tiempo de descanso establecido
|
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 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áximo admitido
|
||||||
public static int ancho_viam; //<Ancho de vía mínimo admitido
|
public static int ancho_viam; //<Ancho de vía mínimo admitido
|
||||||
public static int ancho_via; //<Ancho de vía establecido
|
public static int ancho_via; //<Ancho de vía establecido
|
||||||
|
|
@ -135,12 +135,15 @@ namespace OliviaAddInPro.Model
|
||||||
public static double umbral_reco; //<Umbral de llenado para la recogida de contenedores
|
public static double umbral_reco; //<Umbral de llenado para la recogida de contenedores
|
||||||
};
|
};
|
||||||
public struct OtrosParam
|
public struct OtrosParam
|
||||||
{
|
{
|
||||||
|
public static double giro_max;
|
||||||
public static double anch_peat;
|
public static double anch_peat;
|
||||||
public static double anch_ace;
|
public static double anch_ace;
|
||||||
public static double anch_aplin;
|
public static double anch_aplin;
|
||||||
public static double anch_apbat;
|
public static double anch_apbat;
|
||||||
public static double anch_bordlib;
|
public static double anch_bordlib;
|
||||||
|
public static double desv_max;
|
||||||
|
public static double desv_max_abs;
|
||||||
};
|
};
|
||||||
//*************************************************************************************
|
//*************************************************************************************
|
||||||
//Enums globales limpieza
|
//Enums globales limpieza
|
||||||
|
|
|
||||||
1953
Model/OliviaConf.cs
1953
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 ProgrMax = 100;
|
||||||
public const int ProgrStep = 5;
|
public const int ProgrStep = 5;
|
||||||
public const int ParamN = 5;
|
public const int ParamN = 5;
|
||||||
public const int ParamLimpN = 52;
|
public const int ParamLimpN = 37;
|
||||||
public const int ParamRecoN = 50;
|
public const int ParamRecoN = 40;
|
||||||
/*
|
/*
|
||||||
* Define el separador entre parámetros de la llamada al proceso oliviatasks
|
* Define el separador entre parámetros de la llamada al proceso oliviatasks
|
||||||
*/
|
*/
|
||||||
|
|
@ -60,6 +60,7 @@ namespace OliviaAddInPro.Model
|
||||||
public const string EjecGeoProgName = "olivia";
|
public const string EjecGeoProgName = "olivia";
|
||||||
public const string EjecGeoParamIgual = ":";
|
public const string EjecGeoParamIgual = ":";
|
||||||
public const string NombOlvTasks = "OliviaTasks";
|
public const string NombOlvTasks = "OliviaTasks";
|
||||||
|
public const string NombColSector = "SECTOR";
|
||||||
/**
|
/**
|
||||||
* Define el nombre del grupo de propiedades generales
|
* Define el nombre del grupo de propiedades generales
|
||||||
*/
|
*/
|
||||||
|
|
@ -520,25 +521,15 @@ namespace OliviaAddInPro.Model
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nombre de los campos que lee en limpieza
|
* 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_peat ="Ancho_peat_def";
|
||||||
public const string GTO_anch_ace = "Ancho_acera_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_aplin = "Ancho_ap_lin_def";
|
||||||
public const string GTO_anch_apbat = "Ancho_ap_bat_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_anch_bordlib = "Ancho_bord_lib_def";
|
||||||
//común
|
public const string GTO_desv_max = "Desv_max";
|
||||||
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_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
|
* Define el nombre para mandar a oliviatasks la configuración
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,6 @@ using ArcGIS.Core.Geometry;
|
||||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
using OliviaAddInPro.Helper;
|
using OliviaAddInPro.Helper;
|
||||||
|
|
||||||
using System.Net;
|
|
||||||
using System.Net.Sockets;
|
|
||||||
using System.IO;
|
|
||||||
using System.Diagnostics;
|
|
||||||
|
|
||||||
namespace OliviaAddInPro.Model
|
namespace OliviaAddInPro.Model
|
||||||
{
|
{
|
||||||
[Flags]
|
[Flags]
|
||||||
|
|
@ -35,7 +30,6 @@ namespace OliviaAddInPro.Model
|
||||||
//ya al menos una primera vez
|
//ya al menos una primera vez
|
||||||
//se pone este estado cuando ha terminado ya la primera vez
|
//se pone este estado cuando ha terminado ya la primera vez
|
||||||
}
|
}
|
||||||
|
|
||||||
static class OliviaGlob
|
static class OliviaGlob
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
@ -46,22 +40,16 @@ namespace OliviaAddInPro.Model
|
||||||
public static string PathWork; //<Path del directorio de trabajo
|
public static string PathWork; //<Path del directorio de trabajo
|
||||||
public static string PathCfg; //<Path de la configuración general
|
public static string PathCfg; //<Path de la configuración general
|
||||||
public static string PathExeOlivia; //<Path del ejecutable de OliviaTask
|
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 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 DirData; //<Dir donde están los shapefiles data y nw
|
||||||
public static string PathData; //<Path del shp con datos a planificar, ya filtrados e intersecados con las zonas y niveles
|
public static string PathData; //<Path del shp con datos a planificar, ya filtrados e intersecados con las zonas y niveles
|
||||||
public static string PathNW; //<Path del shp con la red navegable
|
public static string PathNW; //<Path del shp con la red navegable
|
||||||
|
|
||||||
//paths GDBs
|
//paths GDBs
|
||||||
public static string PathGdbGen; //<Path de la gdb general de la que se extraen los datos de interés
|
public static string PathGdbGen; //<Path de la gdb general de la que se extraen los datos de interés
|
||||||
public static string PathGdbNw; //<Path de la gdb referente a la red de carreteras de TOMTOM
|
public static string PathGdbNw; //<Path de la gdb referente a la red de carreteras de TOMTOM
|
||||||
public static string PathSimbVSM; //<Path de la galeria de estilos aplicada por VSM
|
public static string PathSimbVSM; //<Path de la galeria de estilos aplicada por VSM
|
||||||
public static string PathSimbESRI; //<Path de la galeria de estilos de ESRI
|
public static string PathSimbESRI; //<Path de la galeria de estilos de ESRI
|
||||||
|
|
||||||
//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
|
public struct Conexion
|
||||||
{
|
{
|
||||||
|
|
@ -78,7 +66,7 @@ namespace OliviaAddInPro.Model
|
||||||
*/
|
*/
|
||||||
public static int TiempoOutSocket;
|
public static int TiempoOutSocket;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* Nombre de las capas que se van a necesitar para la exportación de datos
|
* Nombre de las capas que se van a necesitar para la exportación de datos
|
||||||
*/
|
*/
|
||||||
public struct Capas
|
public struct Capas
|
||||||
|
|
@ -97,10 +85,6 @@ namespace OliviaAddInPro.Model
|
||||||
get { return tipoEjec; }
|
get { return tipoEjec; }
|
||||||
set { tipoEjec = value; }
|
set { tipoEjec = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TiposEjecucion TipoView
|
|
||||||
{ get; set; }
|
|
||||||
|
|
||||||
public static Limpieza Limp
|
public static Limpieza Limp
|
||||||
{
|
{
|
||||||
get { return limp; }
|
get { return limp; }
|
||||||
|
|
@ -111,30 +95,18 @@ namespace OliviaAddInPro.Model
|
||||||
get { return reco; }
|
get { return reco; }
|
||||||
set { reco = value; }
|
set { reco = value; }
|
||||||
}
|
}
|
||||||
|
public static EjecServ Serv { get; } = new EjecServ();
|
||||||
public static SpatialReference SpatRef { get; set; } = null;
|
public static SpatialReference SpatRef { get; set; } = null;
|
||||||
public static MarchandoUnaDe progrDialog { get; set; } = null;
|
public static ProgressDialog progrDialog { get; set; } = null;
|
||||||
#endregion Properties
|
#endregion Properties
|
||||||
|
|
||||||
public static void Inicia()
|
public static void Inicia()
|
||||||
{
|
{
|
||||||
tipoEjec = TiposEjecucion.Ninguno;
|
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();
|
IniDefault();
|
||||||
LimpiezaDef.iniciaLimpDef();
|
LimpiezaDef.iniciaLimpDef();
|
||||||
RecogidaDef.iniciaRecoDef();
|
RecogidaDef.iniciaRecoDef();
|
||||||
progrDialog = new MarchandoUnaDe();
|
progrDialog = new ProgressDialog("Procesando", Resource1.String_cancel_progreso, 100, false);
|
||||||
limp = new Limpieza();
|
limp = new Limpieza();
|
||||||
reco = new Recogida();
|
reco = new Recogida();
|
||||||
SpatRef = ArcGIS.Core.Geometry.SpatialReferenceBuilder.CreateSpatialReference(GeneralDef.SpatRefDef);
|
SpatRef = ArcGIS.Core.Geometry.SpatialReferenceBuilder.CreateSpatialReference(GeneralDef.SpatRefDef);
|
||||||
|
|
@ -175,39 +147,6 @@ namespace OliviaAddInPro.Model
|
||||||
//quita el flag al tipo de ejecución
|
//quita el flag al tipo de ejecución
|
||||||
OliviaGlob.TipoEjec = OliviaGlob.TipoEjec & ~flag;
|
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
|
* Habilita Sh=true
|
||||||
* o Deshabilita sh=false
|
* o Deshabilita sh=false
|
||||||
|
|
@ -220,13 +159,10 @@ namespace OliviaAddInPro.Model
|
||||||
if (sh)
|
if (sh)
|
||||||
{
|
{
|
||||||
DockpaneLimpiezaViewModel.Show();
|
DockpaneLimpiezaViewModel.Show();
|
||||||
//SetFlagTipEjec(TiposEjecucion.Limp);
|
|
||||||
ViewSetFlagTipEjec(TiposEjecucion.Limp);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DockpaneLimpiezaViewModel.Hide_();
|
DockpaneLimpiezaViewModel.Hide_();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (OliviaGlob.IsReco())
|
else if (OliviaGlob.IsReco())
|
||||||
|
|
@ -234,196 +170,37 @@ namespace OliviaAddInPro.Model
|
||||||
if (sh)
|
if (sh)
|
||||||
{
|
{
|
||||||
DockpaneRecogidaViewModel.Show();
|
DockpaneRecogidaViewModel.Show();
|
||||||
//SetFlagTipEjec(TiposEjecucion.Reco);
|
|
||||||
ViewSetFlagTipEjec(TiposEjecucion.Reco);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DockpaneRecogidaViewModel.Hide_();
|
DockpaneRecogidaViewModel.Hide_();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (OliviaGlob.IsProps())
|
else if(OliviaGlob.IsProps())
|
||||||
{
|
{
|
||||||
if (sh)
|
if (sh)
|
||||||
{
|
{
|
||||||
DockpaneConfigViewModel.Show();
|
DockpaneConfigViewModel.Show();
|
||||||
SetFlagTipEjec(TiposEjecucion.Props);
|
|
||||||
ViewSetFlagTipEjec(TiposEjecucion.Props);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DockpaneConfigViewModel.Hide_();
|
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
|
* Inicializa los nombres por defecto de las variables, para debug por si no hay instalador
|
||||||
*/
|
*/
|
||||||
public static void IniDefault()
|
public static void IniDefault()
|
||||||
{
|
{
|
||||||
var c = ConfigServ.Serv.Leer();
|
var c = ConfigServ.Serv.Leer();
|
||||||
Paths.PathCfg = c.path_cfg_aux;
|
|
||||||
Paths.PathWork = c.path_work;
|
Paths.PathWork = c.path_work;
|
||||||
Paths.PathExeOlivia = c.path_exe;
|
Paths.PathExeOlivia = c.path_exe;
|
||||||
Paths.PathManualOlivia = c.path_manual;
|
|
||||||
Paths.DirData = c.path_data;
|
Paths.DirData = c.path_data;
|
||||||
Paths.PathTemp = c.path_temp;
|
Paths.PathTemp = c.path_temp;
|
||||||
c.PathCartela = c.PathCartela;
|
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.DirData);
|
||||||
HelperGlobal.create_folder(Paths.PathTemp);
|
HelperGlobal.create_folder(Paths.PathTemp);
|
||||||
|
|
||||||
|
|
@ -432,7 +209,7 @@ namespace OliviaAddInPro.Model
|
||||||
Paths.PathSimbVSM = c.PathSimbVSM;
|
Paths.PathSimbVSM = c.PathSimbVSM;
|
||||||
Paths.PathSimbESRI = c.PathSimbESRI;
|
Paths.PathSimbESRI = c.PathSimbESRI;
|
||||||
Conexion.Puerto = c.Puerto;
|
Conexion.Puerto = c.Puerto;
|
||||||
//Conexion.Ip = c.Ip; //la lee en el momento
|
Conexion.Ip = c.Ip;
|
||||||
Conexion.TiempoOutSocket = c.TiempoOutSocket;
|
Conexion.TiempoOutSocket = c.TiempoOutSocket;
|
||||||
|
|
||||||
///////////////////////////////////////
|
///////////////////////////////////////
|
||||||
|
|
@ -447,6 +224,8 @@ namespace OliviaAddInPro.Model
|
||||||
LimpiezaDef.Campos.consulta_observ = c.cons_obser;
|
LimpiezaDef.Campos.consulta_observ = c.cons_obser;
|
||||||
LimpiezaDef.Campos.consulta_anch_tip = c.cons_anch_tip;
|
LimpiezaDef.Campos.consulta_anch_tip = c.cons_anch_tip;
|
||||||
LimpiezaDef.Campos.consulta_tipolo = c.cons_tipolo;
|
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_esca = c.atr_esca;
|
||||||
LimpiezaDef.Atributos.atr_fuent = c.atr_fuent;
|
LimpiezaDef.Atributos.atr_fuent = c.atr_fuent;
|
||||||
|
|
@ -491,8 +270,6 @@ namespace OliviaAddInPro.Model
|
||||||
LimpiezaDef.Parametros.t_descansom = c.t_descanso_min;
|
LimpiezaDef.Parametros.t_descansom = c.t_descanso_min;
|
||||||
LimpiezaDef.Parametros.t_descanso = c.t_descanso;
|
LimpiezaDef.Parametros.t_descanso = c.t_descanso;
|
||||||
LimpiezaDef.Parametros.h_inicio = c.hora_inicio;
|
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_max;
|
||||||
LimpiezaDef.Parametros.ancho_viam = c.ancho_via_min;
|
LimpiezaDef.Parametros.ancho_viam = c.ancho_via_min;
|
||||||
LimpiezaDef.Parametros.ancho_via = c.ancho_via;
|
LimpiezaDef.Parametros.ancho_via = c.ancho_via;
|
||||||
|
|
@ -534,11 +311,15 @@ namespace OliviaAddInPro.Model
|
||||||
LimpiezaDef.Parametros.vdespLS = c.v_desp_LS;
|
LimpiezaDef.Parametros.vdespLS = c.v_desp_LS;
|
||||||
LimpiezaDef.Parametros.umbral_reco = 80;
|
LimpiezaDef.Parametros.umbral_reco = 80;
|
||||||
|
|
||||||
|
LimpiezaDef.OtrosParam.giro_max = c.Giro_max_vehiculo;
|
||||||
LimpiezaDef.OtrosParam.anch_peat = c.Ancho_peat_def;
|
LimpiezaDef.OtrosParam.anch_peat = c.Ancho_peat_def;
|
||||||
LimpiezaDef.OtrosParam.anch_ace = c.Ancho_acera_def;
|
LimpiezaDef.OtrosParam.anch_ace = c.Ancho_acera_def;
|
||||||
LimpiezaDef.OtrosParam.anch_aplin = c.Ancho_ap_lin_def;
|
LimpiezaDef.OtrosParam.anch_aplin = c.Ancho_ap_lin_def;
|
||||||
LimpiezaDef.OtrosParam.anch_apbat = c.Ancho_ap_bat_def;
|
LimpiezaDef.OtrosParam.anch_apbat = c.Ancho_ap_bat_def;
|
||||||
LimpiezaDef.OtrosParam.anch_bordlib = c.Ancho_bord_lib_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
|
//Capas, consultas, atributos y filtros de RECOGIDA
|
||||||
|
|
||||||
|
|
@ -576,13 +357,13 @@ namespace OliviaAddInPro.Model
|
||||||
RecogidaDef.Parametros.t_descM = c.t_descarga_max;
|
RecogidaDef.Parametros.t_descM = c.t_descarga_max;
|
||||||
RecogidaDef.Parametros.t_descm = c.t_descarga_min;
|
RecogidaDef.Parametros.t_descm = c.t_descarga_min;
|
||||||
RecogidaDef.Parametros.t_desc = c.t_descarga;
|
RecogidaDef.Parametros.t_desc = c.t_descarga;
|
||||||
RecogidaDef.Parametros.t_convM = c.t_convenio_max;
|
RecogidaDef.Parametros.t_convM = c.R_t_convenio_max;
|
||||||
RecogidaDef.Parametros.t_convm = c.t_convenio_min;
|
RecogidaDef.Parametros.t_convm = c.R_t_convenio_min;
|
||||||
RecogidaDef.Parametros.t_conv = c.t_convenio;
|
RecogidaDef.Parametros.t_conv = c.R_t_convenio;
|
||||||
RecogidaDef.Parametros.t_descansoM = c.t_descanso_max;
|
RecogidaDef.Parametros.t_descansoM = c.R_t_descanso_max;
|
||||||
RecogidaDef.Parametros.t_descansom = c.t_descanso_min;
|
RecogidaDef.Parametros.t_descansom = c.R_t_descanso_min;
|
||||||
RecogidaDef.Parametros.t_descanso = c.t_descanso;
|
RecogidaDef.Parametros.t_descanso = c.R_t_descanso;
|
||||||
RecogidaDef.Parametros.h_inicio = c.hora_inicio;
|
RecogidaDef.Parametros.h_inicio = c.R_hora_inicio;
|
||||||
RecogidaDef.Parametros.dens_vehi_org = c.dens_vehi_org;
|
RecogidaDef.Parametros.dens_vehi_org = c.dens_vehi_org;
|
||||||
RecogidaDef.Parametros.dens_vehi_res = c.dens_vehi_res;
|
RecogidaDef.Parametros.dens_vehi_res = c.dens_vehi_res;
|
||||||
RecogidaDef.Parametros.dens_vehi_env = c.dens_vehi_env;
|
RecogidaDef.Parametros.dens_vehi_env = c.dens_vehi_env;
|
||||||
|
|
@ -630,13 +411,6 @@ namespace OliviaAddInPro.Model
|
||||||
ComunDef.AtributosNW.atr_N = c.atr_N;
|
ComunDef.AtributosNW.atr_N = c.atr_N;
|
||||||
ComunDef.AtributosNW.atr_pedes = c.atr_pedes;
|
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,7 +8,6 @@ using OliviaAddInPro.Services;
|
||||||
using ArcGIS.Core.Geometry;
|
using ArcGIS.Core.Geometry;
|
||||||
using static OliviaAddInPro.Model.ComunDef;
|
using static OliviaAddInPro.Model.ComunDef;
|
||||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
using OliviaAddInPro.Services.LanzaSrv;
|
|
||||||
|
|
||||||
namespace OliviaAddInPro.Model
|
namespace OliviaAddInPro.Model
|
||||||
{
|
{
|
||||||
|
|
@ -69,130 +68,31 @@ namespace OliviaAddInPro.Model
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
public RecogidaServ Serv
|
public RecogidaServ Serv { get; set; } = null;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return (RecogidaServ)ServCom;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
ServCom = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public LanzaRecoSrv LanzaSrv { get; set; } = null;
|
|
||||||
public Recogida()
|
public Recogida()
|
||||||
{
|
{
|
||||||
Serv = new RecogidaServ(this);
|
Serv = new RecogidaServ(this);
|
||||||
LanzaSrv = new LanzaRecoSrv();
|
ProgrSrc = new MyCancelableProgressorSource(OliviaGlob.progrDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Respuesta<TiposEjecucion> Ejecuta(ModosEjec modo)
|
|
||||||
|
public TareaRes Ejecuta(ModosEjec modo)
|
||||||
{
|
{
|
||||||
Respuesta<bool> res = new Respuesta<bool> { Value = false };
|
TareaRes res = null;
|
||||||
Respuesta<TiposEjecucion> res2 = new Respuesta<TiposEjecucion>() { Value = TiposEjecucion.FinEjecNOk };
|
|
||||||
res = Serv.Ejecuta(modo);
|
res = Serv.Ejecuta(modo);
|
||||||
if (res.Value)
|
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;
|
|
||||||
}
|
}
|
||||||
|
public async void EjecutaAsync(ModosEjec modo, Action<TareaRes> ffin)
|
||||||
/**
|
|
||||||
* 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;
|
await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
|
||||||
string auxili, fra, auxi;
|
{
|
||||||
|
var res = Ejecuta(modo);
|
||||||
|
ffin(res);
|
||||||
|
return res;
|
||||||
|
|
||||||
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] + "'";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,105 +0,0 @@
|
||||||
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,12 +6,6 @@ using System.Threading.Tasks;
|
||||||
using ArcGIS.Core.Geometry;
|
using ArcGIS.Core.Geometry;
|
||||||
using ArcGIS.Desktop.Internal.Layouts.Utilities;
|
using ArcGIS.Desktop.Internal.Layouts.Utilities;
|
||||||
using OliviaAddInPro.Helper;
|
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
|
namespace OliviaAddInPro.Model
|
||||||
{
|
{
|
||||||
|
|
@ -29,10 +23,6 @@ namespace OliviaAddInPro.Model
|
||||||
* Capa de ámbitos
|
* Capa de ámbitos
|
||||||
*/
|
*/
|
||||||
public string CapaElems { get; set; } = string.Empty;
|
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
|
* Nombre dle shp exportado de datos
|
||||||
*/
|
*/
|
||||||
|
|
@ -103,7 +93,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
|
* 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; } = LimpiezaDef.Parametros.reduc_traf;
|
public int Trafico { get; set; } = 80;
|
||||||
/**
|
/**
|
||||||
* Número de puntos de control
|
* Número de puntos de control
|
||||||
*/
|
*/
|
||||||
|
|
@ -115,11 +105,7 @@ namespace OliviaAddInPro.Model
|
||||||
/**
|
/**
|
||||||
* Ignorar o noelementos aislados
|
* Ignorar o noelementos aislados
|
||||||
*/
|
*/
|
||||||
public bool IgnoAis { get; set; } = LimpiezaDef.Parametros.igno_ais;
|
public bool IgnoAis { get; set; } = true;
|
||||||
/**
|
|
||||||
* Coordenadas Min y Max de la red navegable
|
|
||||||
*/
|
|
||||||
public Envelope MimaNw { get; set; } = null;
|
|
||||||
/**
|
/**
|
||||||
* Almacena la consulta para exportar los ámbitos
|
* Almacena la consulta para exportar los ámbitos
|
||||||
*/
|
*/
|
||||||
|
|
@ -130,200 +116,20 @@ namespace OliviaAddInPro.Model
|
||||||
private string err_str = string.Empty;
|
private string err_str = string.Empty;
|
||||||
public string ErrStr
|
public string ErrStr
|
||||||
{
|
{
|
||||||
get
|
get {
|
||||||
{
|
|
||||||
/*string val = string.Empty;
|
/*string val = string.Empty;
|
||||||
val.CopyFrom(err_str);
|
val.CopyFrom(err_str);
|
||||||
err_str = string.Empty;
|
err_str = string.Empty;
|
||||||
return val; */
|
return val; */
|
||||||
return err_str;
|
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
|
* Para la ventana de progreso
|
||||||
*/
|
*/
|
||||||
public MyCancelableProgressorSource ProgrSrc { get; set; } = null;
|
public MyCancelableProgressorSource ProgrSrc;
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
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,153 +1,379 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
<ProductVersion>8.0.30703</ProductVersion>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<ProjectGuid>{10742570-CF59-42F2-BEA2-2A38002A06EE}</ProjectGuid>
|
||||||
<NoWarn>CA1416</NoWarn>
|
<OutputType>Library</OutputType>
|
||||||
<UseWPF>true</UseWPF>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<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>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove=".git\**" />
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<EmbeddedResource Remove=".git\**" />
|
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
<None Remove=".git\**" />
|
</Reference>
|
||||||
<Page Remove=".git\**" />
|
<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>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Config.daml" />
|
<AddInContent Include="Config.daml" />
|
||||||
<Content Include="Images\AddInDesktop16.png" />
|
<AddInContent Include="Images\AddInDesktop16.png" />
|
||||||
<Content Include="Images\AddInDesktop32.png" />
|
<AddInContent Include="Images\AddInDesktop32.png" />
|
||||||
<Content Include="DarkImages\AddInDesktop16.png" />
|
<AddInContent Include="DarkImages\AddInDesktop16.png" />
|
||||||
<Content Include="DarkImages\AddInDesktop32.png" />
|
<AddInContent Include="DarkImages\AddInDesktop32.png" />
|
||||||
<Content Include="DarkImages\GenericButtonBlue16.png" />
|
</ItemGroup>
|
||||||
<Content Include="DarkImages\GenericButtonBlue32.png" />
|
<ItemGroup>
|
||||||
<Content Include="Images\OliviaIconPro16.png" />
|
<Compile Include="Button\ButtonConfig.cs" />
|
||||||
<Content Include="Images\OliviaIconPro32.png" />
|
<Compile Include="Button\ButtonLimp.cs" />
|
||||||
<Content Include="DarkImages\GenericButtonPurple16.png" />
|
<Compile Include="Button\ButtonMaq.cs" />
|
||||||
<Content Include="DarkImages\GenericButtonPurple32.png" />
|
<Compile Include="Button\ButtonRec.cs" />
|
||||||
<Content Include="DarkImages\GenericButtonGreen16.png" />
|
<Compile Include="Conexion\Cstr_socket.cs" />
|
||||||
<Content Include="DarkImages\GenericButtonGreen32.png" />
|
<Compile Include="Helper\EnabledComboBoxItem.cs" />
|
||||||
<Content Include="Images\reco2.png" />
|
<Compile Include="Helper\CheckedListItem.cs" />
|
||||||
<Content Include="Images\carrito2.png" />
|
<Compile Include="Helper\HelperGdb.cs" />
|
||||||
<Content Include="Images\config2_olv.png" />
|
<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" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="OliviaIconPro.ico" />
|
<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" />
|
<Resource Include="View\OliviaIconPro16.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
<Resource Include="View\OliviaIconPro.ico" />
|
<Resource Include="View\OliviaIconPro.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
<Resource Include="Resources\inicio.png" />
|
<Resource Include="Resources\inicio.png" />
|
||||||
<Resource Include="Resources\ptosctrl.png" />
|
<Resource Include="Resources\ptosctrl.png" />
|
||||||
<Resource Include="Resources\time.png" />
|
<Resource Include="Resources\time.png" />
|
||||||
<Resource Include="Resources\zonas.png" />
|
<Resource Include="Resources\zonas.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
<Resource Include="Images\openfolder.png" />
|
<Resource Include="Images\openfolder.png" />
|
||||||
<Resource Include="Images\help16Pro.png" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DotNetProjects.Extended.Wpf.Toolkit" Version="5.0.103" />
|
<AddInContent Include="Images\config2.png" />
|
||||||
<PackageReference Include="Microsoft.WindowsAPICodePack.Shell" Version="1.1.0" />
|
<AddInContent Include="Images\reco2.png" />
|
||||||
<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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="packages.config" />
|
<AddInContent Include="Images\carrito2.png" />
|
||||||
<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>
|
||||||
<ItemGroup>
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Compile Update="Resource1.Designer.cs">
|
<!--
|
||||||
<AutoGen>True</AutoGen>
|
PackageAction can be:
|
||||||
<DependentUpon>Resource1.resx</DependentUpon>
|
BuildDefault: ArcGIS Pro is required. An esriAddinX package is created and copied to ArcGIS Pro add-in folder.
|
||||||
</Compile>
|
BuildZipPostProcess: ArcGIS Pro install is NOT required to build the add-in. An esriAddinX package is created in your output folder.
|
||||||
</ItemGroup>
|
BuildNoPostProcess: ArcGIS Pro install is NOT required to build the add-in. An esriAddinX package is NOT created.
|
||||||
<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')" />
|
-->
|
||||||
|
<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>-->
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -1,156 +1,344 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0-windows</TargetFramework>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
<ProductVersion>8.0.30703</ProductVersion>
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<ProjectGuid>{10742570-CF59-42F2-BEA2-2A38002A06EE}</ProjectGuid>
|
||||||
<NoWarn>CA1416</NoWarn>
|
<OutputType>Library</OutputType>
|
||||||
<UseWPF>true</UseWPF>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<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>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove=".git\**" />
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<EmbeddedResource Remove=".git\**" />
|
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
<None Remove=".git\**" />
|
</Reference>
|
||||||
<Page Remove=".git\**" />
|
<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>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Config.daml" />
|
<AddInContent Include="Config.daml" />
|
||||||
<Content Include="Images\AddInDesktop16.png" />
|
<AddInContent Include="Images\AddInDesktop16.png" />
|
||||||
<Content Include="Images\AddInDesktop32.png" />
|
<AddInContent Include="Images\AddInDesktop32.png" />
|
||||||
<Content Include="DarkImages\AddInDesktop16.png" />
|
<AddInContent Include="DarkImages\AddInDesktop16.png" />
|
||||||
<Content Include="DarkImages\AddInDesktop32.png" />
|
<AddInContent Include="DarkImages\AddInDesktop32.png" />
|
||||||
<Content Include="DarkImages\GenericButtonBlue16.png" />
|
</ItemGroup>
|
||||||
<Content Include="DarkImages\GenericButtonBlue32.png" />
|
<ItemGroup>
|
||||||
<Content Include="Images\OliviaIconPro16.png" />
|
<Compile Include="Button\ButtonConfig.cs" />
|
||||||
<Content Include="Images\OliviaIconPro32.png" />
|
<Compile Include="Button\ButtonLimp.cs" />
|
||||||
<Content Include="DarkImages\GenericButtonPurple16.png" />
|
<Compile Include="Button\ButtonMaq.cs" />
|
||||||
<Content Include="DarkImages\GenericButtonPurple32.png" />
|
<Compile Include="Button\ButtonRec.cs" />
|
||||||
<Content Include="DarkImages\GenericButtonGreen16.png" />
|
<Compile Include="Conexion\Cstr_socket.cs" />
|
||||||
<Content Include="DarkImages\GenericButtonGreen32.png" />
|
<Compile Include="Helper\EnabledComboBoxItem.cs" />
|
||||||
<Content Include="Images\reco2.png" />
|
<Compile Include="Helper\CheckedListItem.cs" />
|
||||||
<Content Include="Images\carrito2.png" />
|
<Compile Include="Helper\HelperGdb.cs" />
|
||||||
<Content Include="Images\config2_olv.png" />
|
<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" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="OliviaIconPro.ico" />
|
<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" />
|
<Resource Include="View\OliviaIconPro16.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
<Resource Include="View\OliviaIconPro.ico" />
|
<Resource Include="View\OliviaIconPro.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
<Resource Include="Resources\inicio.png" />
|
<Resource Include="Resources\inicio.png" />
|
||||||
<Resource Include="Resources\ptosctrl.png" />
|
<Resource Include="Resources\ptosctrl.png" />
|
||||||
<Resource Include="Resources\time.png" />
|
<Resource Include="Resources\time.png" />
|
||||||
<Resource Include="Resources\zonas.png" />
|
<Resource Include="Resources\zonas.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
<Resource Include="Images\openfolder.png" />
|
<Resource Include="Images\openfolder.png" />
|
||||||
<Resource Include="Images\help16Pro.png" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<<<<<<< HEAD
|
<<<<<<< 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" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!--
|
<!--
|
||||||
PackageAction can be:
|
PackageAction can be:
|
||||||
|
|
@ -164,17 +352,12 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<PackageAction>BuildDefault</PackageAction>
|
<PackageAction>BuildDefault</PackageAction>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
</PropertyGroup>
|
</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.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.CleanAddIn" />
|
||||||
<UsingTask AssemblyFile="$(ArcGISFolder)\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.ConvertToRelativePath" />
|
<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="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')" />
|
<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.
|
<!-- 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.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
|
@ -185,5 +368,4 @@
|
||||||
<!--<Target Name="BeforeBuild">
|
<!--<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')" />
|
<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>-->
|
</Target>-->
|
||||||
>>>>>>> origin/develop
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 16
|
# Visual Studio Version 16
|
||||||
VisualStudioVersion = 16.0.30011.22
|
VisualStudioVersion = 16.0.30011.22
|
||||||
|
|
@ -8,25 +8,13 @@ EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
Debug|x64 = Debug|x64
|
|
||||||
Debug|x86 = Debug|x86
|
|
||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
Release|x64 = Release|x64
|
|
||||||
Release|x86 = Release|x86
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{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|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.ActiveCfg = Release|Any CPU
|
||||||
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Release|Any CPU.Build.0 = 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
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ using System.Runtime.InteropServices;
|
||||||
[assembly: AssemblyTitle("OliviaAddInPro")]
|
[assembly: AssemblyTitle("OliviaAddInPro")]
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("VSM - Narvaling")]
|
[assembly: AssemblyCompany("Acme")]
|
||||||
[assembly: AssemblyProduct("OliviaAddInPro")]
|
[assembly: AssemblyProduct("OliviaAddInPro")]
|
||||||
[assembly: AssemblyCopyright("Copyright © VSM 2023")]
|
[assembly: AssemblyCopyright("Copyright © Acme 2021")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[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
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("3.2.0.0")]
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
[assembly: AssemblyFileVersion("3.2.0.0")]
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"profiles": {
|
|
||||||
"OliviaAddInPro": {
|
|
||||||
"commandName": "Executable",
|
|
||||||
"executablePath": "C:\\Program Files\\ArcGIS\\Pro\\bin\\ArcGISPro.exe"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -96,15 +96,6 @@ 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>
|
/// <summary>
|
||||||
/// Busca una cadena traducida similar a Ya existe una ejecución en marcha.
|
/// Busca una cadena traducida similar a Ya existe una ejecución en marcha.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -114,15 +105,6 @@ 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>
|
/// <summary>
|
||||||
/// Busca una cadena traducida similar a OLIVIA | Configuración.
|
/// Busca una cadena traducida similar a OLIVIA | Configuración.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -129,15 +129,9 @@
|
||||||
<data name="String_error_elems_tabla" xml:space="preserve">
|
<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>
|
<value>No se ha encontrado ningún elemento en la tabla que cumpla con los criterios seleccionados.</value>
|
||||||
</data>
|
</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">
|
<data name="String_existe_ejec" xml:space="preserve">
|
||||||
<value>Ya existe una ejecución en marcha</value>
|
<value>Ya existe una ejecución en marcha</value>
|
||||||
</data>
|
</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">
|
<data name="String_header_Config" xml:space="preserve">
|
||||||
<value>OLIVIA | Configuración</value>
|
<value>OLIVIA | Configuración</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
||||||
|
|
@ -7,17 +7,16 @@ using System.Threading.Tasks;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
namespace OliviaAddInPro.Services
|
namespace OliviaAddInPro.Services
|
||||||
{
|
{
|
||||||
class ConfigServ
|
class ConfigServ
|
||||||
{
|
{
|
||||||
private static string pathConfigDef = "C:\\Olivia";
|
private static string pathConfigDef = "C:\\Olivia\\olv.conf";
|
||||||
private static ConfigServ configServ=null;
|
private static ConfigServ configServ=null;
|
||||||
private static string nameDirWork = "%dir_work%";
|
private static string nameDirWork = "%dir_work%";
|
||||||
public const string OlvRegKey = "SOFTWARE\\Narvaling\\Olivia_3_1";
|
public const string OlvRegKey = "SOFTWARE\\Narvaling\\Olivia";
|
||||||
public const string OlvRegName = "workdir";
|
|
||||||
public const string OlvConfigName = "olv.conf";
|
|
||||||
|
|
||||||
public static ConfigServ Serv
|
public static ConfigServ Serv
|
||||||
{
|
{
|
||||||
|
|
@ -28,15 +27,23 @@ namespace OliviaAddInPro.Services
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public OliviaConf Leer()
|
public OliviaConf Leer(bool simplif=false)
|
||||||
{
|
{
|
||||||
OliviaConf res = Default();
|
var aa= System.Reflection.Assembly.GetEntryAssembly().Location;
|
||||||
|
var executingAssembly = System.Reflection.Assembly.GetExecutingAssembly(); //MyLibrary.dll
|
||||||
|
var callingAssembly = System.Reflection.Assembly.GetCallingAssembly(); //MyLibrary.dll
|
||||||
|
var entryAssembly = System.Reflection.Assembly.GetEntryAssembly(); //WpfApp.exe or MyLibrary.dll
|
||||||
|
|
||||||
|
|
||||||
|
OliviaConf res = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var path_cfg = GetPathConfig();
|
if(!simplif)
|
||||||
path_cfg = Path.Combine(path_cfg, OlvConfigName);
|
res = JsonConvert.DeserializeObject<OliviaConf>(File.ReadAllText(GetPathConfig()));
|
||||||
res = JsonConvert.DeserializeObject<OliviaConf>(File.ReadAllText(path_cfg));
|
else
|
||||||
}catch(Exception e)
|
res = JsonConvert.DeserializeObject<OliviaConfSimple>(File.ReadAllText(GetPathConfig()));
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
var ee = e;
|
var ee = e;
|
||||||
res = null;
|
res = null;
|
||||||
|
|
@ -44,12 +51,6 @@ namespace OliviaAddInPro.Services
|
||||||
if(res==null)
|
if(res==null)
|
||||||
res = Default();
|
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.PathGdbGen = pon_path_absoluto(res.PathGdbGen, res.path_work);
|
||||||
res.PathSimbVSM = pon_path_absoluto(res.PathSimbVSM, res.path_work);
|
res.PathSimbVSM = pon_path_absoluto(res.PathSimbVSM, res.path_work);
|
||||||
|
|
@ -59,58 +60,34 @@ namespace OliviaAddInPro.Services
|
||||||
|
|
||||||
|
|
||||||
res.path_exe = pon_path_absoluto(res.path_exe, res.path_work);
|
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_temp = pon_path_absoluto(res.path_temp, res.path_work);
|
||||||
res.path_data = pon_path_absoluto(res.path_data, 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;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Respuesta<bool> Guardar(OliviaConf conf)
|
public void 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_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_temp = pon_path_relativo(conf.path_temp, conf.path_work);
|
||||||
conf.path_data = pon_path_relativo(conf.path_data, 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.PathGdbGen = pon_path_relativo(conf.PathGdbGen, conf.path_work);
|
||||||
conf.PathSimbVSM = pon_path_relativo(conf.PathSimbVSM, conf.path_work);
|
conf.PathSimbVSM = pon_path_relativo(conf.PathSimbVSM, conf.path_work);
|
||||||
conf.PathSimbESRI = pon_path_relativo(conf.PathSimbESRI, conf.path_work);
|
conf.PathSimbESRI = pon_path_relativo(conf.PathSimbESRI, conf.path_work);
|
||||||
conf.PathCartela = pon_path_relativo(conf.PathCartela, conf.path_work);
|
conf.PathCartela = pon_path_relativo(conf.PathCartela, conf.path_work);
|
||||||
conf.Path_Eje_via = pon_path_relativo(conf.Path_Eje_via, conf.path_work);
|
conf.Path_Eje_via = pon_path_relativo(conf.Path_Eje_via, conf.path_work);
|
||||||
|
|
||||||
try
|
string jsonString = JsonConvert.SerializeObject(conf);
|
||||||
{
|
File.WriteAllText(GetPathConfig(), jsonString);
|
||||||
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_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_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.path_data = pon_path_absoluto(conf.path_data, conf.path_work);
|
||||||
conf.PathGdbGen = pon_path_absoluto(conf.PathGdbGen, conf.path_work);
|
conf.PathGdbGen = pon_path_absoluto(conf.PathGdbGen, conf.path_work);
|
||||||
conf.PathSimbVSM = pon_path_absoluto(conf.PathSimbVSM, conf.path_work);
|
conf.PathSimbVSM = pon_path_absoluto(conf.PathSimbVSM, conf.path_work);
|
||||||
conf.PathSimbESRI = pon_path_absoluto(conf.PathSimbESRI, conf.path_work);
|
conf.PathSimbESRI = pon_path_absoluto(conf.PathSimbESRI, conf.path_work);
|
||||||
conf.PathCartela = pon_path_absoluto(conf.PathCartela, 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);
|
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%)
|
* cambia la carpeta referida a directorio de trabajo por los caracteres OliviaDirWork (%dir_work%)
|
||||||
|
|
@ -143,7 +120,7 @@ namespace OliviaAddInPro.Services
|
||||||
str = null;
|
str = null;
|
||||||
if (rkprg.ValueCount > 0)
|
if (rkprg.ValueCount > 0)
|
||||||
{
|
{
|
||||||
str = (String)rkprg.GetValue(OlvRegName);
|
str = (String)rkprg.GetValue("path_cfg");
|
||||||
if (!string.IsNullOrEmpty(str))
|
if (!string.IsNullOrEmpty(str))
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
@ -159,7 +136,6 @@ namespace OliviaAddInPro.Services
|
||||||
var path = GetPathConfig();
|
var path = GetPathConfig();
|
||||||
if(!string.IsNullOrEmpty(path))
|
if(!string.IsNullOrEmpty(path))
|
||||||
{
|
{
|
||||||
path = Path.Combine(path, OlvConfigName);
|
|
||||||
c.path_work = Path.GetDirectoryName(path) + "\\";
|
c.path_work = Path.GetDirectoryName(path) + "\\";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -178,21 +154,14 @@ namespace OliviaAddInPro.Services
|
||||||
c.consulta_sector = "SECTOR";
|
c.consulta_sector = "SECTOR";
|
||||||
c.consulta_secuen = "SECUENCIA";
|
c.consulta_secuen = "SECUENCIA";
|
||||||
|
|
||||||
c.Igno_ais = true;
|
|
||||||
|
|
||||||
//c.red_carreteras = @"%dir_work%Datos\gdbs\TomTom_Q4_2015.gdb";
|
//c.red_carreteras = @"%dir_work%Datos\gdbs\TomTom_Q4_2015.gdb";
|
||||||
c.Puerto = 19995;
|
c.puerto = 19995;
|
||||||
c.buffer_export = 1000;
|
c.buffer_export = 1000;
|
||||||
|
|
||||||
c.path_exe=@"%dir_work%bin\OliviaTasks.exe";
|
c.path_exe=@"%dir_work%bin\OliviaTasks.exe";
|
||||||
c.path_manual= @"%dir_work%Manual_Olivia.pdf";
|
|
||||||
c.path_temp = @"%dir_work%temp\";
|
c.path_temp = @"%dir_work%temp\";
|
||||||
c.path_data=@"%dir_work%data\";
|
c.path_data=@"%dir_work%data\";
|
||||||
c.Path_Eje_via = "";
|
c.Path_Eje_via = @"%dir_work%Datos\gdbs\TomTom_Q4_2015.gdb\TomTom_Q4_2015___nw";
|
||||||
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.eje_via = "TomTom_Q4_2015___nw";
|
||||||
c.municipios = "TomTom_Q4_2015___a8";*/
|
c.municipios = "TomTom_Q4_2015___a8";*/
|
||||||
|
|
||||||
|
|
@ -266,7 +235,6 @@ namespace OliviaAddInPro.Services
|
||||||
c.t_carga_desc=40;
|
c.t_carga_desc=40;
|
||||||
c.t_descanso=30;
|
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.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.ancho_via=2;
|
||||||
c.t_tratamiento_BarMan=2900;
|
c.t_tratamiento_BarMan=2900;
|
||||||
c.t_tratamiento_BarManMant=2900;
|
c.t_tratamiento_BarManMant=2900;
|
||||||
|
|
@ -298,22 +266,30 @@ namespace OliviaAddInPro.Services
|
||||||
c.v_desp_BalMix=15;
|
c.v_desp_BalMix=15;
|
||||||
c.v_desp_BL=5;
|
c.v_desp_BL=5;
|
||||||
c.v_desp_CH=15;
|
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_VPap=0;
|
||||||
c.v_desp_LPap=0;
|
c.v_desp_LPap=0;
|
||||||
c.v_desp_LC=0;
|
c.v_desp_LC=0;
|
||||||
c.v_desp_LZI=0;
|
c.v_desp_LZI=0;
|
||||||
c.v_desp_LPip=0;
|
c.v_desp_LPip=0;
|
||||||
c.v_desp_LS=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
|
//Reco
|
||||||
c.id= "ID";
|
c.id= "OBJECTID";
|
||||||
c.nomrec= "NOMB_TIP_REC";
|
c.nomrec= "NOMB_TIP_REC";
|
||||||
c.lateralidad= "LATERALIDAD";
|
c.lateralidad= "LATERALIDAD";
|
||||||
c.frac= "FRACCION";
|
c.frac= "FRACCION";
|
||||||
c.capac= "CAPACIDAD";
|
c.capac= "CAPACIDAD";
|
||||||
c.uds= "UNIDADES";
|
c.uds= "UNIDADES";
|
||||||
c.kgrec= "Kg_Recog";
|
c.kgrec= "KGRECO";
|
||||||
c.kgrec_val=200;
|
c.kgrec_val=200;
|
||||||
c.is_lleno=false;
|
c.is_lleno=false;
|
||||||
c.is_campo=false;
|
c.is_campo=false;
|
||||||
|
|
@ -349,6 +325,9 @@ namespace OliviaAddInPro.Services
|
||||||
c.R_t_descanso_min = 0;
|
c.R_t_descanso_min = 0;
|
||||||
c.t_llega_sale=5;
|
c.t_llega_sale=5;
|
||||||
c.t_descarga=40;
|
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_org=500;
|
||||||
c.dens_vehi_res=500;
|
c.dens_vehi_res=500;
|
||||||
c.dens_vehi_env=120;
|
c.dens_vehi_env=120;
|
||||||
|
|
@ -371,7 +350,7 @@ namespace OliviaAddInPro.Services
|
||||||
c.t_vaci_lateral=90;
|
c.t_vaci_lateral=90;
|
||||||
c.t_vaci_superior=180;
|
c.t_vaci_superior=180;
|
||||||
c.t_vaci_bilateral=100;
|
c.t_vaci_bilateral=100;
|
||||||
c.t_vaci_bolseo=5*60;
|
c.t_vaci_bolseo=5;
|
||||||
c.t_vaci_lavado=60;
|
c.t_vaci_lavado=60;
|
||||||
c.t_vaci_otra=60;
|
c.t_vaci_otra=60;
|
||||||
c.kgmax_max=20000;
|
c.kgmax_max=20000;
|
||||||
|
|
@ -387,16 +366,6 @@ namespace OliviaAddInPro.Services
|
||||||
c.atr_FT="FT";
|
c.atr_FT="FT";
|
||||||
c.atr_N = "N";
|
c.atr_N = "N";
|
||||||
c.atr_pedes="14";
|
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;
|
return c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,292 +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;
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,111 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.IO;
|
||||||
|
using OliviaAddInPro.Model;
|
||||||
|
using OliviaAddInPro.Helper;
|
||||||
|
|
||||||
|
namespace OliviaAddInPro.Services
|
||||||
|
{
|
||||||
|
class ImportaResServ
|
||||||
|
{
|
||||||
|
//se le llama cuando ha terminado el proceso de ejecución en Olivia Tasks
|
||||||
|
//puede haber ido bien, haberse cancelado, etc. En función de ello se realizan
|
||||||
|
//unas tareas u otras
|
||||||
|
public void FinProceso()
|
||||||
|
{
|
||||||
|
bool mal = true;
|
||||||
|
string err = "";
|
||||||
|
|
||||||
|
if (OliviaGlob.HasFlagTipEjec(TiposEjecucion.FinEjecOk)) //ha terminado bien
|
||||||
|
{
|
||||||
|
if (OliviaGlob.HasFlagTipEjec(TiposEjecucion.EjecSecto)) //Ha terminado bien la sectorización
|
||||||
|
{
|
||||||
|
/*if (gdb.import_secto_ini())
|
||||||
|
{
|
||||||
|
mal = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mal = true;
|
||||||
|
err = gdb.err_st;
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
else if (OliviaGlob.HasFlagTipEjec(TiposEjecucion.EjecPlanif)) //Ha terminado bien la planificación
|
||||||
|
{
|
||||||
|
/*guarda_csv();
|
||||||
|
if (gdb.import_planif())
|
||||||
|
{
|
||||||
|
mal = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mal = true;
|
||||||
|
err = gdb.err_st;
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
//actualiza los flags
|
||||||
|
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.FinEjecOk);
|
||||||
|
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config2);
|
||||||
|
}
|
||||||
|
else if(OliviaGlob.HasFlagTipEjec(TiposEjecucion.FinEjecNOk)) //ha habido error
|
||||||
|
{
|
||||||
|
/*mal = true;
|
||||||
|
err = progr_eje.err_str;*/
|
||||||
|
//actualiza los flags
|
||||||
|
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.FinEjecNOk);
|
||||||
|
}
|
||||||
|
|
||||||
|
borra_files();
|
||||||
|
if (mal)
|
||||||
|
{
|
||||||
|
HelperGlobal.ponMsg(err, System.Windows.MessageBoxImage.Error);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
OliviaGlob.ShowHidePane(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Borra los archivos exportados para el proceso
|
||||||
|
*/
|
||||||
|
public static void borra_files()
|
||||||
|
{
|
||||||
|
string[] list = null;
|
||||||
|
string capa_principal = System.IO.Path.GetFileNameWithoutExtension(OliviaGlob.Paths.PathData);
|
||||||
|
string capa_principal_nw = System.IO.Path.GetFileNameWithoutExtension(OliviaGlob.Paths.PathNW);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (capa_principal == null)
|
||||||
|
return;
|
||||||
|
list = Directory.GetFiles(OliviaGlob.Paths.DirData, capa_principal + "*");
|
||||||
|
if (list.Length > 0)
|
||||||
|
{
|
||||||
|
foreach (string f in list)
|
||||||
|
{
|
||||||
|
if (System.IO.Path.GetExtension(f) == ".lock")
|
||||||
|
continue;
|
||||||
|
File.Delete(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (capa_principal_nw == null)
|
||||||
|
return;
|
||||||
|
list = Directory.GetFiles(OliviaGlob.Paths.DirData, capa_principal_nw + "*");
|
||||||
|
if (list.Length > 0)
|
||||||
|
{
|
||||||
|
foreach (string f in list)
|
||||||
|
{
|
||||||
|
File.Delete(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
HelperGlobal.ponMsg(ex.Message, System.Windows.MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -27,7 +27,16 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
||||||
res.Value = false;
|
res.Value = false;
|
||||||
return res;
|
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
|
//configura el string de opciones
|
||||||
if (!configura_ops_geo(limp, modo))
|
if (!configura_ops_geo(limp, modo))
|
||||||
{
|
{
|
||||||
|
|
@ -36,6 +45,8 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//this.limp = limp;
|
||||||
|
|
||||||
//Llama al ejecuta del padre
|
//Llama al ejecuta del padre
|
||||||
return base.ejec(NombreTratamiento);
|
return base.ejec(NombreTratamiento);
|
||||||
|
|
||||||
|
|
@ -76,10 +87,10 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_trafic + GeneralDef.EjecGeoParamIgual + limp.Trafico + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GG_trafic + GeneralDef.EjecGeoParamIgual + limp.Trafico + " " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_npt + GeneralDef.EjecGeoParamIgual + limp.NPtosCtrl + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GG_npt + GeneralDef.EjecGeoParamIgual + limp.NPtosCtrl + " " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_sec + GeneralDef.EjecGeoParamIgual + limp.NSect + " " +
|
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_coox + GeneralDef.EjecGeoParamIgual + limp.CoordsInstal.X + " " +//coordenadas
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_cooy + GeneralDef.EjecGeoParamIgual + limp.CoordsInstal.Y + " " +//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
|
//campos del dbf de limpieza para leer
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GAA_obser + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Campos.consulta_observ + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GAA_obser + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Campos.consulta_observ + " " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GAA_anch_tip + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Campos.consulta_anch_tip + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GAA_anch_tip + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Campos.consulta_anch_tip + " " +
|
||||||
|
|
@ -91,19 +102,7 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GAL_acera + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Atributos.atr_acera + " " +
|
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_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_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;
|
base.str_cfg = str;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,18 +39,24 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
||||||
}
|
}
|
||||||
|
|
||||||
public Respuesta<bool> ejec(string NTratamiento)
|
public Respuesta<bool> ejec(string NTratamiento)
|
||||||
{
|
{
|
||||||
NombreTratamiento = NTratamiento;
|
NombreTratamiento = NTratamiento;
|
||||||
add_cfg_comun();
|
add_cfg_comun();
|
||||||
|
|
||||||
|
//lanza ventana marchando que lanza proceso en bucle para actualizar barra progreso
|
||||||
|
//OliviaGlob.progr_eje = new ProgresoEjec();
|
||||||
|
|
||||||
//lanza proceso OliviaTask
|
//lanza proceso OliviaTask
|
||||||
var res = lanza();
|
var res = lanza();
|
||||||
if (!res.Value)
|
if (!res.Value)
|
||||||
{
|
{
|
||||||
res.Error.Add("Error al arrancar OliviaTask (programa de procesado de datos): No ha arrancado correctamente la instancia OliviaTask");
|
res.Error.Add("Error al arrancar OliviaTask (programa de procesado de datos): No ha arrancado correctamente la instancia OliviaTask");
|
||||||
|
res.Value = true;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//OliviaGlob.progr_eje.start(str_cfg);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -73,16 +79,7 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_strtto + GeneralDef.EjecGeoParamIgual + NombreTratamiento + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GG_strtto + GeneralDef.EjecGeoParamIgual + NombreTratamiento + " " +
|
||||||
//paths de archivos
|
//paths de archivos
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pd + GeneralDef.EjecGeoParamIgual + OliviaGlob.Paths.PathData + " " +
|
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -97,22 +94,16 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
||||||
|
|
||||||
try
|
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
|
//van ParamN parámetros, sin incluir, si se añaden, incrementar ParamN
|
||||||
args = GeneralDef.EjecGeoParamSep + GeneralDef.GG_tipo + GeneralDef.EjecGeoParamIgual + tipoEjec.ToString() + " " +
|
args = GeneralDef.EjecGeoParamSep + GeneralDef.GG_tipo + GeneralDef.EjecGeoParamIgual + (((int)OliviaGlob.TipoEjec)-1).ToString() + " " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_ip + GeneralDef.EjecGeoParamIgual + OliviaGlob.Conexion.Ip + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GG_ip + GeneralDef.EjecGeoParamIgual + OliviaGlob.Conexion.Ip + " " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_port + GeneralDef.EjecGeoParamIgual + OliviaGlob.Conexion.Puerto + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GG_port + GeneralDef.EjecGeoParamIgual + OliviaGlob.Conexion.Puerto + " " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_tout + GeneralDef.EjecGeoParamIgual + OliviaGlob.Conexion.TiempoOutSocket + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GG_tout + GeneralDef.EjecGeoParamIgual + OliviaGlob.Conexion.TiempoOutSocket + " " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pt + GeneralDef.EjecGeoParamIgual + OliviaGlob.Paths.PathTemp + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pt + GeneralDef.EjecGeoParamIgual + OliviaGlob.Paths.PathTemp + " " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pcfg + GeneralDef.EjecGeoParamIgual + "";
|
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pcfg + GeneralDef.EjecGeoParamIgual + OliviaGlob.Paths.PathCfg + " ";
|
||||||
|
|
||||||
pfi = new ProcessStartInfo(OliviaGlob.Paths.PathExeOlivia, args);
|
pfi = new ProcessStartInfo(OliviaGlob.Paths.PathExeOlivia, args);
|
||||||
pfi.UseShellExecute = false;
|
System.Diagnostics.Process.Start(pfi);
|
||||||
System.Diagnostics.Process.Start(pfi);
|
|
||||||
|
|
||||||
//comprueba que haya arrancado OliviaTask
|
//comprueba que haya arrancado OliviaTask
|
||||||
//le da 2 seg de margen para que arranque
|
//le da 2 seg de margen para que arranque
|
||||||
|
|
@ -188,38 +179,5 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
||||||
else
|
else
|
||||||
return null;
|
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,6 +26,8 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
||||||
return res;
|
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))
|
/*if (!OliviaGlob.gdb_reco.exporta(reco, modo == (int)Ejecuta.ModosEjec.Planif))
|
||||||
{
|
{
|
||||||
err_str = OliviaGlob.gdb_reco.err_st;
|
err_str = OliviaGlob.gdb_reco.err_st;
|
||||||
|
|
@ -61,7 +63,7 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
||||||
else if (modo == ModosEjec.SoloPlanifica)
|
else if (modo == ModosEjec.SoloPlanifica)
|
||||||
modo_str = GeneralDef.SockConfTodo;
|
modo_str = GeneralDef.SockConfTodo;
|
||||||
var conf = ConfigServ.Serv.Leer();
|
var conf = ConfigServ.Serv.Leer();
|
||||||
//van ParamLimpN parámetros, sin incluir "CONFIGURACION", si se añaden, incrementar ParamRecoN
|
//van ParamLimpN parámetros, sin incluir "CONFIGURACION", si se añaden, incrementar ParamLimpN
|
||||||
str = GeneralDef.EjecGeoParamSep + modo_str + " " +
|
str = GeneralDef.EjecGeoParamSep + modo_str + " " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_camp_cap + GeneralDef.EjecGeoParamIgual + conf.capac + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GR_camp_cap + GeneralDef.EjecGeoParamIgual + conf.capac + " " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_kgM + GeneralDef.EjecGeoParamIgual + reco.KgMaxVehic + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GR_kgM + GeneralDef.EjecGeoParamIgual + reco.KgMaxVehic + " " +
|
||||||
|
|
@ -79,24 +81,19 @@ namespace OliviaAddInPro.Services.LanzaSrv
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_trafic + GeneralDef.EjecGeoParamIgual + reco.Trafico + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GG_trafic + GeneralDef.EjecGeoParamIgual + reco.Trafico + " " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_npt + GeneralDef.EjecGeoParamIgual + reco.NPtosCtrl + " " +
|
GeneralDef.EjecGeoParamSep + GeneralDef.GG_npt + GeneralDef.EjecGeoParamIgual + reco.NPtosCtrl + " " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_sec + GeneralDef.EjecGeoParamIgual + reco.NSect + " " +
|
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.GR_gir + GeneralDef.EjecGeoParamIgual + reco.GiroVehic + " " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GG_coox + GeneralDef.EjecGeoParamIgual + reco.CoordsInstal.X + " " +//coordenadas
|
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.GG_cooy + GeneralDef.EjecGeoParamIgual + reco.CoordsInstal.Y + " " +//coordenadas
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_descx + GeneralDef.EjecGeoParamIgual + reco.CoordsPlanta.X + " " +//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_descy + GeneralDef.EjecGeoParamIgual + reco.CoordsPlanta.Y + " " +//coordenadas
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_id + 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_url + GeneralDef.EjecGeoParamIgual + 0 + " " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_fecha + 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_fechaf + GeneralDef.EjecGeoParamIgual + 0 + " " +
|
||||||
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_modo + 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.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;
|
base.str_cfg = str;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*using ArcGIS.Core.Data;
|
using ArcGIS.Core.Data;
|
||||||
using ArcGIS.Core.Geometry;
|
using ArcGIS.Core.Geometry;
|
||||||
using ArcGIS.Core.Internal.CIM;
|
using ArcGIS.Core.Internal.CIM;
|
||||||
using ArcGIS.Desktop.Framework.Threading.Tasks;*/
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
using OliviaAddInPro.Helper;
|
using OliviaAddInPro.Helper;
|
||||||
using OliviaAddInPro.Model;
|
using OliviaAddInPro.Model;
|
||||||
using System;
|
using System;
|
||||||
|
|
@ -20,8 +20,6 @@ namespace OliviaAddInPro.Services
|
||||||
|
|
||||||
public LimpiezaServ(Limpieza _limp)
|
public LimpiezaServ(Limpieza _limp)
|
||||||
{
|
{
|
||||||
if (_limp == null)
|
|
||||||
_limp = OliviaGlob.Limp;
|
|
||||||
limp = _limp;
|
limp = _limp;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
@ -29,11 +27,13 @@ namespace OliviaAddInPro.Services
|
||||||
* Modo 0, sectorizar
|
* Modo 0, sectorizar
|
||||||
* Modo 1, planificar
|
* Modo 1, planificar
|
||||||
*/
|
*/
|
||||||
public Respuesta<bool> Ejecuta(ModosEjec modo)
|
public TareaRes Ejecuta(ModosEjec modo)
|
||||||
{
|
{
|
||||||
var res = new Respuesta<bool>()
|
var res = new TareaRes()
|
||||||
{
|
{
|
||||||
Value = false
|
Errores = false,
|
||||||
|
data = null,
|
||||||
|
msg = ""
|
||||||
};
|
};
|
||||||
MyCancelableProgressorSource cps = limp.ProgrSrc;
|
MyCancelableProgressorSource cps = limp.ProgrSrc;
|
||||||
|
|
||||||
|
|
@ -43,7 +43,8 @@ namespace OliviaAddInPro.Services
|
||||||
ErrStr = string.Empty;
|
ErrStr = string.Empty;
|
||||||
if (!PreparaConsulta(out nombFileAmbs))
|
if (!PreparaConsulta(out nombFileAmbs))
|
||||||
{
|
{
|
||||||
res.Error.Add("No se ha seleccionado una consulta válida" + limp.ConsultaAmbs);
|
res.msg= "No se ha seleccionado una consulta válida" + limp.ConsultaAmbs;
|
||||||
|
res.Errores = true;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -52,19 +53,13 @@ namespace OliviaAddInPro.Services
|
||||||
|
|
||||||
string msg = "";
|
string msg = "";
|
||||||
//comienza ejecucion
|
//comienza ejecucion
|
||||||
if(!ExportaEjec(modo, out msg))
|
if(!LanzaEjec(modo, out msg))
|
||||||
{
|
{
|
||||||
res.Error.Add(msg);
|
res.Errores = true;
|
||||||
//cierra y borra las capas si le ha dado tiempo a exportar
|
res.msg = msg;
|
||||||
FinProcServ.BorraFiles();
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
//cierra las capas que se han abierto durante la exportación
|
|
||||||
CierraCapas();
|
|
||||||
|
|
||||||
res.Value = true;
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -113,7 +108,7 @@ namespace OliviaAddInPro.Services
|
||||||
{
|
{
|
||||||
//NO SE USA AQUÍ, ESTÁ EN EJECSERV
|
//NO SE USA AQUÍ, ESTÁ EN EJECSERV
|
||||||
//si ha importado no hace falta que compruebe, seguro que las tiene
|
//si ha importado no hace falta que compruebe, seguro que las tiene
|
||||||
if (OliviaGlob.IsConfig2() && ComprCamposPlanif(limp.CapaElems))
|
if (OliviaGlob.IsConfig2())
|
||||||
return true;
|
return true;
|
||||||
//no ha importado, comprueba capa
|
//no ha importado, comprueba capa
|
||||||
if (ComprCamposPlanif(limp.CapaElems))
|
if (ComprCamposPlanif(limp.CapaElems))
|
||||||
|
|
@ -151,14 +146,15 @@ namespace OliviaAddInPro.Services
|
||||||
*/
|
*/
|
||||||
public bool CompruebaCamposLimp(string pathCapa)
|
public bool CompruebaCamposLimp(string pathCapa)
|
||||||
{
|
{
|
||||||
string[] camps = limp.GetCampos(pathCapa);
|
int NCAMPS = 5;
|
||||||
int res = 1;
|
string[] camps;
|
||||||
if ((camps == null) || (HelperGdb.CheckFileds(pathCapa, camps) != 0))
|
camps = new string[NCAMPS];
|
||||||
{
|
camps[0] = LimpiezaDef.Campos.consulta_entidad;
|
||||||
ErrStr = HelperGdb.OutStr;
|
camps[1] = LimpiezaDef.Campos.consulta_mecan;
|
||||||
return false;
|
camps[2] = LimpiezaDef.Campos.consulta_observ;
|
||||||
}
|
camps[3] = LimpiezaDef.Campos.consulta_anch_tip;
|
||||||
return true;
|
camps[4] = LimpiezaDef.Campos.consulta_tipolo;
|
||||||
|
return CompruebaCampos(pathCapa, camps)==0;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Lee la gdb y devuelve el array de ámbitos en función de si hay en la gdb o no
|
* Lee la gdb y devuelve el array de ámbitos en función de si hay en la gdb o no
|
||||||
|
|
@ -166,7 +162,7 @@ namespace OliviaAddInPro.Services
|
||||||
public bool[] BuscAmbGdb(string pathCapa)
|
public bool[] BuscAmbGdb(string pathCapa)
|
||||||
{
|
{
|
||||||
string consulta;
|
string consulta;
|
||||||
long numero_lin;
|
int numero_lin;
|
||||||
bool[] amb_gdb = new bool[(int)LimpiezaDef.AmbitsTra.AmbN];//se inician a false
|
bool[] amb_gdb = new bool[(int)LimpiezaDef.AmbitsTra.AmbN];//se inician a false
|
||||||
string ftclass;
|
string ftclass;
|
||||||
|
|
||||||
|
|
@ -215,6 +211,5 @@ namespace OliviaAddInPro.Services
|
||||||
}
|
}
|
||||||
return amb_com;
|
return amb_com;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
using OliviaAddIn;
|
using OliviaAddIn;
|
||||||
using OliviaAddInPro.Model;
|
using OliviaAddInPro.Model;
|
||||||
using OliviaAddInPro.Model.contract;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
@ -14,9 +13,9 @@ namespace OliviaAddInPro.Services
|
||||||
public class ProcesoEjecServ
|
public class ProcesoEjecServ
|
||||||
{
|
{
|
||||||
Cstr_socket soc = null;
|
Cstr_socket soc = null;
|
||||||
int m_out=0;
|
int m_out;
|
||||||
int m_miliseconds=200;
|
int m_miliseconds;
|
||||||
int m_tm_progr=1000;
|
int m_tm_progr;
|
||||||
int modo_fin = 0;
|
int modo_fin = 0;
|
||||||
bool cancela = false;
|
bool cancela = false;
|
||||||
bool cancela_fin = false;
|
bool cancela_fin = false;
|
||||||
|
|
@ -29,7 +28,7 @@ namespace OliviaAddInPro.Services
|
||||||
string tarea = "";
|
string tarea = "";
|
||||||
public string err_str = "";
|
public string err_str = "";
|
||||||
double x, y;
|
double x, y;
|
||||||
IprocessManager cps;
|
CancelableProgressorSource cps;
|
||||||
enum TiposActu
|
enum TiposActu
|
||||||
{
|
{
|
||||||
ActuMal,
|
ActuMal,
|
||||||
|
|
@ -51,21 +50,10 @@ namespace OliviaAddInPro.Services
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
public Respuesta<TiposEjecucion> start(string cfg, IprocessManager cps)
|
public Respuesta<bool> start(string cfg, CancelableProgressorSource cps)
|
||||||
{
|
{
|
||||||
this.cps = 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;
|
str_cfg = cfg;
|
||||||
/*
|
/*
|
||||||
|
|
@ -73,28 +61,18 @@ namespace OliviaAddInPro.Services
|
||||||
{
|
{
|
||||||
run();
|
run();
|
||||||
};*/
|
};*/
|
||||||
var res = run();
|
return 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<TiposEjecucion> run()
|
private Respuesta<bool> run()
|
||||||
{
|
{
|
||||||
int nint = 0;
|
int nint = 0;
|
||||||
int nint_max = 5;
|
int nint_max = 10;
|
||||||
bool sal = false;
|
bool sal = false;
|
||||||
bool first_send_cfg = true;
|
bool first_send_cfg = true;
|
||||||
bool fin = false;
|
bool fin = false;
|
||||||
int lastprog = 0;
|
int lastprog = 0;
|
||||||
var res = new Respuesta<TiposEjecucion>() { Value = TiposEjecucion.FinEjecNOk };
|
var res = new Respuesta<bool>() { Value = false };
|
||||||
cps.SetProceso("Procesando Datos");
|
|
||||||
cps.SetProgress(0);
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
|
|
@ -109,7 +87,7 @@ namespace OliviaAddInPro.Services
|
||||||
if (nint >= nint_max)
|
if (nint >= nint_max)
|
||||||
{
|
{
|
||||||
res.Error.Add("Error en la comunicación con OliviaTask");
|
res.Error.Add("Error en la comunicación con OliviaTask");
|
||||||
var act = new Respuesta<TiposActu>() { Value = TiposActu.ActuFinNOk };
|
var act = new Respuesta<TiposActu>() { Value = TiposActu.ActuMal };
|
||||||
act.Error.AddRange(res.Error);
|
act.Error.AddRange(res.Error);
|
||||||
actualiza(act);
|
actualiza(act);
|
||||||
sal = true;
|
sal = true;
|
||||||
|
|
@ -118,15 +96,11 @@ namespace OliviaAddInPro.Services
|
||||||
nint++;
|
nint++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
first_send_cfg = false;
|
first_send_cfg = false;
|
||||||
nint = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int result = Environment.TickCount & Int32.MaxValue; //para que el tickcount no sea negativo
|
if (cps.Progressor.CancellationToken.IsCancellationRequested) //mira a ver si ha cancelado el usuario
|
||||||
if (cps.Getcancelled()) //mira a ver si ha cancelado el usuario
|
{
|
||||||
{
|
|
||||||
//se ha cancelado, lo envía al OliviaTask
|
//se ha cancelado, lo envía al OliviaTask
|
||||||
envia_cancel();
|
envia_cancel();
|
||||||
if (!cancela_permu)
|
if (!cancela_permu)
|
||||||
|
|
@ -135,29 +109,15 @@ namespace OliviaAddInPro.Services
|
||||||
{
|
{
|
||||||
cancela_permu = false;
|
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 && ((result - lastprog) >= m_tm_progr) && !fin) //en caso normal, todo va bien, pide el progreso y la tarea
|
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
|
//solo pide la programación cada m_tm_progr milis
|
||||||
var pp = pide_progr();
|
var pp = pide_progr();
|
||||||
if (pp.Value> TiposActu.ActuFinOk)
|
if (pp .Value> TiposActu.ActuFinOk)
|
||||||
fin = true;
|
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);
|
actualiza(pp);
|
||||||
lastprog = result;
|
lastprog = Environment.TickCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
} while (!sal);
|
} while (!sal);
|
||||||
|
|
@ -170,7 +130,7 @@ namespace OliviaAddInPro.Services
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
if (!res.HasError)
|
if (!res.HasError)
|
||||||
res.Value = TiposEjecucion.FinEjecOk;
|
res.Value = true;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
//funciones auxiliares----------------------------------------
|
//funciones auxiliares----------------------------------------
|
||||||
|
|
@ -178,7 +138,7 @@ namespace OliviaAddInPro.Services
|
||||||
{
|
{
|
||||||
if (!conectado)
|
if (!conectado)
|
||||||
{
|
{
|
||||||
if (!soc.conecta(Ip, Puerto, Ip))
|
if (!soc.conecta(Ip, Puerto))
|
||||||
{
|
{
|
||||||
conectado = false;
|
conectado = false;
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -428,7 +388,6 @@ namespace OliviaAddInPro.Services
|
||||||
{
|
{
|
||||||
pon_progr(100);
|
pon_progr(100);
|
||||||
pon_texto("Finalizado proceso con éxito");
|
pon_texto("Finalizado proceso con éxito");
|
||||||
pon_textBtn("Finalizar");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TiposActu.ActuFinNOk:
|
case TiposActu.ActuFinNOk:
|
||||||
|
|
@ -436,21 +395,18 @@ namespace OliviaAddInPro.Services
|
||||||
pon_progr(100);
|
pon_progr(100);
|
||||||
err_str = "Finalizado proceso con fallos\n" + tarea;
|
err_str = "Finalizado proceso con fallos\n" + tarea;
|
||||||
pon_texto(err_str);
|
pon_texto(err_str);
|
||||||
pon_textBtn("Finalizar");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TiposActu.ActuSect:
|
case TiposActu.ActuSect:
|
||||||
{
|
{
|
||||||
pon_progr(100);
|
pon_progr(100);
|
||||||
pon_texto("Finalizada sectorización\n" + tarea);
|
pon_texto("Finalizada sectorización\n" + tarea);
|
||||||
pon_textBtn("Finalizar");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TiposActu.ActuPlan:
|
case TiposActu.ActuPlan:
|
||||||
{
|
{
|
||||||
pon_progr(100);
|
pon_progr(100);
|
||||||
pon_texto("Finalizada planificación\n" + tarea);
|
pon_texto("Finalizada planificación\n" + tarea);
|
||||||
pon_textBtn("Finalizar");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TiposActu.ActuPermu:
|
case TiposActu.ActuPermu:
|
||||||
|
|
@ -485,13 +441,8 @@ namespace OliviaAddInPro.Services
|
||||||
*/
|
*/
|
||||||
private void pon_texto(String txt)
|
private void pon_texto(String txt)
|
||||||
{
|
{
|
||||||
cps.SetEstado(txt);
|
cps.Message = txt;
|
||||||
}
|
}
|
||||||
private void pon_textBtn(String txt)
|
|
||||||
{
|
|
||||||
cps.SetTextBtn(txt);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Para poder actualizar la barra de progreso hay que llamar a invoke
|
* Para poder actualizar la barra de progreso hay que llamar a invoke
|
||||||
* porque está desde otro thread
|
* porque está desde otro thread
|
||||||
|
|
@ -501,7 +452,6 @@ namespace OliviaAddInPro.Services
|
||||||
{
|
{
|
||||||
//cps.Status
|
//cps.Status
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Para poder actualizar la barra de progreso hay que llamar a invoke
|
* Para poder actualizar la barra de progreso hay que llamar a invoke
|
||||||
* porque está desde otro thread
|
* porque está desde otro thread
|
||||||
|
|
@ -513,24 +463,14 @@ namespace OliviaAddInPro.Services
|
||||||
|
|
||||||
|
|
||||||
if ((actu == TiposActu.ActuMal) || (actu == TiposActu.ActuFinNOk))
|
if ((actu == TiposActu.ActuMal) || (actu == TiposActu.ActuFinNOk))
|
||||||
cps.SetProceso("Proceso Finalizado con errores.");
|
cps.Status = "Proceso Finalizado con errores.";
|
||||||
else if(actu == TiposActu.ActuFinOk)
|
else if(actu == TiposActu.ActuFinOk)
|
||||||
cps.SetProceso("Proceso Finalizado.");
|
cps.Status = "Proceso Finalizado.";
|
||||||
|
|
||||||
if ((actu == TiposActu.ActuMal) || (actu == TiposActu.ActuFinNOk))
|
if (actu > TiposActu.ActuFinOk)
|
||||||
cps.PonBarColorRojo();
|
cps.Status = "Calculando...";
|
||||||
else
|
if ((actu == TiposActu.ActuPermu) && !cancela)
|
||||||
cps.PonBarColorVerde();
|
cps.Status = "Calculando Permutaciones..."; ;
|
||||||
|
|
||||||
/*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
|
* Para poder actualizar la barra de progreso hay que llamar a invoke
|
||||||
|
|
@ -539,15 +479,7 @@ namespace OliviaAddInPro.Services
|
||||||
*/
|
*/
|
||||||
private void pon_progr(int pro)
|
private void pon_progr(int pro)
|
||||||
{
|
{
|
||||||
cps.SetProgress( pro);
|
cps.Value = (uint)pro;
|
||||||
}
|
|
||||||
|
|
||||||
//configura los parámetros de la conexión
|
|
||||||
public void ConfigConex()
|
|
||||||
{
|
|
||||||
var conf = ConfigServ.Serv.Leer();
|
|
||||||
Puerto = conf.Puerto;
|
|
||||||
Ip = conf.Ip;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,511 +0,0 @@
|
||||||
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,9 +17,8 @@ namespace OliviaAddInPro.Services
|
||||||
|
|
||||||
public RecogidaServ(Recogida _reco)
|
public RecogidaServ(Recogida _reco)
|
||||||
{
|
{
|
||||||
if (_reco == null)
|
|
||||||
_reco = OliviaGlob.Reco;
|
|
||||||
reco = _reco;
|
reco = _reco;
|
||||||
|
RellenaFiltrosReco();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -28,24 +27,22 @@ namespace OliviaAddInPro.Services
|
||||||
*/
|
*/
|
||||||
public int CompruebaCamposReco(string pathCapa)
|
public int CompruebaCamposReco(string pathCapa)
|
||||||
{
|
{
|
||||||
int NCAMPS = 5;
|
int NCAMPS = 6;
|
||||||
string[] camps;
|
string[] camps;
|
||||||
camps = new string[NCAMPS];
|
camps = new string[NCAMPS];
|
||||||
|
camps[0] = RecogidaDef.campos_def.cons_id;
|
||||||
camps[0] = RecogidaDef.campos_def.cons_fracc;
|
camps[1] = RecogidaDef.campos_def.cons_fracc;
|
||||||
camps[1] = RecogidaDef.campos_def.cons_nomrec;
|
camps[2] = RecogidaDef.campos_def.cons_nomrec;
|
||||||
camps[2] = RecogidaDef.campos_def.cons_lateral;
|
camps[3] = RecogidaDef.campos_def.cons_lateral;
|
||||||
camps[3] = RecogidaDef.campos_def.cons_uds;
|
camps[4] = RecogidaDef.campos_def.cons_uds;
|
||||||
camps[4] = RecogidaDef.campos_def.cons_kgrec;
|
camps[5] = RecogidaDef.campos_def.cons_kgrec;
|
||||||
//camps[5] = RecogidaDef.campos_def.cons_id;
|
int compCamp = CompruebaCampos(pathCapa, camps);
|
||||||
int compCamp = HelperGdb.CheckFileds(pathCapa, camps);
|
|
||||||
ErrStr = HelperGdb.OutStr;
|
|
||||||
if (compCamp == 0)
|
if (compCamp == 0)
|
||||||
return 0;
|
return 0;
|
||||||
else if (compCamp == 1 && HelperGdb.OutStr.Contains(RecogidaDef.campos_def.cons_kgrec)) //le falta el de kg recogida, que igual no le hace falta
|
else if (compCamp == 1 && ErrStr.Contains(RecogidaDef.campos_def.cons_kgrec))
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
return 2; //error o le falta 1 que no es el de kg reco o más
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -64,11 +61,13 @@ namespace OliviaAddInPro.Services
|
||||||
* Modo 0, sectorizar
|
* Modo 0, sectorizar
|
||||||
* Modo 1, planificar
|
* Modo 1, planificar
|
||||||
*/
|
*/
|
||||||
public Respuesta<bool> Ejecuta(ModosEjec modo)
|
public TareaRes Ejecuta(ModosEjec modo)
|
||||||
{
|
{
|
||||||
var res = new Respuesta<bool>()
|
var res = new TareaRes()
|
||||||
{
|
{
|
||||||
Value = false
|
Errores = false,
|
||||||
|
data = null,
|
||||||
|
msg = ""
|
||||||
};
|
};
|
||||||
|
|
||||||
com = (TratamientoComun)reco;
|
com = (TratamientoComun)reco;
|
||||||
|
|
@ -79,33 +78,24 @@ namespace OliviaAddInPro.Services
|
||||||
|
|
||||||
if (!PreparaConsulta(out nombFileAmbs))
|
if (!PreparaConsulta(out nombFileAmbs))
|
||||||
{
|
{
|
||||||
res.Error.Add("No se ha seleccionado una consulta válida" + reco.ConsultaAmbs);
|
res.msg = "No se ha seleccionado una consulta válida" + reco.ConsultaAmbs;
|
||||||
|
res.Errores = true;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
if (com.ProgrSrc._ProgrSrc.Getcancelled())
|
|
||||||
{
|
|
||||||
res.Error.Add(Resource1.String_cancel_progreso);
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
//Prepara nombre
|
//Prepara nombre
|
||||||
//Pone nombre al shape en función de los ámbitos, el tratamiento, y los polígonos + timestamp
|
//Pone nombre al shape en función de los ámbitos, el tratamiento, y los polígonos + timestamp
|
||||||
reco.NombreShpExp_PrefTto = nombFileAmbs + DameStrPoligs();
|
reco.NombreShpExp_PrefTto = nombFileAmbs + DameStrPoligs();
|
||||||
|
|
||||||
string msg = "";
|
string msg = "";
|
||||||
//comienza ejecucion
|
//comienza ejecucion
|
||||||
if (!ExportaEjec(modo, out msg))
|
if (!LanzaEjec(modo, out msg))
|
||||||
{
|
{
|
||||||
res.Error.Add(msg);
|
res.Errores = true;
|
||||||
|
res.msg = msg;
|
||||||
return res;
|
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;
|
return res;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -155,7 +145,27 @@ namespace OliviaAddInPro.Services
|
||||||
consulta = "";
|
consulta = "";
|
||||||
}
|
}
|
||||||
return consulta;
|
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] + "'";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
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,14 +17,11 @@
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Content="Guardar" Grid.Column="0" VerticalAlignment="Top" Width="75" Style="{DynamicResource Esri_Button}" Click="OnGuardar"/>
|
<Button Content="Guardar" Grid.Column="0" VerticalAlignment="Top" Width="75" Style="{DynamicResource Esri_Button}" Click="OnGuardar"/>
|
||||||
<Button Content="Releer Config." Grid.Column="1" VerticalAlignment="Top" Style="{DynamicResource Esri_Button}" Click="OnRefres"/>
|
<Button Content="Resetear" Grid.Column="1" VerticalAlignment="Top" Width="75" Style="{DynamicResource Esri_Button}" Click="OnRefres"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<xctk:PropertyGrid x:Name="Configuracion" SelectedObject="{Binding Configuracion}" HorizontalAlignment="Stretch" PropertyValueChanged="Configuracion_PropertyValueChanged" ShowDescriptionByTooltip="True">
|
<xctk:PropertyGrid x:Name="Configuracion" SelectedObject="{Binding Configuracion}" HorizontalAlignment="Stretch">
|
||||||
<xctk:PropertyGrid.CategoryGroupHeaderTemplate>
|
<!-- Only the following properties will be displayed in the PropertyGrid -->
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding}" Background="{DynamicResource Esri_BackgroundPressedBrush}" Foreground="{DynamicResource Esri_TextStyleDefaultBrush}"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</xctk:PropertyGrid.CategoryGroupHeaderTemplate>
|
|
||||||
</xctk:PropertyGrid>
|
</xctk:PropertyGrid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ namespace OliviaAddInPro
|
||||||
public PaneConfigView()
|
public PaneConfigView()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
}
|
}
|
||||||
private void OnGuardar(object sender, RoutedEventArgs e)
|
private void OnGuardar(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
@ -42,12 +43,6 @@ namespace OliviaAddInPro
|
||||||
mod.OnRefres();
|
mod.OnRefres();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Configuracion_PropertyValueChanged(object sender, Xceed.Wpf.Toolkit.PropertyGrid.PropertyValueChangedEventArgs e)
|
|
||||||
{
|
|
||||||
if (DataContext is PaneConfigViewModel mod)
|
|
||||||
{
|
|
||||||
mod.hay_cambios = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
||||||
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,7 +43,6 @@ namespace OliviaAddInPro.View.Configuracion
|
||||||
|
|
||||||
public FrameworkElement ResolveEditor(PropertyItem propertyItem)
|
public FrameworkElement ResolveEditor(PropertyItem propertyItem)
|
||||||
{
|
{
|
||||||
|
|
||||||
Binding binding = new Binding("Value");
|
Binding binding = new Binding("Value");
|
||||||
binding.Source = propertyItem;
|
binding.Source = propertyItem;
|
||||||
binding.Mode = propertyItem.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay;
|
binding.Mode = propertyItem.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay;
|
||||||
|
|
|
||||||
|
|
@ -60,29 +60,4 @@ 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,11 +38,11 @@
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type viewModel:PaneLimpiezaSub4ViewModel}">
|
<DataTemplate DataType="{x:Type viewModel:PaneLimpiezaSub4ViewModel}">
|
||||||
<view:PaneLimpiezaSub4View/>
|
<view:PaneLimpiezaSub4View/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
|
|
||||||
<Grid MinHeight="200" MinWidth="300" x:Name="GridLimp">
|
<Grid MinHeight="200" MinWidth="300" x:Name="GridLimp">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
|
|
@ -56,10 +56,10 @@
|
||||||
ItemsSource="{Binding OptionsMenu}"
|
ItemsSource="{Binding OptionsMenu}"
|
||||||
SelectedItem="{Binding SelectedOption}">
|
SelectedItem="{Binding SelectedOption}">
|
||||||
</frameworkControls:TabIndicator>
|
</frameworkControls:TabIndicator>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Grid.Row="1">
|
<StackPanel Grid.Row="1">
|
||||||
<ContentPresenter Content="{Binding CurrentSubPanelPage}"/>
|
<ContentPresenter Content="{Binding CurrentSubPanelPage}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Grid.Row="2" Margin="0,20,0,0">
|
<StackPanel Grid.Row="2" Margin="0,20,0,0">
|
||||||
<ContentPresenter Name="PaneEjecutar">
|
<ContentPresenter Name="PaneEjecutar">
|
||||||
<ContentPresenter.Content>
|
<ContentPresenter.Content>
|
||||||
|
|
@ -72,17 +72,10 @@
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button x:Name="button_secto" Grid.Column="1" Style="{DynamicResource Esri_Button}" Content="Sectorizar" Margin="10,0,10,0" Click="button_secto_Click"/>
|
<Button x:Name="button_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"/>
|
<Button x:Name="button_planif" Grid.Column="2" Style="{DynamicResource Esri_Button}" Content="Planificar" Margin="10,0,10,0" Click="button_planif_Click"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ContentPresenter.Content>
|
</ContentPresenter.Content>
|
||||||
</ContentPresenter>
|
</ContentPresenter>
|
||||||
</StackPanel>
|
</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>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
using OliviaAddInPro.Helper;
|
using OliviaAddInPro.Helper;
|
||||||
using OliviaAddInPro.Model;
|
|
||||||
|
|
||||||
|
|
||||||
namespace OliviaAddInPro
|
namespace OliviaAddInPro
|
||||||
|
|
@ -50,10 +49,5 @@ namespace OliviaAddInPro
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void button_help_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
OliviaGlob.OpenManual();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
<CheckBox x:Name="checkBox_sentidocirc" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}"
|
<CheckBox x:Name="checkBox_sentidocirc" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}"
|
||||||
Content="Respeta el sentido de circulación" IsChecked="{Binding RespCirc}" HorizontalAlignment="Left" Margin="20,5,0,0" VerticalAlignment="Top"/>
|
Content="Respeta el sentido de circulación" IsChecked="{Binding RespSentCirc}" HorizontalAlignment="Left" Margin="20,5,0,0" VerticalAlignment="Top"/>
|
||||||
|
|
||||||
<Grid Margin="0,5,0,0">
|
<Grid Margin="0,5,0,0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ namespace OliviaAddInPro
|
||||||
private void button_caparestr_Click(object sender, RoutedEventArgs e)
|
private void button_caparestr_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
string texto = "";
|
string texto = "";
|
||||||
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto, "", true);
|
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto);
|
||||||
if (DataContext is PaneLimpiezaSub2ViewModel mod)
|
if (DataContext is PaneLimpiezaSub2ViewModel mod)
|
||||||
{
|
{
|
||||||
mod.GeomRestr = geom;
|
mod.GeomRestr = geom;
|
||||||
|
|
@ -55,7 +55,7 @@ namespace OliviaAddInPro
|
||||||
private void button_capaniv_Click(object sender, RoutedEventArgs e)
|
private void button_capaniv_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
string texto = "";
|
string texto = "";
|
||||||
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto, "", true);
|
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto);
|
||||||
if (DataContext is PaneLimpiezaSub2ViewModel mod)
|
if (DataContext is PaneLimpiezaSub2ViewModel mod)
|
||||||
{
|
{
|
||||||
mod.GeomNiv = geom;
|
mod.GeomNiv = geom;
|
||||||
|
|
@ -69,7 +69,7 @@ namespace OliviaAddInPro
|
||||||
private void button_capazon_Click(object sender, RoutedEventArgs e)
|
private void button_capazon_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
string texto = "";
|
string texto = "";
|
||||||
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto, "", true);
|
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto);
|
||||||
if (DataContext is PaneLimpiezaSub2ViewModel mod)
|
if (DataContext is PaneLimpiezaSub2ViewModel mod)
|
||||||
{
|
{
|
||||||
mod.GeomZon = geom;
|
mod.GeomZon = geom;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
<ComboBox Margin="10,5,9.6,0"
|
<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"/>
|
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"/>
|
<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}" MouseDoubleClick="listBoxAttributes_MouseDoubleClick"/>
|
<ListBox Margin="10,5,9.6,0" Height="127" ItemsSource="{Binding Path=Attributes}" Name="listBoxAttributes" SelectionMode="{Binding SelMode}"/>
|
||||||
<Button Margin="167,25,9.6,0" Content="Aceptar" Opacity="0.75" Click="Button_Click"/>
|
<Button Margin="167,25,9.6,0" Content="Aceptar" Opacity="0.75" Click="Button_Click"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</controls:ProWindow>
|
</controls:ProWindow>
|
||||||
|
|
@ -77,11 +77,5 @@ namespace OliviaAddInPro.View
|
||||||
else
|
else
|
||||||
DialogResult = false;
|
DialogResult = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void listBoxAttributes_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
|
||||||
{
|
|
||||||
ok = true;
|
|
||||||
Close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,25 +63,18 @@
|
||||||
<ContentPresenter Name="PaneEjecutar">
|
<ContentPresenter Name="PaneEjecutar">
|
||||||
<ContentPresenter.Content>
|
<ContentPresenter.Content>
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
<Grid Margin="0,10,0,0">
|
<Grid Margin="0,10,0,0" Height="40 ">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="100"/>
|
<ColumnDefinition Width="30"/>
|
||||||
<ColumnDefinition Width="100"/>
|
<ColumnDefinition Width="150"/>
|
||||||
<ColumnDefinition Width="100"/>
|
<ColumnDefinition Width="120"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button x:Name="button_secto" Grid.Column="1" Style="{DynamicResource Esri_Button}" Content="Sectorizar" Margin="10,0,10,0" Click="button_secto_Click"/>
|
<Button x:Name="button_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" Style="{DynamicResource Esri_Button}" Content="Planificar" Margin="10,0,10,0" Click="button_planif_Click"/>
|
<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"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ContentPresenter.Content>
|
</ContentPresenter.Content>
|
||||||
</ContentPresenter>
|
</ContentPresenter>
|
||||||
</StackPanel>
|
</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>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
using OliviaAddInPro.Helper;
|
using OliviaAddInPro.Helper;
|
||||||
using OliviaAddInPro.Model;
|
|
||||||
|
|
||||||
namespace OliviaAddInPro
|
namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
|
|
@ -49,10 +49,5 @@ namespace OliviaAddInPro
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void button_help_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
OliviaGlob.OpenManual();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="150"/>
|
<ColumnDefinition Width="150"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<ComboBox x:Name="comboBox_frac" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposFrac}" HorizontalAlignment="Left" Margin="0,0,0,0" Width="150"
|
<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}"
|
SelectionChanged="comboBox_frac_SelectionChanged" SelectedIndex="{Binding Path=TipoFrac, Mode = TwoWay}"
|
||||||
|
|
@ -49,8 +48,7 @@
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</-->
|
</-->
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<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"/>
|
<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"/>
|
||||||
<Label x:Name="label_densCont" Grid.Column="2" Content="kg/m3" Margin="0,-1,0,0" Visibility="{Binding Path=VisTextDens, Mode = TwoWay}"/>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<Label Content="Tipo de carga" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
<Label Content="Tipo de carga" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
||||||
<Grid Margin="20,0,0,0">
|
<Grid Margin="20,0,0,0">
|
||||||
|
|
@ -91,7 +89,7 @@
|
||||||
<ComboBox x:Name="comboBox_tipoCapac" IsEnabled="{Binding EnabComboCapac, Mode=TwoWay}" ItemsSource="{Binding TiposCapac, Mode=TwoWay}" HorizontalAlignment="Left" Margin="0,0,0,0"
|
<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"
|
VerticalAlignment="Top" Width="75"
|
||||||
SelectedIndex="{Binding TipoCapac}" SelectionChanged="comboBox_tipoCapac_SelectionChanged"/>
|
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="8" PreviewTextInput="txtBox_kgCapac_PreviewTextInput"/>
|
<TextBox x:Name="txtBox_kgCapac" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Grid.Column="1" Margin="5,0,0,3" TextWrapping="NoWrap" Text="{Binding Path=TextKgCapac, Mode = TwoWay}" TextAlignment="Right" MaxLength="4" PreviewTextInput="txtBox_kgCapac_PreviewTextInput"/>
|
||||||
<Label x:Name="label_kgmax" Grid.Column="2" Content="kg máx. por viaje" Margin="0,-1,0,0"/>
|
<Label x:Name="label_kgmax" Grid.Column="2" Content="kg máx. por viaje" Margin="0,-1,0,0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Label Content="Tiempo de vaciado de contenedor" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
<Label Content="Tiempo de vaciado de contenedor" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
||||||
|
|
@ -100,7 +98,7 @@
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</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="4" 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="3" PreviewTextInput="TextBox_PreviewTextInput"/>
|
||||||
<Label Grid.Column="1" Content="seg." Margin="0,-3,0,8"/>
|
<Label Grid.Column="1" Content="seg." Margin="0,-3,0,8"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Label Margin="15,0,0,0" Content="Planta de descarga" FontWeight="DemiBold"/>
|
<Label Margin="15,0,0,0" Content="Planta de descarga" FontWeight="DemiBold"/>
|
||||||
|
|
|
||||||
|
|
@ -1,134 +0,0 @@
|
||||||
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,8 +18,6 @@ using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
using ArcGIS.Desktop.Mapping;
|
using ArcGIS.Desktop.Mapping;
|
||||||
using OliviaAddInPro.Model;
|
using OliviaAddInPro.Model;
|
||||||
using OliviaAddInPro.View;
|
using OliviaAddInPro.View;
|
||||||
using OliviaAddInPro.Helper;
|
|
||||||
using OliviaAddInPro.Services;
|
|
||||||
|
|
||||||
namespace OliviaAddInPro
|
namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
|
|
@ -28,11 +26,9 @@ namespace OliviaAddInPro
|
||||||
private bool firstTimeShow = true;
|
private bool firstTimeShow = true;
|
||||||
private static bool hideTemp = false;
|
private static bool hideTemp = false;
|
||||||
private const string _dockPaneID = "OliviaAddInPro_DockpaneConfig";
|
private const string _dockPaneID = "OliviaAddInPro_DockpaneConfig";
|
||||||
PaneConfigViewModel paneConfig;
|
|
||||||
protected DockpaneConfigViewModel()
|
protected DockpaneConfigViewModel()
|
||||||
{
|
{
|
||||||
paneConfig = new PaneConfigViewModel();
|
_currentPage = new PaneConfigViewModel();
|
||||||
_currentPage = (PanelViewModelBase) paneConfig;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -47,10 +43,7 @@ namespace OliviaAddInPro
|
||||||
|
|
||||||
pane.Activate();
|
pane.Activate();
|
||||||
}
|
}
|
||||||
protected override void OnHidden()
|
|
||||||
{
|
|
||||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Ninguno);
|
|
||||||
}
|
|
||||||
internal static void Hide_()
|
internal static void Hide_()
|
||||||
{
|
{
|
||||||
DockPane pane = FrameworkApplication.DockPaneManager.Find(_dockPaneID);
|
DockPane pane = FrameworkApplication.DockPaneManager.Find(_dockPaneID);
|
||||||
|
|
@ -71,18 +64,7 @@ namespace OliviaAddInPro
|
||||||
if (isVisible == false && !firstTimeShow)
|
if (isVisible == false && !firstTimeShow)
|
||||||
{
|
{
|
||||||
//avisa de cerrar la ventana
|
//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)
|
if (firstTimeShow)
|
||||||
firstTimeShow = false;
|
firstTimeShow = false;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using OliviaAddInPro.Helper;
|
|
||||||
using OliviaAddInPro.Model;
|
using OliviaAddInPro.Model;
|
||||||
using OliviaAddInPro.Services;
|
using OliviaAddInPro.Services;
|
||||||
|
|
||||||
|
|
@ -19,8 +18,6 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
OnRefres();
|
OnRefres();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool hay_cambios = false;
|
|
||||||
|
|
||||||
|
|
||||||
public override string DisplayName
|
public override string DisplayName
|
||||||
|
|
@ -42,18 +39,19 @@ namespace OliviaAddInPro
|
||||||
|
|
||||||
public void OnGuardar()
|
public void OnGuardar()
|
||||||
{
|
{
|
||||||
Respuesta<bool> resp = ConfigServ.Serv.Guardar(Configuracion);
|
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()
|
public void OnRefres()
|
||||||
{
|
{
|
||||||
Configuracion = ConfigServ.Serv.Leer();
|
ReferesConfig(true);
|
||||||
hay_cambios = false;
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ReferesConfig(bool simplificado)
|
||||||
|
{
|
||||||
|
Configuracion = ConfigServ.Serv.Leer(simplificado);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace OliviaAddInPro
|
||||||
public class DockpaneLimpiezaViewModel : DockPane
|
public class DockpaneLimpiezaViewModel : DockPane
|
||||||
{
|
{
|
||||||
private bool firstTimeShow = true;
|
private bool firstTimeShow = true;
|
||||||
private static bool hideTemp = false;
|
private static bool hideTemp = false;
|
||||||
private const string _dockPaneID = "OliviaAddInPro_DockpaneLimpieza";
|
private const string _dockPaneID = "OliviaAddInPro_DockpaneLimpieza";
|
||||||
private PaneLimpiezaViewModel _pane;
|
private PaneLimpiezaViewModel _pane;
|
||||||
public DockpaneLimpiezaViewModel()
|
public DockpaneLimpiezaViewModel()
|
||||||
|
|
@ -63,13 +63,15 @@ 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
|
//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)
|
protected override void OnShow(bool isVisible)
|
||||||
{
|
{
|
||||||
|
if (isVisible == false && !firstTimeShow && !hideTemp)
|
||||||
|
{
|
||||||
|
//avisa de cerrar la ventana
|
||||||
|
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Ninguno);
|
||||||
|
}
|
||||||
if (firstTimeShow)
|
if (firstTimeShow)
|
||||||
firstTimeShow = false;
|
firstTimeShow = false;
|
||||||
}
|
}
|
||||||
protected override void OnHidden()
|
|
||||||
{
|
|
||||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Ninguno);
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Text shown near the top of the DockPane.
|
/// Text shown near the top of the DockPane.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -193,12 +193,13 @@ namespace OliviaAddInPro
|
||||||
public PaneLimpiezaSub1ViewModel()
|
public PaneLimpiezaSub1ViewModel()
|
||||||
{
|
{
|
||||||
LblCapaElems = Resource1.String_selec_capa;
|
LblCapaElems = Resource1.String_selec_capa;
|
||||||
timeTto = 0;
|
timeTto = 10;
|
||||||
textVeloDespl = "";
|
textVeloDespl = "10";
|
||||||
lblUdsTimeTto = "min";
|
lblUdsTimeTto = "min";
|
||||||
lblUdsVeloDespl = "km/h";
|
lblUdsVeloDespl = "km/h";
|
||||||
limpServ = new LimpiezaServ(null); //no hace falta instancia limp
|
limpServ = new LimpiezaServ(null); //no hace falta instancia limp
|
||||||
textAnchoVia = LimpiezaDef.Parametros.ancho_via.ToString();
|
textAnchoVia = LimpiezaDef.Parametros.ancho_via.ToString();
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Realiza las comprobaciones para cuando se ha abierto una capa
|
* Realiza las comprobaciones para cuando se ha abierto una capa
|
||||||
|
|
@ -209,12 +210,8 @@ namespace OliviaAddInPro
|
||||||
CapaElems = string.Empty;
|
CapaElems = string.Empty;
|
||||||
OpsAmbs.Clear();
|
OpsAmbs.Clear();
|
||||||
Ambitos.Clear();
|
Ambitos.Clear();
|
||||||
TipoTto = -1;
|
|
||||||
VisTextAnchoVia = System.Windows.Visibility.Hidden;
|
VisTextAnchoVia = System.Windows.Visibility.Hidden;
|
||||||
TextVeloDespl = "";
|
|
||||||
cambia_tiempo_tto();
|
|
||||||
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config); //lo reinicia, por si estaba después de planificar
|
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config); //lo reinicia, por si estaba después de planificar
|
||||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.Config2);
|
|
||||||
if (string.IsNullOrEmpty(capa))
|
if (string.IsNullOrEmpty(capa))
|
||||||
return false;
|
return false;
|
||||||
//comprueba los campos de limpieza
|
//comprueba los campos de limpieza
|
||||||
|
|
@ -223,7 +220,7 @@ namespace OliviaAddInPro
|
||||||
HelperGlobal.ponMsg(limpServ.ErrStr, System.Windows.MessageBoxImage.Warning);
|
HelperGlobal.ponMsg(limpServ.ErrStr, System.Windows.MessageBoxImage.Warning);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
LimpiezaDef.forma_filtros();
|
|
||||||
amb_tra_gdb = limpServ.BuscAmbGdb(capa);
|
amb_tra_gdb = limpServ.BuscAmbGdb(capa);
|
||||||
bool hay_alguno = false;
|
bool hay_alguno = false;
|
||||||
foreach (bool b in amb_tra_gdb)
|
foreach (bool b in amb_tra_gdb)
|
||||||
|
|
@ -341,13 +338,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
|
//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)
|
if (UdsTTto != (int)GeneralDef.OlvTiposTto.OlvTipTtoM2h_eje)
|
||||||
{
|
{
|
||||||
VisTextAnchoVia = System.Windows.Visibility.Visible;
|
VisTextAnchoVia = System.Windows.Visibility.Visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
VisTextAnchoVia = System.Windows.Visibility.Hidden;
|
VisTextAnchoVia = System.Windows.Visibility.Hidden;
|
||||||
}
|
}
|
||||||
/*if (((TipoTto == (int)LimpiezaDef.TiposTto.TtoBaldMecCalz) && (SelOpAmb >= 2)) ||
|
/*if (((TipoTto == (int)LimpiezaDef.TiposTto.TtoBaldMecCalz) && (SelOpAmb >= 2)) ||
|
||||||
((TipoTto == (int)LimpiezaDef.TiposTto.TtoCaidaHoja) && (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
|
EnableListBoxAmb = false; //si uno de los ámbitos es "eje de calle" no se puede combinar con los demás ámbitos
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ using ArcGIS.Desktop.Framework.Contracts;
|
||||||
using ArcGIS.Desktop.Framework.Dialogs;
|
using ArcGIS.Desktop.Framework.Dialogs;
|
||||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
using ArcGIS.Desktop.Mapping;
|
using ArcGIS.Desktop.Mapping;
|
||||||
using OliviaAddInPro.Model;
|
|
||||||
|
|
||||||
namespace OliviaAddInPro
|
namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
|
|
@ -24,7 +23,7 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
numPtosCtrl = numSect = 3;
|
numPtosCtrl = numSect = 3;
|
||||||
checkAjustSect = checkSectAuto = false;
|
checkAjustSect = checkSectAuto = false;
|
||||||
checkIgnoAis = LimpiezaDef.Parametros.igno_ais;
|
checkIgnoAis = true;
|
||||||
enableNSect = true;
|
enableNSect = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ using ArcGIS.Desktop.Framework.Contracts;
|
||||||
using ArcGIS.Desktop.Framework.Dialogs;
|
using ArcGIS.Desktop.Framework.Dialogs;
|
||||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
using ArcGIS.Desktop.Mapping;
|
using ArcGIS.Desktop.Mapping;
|
||||||
using OliviaAddInPro.Model;
|
|
||||||
|
|
||||||
namespace OliviaAddInPro
|
namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
|
|
@ -22,12 +21,12 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
public PaneLimpiezaSub4ViewModel()
|
public PaneLimpiezaSub4ViewModel()
|
||||||
{
|
{
|
||||||
textPercentTrafico = LimpiezaDef.Parametros.reduc_traf;
|
textPercentTrafico = 80;
|
||||||
timeCargDesc = LimpiezaDef.Parametros.t_cardesc;
|
timeCargDesc = 40;
|
||||||
timeDespIniFin = LimpiezaDef.Parametros.t_desp;
|
timeDespIniFin = 25;
|
||||||
timeIniJornada = LimpiezaDef.Parametros.h_inicio;
|
timeIniJornada = 7 * 60 + 30;
|
||||||
timeJornadaConv = LimpiezaDef.Parametros.t_conv;
|
timeJornadaConv = 8 * 60;
|
||||||
timeDescPers = LimpiezaDef.Parametros.t_descanso;
|
timeDescPers = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,16 +8,15 @@ using System.Threading.Tasks;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using OliviaAddInPro.Helper;
|
using OliviaAddInPro.Helper;
|
||||||
using static OliviaAddInPro.Model.ComunDef;
|
using static OliviaAddInPro.Model.ComunDef;
|
||||||
//using ArcGIS.Desktop.Framework.Threading.Tasks;
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
//using ArcGIS.Desktop.Framework.Contracts;
|
using ArcGIS.Desktop.Framework.Contracts;
|
||||||
|
|
||||||
namespace OliviaAddInPro
|
namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
class PaneLimpiezaViewModel : PanelViewModelBase
|
class PaneLimpiezaViewModel : PanelViewModelBase
|
||||||
{
|
{
|
||||||
private PaneLimpiezaSub1ViewModel _subPanel1ViewModel;
|
private PaneLimpiezaSub1ViewModel _subPanel1ViewModel;
|
||||||
Limpieza limp;
|
Limpieza limp;
|
||||||
public MarchandoUnaDe marchando;
|
|
||||||
public PaneLimpiezaViewModel()
|
public PaneLimpiezaViewModel()
|
||||||
{
|
{
|
||||||
_subPanel1ViewModel = new PaneLimpiezaSub1ViewModel();
|
_subPanel1ViewModel = new PaneLimpiezaSub1ViewModel();
|
||||||
|
|
@ -80,11 +79,6 @@ namespace OliviaAddInPro
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
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
|
//lee el tipo tto
|
||||||
if (_subPanel1ViewModel.TipoTto == (int)LimpiezaDef.TiposTto.TtoNoDef)
|
if (_subPanel1ViewModel.TipoTto == (int)LimpiezaDef.TiposTto.TtoNoDef)
|
||||||
|
|
@ -114,20 +108,17 @@ namespace OliviaAddInPro
|
||||||
limp.RespCirc = _subPanel1ViewModel.RespCirc;
|
limp.RespCirc = _subPanel1ViewModel.RespCirc;
|
||||||
|
|
||||||
//lee velo de desplazamiento
|
//lee velo de desplazamiento
|
||||||
int vv = 0;
|
int vv = -1;
|
||||||
if (string.Compare(_subPanel1ViewModel.TextVeloDespl, Resource1.String_velo_nodef) != 0)
|
if((!HelperGlobal.Str2Int(_subPanel1ViewModel.TextVeloDespl, out vv)) && (_subPanel1ViewModel.TextVeloDespl!=Resource1.String_velo_nodef))
|
||||||
{
|
{
|
||||||
if (!HelperGlobal.Str2Int(_subPanel1ViewModel.TextVeloDespl, out vv))
|
err_str = "Error al leer la velocidad de desplazamiento";
|
||||||
{
|
return false;
|
||||||
err_str = "Error al leer la velocidad de desplazamiento";
|
}
|
||||||
return false;
|
if ((vv == 0) || (vv > LimpiezaDef.Parametros.v_despM) || (vv < LimpiezaDef.Parametros.v_despm))
|
||||||
}
|
{
|
||||||
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;
|
||||||
err_str = "La velocidad de desplazamiento no está dentro de los límites configurados";
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
limp.VDespl = vv;
|
limp.VDespl = vv;
|
||||||
|
|
||||||
//lee tiempo de tto
|
//lee tiempo de tto
|
||||||
|
|
@ -158,7 +149,7 @@ namespace OliviaAddInPro
|
||||||
err_str = "El formato introducido para el ancho de la vía no es válido.";
|
err_str = "El formato introducido para el ancho de la vía no es válido.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//lee las propiedades comunes a recogida
|
//lee las propiedades comunes a recogida
|
||||||
if (!LeeComun(limp,out err_str))
|
if (!LeeComun(limp,out err_str))
|
||||||
|
|
@ -177,30 +168,29 @@ namespace OliviaAddInPro
|
||||||
/**
|
/**
|
||||||
* Acciones para comenzar ejecución
|
* Acciones para comenzar ejecución
|
||||||
*/
|
*/
|
||||||
public void Ejecuta(OliviaAddInPro.Services.ModosEjec modo)
|
public void Ejecuta(OliviaAddInPro.Services.ModosEjec modo)
|
||||||
{
|
{
|
||||||
string err = "";
|
string err = "";
|
||||||
|
|
||||||
|
|
||||||
|
OliviaGlob.progrDialog.Show();
|
||||||
|
|
||||||
if (!Lee(out err))
|
if (!Lee(out err))
|
||||||
{
|
{
|
||||||
HelperGlobal.ponMsg(err);
|
HelperGlobal.ponMsg(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//marchando
|
|
||||||
OliviaGlob.Limp.ProgrSrc = new MyCancelableProgressorSource(OliviaGlob.progrDialog.GetViewModel());
|
|
||||||
|
|
||||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetProceso("");
|
Action<TareaRes> ac = finEjecuta;
|
||||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetEstado("");
|
OliviaGlob.Limp.EjecutaAsync(modo, ac);
|
||||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetProgress(0);
|
}
|
||||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetTextBtn("Cancelar");
|
public void finEjecuta(TareaRes res)
|
||||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.PonBarColorVerde();
|
{
|
||||||
|
OliviaGlob.progrDialog.Hide();
|
||||||
//oculta la ventana
|
if (res.Errores)
|
||||||
OliviaGlob.ShowHidePane(false);
|
{
|
||||||
|
HelperGlobal.ponMsg(res.msg);
|
||||||
OliviaGlob.limp.ComienzaEjec(modo);
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,12 @@ using OliviaAddInPro.Helper;
|
||||||
using static OliviaAddInPro.Model.ComunDef;
|
using static OliviaAddInPro.Model.ComunDef;
|
||||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
using ArcGIS.Desktop.Framework.Contracts;
|
using ArcGIS.Desktop.Framework.Contracts;
|
||||||
|
|
||||||
namespace OliviaAddInPro
|
namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
class PaneLimpiezaViewModel : PanelViewModelBase
|
class PaneLimpiezaViewModel : PanelViewModelBase
|
||||||
{
|
{
|
||||||
private PaneLimpiezaSub1ViewModel _subPanel1ViewModel;
|
private PaneLimpiezaSub1ViewModel _subPanel1ViewModel;
|
||||||
Limpieza limp;
|
|
||||||
public MarchandoUnaDe marchando;
|
|
||||||
public PaneLimpiezaViewModel()
|
public PaneLimpiezaViewModel()
|
||||||
{
|
{
|
||||||
_subPanel1ViewModel = new PaneLimpiezaSub1ViewModel();
|
_subPanel1ViewModel = new PaneLimpiezaSub1ViewModel();
|
||||||
|
|
@ -32,8 +30,8 @@ namespace OliviaAddInPro
|
||||||
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/ptosctrl.png")), Resource1.String_ctrol, _subPanel3ViewModel),
|
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/ptosctrl.png")), Resource1.String_ctrol, _subPanel3ViewModel),
|
||||||
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/time.png")), Resource1.String_tiempos, _subPanel4ViewModel)
|
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/time.png")), Resource1.String_tiempos, _subPanel4ViewModel)
|
||||||
};
|
};
|
||||||
SelectedOption = OptionsMenu[0];
|
SelectedOption = OptionsMenu[0];
|
||||||
limp = OliviaGlob.Limp;
|
// OliviaGlob.limp = OliviaGlob.Limp;
|
||||||
}
|
}
|
||||||
public override string DisplayName
|
public override string DisplayName
|
||||||
{
|
{
|
||||||
|
|
@ -79,12 +77,7 @@ namespace OliviaAddInPro
|
||||||
err_str = "No se ha seleccionado ninguna Capa de Limpieza";
|
err_str = "No se ha seleccionado ninguna Capa de Limpieza";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
limp.CapaElems = _subPanel1ViewModel.CapaElems;
|
OliviaGlob.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
|
//lee el tipo tto
|
||||||
if (_subPanel1ViewModel.TipoTto == (int)LimpiezaDef.TiposTto.TtoNoDef)
|
if (_subPanel1ViewModel.TipoTto == (int)LimpiezaDef.TiposTto.TtoNoDef)
|
||||||
|
|
@ -92,26 +85,31 @@ namespace OliviaAddInPro
|
||||||
err_str = "No se ha seleccionado ningún Tipo de Tratamiento";
|
err_str = "No se ha seleccionado ningún Tipo de Tratamiento";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
<<<<<<< HEAD
|
||||||
|
OliviaGlob.limp.TipoTto = _subPanel1ViewModel.TipoTto;
|
||||||
|
|
||||||
|
=======
|
||||||
limp.TipoTto = _subPanel1ViewModel.TipoTto;
|
limp.TipoTto = _subPanel1ViewModel.TipoTto;
|
||||||
limp.TipoTtoStr = LimpiezaDef.tto_gdb[_subPanel1ViewModel.TipoTto];
|
limp.TipoTtoStr = LimpiezaDef.tto_gdb[_subPanel1ViewModel.TipoTto];
|
||||||
|
>>>>>>> Elena/reco
|
||||||
//lee el/los ámbito seleccionado
|
//lee el/los ámbito seleccionado
|
||||||
if (!_subPanel1ViewModel.lee_ambitos())
|
if (!_subPanel1ViewModel.lee_ambitos())
|
||||||
{
|
{
|
||||||
err_str = "No se ha seleccionado ningún Ámbito de trabajo";
|
err_str = "No se ha seleccionado ningún Ámbito de trabajo";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
limp.AmbitosSel = _subPanel1ViewModel.AmbitosSel;
|
OliviaGlob.limp.AmbitosSel = _subPanel1ViewModel.AmbitosSel;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (i = 0; i < limp.AmbitosSel.Length; i++)
|
for (i = 0; i < OliviaGlob.limp.AmbitosSel.Length; i++)
|
||||||
if (limp.AmbitosSel[i])
|
if (OliviaGlob.limp.AmbitosSel[i])
|
||||||
break;
|
break;
|
||||||
if(i>= limp.AmbitosSel.Length)
|
if(i>= OliviaGlob.limp.AmbitosSel.Length)
|
||||||
{
|
{
|
||||||
err_str = "No se ha seleccionado ningún Ámbito de trabajo";
|
err_str = "No se ha seleccionado ningún Ámbito de trabajo";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//lee si respeta circulacion
|
//lee si respeta circulacion
|
||||||
limp.RespCirc = _subPanel1ViewModel.RespCirc;
|
OliviaGlob.limp.RespCirc = _subPanel1ViewModel.RespCirc;
|
||||||
|
|
||||||
//lee velo de desplazamiento
|
//lee velo de desplazamiento
|
||||||
int vv = -1;
|
int vv = -1;
|
||||||
|
|
@ -125,7 +123,7 @@ namespace OliviaAddInPro
|
||||||
err_str = "La velocidad de desplazamiento no está dentro de los límites configurados";
|
err_str = "La velocidad de desplazamiento no está dentro de los límites configurados";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
limp.VDespl = vv;
|
OliviaGlob.limp.VDespl = vv;
|
||||||
|
|
||||||
//lee tiempo de tto
|
//lee tiempo de tto
|
||||||
if ((_subPanel1ViewModel.TimeTto == 0) ||
|
if ((_subPanel1ViewModel.TimeTto == 0) ||
|
||||||
|
|
@ -134,31 +132,11 @@ namespace OliviaAddInPro
|
||||||
err_str = "El tiempo de tratamiento no está dentro de los límites configurados";
|
err_str = "El tiempo de tratamiento no está dentro de los límites configurados";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
limp.Ttto = _subPanel1ViewModel.TimeTto;
|
OliviaGlob.limp.Ttto = _subPanel1ViewModel.TimeTto;
|
||||||
limp.UdsTTto = _subPanel1ViewModel.UdsTTto;
|
OliviaGlob.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
|
//lee las propiedades comunes a recogida
|
||||||
if (!LeeComun(limp,out err_str))
|
if (!LeeComun(OliviaGlob.limp,out err_str))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -177,32 +155,28 @@ namespace OliviaAddInPro
|
||||||
public void Ejecuta(OliviaAddInPro.Services.ModosEjec modo)
|
public void Ejecuta(OliviaAddInPro.Services.ModosEjec modo)
|
||||||
{
|
{
|
||||||
string err = "";
|
string err = "";
|
||||||
<<<<<<< HEAD
|
|
||||||
//comprueba datos de la ventana
|
|
||||||
=======
|
|
||||||
//marchando
|
|
||||||
|
|
||||||
|
|
||||||
OliviaGlob.Limp.ProgrSrc = new MyCancelableProgressorSource(OliviaGlob.progrDialog.GetViewModel());
|
|
||||||
OliviaGlob.progrDialog.Show();
|
OliviaGlob.progrDialog.Show();
|
||||||
|
var progSrc = new CancelableProgressorSource(OliviaGlob.progrDialog);
|
||||||
|
|
||||||
//oculta la ventana
|
|
||||||
OliviaGlob.ShowHidePane(false);
|
|
||||||
|
|
||||||
>>>>>>> Gerardo/MarchandoUnaDe
|
|
||||||
if (!Lee(out err))
|
if (!Lee(out err))
|
||||||
{
|
{
|
||||||
HelperGlobal.ponMsg(err);
|
HelperGlobal.ponMsg(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
OliviaGlob.Limp.ComienzaEjec(modo);
|
|
||||||
=======
|
|
||||||
|
|
||||||
Action<TareaRes> ac = OliviaGlob.finEjecuta;
|
Action<TareaRes> ac = finEjecuta;
|
||||||
OliviaGlob.Limp.EjecutaAsync(modo, ac);
|
OliviaGlob.Limp.EjecutaAsync(modo, progSrc, ac);
|
||||||
|
}
|
||||||
>>>>>>> Gerardo/MarchandoUnaDe
|
public void finEjecuta(TareaRes res)
|
||||||
|
{
|
||||||
|
OliviaGlob.progrDialog.Hide();
|
||||||
|
if (res.Errores)
|
||||||
|
{
|
||||||
|
HelperGlobal.ponMsg(res.msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
//using System.Runtime.InteropServices.WindowsRuntime;
|
using System.Runtime.InteropServices.WindowsRuntime;
|
||||||
using OliviaAddInPro.Model;
|
using OliviaAddInPro.Model;
|
||||||
using OliviaAddInPro.Helper;
|
using OliviaAddInPro.Helper;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,10 +43,7 @@ namespace OliviaAddInPro
|
||||||
hideTemp = false;
|
hideTemp = false;
|
||||||
pane.Activate();
|
pane.Activate();
|
||||||
}
|
}
|
||||||
protected override void OnHidden()
|
|
||||||
{
|
|
||||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Ninguno);
|
|
||||||
}
|
|
||||||
internal static void Hide_()
|
internal static void Hide_()
|
||||||
{
|
{
|
||||||
DockPane pane = FrameworkApplication.DockPaneManager.Find(_dockPaneID);
|
DockPane pane = FrameworkApplication.DockPaneManager.Find(_dockPaneID);
|
||||||
|
|
@ -67,7 +64,7 @@ namespace OliviaAddInPro
|
||||||
if (isVisible == false && !firstTimeShow && !hideTemp)
|
if (isVisible == false && !firstTimeShow && !hideTemp)
|
||||||
{
|
{
|
||||||
//avisa de cerrar la ventana
|
//avisa de cerrar la ventana
|
||||||
OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Ninguno);
|
OliviaGlob.SetFlagTipEjec(TiposEjecucion.Ninguno);
|
||||||
}
|
}
|
||||||
if (firstTimeShow)
|
if (firstTimeShow)
|
||||||
firstTimeShow = false;
|
firstTimeShow = false;
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ namespace OliviaAddInPro
|
||||||
public string TextDensCont
|
public string TextDensCont
|
||||||
{
|
{
|
||||||
get { return textDensCont; }
|
get { return textDensCont; }
|
||||||
set { base.SetProperty(ref textDensCont, value, () => TextDensCont); }
|
set { base.SetProperty(ref textKgCapac, value, () => TextDensCont); }
|
||||||
}
|
}
|
||||||
private Visibility visTextDens = Visibility.Hidden;
|
private Visibility visTextDens = Visibility.Hidden;
|
||||||
public Visibility VisTextDens
|
public Visibility VisTextDens
|
||||||
|
|
@ -274,13 +274,11 @@ namespace OliviaAddInPro
|
||||||
TiposVehic.Clear();
|
TiposVehic.Clear();
|
||||||
TiposCapac.Clear();
|
TiposCapac.Clear();
|
||||||
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config); //lo reinicia, por si estaba después de planificar
|
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config); //lo reinicia, por si estaba después de planificar
|
||||||
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.Config2);
|
|
||||||
if (string.IsNullOrEmpty(capa))
|
if (string.IsNullOrEmpty(capa))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
//comprueba los campos de recogida
|
//comprueba los campos de recogida
|
||||||
int camp = recoServ.CompruebaCamposReco(capa);
|
if (recoServ.CompruebaCamposReco(capa)>1 || (recoServ.CompruebaCamposReco(capa)==1 && RecogidaDef.kgrec_camp))
|
||||||
if (camp>1 || (camp==1 && RecogidaDef.kgrec_camp))
|
|
||||||
{
|
{
|
||||||
HelperGlobal.ponMsg(recoServ.ErrStr, System.Windows.MessageBoxImage.Warning);
|
HelperGlobal.ponMsg(recoServ.ErrStr, System.Windows.MessageBoxImage.Warning);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -94,9 +94,6 @@ namespace OliviaAddInPro
|
||||||
err_str = "";
|
err_str = "";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//Rellena el array de filtros
|
|
||||||
reco.RellenaFiltrosReco();
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
///Lee el panel 1
|
///Lee el panel 1
|
||||||
if (!_subPanel1ViewModel.CapaAbierta || string.IsNullOrEmpty(_subPanel1ViewModel.CapaElems))
|
if (!_subPanel1ViewModel.CapaAbierta || string.IsNullOrEmpty(_subPanel1ViewModel.CapaElems))
|
||||||
|
|
@ -123,7 +120,7 @@ namespace OliviaAddInPro
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
reco.DensCont = Convert.ToInt32(_subPanel1ViewModel.TextDensCont);
|
reco.DensCont = Convert.ToInt32(_subPanel1ViewModel.TextDensCont);
|
||||||
if (reco.DensCont <= 0 || reco.DensCont > 1000)
|
if (reco.DensCont <= 0 || reco.DensCont > 100)
|
||||||
{
|
{
|
||||||
err_str = "El valor introducido para la densidad del contenedor no es válido.";
|
err_str = "El valor introducido para la densidad del contenedor no es válido.";
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -199,7 +196,7 @@ namespace OliviaAddInPro
|
||||||
err_str = "El formato introducido para el tiempo de vaciado no es válido.";
|
err_str = "El formato introducido para el tiempo de vaciado no es válido.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//revisa las coordenadas de la planta de descarga
|
//revisa las coordenadas de la planta de instalación
|
||||||
reco.CoordsPlanta = _subPanel1ViewModel.CoordsPlanta;
|
reco.CoordsPlanta = _subPanel1ViewModel.CoordsPlanta;
|
||||||
if (reco.CoordsPlanta.Equals(new Coordinate2D(0, 0)))
|
if (reco.CoordsPlanta.Equals(new Coordinate2D(0, 0)))
|
||||||
{
|
{
|
||||||
|
|
@ -207,13 +204,6 @@ namespace OliviaAddInPro
|
||||||
return false;
|
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
|
//lee las propiedades comunes a recogida
|
||||||
if (!LeeComun(reco, out err_str))
|
if (!LeeComun(reco, out err_str))
|
||||||
{
|
{
|
||||||
|
|
@ -234,24 +224,24 @@ namespace OliviaAddInPro
|
||||||
public void Ejecuta(OliviaAddInPro.Services.ModosEjec modo)
|
public void Ejecuta(OliviaAddInPro.Services.ModosEjec modo)
|
||||||
{
|
{
|
||||||
string err = "";
|
string err = "";
|
||||||
//comprueba datos de la ventana
|
OliviaGlob.progrDialog.Show();
|
||||||
if (!Lee(out err))
|
if (!Lee(out err))
|
||||||
{
|
{
|
||||||
HelperGlobal.ponMsg(err);
|
HelperGlobal.ponMsg(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//marchando
|
|
||||||
OliviaGlob.Reco.ProgrSrc = new MyCancelableProgressorSource(OliviaGlob.progrDialog.GetViewModel());
|
|
||||||
|
|
||||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetProceso("");
|
Action<TareaRes> ac = finEjecuta;
|
||||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetEstado("");
|
OliviaGlob.Reco.EjecutaAsync(modo, ac);
|
||||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetProgress(0);
|
|
||||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetTextBtn("Cancelar");
|
|
||||||
OliviaGlob.Limp.ProgrSrc._ProgrSrc.PonBarColorVerde();
|
|
||||||
//oculta la ventana
|
|
||||||
OliviaGlob.ShowHidePane(false);
|
|
||||||
|
|
||||||
OliviaGlob.Reco.ComienzaEjec(modo);
|
}
|
||||||
|
public void finEjecuta(TareaRes res)
|
||||||
|
{
|
||||||
|
OliviaGlob.progrDialog.Hide();
|
||||||
|
if (res.Errores)
|
||||||
|
{
|
||||||
|
HelperGlobal.ponMsg(res.msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue