Compare commits

..

No commits in common. "develop" and "Elena/develop" have entirely different histories.

62 changed files with 1124 additions and 4189 deletions

Binary file not shown.

View File

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using ArcGIS.Core.CIM;
using ArcGIS.Core.Data;
using ArcGIS.Core.Geometry;
@ -19,7 +18,6 @@ using ArcGIS.Desktop.Framework.Threading.Tasks;
using ArcGIS.Desktop.Mapping;
using OliviaAddInPro.Helper;
using OliviaAddInPro.Model;
using Button = ArcGIS.Desktop.Framework.Contracts.Button;
namespace OliviaAddInPro
{

View File

@ -29,7 +29,8 @@ namespace OliviaAddInPro
if (OliviaGlob.TipoView == TiposEjecucion.Ninguno)
{
///Comprueba que existe la red navegable configurada
///Comprueba que existe la red navegable configurada
if (!OliviaGlob.CompruebaNwYCampos())
{
HelperGlobal.ponMsg("No se encuentra red navegable, cambie Configuración: " + HelperGdb.OutStr,

View File

@ -24,7 +24,7 @@ namespace OliviaAddIn
//devuelve -1 si no se ha podido crear socket
//0 si no se puede conectar
//1 si conectado
public bool conecta(string ip, int puerto, string ip_local="")
public bool conecta(string ip, int puerto)
{
termina();
try
@ -39,7 +39,7 @@ namespace OliviaAddIn
return false;
try
{
return str_socket_conecta(sc, ip, puerto, ip_local) != 0;
return str_socket_conecta(sc, ip, puerto) != 0;
}
catch
{
@ -120,7 +120,7 @@ namespace OliviaAddIn
unsafe public static extern IntPtr str_socket_crea();
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
unsafe public static extern int str_socket_conecta(IntPtr soc, String ip, int puerto, String ip_local=null);
unsafe public static extern int str_socket_conecta(IntPtr soc, String ip, int puerto);
[DllImport("utiles.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Ansi)]
unsafe public static extern int str_socket_envia(IntPtr soc, String txt);//solo este

View File

@ -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">
<AddInInfo id="{10742570-cf59-42f2-bea2-2a38002a06ee}" version="3.2" desktopVersion="3.0.3.36057">
<ArcGIS defaultAssembly="OliviaAddInPro.dll" defaultNamespace="OliviaAddInPro" xmlns="http://schemas.esri.com/DADF/Registry" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.esri.com/DADF/Registry file:///C:/Program%20Files/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd">
<AddInInfo id="{10742570-cf59-42f2-bea2-2a38002a06ee}" version="3.0" desktopVersion="2.8.29751">
<Name>OliviaAddInPro</Name>
<Description>AddIn de Optimización de la Limpieza Viaria para ArcGIs Pro</Description>
<Image>Images\AddinDesktop32.png</Image>
<Author>VSM</Author>
<Company>VSM - Narvaling</Company>
<Date>18/04/2023 12:00:00, 2023</Date>
<Date>08/07/2022 12:00:00, 2022</Date>
<Subject>Framework</Subject>
<!-- Note subject can be one or more of these topics:
Content, Framework, Editing, Geodatabase, Geometry, Geoprocessing, Layouts, Map Authoring, Map Exploration -->
@ -17,17 +16,17 @@
<tabs>
<tab id="OliviaAddInPro_Tab1" caption="Olivia Pro">
<group refID="OliviaAddInPro_Group1" />
<group refID="OliviaAddInPro_Group2" />
<group refID="OliviaAddInPro_Group2" />
</tab>
</tabs>
<groups>
<group id="OliviaAddInPro_Group2" caption=" " appearsOnAddInTab="false">
<button refID="OliviaAddInPro_ButtonLimp" size="large" />
<button refID="OliviaAddInPro_ButtonRec" size="large" />
</group>
<group id="OliviaAddInPro_Group1" caption=" " appearsOnAddInTab="false">
<button refID="OliviaAddInPro_ButtonConfig" size="large" />
<button refID="OliviaAddInPro_ButtonRec" size="large" />
</group>
<group id="OliviaAddInPro_Group1" caption=" " appearsOnAddInTab="false">
<button refID="OliviaAddInPro_ButtonConfig" size="large" />
</group>
</groups>
<controls>
<!-- add your controls here -->
@ -42,7 +41,7 @@
<button id="OliviaAddInPro_ButtonConfig" caption="Configuración" className="ButtonConfig" loadOnClick="true" largeImage="Images/config2_olv.png">
<tooltip heading="OLIVIA - Configuración">
Add-In de ArcGIS Pro para la herramienta de optimización de la limpieza viaria, OLIVIA<disabledText /></tooltip>
</button>
</button>
</controls>
<dockPanes>
<dockPane id="OliviaAddInPro_DockpaneLimpieza" caption="OLIVIA | Limpieza" className="DockpaneLimpiezaViewModel" dock="group" dockWith="esri_core_contentsDockPane">

View File

@ -25,14 +25,12 @@ using OliviaAddInPro.Model.contract;
using ArcGIS.Core.Data.DDL;
using ArcGIS.Core.CIM;
using System.Threading;
using ArcGIS.Core.Data.Exceptions;
using Microsoft.Win32;
using Microsoft.WindowsAPICodePack.Dialogs;
namespace OliviaAddInPro.Helper
{
public static class HelperGdb
{
{
private static string ObjectId = "OBJECTID";
private static string out_str = string.Empty;
public static string OutStr
{
@ -69,7 +67,6 @@ namespace OliviaAddInPro.Helper
OpenFtrClassPoint = 2,
OpenFtrClassPolygon = 4,
OpenGdb = 8,
OpenDataset = 16
}
private static void ReiniciaOutStr()
@ -78,7 +75,7 @@ namespace OliviaAddInPro.Helper
}
//Proceso para sacar un diálogo y seleccionar una o varias geometrías de dentro de una fclass
public static ArcGIS.Core.Geometry.Geometry OpenGeom(TiposOpenFileDlg tipo, out string txt_sal, string initialLoc = "", bool multisel = false)
public static ArcGIS.Core.Geometry.Geometry OpenGeom(TiposOpenFileDlg tipo, out string txt_sal, string initialLoc = "")
{
//inicialmente
ArcGIS.Core.Geometry.Geometry geom = null;
@ -89,7 +86,7 @@ namespace OliviaAddInPro.Helper
if (fc != null)
{
//hace geom
geom = SelecLeeGeom(fc, out txt_sal, multisel);
geom = SelecLeeGeom(fc, out txt_sal, true);
if (geom == null && (HelperGdb.OutStr.Length > 0))
HelperGlobal.ponMsg(HelperGdb.OutStr, System.Windows.MessageBoxImage.Error);
@ -335,11 +332,6 @@ namespace OliviaAddInPro.Helper
filtro.AddFilter(BrowseProjectFilter.GetFilter("esri_browseDialogFilters_geodatabases"));
titulo = "Abrir Geodatabase";
}
if ((tipo & TiposOpenFileDlg.OpenDataset) == TiposOpenFileDlg.OpenDataset)
{
filtro.AddFilter(BrowseProjectFilter.GetFilter("esri_browseDialogFilters_featureDatasets_all"));
titulo = "Abrir Dataset";
}
if (tipo == 0)
{
filtro.AddFilter(BrowseProjectFilter.GetFilter(""));
@ -436,123 +428,44 @@ namespace OliviaAddInPro.Helper
}
//Dado un path de una feature class devuelve la ftclass abierta directamente,
//o null si ha habido algún problema o no lo ha encontrado
public static FeatureClass GetFtClassSync(string pathFtClss)
{
FeatureClass ftclss = null;
FeatureDataset dtset = null;
if (string.IsNullOrEmpty(pathFtClss))
return null;
Geodatabase gdb = GetGdbSync(pathFtClss);
ReiniciaOutStr();
if (gdb != null)
{
string dtsetName = new DirectoryInfo(System.IO.Path.GetDirectoryName(pathFtClss)).Name;
try
{
dtset = gdb.OpenDataset<FeatureDataset>(dtsetName);
}
catch (Exception ex)
{
HelperGdb.OutStr = "Error al abrir Dataset " + dtsetName + ": " + ex.Message;
dtset= null;
}
string ftclassName = System.IO.Path.GetFileNameWithoutExtension(pathFtClss);
if (dtset != null)
{
try
{
ftclss = dtset.OpenDataset<FeatureClass>(ftclassName);
}
catch (Exception ex)
{
ftclss = null;
}
}
else
{
try
{
ftclss = gdb.OpenDataset<FeatureClass>(ftclassName);
}
catch (Exception ex)
{
ftclss = null;
}
}
if(ftclss==null)
HelperGdb.OutStr = "Error al abrir Feature Class " + ftclassName;
}
else //mira a ver si es shapefile
{
ftclss = GetFtClassFromShpSync(pathFtClss);
}
Free(gdb);
Free(dtset);
return ftclss;
}
//Dado un path de una feature class devuelve la ftclass abierta directamente,
//o null si ha habido algún problema o no lo ha encontrado
public static FeatureClass GetFtClass(string pathFtClss)
{
FeatureClass ftclss = null;
FeatureDataset dtset = null;
if (string.IsNullOrEmpty(pathFtClss))
return null;
Geodatabase gdb = GetGdb(pathFtClss).Result;
ReiniciaOutStr();
if (gdb != null)
{
var task = ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<FeatureClass>)(() =>
{
string dtsetName = new DirectoryInfo(System.IO.Path.GetDirectoryName(pathFtClss)).Name;
try
{
dtset = gdb.OpenDataset<FeatureDataset>(dtsetName);
}
catch (Exception ex)
{
HelperGdb.OutStr = "Error al abrir Dataset " + dtsetName + ": " + ex.Message;
dtset = null;
}
string ftclassName = System.IO.Path.GetFileNameWithoutExtension(pathFtClss);
if (dtset != null)
{
try
{
ftclss = dtset.OpenDataset<FeatureClass>(ftclassName);
}
catch (Exception ex)
{
ftclss = null;
}
}
else
{
try
{
ftclss = gdb.OpenDataset<FeatureClass>(ftclassName);
}
catch (Exception ex)
{
ftclss = null;
}
}
if (ftclss == null)
HelperGdb.OutStr = "Error al abrir Feature Class " + ftclassName;
return ftclss;
}));
task.Wait();
ftclss = GetFtClass(System.IO.Path.GetFileNameWithoutExtension(pathFtClss), gdb).Result;
}
else //mira a ver si es shapefile
{
ftclss = GetFtClassFromShp(pathFtClss).Result;
}
Free(gdb);
Free(dtset);
return ftclss;
}
//Dado un path de una feature class devuelve la ftclass abierta directamente,
//o null si ha habido algún problema o no lo ha encontrado
public static FeatureClass GetFtClassSync(string pathFtClss)
{
FeatureClass ftclss = null;
if (string.IsNullOrEmpty(pathFtClss))
return null;
Geodatabase gdb = GetGdbSync(pathFtClss);
ReiniciaOutStr();
if (gdb != null)
{
ftclss = GetFtClassSync(System.IO.Path.GetFileNameWithoutExtension(pathFtClss), gdb);
}
else //mira a ver si es shapefile
{
ftclss = GetFtClassFromShpSync(pathFtClss);
}
Free(gdb);
return ftclss;
}
//Dado el path de una gdb y el nombre de una feature class, devuelve la
@ -567,7 +480,7 @@ namespace OliviaAddInPro.Helper
{
try
{
ftclss = gdb.OpenDataset<FeatureClass>(nameFtclss);
ftclss = gdb.OpenDataset<FeatureClass>(nameFtclss);
}
catch (Exception ex)
{
@ -706,7 +619,7 @@ namespace OliviaAddInPro.Helper
if (filt == null)
filt = new ArcGIS.Core.Data.QueryFilter();
sel = fc.Select(filt, SelectionType.ObjectID, SelectionOption.Normal);
long nsel = sel.GetCount();
int nsel = sel.GetCount();
IReadOnlyList<long> ids_ = sel.GetObjectIDs();
ids = ids_.ToList();
return ids;
@ -737,7 +650,7 @@ namespace OliviaAddInPro.Helper
if (filt == null)
filt = new ArcGIS.Core.Data.QueryFilter();
sel = fc.Select(filt, SelectionType.ObjectID, SelectionOption.Normal);
var nsel = sel.GetCount();
int nsel = sel.GetCount();
IReadOnlyList<long> ids_ = sel.GetObjectIDs();
ids = ids_.ToList();
return ids;
@ -809,27 +722,6 @@ namespace OliviaAddInPro.Helper
return fields_st;
}
//Devuelve una lista con los campos de una feature class
public static IReadOnlyList<ArcGIS.Core.Data.Field> GetFieldsSyncEx(FeatureClass fc)
{
FeatureClassDefinition ftcldef = null;
IReadOnlyList<ArcGIS.Core.Data.Field> fields = null;
ReiniciaOutStr();
if (fc == null)
return null;
try
{
ftcldef = fc.GetDefinition();
fields = ftcldef.GetFields();
}
catch (Exception ex)
{
HelperGdb.OutStr = "Error al leer los campos " + fc.GetName() + ": " + ex.Message;
return fields;
}
return fields;
}
/*
* Comprueba que en la capa dada exista un campo con nombre 'field'
@ -898,7 +790,7 @@ namespace OliviaAddInPro.Helper
for (i = 0; i < camps.Length; i++)
{
//if (!fields.Any(f=>f.ToUpper().Trim().Contains(camps[i].Substring (0,Math.Min(camps[i].Length, ComunDef.MaxCaracteresBBDD)).ToUpper().Trim())))
if (!fields.Any(f=>f.ToUpper().Trim().Equals(camps[i].ToUpper().Trim())))
if (!fields.Any(f=>f.ToUpper().Trim().Contains(camps[i].ToUpper().Trim())))
{
OutStr = OutStr + camps[i] + " ";
mal++;
@ -941,7 +833,7 @@ namespace OliviaAddInPro.Helper
{
//if (!fields.Any(f => f.ToUpper().Trim().Contains(camps[i].Substring(0, Math.Min(camps[i].Length, ComunDef.MaxCaracteresBBDD)).ToUpper().Trim())))
if (!fields.Any(f => f.ToUpper().Trim().Equals(camps[i].ToUpper().Trim())))
if (!fields.Any(f => f.ToUpper().Trim().Contains(camps[i].ToUpper().Trim())))
{
OutStr = OutStr + camps[i] + " ";
mal++;
@ -1068,7 +960,7 @@ namespace OliviaAddInPro.Helper
* Devuelve una geometría que es la suma de la inicial y la que se añade Add
*/
public static ArcGIS.Core.Geometry.Geometry IntersectGeom(ArcGIS.Core.Geometry.Geometry geomIni, ArcGIS.Core.Geometry.Geometry geomInters,
GeometryDimensionType resultDimension = GeometryDimensionType.EsriGeometryUnknownDimension)//esriGeometryNoDimension)
GeometryDimension resultDimension = GeometryDimension.esriGeometryNoDimension)
{
if (geomIni == null)
return geomInters;
@ -1077,7 +969,7 @@ namespace OliviaAddInPro.Helper
ArcGIS.Core.Geometry.Geometry geomSal = null;
try
{
if (resultDimension == GeometryDimensionType.EsriGeometryUnknownDimension)//GeometryDimension.esriGeometryNoDimension)
if (resultDimension == GeometryDimension.esriGeometryNoDimension)
geomSal = GeometryEngine.Instance.Intersection(geomIni, geomInters);
else
geomSal = GeometryEngine.Instance.Intersection(geomIni, geomInters, resultDimension);
@ -1268,11 +1160,11 @@ namespace OliviaAddInPro.Helper
/**
* Devuelve el número de entidades de una FeatureClass que cumplen la consulta, o todos si la consulta es empty
*/
public static long GetNumElems(string pathGdb, string ftclssName, string consulta = "")
public static int GetNumElems(string pathGdb, string ftclssName, string consulta = "")
{
Geodatabase gdb = GetGdb(pathGdb).Result;
FeatureClass fc = null;
long n = -1;
int n = -1;
if (gdb != null)
{
fc = GetFtClass(ftclssName, gdb).Result;
@ -1325,11 +1217,11 @@ namespace OliviaAddInPro.Helper
/**
* Devuelve el número de entidades de una FeatureClass que cumplen la consulta, o todos si la consulta es empty
*/
public static Task<long> GetNumElems(FeatureClass fc, string consulta = "")
public static Task<int> GetNumElems(FeatureClass fc, string consulta = "")
{
long n = -1;
int n = -1;
ReiniciaOutStr();
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<long>)(() =>
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<int>)(() =>
{
try
{
@ -1359,9 +1251,9 @@ namespace OliviaAddInPro.Helper
/**
* Devuelve el número de entidades de una FeatureClass que cumplen la consulta, o todos si la consulta es empty
*/
public static long GetNumElemsSync(FeatureClass fc, string consulta = "")
public static int GetNumElemsSync(FeatureClass fc, string consulta = "")
{
long n = -1;
int n = -1;
ReiniciaOutStr();
try
{
@ -1390,17 +1282,17 @@ namespace OliviaAddInPro.Helper
/**
* Devuelve el número de entidades de una FeatureClass que cumplen la consulta, o todos si la consulta es empty
*/
public static long GetNumElems(string pathFtClss, string consulta = "")
public static int GetNumElems(string pathFtClss, string consulta = "")
{
FeatureClass fc = GetFtClass(pathFtClss);
var n = GetNumElems(fc, consulta).Result;
int n = GetNumElems(fc, consulta).Result;
Free(fc);
return n;
}
public static long GetNumElemsSync(string pathFtClss, string consulta = "")
public static int GetNumElemsSync(string pathFtClss, string consulta = "")
{
FeatureClass fc = GetFtClassSync(pathFtClss);
var n = GetNumElemsSync(fc, consulta);
int n = GetNumElemsSync(fc, consulta);
Free(fc);
return n;
}
@ -1444,14 +1336,11 @@ namespace OliviaAddInPro.Helper
if (!System.IO.Directory.Exists(outpath))
System.IO.Directory.CreateDirectory(outpath);
FeatureClass fc = null;
bool debug = true;
/////////////////////////////////////////////////////////
//Prepara una where_clause con las entidades que cumplen el filtro
//Abre la featureclass
try
{
if (debug)
HelperGlobal.ponMsg("pathLayerIn " + pathLayerIn);
fc = GetFtClassSync(pathLayerIn);
if (fc == null)
{
@ -1460,17 +1349,14 @@ namespace OliviaAddInPro.Helper
}
List<long> ids = new List<long>();
if (debug)
HelperGlobal.ponMsg("fc " + fc.GetName() + " tipo " + fc.GetType().Name);
/////////////////////////////////////////////////////////
//Añade a la lista los ids que cumplen el filtro espacial
try
{
ids = fc.Select(filter, SelectionType.ObjectID, SelectionOption.Normal).GetObjectIDs().ToList();
}
catch(Exception ex)
{
OutStr = "Error al seleccionar IDs. "+ex.Message;
catch
{
ids = new List<long>();
}
@ -1486,7 +1372,7 @@ namespace OliviaAddInPro.Helper
}*/
if (ids.Count <= 0)
{
OutStr = "Error al aplicar filtro espacial en exportación: "+ OutStr;
OutStr = "Error al aplicar filtro espacial en exportación";
return false;
}
/////////////////////////////////////////////////////////
@ -1497,7 +1383,7 @@ namespace OliviaAddInPro.Helper
}
//convierte la lista de ids a string para la clause de la forma
//(id1, id2, id3..)
string whereClause = GetWhereClauseFromIds(ids,fc.GetDefinition().GetObjectIDField());
string whereClause = GetWhereClauseFromIds(ids);
///////////////////////////////////////////////////////////
///Exporta
@ -1510,7 +1396,7 @@ namespace OliviaAddInPro.Helper
var environments = Geoprocessing.MakeEnvironmentArray(outputCoordinateSystem: sr);
//SpatialReferenceBuilder.CreateSpatialReference(3857)
double valini = cps.GetProgress();
var gpres = Geoprocessing.ExecuteToolAsync("FeatureClassToFeatureClass_conversion", args,
IGPResult gpResult = Geoprocessing.ExecuteToolAsync("FeatureClassToFeatureClass_conversion", args,
environments, null,
(event_name, o) => // implement delegate and handle events
@ -1544,10 +1430,8 @@ namespace OliviaAddInPro.Helper
break;
}
}
});
while (!gpres.IsCompleted && !gpres.IsCanceled && !gpres.IsFaulted)
Thread.Sleep(10);
IGPResult gpResult = gpres.Result;
}).Result;
if (gpResult.IsCanceled)
{
cps.Setcancelled();
@ -1563,8 +1447,6 @@ namespace OliviaAddInPro.Helper
OutStr = "Error: " + msg;
return false;
}
gpres.Dispose();
return true;
}
catch (Exception ex)
@ -1820,7 +1702,7 @@ namespace OliviaAddInPro.Helper
* Dada una lista de ids de elemento, crea una consulta en la que se llama a todos esos elementos
* campo IN (id1, id2, id3..)
*/
public static string GetWhereClauseFromIds(List<long> ids, string ObjectId = "OBJECTID")
public static string GetWhereClauseFromIds(List<long> ids)
{
if (ids.Count <= 0)
return string.Empty;
@ -1867,7 +1749,7 @@ namespace OliviaAddInPro.Helper
public static bool RemoveRowsFromShp(FeatureClass fc, List<long> quita)
{
//Crea la consulta
var consulta = GetWhereClauseFromIds(quita, fc.GetDefinition().GetObjectIDField());
var consulta = GetWhereClauseFromIds(quita);
if (String.IsNullOrEmpty(consulta))
return false;
@ -2014,7 +1896,7 @@ namespace OliviaAddInPro.Helper
geom = f.GetShape();
line = (ArcGIS.Core.Geometry.Polyline)geom;
longi_tot = line.Length;
geom = IntersectGeom(geom_zon, line, GeometryDimensionType.EsriGeometry1Dimension);//GeometryDimension.esriGeometry1Dimension);
geom = IntersectGeom(geom_zon, line, GeometryDimension.esriGeometry1Dimension);
line = (ArcGIS.Core.Geometry.Polyline)geom;
longi_zon = line.Length;//se consigue la longitud de ámbito (linea) que interseca con el nivel)
if ((longi_zon / longi_tot) < porc)
@ -2117,13 +1999,12 @@ namespace OliviaAddInPro.Helper
if (!string.IsNullOrEmpty(ext_))
dlg.DefaultExt = ext_;
if (brwsFilt != null)
{
brwsFilt.BrowsingFilesMode = true;
dlg.BrowseFilter = brwsFilt;
}
try
{
bool? ok = dlg.ShowDialog();
if ((ok ?? true) && dlg.FilePath.Length > 0)
return dlg.FilePath;
else
@ -2140,46 +2021,9 @@ namespace OliviaAddInPro.Helper
*/
public static string FolderBrowseDlg(string title_, string initloc_)
{
var openFileDialog = new CommonOpenFileDialog();
//{ IsFolderPicker = true };
if(!String.IsNullOrEmpty(initloc_))
openFileDialog.InitialDirectory = initloc_;
openFileDialog.IsFolderPicker = true;
//openFileDialog.InitialDirectory = initloc_;
openFileDialog.Title = title_;
//openFileDialog.Filter = "Folders";
//if (openFileDialog.ShowDialog() == true)
if (openFileDialog.ShowDialog() == CommonFileDialogResult.Ok)
return openFileDialog.FileName;
return null;
}
/**
* Comprueva si existe un Dataset, con ruta completa
*/
public static Task<bool> CheckDataset(string datasetName)
{
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<bool>)(() =>
{
if (string.IsNullOrEmpty(datasetName))
return false;
try
{
Geodatabase gdb = GetGdbSync(datasetName);
if (gdb == null)
return false;
var datname = new System.IO.DirectoryInfo(datasetName).Name;
FeatureDataset ftdst = gdb.OpenDataset<FeatureDataset>(datname);
ftdst.Dispose();
return true;
}
catch
{
return false;
}
}));
}
/**
* Comprueva si una GDB contiene un Dataset
*/
@ -2212,8 +2056,7 @@ namespace OliviaAddInPro.Helper
try
{
FeatureDatasetDefinition featureDatasetDefinition = gdb.GetDefinition<FeatureDatasetDefinition>(datasetName);
ArcGIS.Core.Geometry.SpatialReference entr = featureDatasetDefinition.GetSpatialReference();
if (entr.Wkid==spatref.Wkid)
if(featureDatasetDefinition.GetSpatialReference().Equals(spatref))
return 0;
return 2;
}
@ -2226,10 +2069,7 @@ namespace OliviaAddInPro.Helper
/**
* Crea un FeatureDataset con el nombre dado y la spatialrefernece dada en la gdb dada
* Devuelve 0 si no hay que crear nada, existe y coincide ref espac
* 2 si existe el dataset pero con otra referencia espacial, así que se crea otro
* 1 si da error
* 4 si no existe así que se crea
* Devuelve 0 si no hay que crear nada o si lo ha creado bien, 2 si existe el dataset pero con otra referencia espacial, 1 si da error
*/
public static Respuesta<int> CreateDataset(string gdbPath, string datasetName, ArcGIS.Core.Geometry.SpatialReference spatref, out string datasetNameOut)
{
@ -2251,7 +2091,6 @@ namespace OliviaAddInPro.Helper
bool crea = false;
int idat = 1;
int r = 2;
bool refspatdif = false;
while(r==2)
{
var task1 = CheckDataset(gdb, datasetName);
@ -2270,7 +2109,7 @@ namespace OliviaAddInPro.Helper
//existe ese nombre, pero con otra ref espacial
//crea un nuevo dataset y avisa
datasetName = string.Format("{0}_{1}",datasetName,idat);
refspatdif = true;
datasetNameOut = datasetName;
idat++;
}
else//r==1
@ -2284,7 +2123,6 @@ namespace OliviaAddInPro.Helper
else
r = 3; //no existe, lo crea con ese nombre
};
datasetNameOut = datasetName;
if (r!=3)
return res;
//no existe, lo crea
@ -2316,11 +2154,10 @@ namespace OliviaAddInPro.Helper
task.Wait();
if (task.Result.Value)//ha ido bien
{
//avisa
if (refspatdif)
res.Value = 2;
if (string.IsNullOrEmpty(datasetNameOut))
res.Value = 0;
else
res.Value = 4;
res.Value = 2;//avisa
//actualiza la gdb
Refresh(gdbPath);
}
@ -2432,7 +2269,6 @@ namespace OliviaAddInPro.Helper
msg = e.Message;
}*/
res.Value = true;
gpres.Dispose();
//actualiza la gdb
Refresh(System.IO.Path.GetDirectoryName(Gdb_dataset));
return res;
@ -2446,72 +2282,16 @@ namespace OliviaAddInPro.Helper
/**
* Borrar una feature class de un dataset
* Devuelve -1 si da error al abrir la gdb, -2 si da error al abrir el ftclass (igual porque no existe)
* y 0 si da error el proceso de borrar, y 1 si va todo bien
*/
public static Respuesta<int> DeleteFeatureClassSync(string gdbPathDataset, string featureClassName)
{
var res = new Respuesta<int> { Value = 0 };
Geodatabase gdb = GetGdbSync(gdbPathDataset);
if (gdb == null)
{
res.Value = -1;
return res;
}
FeatureClass ftclss = GetFtClassSync(gdbPathDataset + " \\"+ featureClassName);
if (ftclss == null)
{
res.Value = -2;
return res;
}
Respuesta<bool> resp = new Respuesta<bool> { Value = false };
SchemaBuilder schemaBuilder = null;
try
{
// Create a FeatureClassDescription object
FeatureClassDescription featureClassDescription = new FeatureClassDescription(ftclss.GetDefinition());
// Create a SchemaBuilder object
schemaBuilder = new SchemaBuilder(gdb);
// Add the deletion fo the feature class to our list of DDL tasks
schemaBuilder.Delete(featureClassDescription);
// Execute the DDL
resp.Value = schemaBuilder.Build();
if (!resp.Value && schemaBuilder.ErrorMessages.Count > 0)
resp.Error.Add(schemaBuilder.ErrorMessages.FirstOrDefault());
}
catch
{
resp.Error.Add(schemaBuilder.ErrorMessages.FirstOrDefault());
}
if (resp.Value)
res.Value = 1;
else
{
res.Error.Add(resp.Error.FirstOrDefault());
}
Free(gdb);
Free(ftclss);
return res;
}
/**
* Borrar una feature class de un dataset
*/
public static Respuesta<bool> DeleteFeatureClass(string gdbPathDataset, string featureClassName)
public static Respuesta<bool> DeleteFeatureClass(string gdbPath, string featureClassPath)
{
var res = new Respuesta<bool> { Value = false };
Geodatabase gdb = GetGdb(gdbPathDataset).Result;
if (gdb == null)
return res;
FeatureClass ftclss = GetFtClass(gdbPathDataset + " \\" + featureClassName);
FeatureClass ftclss = GetFtClass(featureClassPath);
if (ftclss == null)
return res;
Geodatabase gdb = GetGdb(gdbPath).Result;
if (gdb == null)
return res;
var task = ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<Respuesta<bool>>)(() =>
{
@ -2650,8 +2430,7 @@ namespace OliviaAddInPro.Helper
//{
try
{
List<String> fields = new List<string>();
fields.Add(field);
String[] fields = new string[] { field }; //field to be used to retrieve unique values
UniqueValueRendererDefinition uniqueValueRendererDef;
CIMSymbolReference symbolTemplate=new CIMSymbolReference();
if (tipo == GeometryType.Point)//puntual
@ -2707,9 +2486,7 @@ namespace OliviaAddInPro.Helper
try
{
var gpres = Geoprocessing.ExecuteToolAsync("management.AlterField", args);
while (!gpres.IsCompleted && !gpres.IsCanceled && !gpres.IsFaulted)
Thread.Sleep(10);
if (!gpres.IsCompletedSuccessfully)
if (gpres.Result.IsFailed)
{
var gpResult = gpres.Result;
string msg;
@ -2720,7 +2497,6 @@ namespace OliviaAddInPro.Helper
}
else
res= true; //ha ido bien
gpres.Dispose();
return res;
}
catch
@ -2787,9 +2563,7 @@ namespace OliviaAddInPro.Helper
try
{
var gpres = Geoprocessing.ExecuteToolAsync("management.AddFields", args);
while (!gpres.IsCompleted && !gpres.IsCanceled && !gpres.IsFaulted)
Thread.Sleep(10);
if (gpres.IsFaulted)
if (gpres.Result.IsFailed)
{
var gpResult = gpres.Result;
string msg;
@ -2800,7 +2574,6 @@ namespace OliviaAddInPro.Helper
}
else
res = true; //ha ido bien
gpres.Dispose();
return res;
}
catch

File diff suppressed because it is too large Load Diff

View File

@ -97,14 +97,13 @@ namespace OliviaAddInPro.Helper
_ProgrSrc.SetProgress(0);
_ProgrSrc.SetProceso(stat);
}
public void IncMessage(uint inc, string mes=null)
public void IncMessage(uint inc, string mes)
{
var prog = _ProgrSrc.GetProgress() + inc;
if (prog > 100)
prog = 100;
_ProgrSrc.SetProgress(prog);
if(!string.IsNullOrEmpty(mes))
_ProgrSrc.SetEstado(mes);
_ProgrSrc.SetEstado(mes);
}
}

View File

@ -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>

View File

@ -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.

View File

@ -33,18 +33,5 @@ namespace OliviaAddInPro.Model
public static string atr_pedes; //<Atributo del campo FOW que indica peatonal
};
/**
* 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 static string consulta_sector; //<Campo de la tabla donde se guarda info de sector
public static string consulta_secuen; //<Campo de la tabla donde se guarda info de secuencia
public static double giro_max;
public static double desv_max;
public static double desv_max_abs;
}
}
}

View File

@ -61,6 +61,17 @@ namespace OliviaAddInPro.Model
public override Respuesta<TiposEjecucion> Ejecuta(ModosEjec modo)
{
/////////////////////////////
/////
///DEBUG
///
//Respuesta<TiposEjecucion> res1 = new Respuesta<TiposEjecucion> { Value = TiposEjecucion.FinEjecOk };
//HelperGdb.OpenLayer(@"C:\Users\Elena\Documents\ArcGIS\Projects\MyProject3\MyProject3.gdb\Barrido_man\BarMan_AceM_AceNM_20220529_134336", "SECTOR", true);
//Serv.ActualizaSecto(@"D:\Proyectos\Olivia\Instal2.0\data\data_T00_A0405_20220628_214902.shp", @"C:\\Users\\Elena\\Documents\\ArcGIS\\Projects\\MyProject3\\MyProject3.gdb\\Barrido_man\\BarMan_AceM_AceNM_20220628_214613");
//return res1;
//////////////////
/////////////////////////////
Respuesta<bool> res = new Respuesta<bool> { Value=false};
@ -131,10 +142,7 @@ namespace OliviaAddInPro.Model
{
auxili = shapefile.Substring(aux, auxl);
ambitos = ambitos + auxili;
aux = indice; //para coger el timestamp
}
//concatena el timestamp
ambitos = ambitos + shapefile.Substring(aux);

78
Model/Limpieza.cs.bak Normal file
View File

@ -0,0 +1,78 @@
using ArcGIS.Core.Geometry;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OliviaAddInPro.Helper;
using System.Collections.ObjectModel;
using ArcGIS.Core.CIM;
using ArcGIS.Core.Data;
using OliviaAddInPro.Services;
using static OliviaAddInPro.Model.ComunDef;
using ArcGIS.Desktop.Framework.Contracts;
using ArcGIS.Desktop.Framework.Threading.Tasks;
using OliviaAddInPro.Services.LanzaSrv;
namespace OliviaAddInPro.Model
{
public class Limpieza : TratamientoComun
{
//**********************************************
//Se recogen en PaneLimpiezaSub1
/**
* Ámbitos de trabajo elegidos
*/
public bool[] AmbitosSel { get; set; } = new bool[(int)LimpiezaDef.AmbitsTra.AmbN];
/**
* Indica si respeta el sentido de circulación o no
*/
public bool RespCirc { get; set; } = false;
/**
* Tipo de unidades del tiempo de tto
*/
public int UdsTTto { get; set; } = (int)GeneralDef.OlvTiposTto.OlvTipTtoNoDef;
/**
* Instancia para las funciones de exportación y demás
*/
public LimpiezaServ Serv { get; set; } = null;
public LanzaLimpSrv LanzaSrv { get; set; } = null;
/**
* Ancho de vía, en metros
*/
public double AnchoVia { get; set; } = LimpiezaDef.Parametros.ancho_via;
public Limpieza()
{
Serv = new LimpiezaServ(this);
LanzaSrv = new LanzaLimpSrv();
<<<<<<< HEAD
=======
ProceSrv = new ProcesoEjecServ();
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;
}
}
}

View File

@ -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_anch_tip; //<Campo a consultar de la capa de limpieza, ancho tipo
public static string consulta_tipolo; //<Campo a consultar de la capa de limpieza, tipología
public static string consulta_sector; //<Campo a consultar de la capa planificada, sector
public static string consulta_secuen; //<Campo a consultar de la capa planificada, planificacion
};
/**
* Nombre de los atributos (de las capas) sobre los que se realizarán consultas para la limpieza
@ -91,8 +93,6 @@ namespace OliviaAddInPro.Model
public static int t_descansom; //<Tiempo de descanso mínimo admitido
public static int t_descanso; //<Tiempo de descanso establecido
public static int h_inicio; //<Hora de inicio de la jornada de trabajo
public static int reduc_traf; //<Porcent de reducción por tráfico
public static bool igno_ais;
public static int ancho_viaM; //<Ancho de vía máximo admitido
public static int ancho_viam; //<Ancho de vía mínimo admitido
public static int ancho_via; //<Ancho de vía establecido
@ -135,12 +135,15 @@ namespace OliviaAddInPro.Model
public static double umbral_reco; //<Umbral de llenado para la recogida de contenedores
};
public struct OtrosParam
{
{
public static double giro_max;
public static double anch_peat;
public static double anch_ace;
public static double anch_aplin;
public static double anch_apbat;
public static double anch_bordlib;
public static double desv_max;
public static double desv_max_abs;
};
//*************************************************************************************
//Enums globales limpieza

View File

@ -69,7 +69,7 @@ namespace OliviaAddInPro.Model
public OliviaConf()
{
Ip = "127.0.0.1";
Ip = "0.0.0.0";
Puerto = 19995;
TiempoOutSocket = 20;
}
@ -80,8 +80,12 @@ namespace OliviaAddInPro.Model
* IP donde va a realizar la conexión a OliviaTask, se inicializa al arrancar con la local
*/
[Browsable(false)]
public string Ip { get; set; }
public string Ip { get; set; }
/**
* Puerto local donde va a realizar la conexión a OliviaTask, se inicializa al arrancar
*/
[Browsable(false)]
public int Puerto { get; set; }
/**
* Time out de la conexión con OliviaTask, en seg
*/
@ -239,36 +243,17 @@ namespace OliviaAddInPro.Model
[Category("General")]
[PropertyOrder(5)]
[DisplayName("GDB para Resultados")]
[DisplayName("GDB para Importación")]
[Description("Gdb en la que se importarán los resultados de la ejecución")]
[Editor(typeof(PropertyGridFilePickerGDB), typeof(PropertyGridFilePickerGDB))]
public string Path_Gdb_Import { get; set; }
[Category("General")]
[PropertyOrder(6)]
[DisplayName("Dataset para Resultados")]
[Description("Dataset, dentro de la GDB, en la que se importarán los resultados de la ejecución")]
[Editor(typeof(PropertyGridFilePickerDataset), typeof(PropertyGridFilePickerDataset))]
public string Path_Dataset_Import { get; set; }
[Category("General")]
[PropertyOrder(7)]
[PropertyOrder(5)]
[DisplayName("Carpeta para listados (CSV)")]
[Description("Carpeta en la que se guardarán los listados en CSV de la planificación")]
[Editor(typeof(PropertyGridFilePickerFolder), typeof(PropertyGridFilePickerFolder))]
public string Path_Guarda_Csv { get; set; }
[Category("General")]
[PropertyOrder(8)]
[DisplayName("Ignorar aislados")]
[Description("Indica si por defecto se van a ignorar elementos aislados")]
public bool Igno_ais { get; set; }
[Category("General")]
[PropertyOrder(9)]
[DisplayName("Campo para exportar ID")]
[Description("Nombre del campo que indica el ID del ámbito")]
public string id { get; set; }
#endregion
#region 02CamposLimp
@ -384,6 +369,11 @@ namespace OliviaAddInPro.Model
#endregion
#region 04CamposRecogida
[Category("Campos Recogida")]
[DisplayName("ID")]
[Description("Nombre del campo que indica el ID del contenedor")]
public string id { get; set; }
[Category("Campos Recogida")]
[DisplayName("Tipo de carga")]
[Description("Nombre del campo que indica el tipo de carga")]
@ -750,20 +740,15 @@ namespace OliviaAddInPro.Model
[Browsable(false)]
public int hora_inicio { get; set; } //ES UNA HORA, SON LOS MINUTOS DESDE LAS 00, PERO TIENE QUE APARECER CON FORMATO DE TIME 07:30, POR EJEMPLO
[Category("Tiempos de la jornada - Avanzadas")]
[Category("Tiempos de la jornada - Avanzadas")] //OCULTAR
[DisplayName("Salida/llegada, en recogida (min)")]
[Description("")]
public int t_llega_sale { get; set; }
[Category("Tiempos de la jornada - Avanzadas")]
[Category("Tiempos de la jornada - Avanzadas")] //OCULTAR
[DisplayName("Descarga en planta, en recogida (min)")]
[Description("")]
public int t_descarga { get; set; }
[Category("Tiempos de la jornada - Avanzadas")]
[DisplayName("Reducción por tráfico %")]
[Description("Reducción de la velocidad por tráfico, %")]
public int reduc_traf { get; set; }
#endregion
#region 09AnchosLimpAvanz
@ -1070,37 +1055,37 @@ namespace OliviaAddInPro.Model
#endregion
#region 12TiemposRecoAvanz
[Category("Tiempos de Tratamiento Recogida (seg) - Avanzadas")]//OCULTAR
[Category("Tiempos de Tratamiento Recogida (min) - Avanzadas")]//OCULTAR
[DisplayName("Carga Trasera")]
[Description("")]
public int t_vaci_trasera { get; set; }
[Category("Tiempos de Tratamiento Recogida (seg) - Avanzadas")]//OCULTAR
[Category("Tiempos de Tratamiento Recogida (min) - Avanzadas")]//OCULTAR
[DisplayName("Carga Lateral")]
[Description("")]
public int t_vaci_lateral { get; set; }
[Category("Tiempos de Tratamiento Recogida (seg) - Avanzadas")]//OCULTAR
[Category("Tiempos de Tratamiento Recogida (min) - Avanzadas")]//OCULTAR
[DisplayName("Carga superior")]
[Description("")]
public int t_vaci_superior { get; set; }
[Category("Tiempos de Tratamiento Recogida (seg) - Avanzadas")]//OCULTAR
[Category("Tiempos de Tratamiento Recogida (min) - Avanzadas")]//OCULTAR
[DisplayName("Carga Bilateral")]
[Description("")]
public int t_vaci_bilateral { get; set; }
[Category("Tiempos de Tratamiento Recogida (seg) - Avanzadas")]//OCULTAR
[Category("Tiempos de Tratamiento Recogida (min) - Avanzadas")]//OCULTAR
[DisplayName("Bolseo")]
[Description("")]
public int t_vaci_bolseo { get; set; }
[Category("Tiempos de Tratamiento Recogida (seg) - Avanzadas")]//OCULTAR
[Category("Tiempos de Tratamiento Recogida (min) - Avanzadas")]//OCULTAR
[DisplayName("Lavado")]
[Description("")]
public int t_vaci_lavado { get; set; }
[Category("Tiempos de Tratamiento Recogida (seg) - Avanzadas")]//OCULTAR
[Category("Tiempos de Tratamiento Recogida (min) - Avanzadas")]//OCULTAR
[DisplayName("Otro tipo de carga")]
[Description("")]
public int t_vaci_otra { get; set; }
@ -1228,13 +1213,10 @@ namespace OliviaAddInPro.Model
#endregion
#region 15GenAvanz
/**
* Puerto local donde va a realizar la conexión a OliviaTask, se inicializa al arrancar
*/
[Category("General - Avanzadas")] //OCULTAR
[DisplayName("Puerto de conexión")]
[Description("Puerto de conexión con el proceso olivia")]
public int Puerto { get; set; }
public int puerto { get; set; }
[Category("General - Avanzadas")] //OCULTAR
[DisplayName("Desviación máxima relativa")]

View File

@ -51,8 +51,8 @@ namespace OliviaAddInPro.Model
public const int ProgrMax = 100;
public const int ProgrStep = 5;
public const int ParamN = 5;
public const int ParamLimpN = 52;
public const int ParamRecoN = 50;
public const int ParamLimpN = 37;
public const int ParamRecoN = 40;
/*
* 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 EjecGeoParamIgual = ":";
public const string NombOlvTasks = "OliviaTasks";
public const string NombColSector = "SECTOR";
/**
* Define el nombre del grupo de propiedades generales
*/
@ -520,25 +521,15 @@ namespace OliviaAddInPro.Model
/**
* Nombre de los campos que lee en limpieza
*/
*/
public const string GTO_girmax ="Giro_max_vehiculo";
public const string GTO_anch_peat ="Ancho_peat_def";
public const string GTO_anch_ace = "Ancho_acera_def";
public const string GTO_anch_aplin = "Ancho_ap_lin_def";
public const string GTO_anch_apbat = "Ancho_ap_bat_def";
public const string GTO_anch_bordlib = "Ancho_bord_lib_def";
//común
public const string GTO_girmax = "Giro_max_vehiculo";
public const string GTO_desv_max = "Desv_max_rel";
public const string GTO_desv_max = "Desv_max";
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
*/

View File

@ -60,7 +60,6 @@ namespace OliviaAddInPro.Model
//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
@ -119,6 +118,13 @@ namespace OliviaAddInPro.Model
{
tipoEjec = TiposEjecucion.Ninguno;
TipoView= TiposEjecucion.Ninguno;
IniDefault();
LimpiezaDef.iniciaLimpDef();
RecogidaDef.iniciaRecoDef();
progrDialog = new MarchandoUnaDe();
limp = new Limpieza();
reco = new Recogida();
SpatRef = ArcGIS.Core.Geometry.SpatialReferenceBuilder.CreateSpatialReference(GeneralDef.SpatRefDef);
Respuesta<bool> resp = coge_ip();
if (!resp.Value && resp.HasError)
@ -130,14 +136,6 @@ namespace OliviaAddInPro.Model
{
HelperGlobal.ponMsg(resp.Error.First());
}
IniDefault();
LimpiezaDef.iniciaLimpDef();
RecogidaDef.iniciaRecoDef();
progrDialog = new MarchandoUnaDe();
limp = new Limpieza();
reco = new Recogida();
SpatRef = ArcGIS.Core.Geometry.SpatialReferenceBuilder.CreateSpatialReference(GeneralDef.SpatRefDef);
}
public static bool IsLimp()
@ -272,7 +270,7 @@ namespace OliviaAddInPro.Model
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];
@ -290,10 +288,9 @@ namespace OliviaAddInPro.Model
{
if (string.IsNullOrEmpty(path))
return false;
if(Directory.Exists(path))
return true;
//no existe directorio, mira el anterior
if (!Directory.Exists(Path.GetPathRoot(path)))
var dir = Path.GetDirectoryName(path);
if (string.IsNullOrEmpty(dir) || !Directory.Exists(path))
return false;
return true;
@ -332,11 +329,10 @@ namespace OliviaAddInPro.Model
try
{
string[] ips = OliviaGlob.dame_local_ips();
/*if (ips != null && ips.Length > 0)
if (ips != null && ips.Length > 0)
Conexion.Ip = ips[0];
else
Conexion.Ip = "127.0.0.1";*/
Conexion.Ip = "127.0.0.1";
Conexion.Ip = "127.0.0.1";
resp.Value = true;
return resp;
}
@ -397,12 +393,12 @@ namespace OliviaAddInPro.Model
HelperGlobal.ponMsg("No se encuentra el archivo " + OliviaGlob.Paths.PathManualOlivia);
else
{
Process.Start(new ProcessStartInfo(OliviaGlob.Paths.PathManualOlivia) { UseShellExecute = true });
System.Diagnostics.Process.Start(OliviaGlob.Paths.PathManualOlivia);
}
}
catch (Exception ex)
catch (Exception)
{
HelperGlobal.ponMsg("Error al abrir el manual de ayuda " + OliviaGlob.Paths.PathManualOlivia + " "+ex.Message);
HelperGlobal.ponMsg("Error al abrir el manual de ayuda " + OliviaGlob.Paths.PathManualOlivia);
return;
}
}
@ -421,7 +417,6 @@ namespace OliviaAddInPro.Model
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);
@ -447,6 +442,8 @@ namespace OliviaAddInPro.Model
LimpiezaDef.Campos.consulta_observ = c.cons_obser;
LimpiezaDef.Campos.consulta_anch_tip = c.cons_anch_tip;
LimpiezaDef.Campos.consulta_tipolo = c.cons_tipolo;
LimpiezaDef.Campos.consulta_sector = c.consulta_sector;
LimpiezaDef.Campos.consulta_secuen = c.consulta_secuen;
LimpiezaDef.Atributos.atr_esca = c.atr_esca;
LimpiezaDef.Atributos.atr_fuent = c.atr_fuent;
@ -491,8 +488,6 @@ namespace OliviaAddInPro.Model
LimpiezaDef.Parametros.t_descansom = c.t_descanso_min;
LimpiezaDef.Parametros.t_descanso = c.t_descanso;
LimpiezaDef.Parametros.h_inicio = c.hora_inicio;
LimpiezaDef.Parametros.reduc_traf = c.reduc_traf;
LimpiezaDef.Parametros.igno_ais = c.Igno_ais;
LimpiezaDef.Parametros.ancho_viaM = c.ancho_via_max;
LimpiezaDef.Parametros.ancho_viam = c.ancho_via_min;
LimpiezaDef.Parametros.ancho_via = c.ancho_via;
@ -534,11 +529,15 @@ namespace OliviaAddInPro.Model
LimpiezaDef.Parametros.vdespLS = c.v_desp_LS;
LimpiezaDef.Parametros.umbral_reco = 80;
LimpiezaDef.OtrosParam.giro_max = c.Giro_max_vehiculo;
LimpiezaDef.OtrosParam.anch_peat = c.Ancho_peat_def;
LimpiezaDef.OtrosParam.anch_ace = c.Ancho_acera_def;
LimpiezaDef.OtrosParam.anch_aplin = c.Ancho_ap_lin_def;
LimpiezaDef.OtrosParam.anch_apbat = c.Ancho_ap_bat_def;
LimpiezaDef.OtrosParam.anch_bordlib = c.Ancho_bord_lib_def;
LimpiezaDef.OtrosParam.desv_max = c.Desv_max;
LimpiezaDef.OtrosParam.desv_max_abs = c.Desv_max_abs;
//Capas, consultas, atributos y filtros de RECOGIDA
@ -630,13 +629,6 @@ namespace OliviaAddInPro.Model
ComunDef.AtributosNW.atr_N = c.atr_N;
ComunDef.AtributosNW.atr_pedes = c.atr_pedes;
ComunDef.CamposCom.camp_oid = c.id;
ComunDef.CamposCom.consulta_sector = c.consulta_sector;
ComunDef.CamposCom.consulta_secuen = c.consulta_secuen;
ComunDef.CamposCom.giro_max = c.Giro_max_vehiculo;
ComunDef.CamposCom.desv_max = c.Desv_max;
ComunDef.CamposCom.desv_max_abs = c.Desv_max_abs;
}
}
}

View File

@ -150,8 +150,6 @@ namespace OliviaAddInPro.Model
{
auxili = shapefile.Substring(aux, auxl);
carga = carga + auxili;
aux = indice; //para coger el timestamp
}
//concatena el timestamp
@ -164,7 +162,7 @@ namespace OliviaAddInPro.Model
public override string[] GetCampos(string capa=null)
{
string[] camps = {
//RecogidaDef.campos_def.cons_id,
RecogidaDef.campos_def.cons_id,
RecogidaDef.campos_def.cons_nomrec,
RecogidaDef.campos_def.cons_lateral ,
RecogidaDef.campos_def.cons_fracc,

View File

@ -103,7 +103,7 @@ namespace OliviaAddInPro.Model
/**
* Porcentaje de tráfico que se estima, ya que si no los vehículos irían siempre a la velocida máxima permitida por la vía
*/
public int Trafico { get; set; } = LimpiezaDef.Parametros.reduc_traf;
public int Trafico { get; set; } = 80;
/**
* Número de puntos de control
*/
@ -115,11 +115,7 @@ namespace OliviaAddInPro.Model
/**
* Ignorar o noelementos aislados
*/
public bool IgnoAis { get; set; } = LimpiezaDef.Parametros.igno_ais;
/**
* Coordenadas Min y Max de la red navegable
*/
public Envelope MimaNw { get; set; } = null;
public bool IgnoAis { get; set; } = true;
/**
* Almacena la consulta para exportar los ámbitos
*/
@ -141,8 +137,6 @@ namespace OliviaAddInPro.Model
set { err_str = value; }
}
private ObservableCollection<string> nombCamposOrig = new ObservableCollection<string>();
private IReadOnlyList<ArcGIS.Core.Data.Field> camposOrig = null;
/**
* Para la ventana de progreso
*/
@ -201,80 +195,51 @@ namespace OliviaAddInPro.Model
ambitos = string.Empty;
}
/**
* Devuelve los campos característicos de Limpieza o Recogida
* Restaura el nombre original del campo si se ha truncado a 10 car al exportar a shp
*/
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)
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;
}
////////////////////////////////////////////////////////
string[] camps = GetCampos();
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++)
for (i = 0; i < camps.Length; i++)
{
if (camposOrig[i].Name.Length <= LENGTHCAMPSHP)
if (camps[i].Length <= LENGTHCAMPSHP)
continue;
if (EstaRepeNomb(fields, camposOrig[i].Name))
continue;
campTrunc = camposOrig[i].Name.Substring(0, LENGTHCAMPSHP);
campTrunc = camps[i].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))
if (!HelperGdb.RenameFieldSync(nombFtClass, campTrunc, camps[i],camps[i]))
break;
}
if (i < camposOrig.Count)
if (i < camps.Length)
{
resp.Error.Add("Error en el campo " + camposOrig[i].Name);
resp.Error.Add("Error en el campo " + camps[i]);
}
else
resp.Value = true;
@ -283,47 +248,8 @@ namespace OliviaAddInPro.Model
{
}
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);
}
}
}

View File

@ -16,7 +16,5 @@ namespace OliviaAddInPro.Model.contract
bool Getcancelled();
void Setcancelled();
void Inicia();
void PonBarColorVerde();
void PonBarColorRojo();
}
}

View File

@ -1,153 +1,399 @@
<?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>
<TargetFramework>net6.0-windows</TargetFramework>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<NoWarn>CA1416</NoWarn>
<UseWPF>true</UseWPF>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{10742570-CF59-42F2-BEA2-2A38002A06EE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OliviaAddInPro</RootNamespace>
<AssemblyName>OliviaAddInPro</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
</PropertyGroup>
<PropertyGroup>
<ArcGISFolder>$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISPro', 'InstallDir', null, RegistryView.Registry64))</ArcGISFolder>
<ArcGISFolder Condition="'$(ArcGISFolder)' == ''">$(registry:HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro@InstallDir)</ArcGISFolder>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>0</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>
<ItemGroup>
<Compile Remove=".git\**" />
<EmbeddedResource Remove=".git\**" />
<None Remove=".git\**" />
<Page Remove=".git\**" />
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="WindowsBase" />
<Reference Include="System.Xaml" />
<Reference Include="ArcGIS.Desktop.Framework">
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Framework.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Core">
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Core">
<HintPath>$(ArcGISFolder)\bin\Extensions\Core\ArcGIS.Desktop.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Mapping">
<HintPath>$(ArcGISFolder)\bin\Extensions\Mapping\ArcGIS.Desktop.Mapping.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Catalog">
<HintPath>$(ArcGISFolder)\bin\Extensions\Catalog\ArcGIS.Desktop.Catalog.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Editing">
<HintPath>$(ArcGISFolder)\bin\Extensions\Editing\ArcGIS.Desktop.Editing.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Extensions">
<HintPath>$(ArcGISFolder)\bin\Extensions\DesktopExtensions\ArcGIS.Desktop.Extensions.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.GeoProcessing">
<HintPath>$(ArcGISFolder)\bin\Extensions\GeoProcessing\ArcGIS.Desktop.GeoProcessing.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Layouts">
<HintPath>$(ArcGISFolder)\bin\Extensions\Layout\ArcGIS.Desktop.Layouts.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Shared.Wpf">
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Shared.Wpf.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Ribbon.Wpf">
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Ribbon.Wpf.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.DataGrid.Contrib.Wpf">
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.DataGrid.Contrib.Wpf.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Resources">
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Resources.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Resources">
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Resources.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ESRI.ArcGIS.ItemIndex">
<HintPath>$(ArcGISFolder)\bin\ESRI.ArcGIS.ItemIndex.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Xceed.Wpf.Toolkit, Version=4.1.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\bin\Release\Xceed.Wpf.Toolkit.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="Config.daml" />
<Content Include="Images\AddInDesktop16.png" />
<Content Include="Images\AddInDesktop32.png" />
<Content Include="DarkImages\AddInDesktop16.png" />
<Content Include="DarkImages\AddInDesktop32.png" />
<Content Include="DarkImages\GenericButtonBlue16.png" />
<Content Include="DarkImages\GenericButtonBlue32.png" />
<Content Include="Images\OliviaIconPro16.png" />
<Content Include="Images\OliviaIconPro32.png" />
<Content Include="DarkImages\GenericButtonPurple16.png" />
<Content Include="DarkImages\GenericButtonPurple32.png" />
<Content Include="DarkImages\GenericButtonGreen16.png" />
<Content Include="DarkImages\GenericButtonGreen32.png" />
<Content Include="Images\reco2.png" />
<Content Include="Images\carrito2.png" />
<Content Include="Images\config2_olv.png" />
<AddInContent Include="Config.daml" />
<AddInContent Include="Images\AddInDesktop16.png" />
<AddInContent Include="Images\AddInDesktop32.png" />
<AddInContent Include="DarkImages\AddInDesktop16.png" />
<AddInContent Include="DarkImages\AddInDesktop32.png" />
</ItemGroup>
<ItemGroup>
<Compile Include="Button\ButtonConfig.cs" />
<Compile Include="Button\ButtonLimp.cs" />
<Compile Include="Button\ButtonMaq.cs" />
<Compile Include="Button\ButtonRec.cs" />
<Compile Include="Conexion\Cstr_socket.cs" />
<Compile Include="Helper\EnabledComboBoxItem.cs" />
<Compile Include="Helper\CheckedListItem.cs" />
<Compile Include="Helper\HelperGdb.cs" />
<Compile Include="Helper\HelperGlobal.cs" />
<Compile Include="Model\ComunDef.cs" />
<Compile Include="Model\contract\IprocessManager.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\FinProcServ.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\Comun\MarchandoUnaDeViewModel.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\Comun\MarchandoUnaDe.xaml.cs">
<DependentUpon>MarchandoUnaDe.xaml</DependentUpon>
</Compile>
<Compile Include="View\Configuracion\PropertyGridFilePickerFolder.xaml.cs">
<DependentUpon>PropertyGridFilePickerFolder.xaml</DependentUpon>
</Compile>
<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>
<Resource Include="OliviaIconPro.ico" />
</ItemGroup>
<ItemGroup>
<Page Include="View\Comun\MarchandoUnaDe.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Configuracion\PropertyGridFilePickerFolder.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<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="DarkImages\GenericButtonGreen16.png" />
</ItemGroup>
<ItemGroup>
<AddInContent Include="DarkImages\GenericButtonGreen32.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="View\OliviaIconPro16.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="View\OliviaIconPro.ico" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\inicio.png" />
<Resource Include="Resources\ptosctrl.png" />
<Resource Include="Resources\time.png" />
<Resource Include="Resources\zonas.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\openfolder.png" />
</ItemGroup>
<ItemGroup>
<AddInContent Include="Images\reco2.png" />
</ItemGroup>
<ItemGroup>
<AddInContent Include="Images\carrito2.png" />
</ItemGroup>
<ItemGroup>
<AddInContent Include="Images\config2_olv.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\help16Pro.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="DotNetProjects.Extended.Wpf.Toolkit" Version="5.0.103" />
<PackageReference Include="Microsoft.WindowsAPICodePack.Shell" Version="1.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<Reference Include="ArcGIS.Desktop.Framework">
<HintPath>C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Framework.dll</HintPath>
<CopyLocal>false</CopyLocal>
</Reference>
<Reference Include="ArcGIS.Core">
<HintPath>C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Core.dll</HintPath>
<CopyLocal>false</CopyLocal>
</Reference>
<Reference Include="ArcGIS.Desktop.Core">
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\Core\ArcGIS.Desktop.Core.dll</HintPath>
<CopyLocal>false</CopyLocal>
</Reference>
<Reference Include="ArcGIS.Desktop.Layouts">
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\Layout\ArcGIS.Desktop.Layouts.dll</HintPath>
</Reference>
<Reference Include="ArcGIS.Desktop.Mapping">
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\Mapping\ArcGIS.Desktop.Mapping.dll</HintPath>
<CopyLocal>false</CopyLocal>
</Reference>
<Reference Include="ArcGIS.Desktop.Catalog">
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\Catalog\ArcGIS.Desktop.Catalog.dll</HintPath>
<CopyLocal>false</CopyLocal>
</Reference>
<Reference Include="ArcGIS.Desktop.Shared.Wpf">
<HintPath>C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Shared.Wpf.dll</HintPath>
<CopyLocal>false</CopyLocal>
</Reference>
<Reference Include="ArcGIS.Desktop.Editing">
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\Editing\ArcGIS.Desktop.Editing.dll</HintPath>
<CopyLocal>false</CopyLocal>
</Reference>
<Reference Include="ArcGIS.Desktop.Extensions">
<HintPath>C:\Program Files\ArcGIS\Pro\bin\Extensions\DesktopExtensions\ArcGIS.Desktop.Extensions.dll</HintPath>
<CopyLocal>false</CopyLocal>
</Reference>
</ItemGroup>
<ItemGroup>
<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')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!--
PackageAction can be:
BuildDefault: ArcGIS Pro is required. An esriAddinX package is created and copied to ArcGIS Pro add-in folder.
BuildZipPostProcess: ArcGIS Pro install is NOT required to build the add-in. An esriAddinX package is created in your output folder.
BuildNoPostProcess: ArcGIS Pro install is NOT required to build the add-in. An esriAddinX package is NOT created.
-->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PackageAction>BuildDefault</PackageAction>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PackageAction>BuildDefault</PackageAction>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<UsingTask AssemblyFile="$(ArcGISFolder)\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.PackageAddIn" />
<UsingTask AssemblyFile="$(ArcGISFolder)\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.CleanAddIn" />
<UsingTask AssemblyFile="$(ArcGISFolder)\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.ConvertToRelativePath" />
<!--<Import Project="Esri.ArcGISPro.Extensions.targets" Condition="Exists('Esri.ArcGISPro.Extensions.targets')" />-->
<Import Project="$(ArcGISFolder)\bin\Esri.ProApp.SDK.Desktop.targets" Condition="Exists('$(ArcGISFolder)\bin\Esri.ProApp.SDK.Desktop.targets') AND !Exists('Esri.ArcGISPro.Extensions.targets')" />
<!-- 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>

View File

@ -1,156 +1,344 @@
<?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>
<TargetFramework>net6.0-windows</TargetFramework>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<NoWarn>CA1416</NoWarn>
<UseWPF>true</UseWPF>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{10742570-CF59-42F2-BEA2-2A38002A06EE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OliviaAddInPro</RootNamespace>
<AssemblyName>OliviaAddInPro</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
</PropertyGroup>
<PropertyGroup>
<ArcGISFolder>$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISPro', 'InstallDir', null, RegistryView.Registry64))</ArcGISFolder>
<ArcGISFolder Condition="'$(ArcGISFolder)' == ''">$(registry:HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro@InstallDir)</ArcGISFolder>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ArcGISFolder)\bin\ArcGISPro.exe</StartProgram>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<StartAction>Program</StartAction>
<StartProgram>$(ArcGISFolder)\bin\ArcGISPro.exe</StartProgram>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Compile Remove=".git\**" />
<EmbeddedResource Remove=".git\**" />
<None Remove=".git\**" />
<Page Remove=".git\**" />
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="WindowsBase" />
<Reference Include="System.Xaml" />
<Reference Include="ArcGIS.Desktop.Framework">
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Framework.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Core">
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Core">
<HintPath>$(ArcGISFolder)\bin\Extensions\Core\ArcGIS.Desktop.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Mapping">
<HintPath>$(ArcGISFolder)\bin\Extensions\Mapping\ArcGIS.Desktop.Mapping.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Catalog">
<HintPath>$(ArcGISFolder)\bin\Extensions\Catalog\ArcGIS.Desktop.Catalog.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Editing">
<HintPath>$(ArcGISFolder)\bin\Extensions\Editing\ArcGIS.Desktop.Editing.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Extensions">
<HintPath>$(ArcGISFolder)\bin\Extensions\DesktopExtensions\ArcGIS.Desktop.Extensions.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.GeoProcessing">
<HintPath>$(ArcGISFolder)\bin\Extensions\GeoProcessing\ArcGIS.Desktop.GeoProcessing.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Layouts">
<HintPath>$(ArcGISFolder)\bin\Extensions\Layout\ArcGIS.Desktop.Layouts.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Shared.Wpf">
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Shared.Wpf.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Ribbon.Wpf">
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Ribbon.Wpf.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.DataGrid.Contrib.Wpf">
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.DataGrid.Contrib.Wpf.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Resources">
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Resources.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ArcGIS.Desktop.Resources">
<HintPath>$(ArcGISFolder)\bin\ArcGIS.Desktop.Resources.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="ESRI.ArcGIS.ItemIndex">
<HintPath>$(ArcGISFolder)\bin\ESRI.ArcGIS.ItemIndex.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Xceed.Wpf.Toolkit">
<HintPath>..\wpftoolkit-master\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit\bin\Release\Xceed.Wpf.Toolkit.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="Config.daml" />
<Content Include="Images\AddInDesktop16.png" />
<Content Include="Images\AddInDesktop32.png" />
<Content Include="DarkImages\AddInDesktop16.png" />
<Content Include="DarkImages\AddInDesktop32.png" />
<Content Include="DarkImages\GenericButtonBlue16.png" />
<Content Include="DarkImages\GenericButtonBlue32.png" />
<Content Include="Images\OliviaIconPro16.png" />
<Content Include="Images\OliviaIconPro32.png" />
<Content Include="DarkImages\GenericButtonPurple16.png" />
<Content Include="DarkImages\GenericButtonPurple32.png" />
<Content Include="DarkImages\GenericButtonGreen16.png" />
<Content Include="DarkImages\GenericButtonGreen32.png" />
<Content Include="Images\reco2.png" />
<Content Include="Images\carrito2.png" />
<Content Include="Images\config2_olv.png" />
<AddInContent Include="Config.daml" />
<AddInContent Include="Images\AddInDesktop16.png" />
<AddInContent Include="Images\AddInDesktop32.png" />
<AddInContent Include="DarkImages\AddInDesktop16.png" />
<AddInContent Include="DarkImages\AddInDesktop32.png" />
</ItemGroup>
<ItemGroup>
<Compile Include="Button\ButtonConfig.cs" />
<Compile Include="Button\ButtonLimp.cs" />
<Compile Include="Button\ButtonMaq.cs" />
<Compile Include="Button\ButtonRec.cs" />
<Compile Include="Conexion\Cstr_socket.cs" />
<Compile Include="Helper\EnabledComboBoxItem.cs" />
<Compile Include="Helper\CheckedListItem.cs" />
<Compile Include="Helper\HelperGdb.cs" />
<Compile Include="Helper\HelperGlobal.cs" />
<Compile Include="Model\ComunDef.cs" />
<Compile Include="Model\ESRI.ArcGIS.Geometry.esriSRProjCS4Type.cs" />
<Compile Include="Model\Recogida.cs" />
<Compile Include="Model\RecogidaDef.cs" />
<Compile Include="Model\Respuesta.cs" />
<Compile Include="Model\TratamientoComun.cs" />
<Compile Include="Model\Limpieza.cs" />
<Compile Include="Model\LimpiezaDef.cs" />
<Compile Include="Services\EjecServ.cs" />
<Compile Include="Model\OliviaConf.cs" />
<Compile Include="Model\OliviaDef.cs" />
<Compile Include="Services\ConfigServ.cs" />
<<<<<<< HEAD
<Compile Include="Services\LanzaSrv\LanzaLimpSrv.cs" />
<Compile Include="Services\LanzaSrv\LanzaOlvServ.cs" />
<Compile Include="Services\LanzaSrv\LanzaRecoSrv.cs" />
=======
<Compile Include="Services\ImportaResServ.cs" />
>>>>>>> Elena/reco
<Compile Include="Services\LimpiezaServ.cs" />
<Compile Include="Services\RecogidaServ.cs" />
<Compile Include="ViewModel\Configuracion\DockpaneConfigViewModel.cs" />
<Compile Include="ViewModel\Configuracion\PaneConfigViewModel.cs" />
<Compile Include="ViewModel\OptionsMenuItem.cs" />
<Compile Include="ViewModel\PaneEjecutarViewModel.cs" />
<Compile Include="ViewModel\Limpieza\PaneLimpiezaSub4ViewModel.cs" />
<Compile Include="ViewModel\Limpieza\PaneLimpiezaSub3ViewModel.cs" />
<Compile Include="ViewModel\Limpieza\PaneLimpiezaSub2ViewModel.cs" />
<Compile Include="ViewModel\Limpieza\PaneLimpiezaViewModel.cs" />
<Compile Include="ViewModel\PanelViewModelBase.cs" />
<Compile Include="ViewModel\Recogida\PaneRecogidaSub1ViewModel.cs" />
<Compile Include="View\Recogida\PaneRecogidaSub1.xaml.cs">
<DependentUpon>PaneRecogidaSub1.xaml</DependentUpon>
</Compile>
<Compile Include="View\Recogida\PaneRecogida.xaml.cs">
<DependentUpon>PaneRecogida.xaml</DependentUpon>
</Compile>
<Compile Include="ViewModel\Recogida\PaneRecogidaViewModel.cs" />
<Compile Include="View\Configuracion\DockPaneConfig.xaml.cs">
<DependentUpon>DockPaneConfig.xaml</DependentUpon>
</Compile>
<Compile Include="View\Configuracion\PaneConfigView.xaml.cs">
<DependentUpon>PaneConfigView.xaml</DependentUpon>
</Compile>
<Compile Include="View\PaneEjecutar.xaml.cs">
<DependentUpon>PaneEjecutar.xaml</DependentUpon>
</Compile>
<Compile Include="View\Limpieza\PaneLimpiezaSub4.xaml.cs">
<DependentUpon>PaneLimpiezaSub4.xaml</DependentUpon>
</Compile>
<Compile Include="View\Limpieza\PaneLimpiezaSub3.xaml.cs">
<DependentUpon>PaneLimpiezaSub3.xaml</DependentUpon>
</Compile>
<Compile Include="View\Limpieza\PaneLimpiezaSub2.xaml.cs">
<DependentUpon>PaneLimpiezaSub2.xaml</DependentUpon>
</Compile>
<Compile Include="View\Limpieza\PaneLimpiezaSub1.xaml.cs">
<DependentUpon>PaneLimpiezaSub1.xaml</DependentUpon>
</Compile>
<Compile Include="ViewModel\Limpieza\PaneLimpiezaSub1ViewModel.cs" />
<Compile Include="View\Limpieza\PaneLimpieza.xaml.cs">
<DependentUpon>PaneLimpieza.xaml</DependentUpon>
</Compile>
<Compile Include="View\Limpieza\DockpaneLimpieza.xaml.cs">
<DependentUpon>DockpaneLimpieza.xaml</DependentUpon>
</Compile>
<Compile Include="ViewModel\Limpieza\DockpaneLimpiezaViewModel.cs" />
<Compile Include="View\Recogida\DockpaneRecogida.xaml.cs">
<DependentUpon>DockpaneRecogida.xaml</DependentUpon>
</Compile>
<Compile Include="ViewModel\Recogida\DockpaneRecogidaViewModel.cs" />
<Compile Include="Module1.cs" />
<Compile Include="Model\OliviaGlob.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Resource1.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resource1.resx</DependentUpon>
</Compile>
<Compile Include="View\ProWndSelectFields.xaml.cs">
<DependentUpon>ProWndSelectFields.xaml</DependentUpon>
</Compile>
<Compile Include="ViewModel\ShowProWndSelectFields.cs" />
</ItemGroup>
<ItemGroup>
<AddInContent Include="DarkImages\GenericButtonBlue16.png" />
</ItemGroup>
<ItemGroup>
<AddInContent Include="DarkImages\GenericButtonBlue32.png" />
</ItemGroup>
<ItemGroup>
<AddInContent Include="Images\OliviaIconPro16.png" />
<AddInContent Include="Images\OliviaIconPro32.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="OliviaIconPro.ico" />
</ItemGroup>
<ItemGroup>
<Page Include="View\Recogida\PaneRecogidaSub1.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="View\Recogida\PaneRecogida.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Configuracion\DockPaneConfig.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Configuracion\PaneConfigView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\PaneEjecutar.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="View\Limpieza\PaneLimpiezaSub4.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="View\Limpieza\PaneLimpiezaSub3.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="View\Limpieza\PaneLimpiezaSub2.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="View\Limpieza\PaneLimpiezaSub1.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Limpieza\PaneLimpieza.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Limpieza\DockpaneLimpieza.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Recogida\DockpaneRecogida.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\ProWndSelectFields.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<AddInContent Include="DarkImages\GenericButtonPurple16.png" />
</ItemGroup>
<ItemGroup>
<AddInContent Include="DarkImages\GenericButtonPurple32.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resource1.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resource1.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<AddInContent Include="Images\config.png" />
</ItemGroup>
<ItemGroup>
<AddInContent Include="DarkImages\GenericButtonGreen16.png" />
</ItemGroup>
<ItemGroup>
<AddInContent Include="DarkImages\GenericButtonGreen32.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="View\OliviaIconPro16.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="View\OliviaIconPro.ico" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\inicio.png" />
<Resource Include="Resources\ptosctrl.png" />
<Resource Include="Resources\time.png" />
<Resource Include="Resources\zonas.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\openfolder.png" />
<Resource Include="Images\help16Pro.png" />
</ItemGroup>
<<<<<<< HEAD
<ItemGroup>
<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 />
=======
<ItemGroup>
<AddInContent Include="Images\config2.png" />
<AddInContent Include="Images\reco2.png" />
</ItemGroup>
<ItemGroup>
<AddInContent Include="Images\carrito2.png" />
</ItemGroup>
>>>>>>> Elena/reco
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!--
PackageAction can be:
@ -164,17 +352,12 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PackageAction>BuildDefault</PackageAction>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<UsingTask AssemblyFile="$(ArcGISFolder)\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.PackageAddIn" />
<UsingTask AssemblyFile="$(ArcGISFolder)\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.CleanAddIn" />
<UsingTask AssemblyFile="$(ArcGISFolder)\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.ConvertToRelativePath" />
<!--<Import Project="Esri.ArcGISPro.Extensions.targets" Condition="Exists('Esri.ArcGISPro.Extensions.targets')" />-->
<Import Project="$(ArcGISFolder)\bin\Esri.ProApp.SDK.Desktop.targets" Condition="Exists('$(ArcGISFolder)\bin\Esri.ProApp.SDK.Desktop.targets') AND !Exists('Esri.ArcGISPro.Extensions.targets')" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
@ -185,5 +368,4 @@
<!--<Target Name="BeforeBuild">
<Error Text="C:\Users\Elena\AppData\Local\Programs\ArcGIS\Pro\bin\Esri.ProApp.SDK.Desktop.targets not found." Condition="!Exists('C:\Users\Elena\AppData\Local\Programs\ArcGIS\Pro\bin\Esri.ProApp.SDK.Desktop.targets') AND !Exists('Esri.ArcGISPro.Extensions.targets')" />
</Target>-->
>>>>>>> origin/develop
</Project>

View File

@ -1,4 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30011.22
@ -8,25 +8,13 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Debug|x64.ActiveCfg = Debug|Any CPU
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Debug|x64.Build.0 = Debug|Any CPU
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Debug|x86.ActiveCfg = Debug|Any CPU
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Debug|x86.Build.0 = Debug|Any CPU
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Release|Any CPU.Build.0 = Release|Any CPU
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Release|x64.ActiveCfg = Release|Any CPU
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Release|x64.Build.0 = Release|Any CPU
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Release|x86.ActiveCfg = Release|Any CPU
{10742570-CF59-42F2-BEA2-2A38002A06EE}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("VSM - Narvaling")]
[assembly: AssemblyProduct("OliviaAddInPro")]
[assembly: AssemblyCopyright("Copyright © VSM 2023")]
[assembly: AssemblyCopyright("Copyright © VSM 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.2.0.0")]
[assembly: AssemblyFileVersion("3.2.0.0")]
[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyFileVersion("3.0.0.0")]

View File

@ -1,8 +0,0 @@
{
"profiles": {
"OliviaAddInPro": {
"commandName": "Executable",
"executablePath": "C:\\Program Files\\ArcGIS\\Pro\\bin\\ArcGISPro.exe"
}
}
}

View File

@ -12,10 +12,10 @@ namespace OliviaAddInPro.Services
{
class ConfigServ
{
private static string pathConfigDef = "C:\\Olivia";
private static string pathConfigDef = "C:\\Olivia\\olv.conf";
private static ConfigServ configServ=null;
private static string nameDirWork = "%dir_work%";
public const string OlvRegKey = "SOFTWARE\\Narvaling\\Olivia_3_1";
public const string OlvRegKey = "SOFTWARE\\Narvaling\\Olivia_3_0";
public const string OlvRegName = "workdir";
public const string OlvConfigName = "olv.conf";
@ -44,12 +44,6 @@ namespace OliviaAddInPro.Services
if(res==null)
res = Default();
//pilla la IP
if(res.Ip.CompareTo("0.0.0.0")==0)
{
//coge la IP local
res.Ip = OliviaGlob.Conexion.Ip;
}
res.PathGdbGen = pon_path_absoluto(res.PathGdbGen, res.path_work);
res.PathSimbVSM = pon_path_absoluto(res.PathSimbVSM, res.path_work);
@ -60,10 +54,6 @@ namespace OliviaAddInPro.Services
res.path_exe = pon_path_absoluto(res.path_exe, res.path_work);
res.path_manual = pon_path_absoluto(res.path_manual, res.path_work);
//chapa
if (res.path_manual.Contains("Manual_Olivia_3_0.pdf"))
res.path_manual.Replace("Manual_Olivia_3_0.pdf", "Manual_Olivia.pdf");
//////////////
res.path_temp = pon_path_absoluto(res.path_temp, res.path_work);
res.path_data = pon_path_absoluto(res.path_data, res.path_work);
res.path_cfg_aux = @"%dir_work%cfg.ini";
@ -71,9 +61,8 @@ namespace OliviaAddInPro.Services
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_manual = pon_path_relativo(conf.path_manual, conf.path_work);
conf.path_temp = pon_path_relativo(conf.path_temp, conf.path_work);
@ -85,19 +74,11 @@ namespace OliviaAddInPro.Services
conf.PathSimbESRI = pon_path_relativo(conf.PathSimbESRI, 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);
try
{
string jsonString = JsonConvert.SerializeObject(conf);
var path_cfg = GetPathConfig();
path_cfg = Path.Combine(path_cfg, OlvConfigName);
File.WriteAllText(path_cfg, jsonString);
}
catch(Exception ex)
{
resp.Error.Add("Error al guardar archivo: " + ex.Message);
resp.Value = false;
}
string jsonString = JsonConvert.SerializeObject(conf);
var path_cfg = GetPathConfig();
path_cfg = Path.Combine(path_cfg, OlvConfigName);
File.WriteAllText(path_cfg, jsonString);
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);
@ -109,8 +90,6 @@ namespace OliviaAddInPro.Services
conf.PathSimbESRI = pon_path_absoluto(conf.PathSimbESRI, conf.path_work);
conf.PathCartela = pon_path_absoluto(conf.PathCartela, conf.path_work);
conf.Path_Eje_via = pon_path_absoluto(conf.Path_Eje_via, conf.path_work);
return resp;
}
/**
* cambia la carpeta referida a directorio de trabajo por los caracteres OliviaDirWork (%dir_work%)
@ -178,20 +157,17 @@ namespace OliviaAddInPro.Services
c.consulta_sector = "SECTOR";
c.consulta_secuen = "SECUENCIA";
c.Igno_ais = true;
//c.red_carreteras = @"%dir_work%Datos\gdbs\TomTom_Q4_2015.gdb";
c.Puerto = 19995;
c.puerto = 19995;
c.buffer_export = 1000;
c.path_exe=@"%dir_work%bin\OliviaTasks.exe";
c.path_manual= @"%dir_work%Manual_Olivia.pdf";
c.path_manual= @"%dir_work%Manual_Olivia_3_0.pdf";
c.path_temp = @"%dir_work%temp\";
c.path_data=@"%dir_work%data\";
c.Path_Eje_via = "";
c.Path_Gdb_Import = "";
c.Path_Guarda_Csv = "";
c.Path_Dataset_Import = "";
c.path_cfg_aux = @"%dir_work%cfg.ini";
/*c.eje_via = "TomTom_Q4_2015___nw";
c.municipios = "TomTom_Q4_2015___a8";*/
@ -266,7 +242,6 @@ namespace OliviaAddInPro.Services
c.t_carga_desc=40;
c.t_descanso=30;
c.hora_inicio=420; //ES UNA HORA, SON LOS MINUTOS DESDE LAS 00, PERO TIENE QUE APARECER CON FORMATO DE TIME 07:30, POR EJEMPLO
c.reduc_traf = 80;
c.ancho_via=2;
c.t_tratamiento_BarMan=2900;
c.t_tratamiento_BarManMant=2900;
@ -305,15 +280,24 @@ namespace OliviaAddInPro.Services
c.v_desp_LZI=0;
c.v_desp_LPip=0;
c.v_desp_LS=0;
c.Giro_max_vehiculo=175.0000000;
c.Ancho_peat_def=6.0000000;
c.Ancho_acera_def=1.5000000;
c.Ancho_ap_lin_def=2.0000000;
c.Ancho_ap_bat_def=4.0000000;
c.Ancho_bord_lib_def=1.5000000;
c.Desv_max=0.1500000;
c.Desv_max_abs=1800.0000000;
//Reco
c.id= "ID";
c.id= "OBJECTID";
c.nomrec= "NOMB_TIP_REC";
c.lateralidad= "LATERALIDAD";
c.frac= "FRACCION";
c.capac= "CAPACIDAD";
c.uds= "UNIDADES";
c.kgrec= "Kg_Recog";
c.kgrec= "KGRECO";
c.kgrec_val=200;
c.is_lleno=false;
c.is_campo=false;
@ -371,7 +355,7 @@ namespace OliviaAddInPro.Services
c.t_vaci_lateral=90;
c.t_vaci_superior=180;
c.t_vaci_bilateral=100;
c.t_vaci_bolseo=5*60;
c.t_vaci_bolseo=5;
c.t_vaci_lavado=60;
c.t_vaci_otra=60;
c.kgmax_max=20000;
@ -387,16 +371,6 @@ namespace OliviaAddInPro.Services
c.atr_FT="FT";
c.atr_N = "N";
c.atr_pedes="14";
c.Ancho_peat_def = 6.0000000;
c.Ancho_acera_def = 1.5000000;
c.Ancho_ap_lin_def = 2.0000000;
c.Ancho_ap_bat_def = 4.0000000;
c.Ancho_bord_lib_def = 1.5000000;
c.Giro_max_vehiculo = 175.0000000;
c.Desv_max = 0.1500000;
c.Desv_max_abs = 1800.0000000;
return c;
}
}

View File

@ -10,7 +10,6 @@ using OliviaAddInPro.Helper;
using ArcGIS.Core.Internal.Data;
using ArcGIS.Desktop.Framework.Threading.Tasks;
using System.Windows;
using System.IO;
namespace OliviaAddInPro.Services
{
@ -57,8 +56,6 @@ namespace OliviaAddInPro.Services
{
ErrStr = string.Empty;
OliviaGlob.Paths.PathData = string.Empty;
OliviaGlob.Paths.PathNW = string.Empty;
if (com.ProgrSrc._ProgrSrc.Getcancelled())
{
ErrStr = Resource1.String_cancel_progreso;
@ -78,14 +75,8 @@ namespace OliviaAddInPro.Services
ErrStr = Resource1.String_cancel_progreso;
return false;
}
//////////////////////////////////////////////
///Se guarda el nombre de los campos originales
///
com.GuardaCamposOrig(com.CapaElems);
//Cuenta las filas que cumplen la consulta
var nelems = HelperGdb.GetNumElemsSync(com.CapaElems, com.ConsultaAmbs);
int nelems = HelperGdb.GetNumElemsSync(com.CapaElems, com.ConsultaAmbs);
if (nelems <= 0)
{
ErrStr = "No existen ámbitos que cumplan las condiciones introducidas para la exportación " + com.ConsultaAmbs;
@ -165,33 +156,25 @@ namespace OliviaAddInPro.Services
com.NombreShpExport = PREF_NAME_EXPORT + com.NombreShpExp_PrefTto + "_" + fechaHora + EXT_SHP;
com.ProgrSrc.IncMessage(10, "Exportando ámbitos de trabajo");//10%
//Guarda el nombre
OliviaGlob.Paths.PathData = OliviaGlob.Paths.DirData + com.NombreShpExport;
//exporta los datos de entrada
if (!HelperGdb.ExportShp2(com.CapaElems, filtroEspacial, com.NombreShpExport, OliviaGlob.Paths.DirData, com.ProgrSrc._ProgrSrc, null, 50))
{
ErrStr = "Error al exportar los ámbitos: " + HelperGdb.OutStr;
return false;
}
if (com.ProgrSrc._ProgrSrc.Getcancelled())
{
ErrStr = Resource1.String_cancel_progreso;
return false;
}
/////////////////////////////////////////////////////////////////////
///Comprueba si está la columna de ObjectId y si no, la crea
if(!ComprCreaColOid(OliviaGlob.Paths.PathData, com.CapaElems, filtroEspacial))
{
ErrStr = "Error al exportar columna " + ComunDef.CamposCom.camp_oid;
return false;
}
//Guarda el nombre
OliviaGlob.Paths.PathData = OliviaGlob.Paths.DirData + com.NombreShpExport;
///////////////////////////////////////////////////////////////////////
//ahora si está en modo planificación, ya ha hecho una ejec antes y la capa no tiene esa columna pero la tiene guardada de la ejec anterior, exporta la sectorización
if (modo==ModosEjec.Planifica && !string.IsNullOrEmpty(com.CapaPlanif) && OliviaGlob.IsConfig2())
//ahora si está en modo planificación y la capa no tiene esa columna, exporta la sectorización
if (modo==ModosEjec.Planifica && !string.IsNullOrEmpty(com.CapaPlanif))
{
string capa_principal = System.IO.Path.GetFileNameWithoutExtension(OliviaGlob.Paths.PathData);
HelperGdb.CloseLayer(capa_principal);
@ -254,7 +237,22 @@ namespace OliviaAddInPro.Services
{
ErrStr = "Error al añadir buffer a la geometría";
return false;
}
}
//quita las restricciones
if (com.GeomRestr != null)
{
geom_export = HelperGdb.QuitaGeom(geom_export, com.GeomRestr);
if (geom_export == null)
{
ErrStr = "Error al intersecar con las restricciones.";
return false;
}
}
if (com.ProgrSrc._ProgrSrc.Getcancelled())
{
ErrStr = Resource1.String_cancel_progreso;
return false;
}
//////////////////////////////////////////////////////////////
//comprueba si la geometría de exportación contiene a la instalación y a la planta de descarga
for (int i = 0; i < coords.Length; i++)
@ -287,28 +285,13 @@ namespace OliviaAddInPro.Services
else
ErrStr = "Error al incluir punto de instalación en polígono de exportación.";
return false;
}
}
//actualiza la geometría
geom_export = respGeom.Value;
}
}
}
}
//quita las restricciones de circ
if (com.GeomRestr != null)
{
geom_export = HelperGdb.QuitaGeom(geom_export, com.GeomRestr);
if (geom_export == null)
{
ErrStr = "Error al intersecar con las restricciones.";
return false;
}
}
if (com.ProgrSrc._ProgrSrc.Getcancelled())
{
ErrStr = Resource1.String_cancel_progreso;
return false;
}
//mira spatialreference del nw
/*FeatureClass fc = HelperGdb.GetFtClass(OliviaGlob.Paths.PathGdbNw);
@ -331,11 +314,7 @@ namespace OliviaAddInPro.Services
* /
}
}*/
//////////////////////////////////////
//guarda la mima de la geometría de la red navegable a exportar
com.MimaNw = geom_export.Extent;
//////////////////////////////////////
///
//Hace el filtro con la geometría final
filtroEspacial = HelperGdb.CreateFiler(String.Empty, geom_export);
if (filtroEspacial == null)
@ -353,14 +332,14 @@ namespace OliviaAddInPro.Services
//Prepara nombre de exportación
com.NombreShpExportNw = PREF_NAME_EXPORT_NW + fechaHora + EXT_SHP;
//guarda los nombres del shape
OliviaGlob.Paths.PathNW = OliviaGlob.Paths.DirData + com.NombreShpExportNw;
//exporta los datos de entrada
if (!HelperGdb.ExportShp2(OliviaGlob.Paths.PathGdbNw, filtroEspacial, com.NombreShpExportNw, OliviaGlob.Paths.DirData, com.ProgrSrc._ProgrSrc, spatRefData,100))
{
ErrStr = "Error al exportar la red navegable: " + HelperGdb.OutStr;
return false;
}
}
//guarda los nombres del shape
OliviaGlob.Paths.PathNW = OliviaGlob.Paths.DirData + com.NombreShpExportNw;
if (com.ProgrSrc._ProgrSrc.Getcancelled())
{
ErrStr = Resource1.String_cancel_progreso;
@ -384,13 +363,13 @@ namespace OliviaAddInPro.Services
//Añade al shp exportado la columna de sector y secuencia
HelperGdb.FieldToAdd[] fields = new HelperGdb.FieldToAdd[2];
//campo SECTOR
fields[0].Name = ComunDef.CamposCom.consulta_sector;
fields[0].Alias = ComunDef.CamposCom.consulta_sector;
fields[0].Name = LimpiezaDef.Campos.consulta_sector;
fields[0].Alias = LimpiezaDef.Campos.consulta_sector;
fields[0].Tipo = "LONG";
fields[0].Length = 0;
//campo SECUENCIA
fields[1].Name = ComunDef.CamposCom.consulta_secuen;
fields[1].Alias = ComunDef.CamposCom.consulta_secuen;
fields[1].Name = LimpiezaDef.Campos.consulta_secuen;
fields[1].Alias = LimpiezaDef.Campos.consulta_secuen;
fields[1].Tipo = "LONG";
fields[1].Length = 0;
@ -431,8 +410,8 @@ namespace OliviaAddInPro.Services
{
//context.Invalidate(rowshp);
// modify and execute
modifyOp.Modify(rowshp, ComunDef.CamposCom.consulta_sector, rowsecto[ComunDef.CamposCom.consulta_sector]);
modifyOp.Modify(rowshp, ComunDef.CamposCom.consulta_secuen, rowsecto[ComunDef.CamposCom.consulta_secuen]);
modifyOp.Modify(rowshp, LimpiezaDef.Campos.consulta_sector, rowsecto[LimpiezaDef.Campos.consulta_sector]);
modifyOp.Modify(rowshp, LimpiezaDef.Campos.consulta_secuen, rowsecto[LimpiezaDef.Campos.consulta_secuen]);
rowshp.Store();
//context.Invalidate(rowshp);
}
@ -514,103 +493,8 @@ namespace OliviaAddInPro.Services
}
/**
* Comrpueba si existe la columna de oid y si no, la crea y la rellena
* Prepara la geometría para exportar los ámbitos
*/
public bool ComprCreaColOid(string pathCapa, string pathCapaOrig, SpatialQueryFilter filter)
{
//comprueba si está el campo
bool compCamp = HelperGdb.CheckField(pathCapa, ComunDef.CamposCom.camp_oid);
ErrStr = HelperGdb.OutStr;
if (compCamp)
return true; //tiene el campo
//no lo tiene, lo crea
//Añade al shp exportado la columna de sector y secuencia
HelperGdb.FieldToAdd[] fields = new HelperGdb.FieldToAdd[1];
//campo
fields[0].Name = ComunDef.CamposCom.camp_oid;
fields[0].Alias = ComunDef.CamposCom.camp_oid;
fields[0].Tipo = "LONG";
fields[0].Length = 0;
if (!HelperGdb.AddFieldsSync(pathCapa, fields))
return false;
//vuelve a cerrar la capa
string capa_principal = System.IO.Path.GetFileNameWithoutExtension(pathCapa);
HelperGdb.CloseLayer(capa_principal);
/////////////////////////////////////////////////////
//Coge los ids de la capa de la que ha exportado
using (FeatureClass fc_orig = HelperGdb.GetFtClassSync(pathCapaOrig))
{
if (fc_orig == null)
return false;
List<long> ids = new List<long>();
//Añade a la lista los ids que cumplen el filtro espacial
try
{
ids = fc_orig.Select(filter, SelectionType.ObjectID, SelectionOption.Normal).GetObjectIDs().ToList();
}
catch
{
ids = new List<long>();
}
//Comprueba que hay tantos ids como elementos en el shp
using (FeatureClass fc_shp = HelperGdb.GetFtClassSync(pathCapa))
{
if (fc_shp == null)
return false;
long nelem_shp = HelperGdb.GetNumElemsSync(fc_shp);
if (nelem_shp != ids.Count)
return false;
/////////////////////////////////////////////////////
//ahora rellena las columnas
try
{
using (RowCursor rc_shp = fc_shp.Search())
{
if (rc_shp == null)
return false;
var modifyOp = new ArcGIS.Desktop.Editing.EditOperation();
modifyOp.Name = "Actualiza OID";
bool ex = false;
//modifyOp.Callback((context) =>
//{
int i = 0;
while (rc_shp.MoveNext() && i < ids.Count)
{
using (Row rowshp = rc_shp.Current)
{
//context.Invalidate(rowshp);
// modify and execute
modifyOp.Modify(rowshp, ComunDef.CamposCom.camp_oid, ids[i++]);
rowshp.Store();
//context.Invalidate(rowshp);
}
}
//}, fc_shp);
ex = modifyOp.Execute();
ArcGIS.Desktop.Core.Project.Current.SaveEditsAsync();
if (ex && modifyOp.IsDone)
return true;
else
return false;
}
}
catch
{
return false;
}
return true;
}
}
}
/**
* Prepara la geometría para exportar los ámbitos
*/
public Geometry GetGeomAmbitsExport()
{
Geometry geomAux = null;
@ -632,13 +516,11 @@ namespace OliviaAddInPro.Services
if (geomAux == null)
{
ErrStr = "Error al intersecar zonas y/o niveles.";
HelperGdb.Free(fc);
return null;
}
if (geomAux.IsEmpty)
{
ErrStr = "No existen ámbitos en la intersección entre zonas y/o niveles.";
HelperGdb.Free(fc);
return null;
}
}
@ -646,7 +528,6 @@ namespace OliviaAddInPro.Services
if ((geomAux == null) && (com.CapaElems == OliviaGlob.Paths.PathGdbNw))
{
ErrStr = "Al emplear ejes de calle como ámbitos es necesario indicar polígono de exportación";
HelperGdb.Free(fc);
return null;
}
@ -655,11 +536,10 @@ namespace OliviaAddInPro.Services
//if (geomAux == null)
{
//Ahora hace la geometría de los ámbitos que cumplen la consulta
geomAmbits = HelperGdb.GetGeomUnique(fc, filtro);
geomAmbits = HelperGdb.GetGeomConvexHullSync(fc, filtro);
if (geomAmbits == null || geomAmbits.IsEmpty)
{
ErrStr = "No se ha podido generar geometría de los ámbitos" + com.ConsultaAmbs + HelperGdb.OutStr;
HelperGdb.Free(fc);
return null;
}
if (geomAux == null)
@ -667,7 +547,7 @@ namespace OliviaAddInPro.Services
else
{
geomAux = HelperGdb.IntersectGeom(geomAux, geomAmbits);
//geomAux = GeometryEngine.Instance.ConvexHull(geomAux);
geomAux = GeometryEngine.Instance.ConvexHull(geomAux);
}
}
//le quita las restricciones
@ -677,7 +557,6 @@ namespace OliviaAddInPro.Services
if (geomAux == null)
{
ErrStr = "Error al intersecar con las restricciones.";
HelperGdb.Free(fc);
return null;
}
}
@ -707,8 +586,8 @@ namespace OliviaAddInPro.Services
int NCAMPS = 2;
string[] camps;
camps = new string[NCAMPS];
camps[0] = ComunDef.CamposCom.consulta_sector;
camps[1] = ComunDef.CamposCom.consulta_secuen;
camps[0] = LimpiezaDef.Campos.consulta_sector;
camps[1] = LimpiezaDef.Campos.consulta_secuen;
return HelperGdb.CheckFiledsSync(pathCapa, camps) == 0;
}
@ -717,16 +596,16 @@ namespace OliviaAddInPro.Services
*/
public bool CompruebaPlanif()
{
//si ha importado seguro que las tiene
if (OliviaGlob.IsConfig2() && !string.IsNullOrEmpty(com.CapaPlanif))
return true;
//comprueba capa
if (ComprCamposPlanif(com.CapaElems))
{
com.CapaPlanif = string.Empty;//reinicia para que coja la secto de la capa original
return true;
}
}
//si ha importado seguro que las tiene
if (OliviaGlob.IsConfig2() && !string.IsNullOrEmpty(com.CapaPlanif))
return true;
return false;
}
@ -734,22 +613,20 @@ namespace OliviaAddInPro.Services
/**
* Realiza las funciones de importación de la sectorización
*/
public Respuesta<string> ImportSecto(string GdbFileName, string FtClssName)
public Respuesta<string> ImportSecto(string GdbFileName)
{
com.ProgrSrc.IncMessage(10,"Importando capas");
var res = Import(GdbFileName, 0, FtClssName);
var res = Import(GdbFileName, 0);
if (res.HasError || string.IsNullOrEmpty(res.Value))
{
return res;
}
}
//////////////////////////////////////////////////
com.ProgrSrc.IncMessage(50, "Pintando capas con valores únicos");
//abre las capas, pintando los sectores
bool mal = false;
string path_import = res.Value;
//abre con valor único
string path_lyr = path_import;
var resb = HelperGdb.OpenLayerUniqueValue(path_lyr, ComunDef.CamposCom.consulta_sector);
var resb = HelperGdb.OpenLayerUniqueValue(path_lyr, LimpiezaDef.Campos.consulta_sector);
if (!resb.Value)
{
res.Error.Add("Error al abrir capa "+ path_lyr + " con Valor único. " + resb.Error.FirstOrDefault());
@ -763,17 +640,15 @@ namespace OliviaAddInPro.Services
/**
* Realiza las funciones de importación de la planificación
*/
public Respuesta<string> ImportPlanif(string GdbFileName, string FtClssName)
public Respuesta<string> ImportPlanif(string GdbFileName)
{
com.ProgrSrc.IncMessage(10, "Importando capas");
var res = Import(GdbFileName, 1, FtClssName);
var res = Import(GdbFileName, 1);
if (res.HasError || string.IsNullOrEmpty(res.Value))
{
res.Value = string.Empty;
return res;
}
//////////////////////////////////////////////////
com.ProgrSrc.IncMessage(30, "Pintando capas con valores únicos");
//abre las capas, pintando los sectores
string path_import = res.Value;
int NOPEN = 6;
@ -803,8 +678,7 @@ namespace OliviaAddInPro.Services
var resb = new Respuesta<bool>();
for(i =0;i<NOPEN;i++)
{
com.ProgrSrc.IncMessage((uint)(60 / NOPEN));
resb = HelperGdb.OpenLayerUniqueValue(path_lyr_arr[i], ComunDef.CamposCom.consulta_sector, visible_arr[i]);
resb = HelperGdb.OpenLayerUniqueValue(path_lyr_arr[i], LimpiezaDef.Campos.consulta_sector, visible_arr[i]);
if (!resb.Value)
break;
}
@ -822,7 +696,7 @@ namespace OliviaAddInPro.Services
/**
* Realiza las funciones de importación, modo 0 secto, modo 1 planif
*/
public Respuesta<string> Import(string GdbFileName, int modo, string FtClssName="")
public Respuesta<string> Import(string GdbFileName, int modo)
{
var res = new Respuesta<string> { Value = string.Empty };
@ -832,6 +706,7 @@ namespace OliviaAddInPro.Services
string shapefile = System.IO.Path.GetFileNameWithoutExtension(path_shape);
int ind = shapefile.IndexOf("_", 0);
string prefijo = shapefile.Substring(ind + 1, 1);
//////////////////////////////////////////////////////////////////////////////////
//decodifica el nombre del shapefile para asignarle el correspondiente nombre en la GDB a la que se importa el shape
string tratamiento = string.Empty;
@ -850,53 +725,14 @@ namespace OliviaAddInPro.Services
/////////////////////////////////////////
/////mira a ver si tiene configurado Dataset
string msg_avisa = string.Empty;
string amb_aux = string.Empty;
bool sobreescribe = false;
if (!string.IsNullOrEmpty(OliviaGlob.Paths.PathDatasetImport))
{
var datname = new System.IO.DirectoryInfo(OliviaGlob.Paths.PathDatasetImport).Name;
var task1 = HelperGdb.CheckDataset(OliviaGlob.Paths.PathDatasetImport);
task1.Wait();
if (task1.Result)
{
tratamiento = datname;
}
else
{
msg_avisa = "No se encuentra el Dataset " + datname + ". ";
}
}
else
{
/////////////////////////////////////////
//no tiene un dataset configurado, saca ventana para elegir uno
//saca ventana para elegir Dataset, si se cancela, se guarda en el nombre por defecto en función del tratamiento y los ámbitos
//HelperGlobal.ponMsg("A continuación, introduzca nombre de Feature Class y ubicación (Dataset) para importación. Si cancela el proceso, se establecerán el nombre y Dataset por defecto en función de los ámbitos y el tratamiento");
string path_aux = FtClssName;
//HelperGdb.SaveFileDlg("Introduzca nombre de Feature Class a importar", GdbFileName, null, ArcGIS.Desktop.Catalog.ItemFilters.featureClasses_all);
if (!string.IsNullOrEmpty(path_aux))
{
tratamiento = new DirectoryInfo(System.IO.Path.GetDirectoryName(path_aux)).Name;
//tratamiento = System.IO.Path.GetFileName(System.IO.Path.GetDirectoryName(path_aux));
amb_aux = System.IO.Path.GetFileNameWithoutExtension(path_aux);
//comprueba si ya existe ese ft class
FeatureClass ft = HelperGdb.GetFtClassSync(path_aux);
if (ft != null)
sobreescribe = true;
HelperGdb.Free(ft);
}
}
//crea el dataset o comprueba si existe
string datasetNameOut = string.Empty;
var resp = HelperGdb.CreateDataset(GdbFileName, tratamiento, spatRefData, out datasetNameOut);
var resp = HelperGdb.CreateDataset(GdbFileName, tratamiento, spatRefData, out datasetNameOut);
string err_spatref = "Atención, no coincide la proyección de las FeatureClass del Dataset ya creado con la del FeatureClass a importar";
if(resp.Value==0)
{
//avisa
msg_avisa += "Se importan los archivos en " + GdbFileName + "\\" + datasetNameOut;
//HelperGlobal.ponMsg("Se importan los archivos en "+ GdbFileName+"\\"+ datasetNameOut);
HelperGlobal.ponMsg("Se importan los archivos en "+ GdbFileName+"\\"+ datasetNameOut);
tratamiento = datasetNameOut;
}
else if (resp.Value == 1)
@ -904,33 +740,18 @@ namespace OliviaAddInPro.Services
res.Error.Add("Error al crear el Dataset para importar " + tratamiento);
return res;
}
else //2 o 4 if (resp.Value == 2)
else if (resp.Value == 2)
{
//avisa
string err_spatref = string.Empty;
if (resp.Value==2)
err_spatref = "Atención, no coincide la proyección de las FeatureClass del Dataset ya creado con la del FeatureClass a importar. ";
msg_avisa = err_spatref + "Se ha creado un nuevo dataset " + datasetNameOut;
//HelperGlobal.ponMsg(err_spatref +", se ha creado un nuevo dataset "+ datasetNameOut );
HelperGlobal.ponMsg(err_spatref +", se ha creado un nuevo dataset "+ datasetNameOut );
tratamiento = datasetNameOut;
}
//avisa ahora para dar tiempo?
if (!string.IsNullOrEmpty(msg_avisa))
{
if(!HelperGlobal.ponMsg(msg_avisa, MessageBoxImage.Question, "OLIVIA", MessageBoxButton.OKCancel))
{
res.Error.Add("Proceso de importación Cancelado por el usuario");
return res;
}
}
string dataset = tratamiento;
string dataset = tratamiento;
/////////////////////////////////////////
if (!string.IsNullOrEmpty(amb_aux))
ambitos = amb_aux;
/////////////////////////////////////////
//todo ok, se pone a importar
string err_st =string.Empty;
string name = ambitos;
string path_import = GdbFileName + "\\" + dataset + "\\" + ambitos;
int NIMPORT;
string[] noms_shp = null;
@ -992,18 +813,7 @@ namespace OliviaAddInPro.Services
/////////////////////////////////////////
//se embucla para hacer todas las importaciones necesarias
for (i = 0; i < NIMPORT; i++)
{
//mira a ver si hay que borrar para reemplazar
if (sobreescribe)
{
resp = HelperGdb.DeleteFeatureClassSync(GdbFileName + "\\" + dataset, noms_gdb[i]);
if (resp.Value!=-2 && resp.Value!=1) //-2 porque puede ser que no pueda abrir la capa porque no existe
{
err_st = "Error al sobreescribir la capa " + noms_gdb[i];
break;
}
}
{
resp2 = HelperGdb.ImportShp(dir_shp + "\\" + noms_shp[i] + HelperGdb.SHP_EXT, GdbFileName + "\\" + dataset, noms_gdb[i]);
if (!resp2.Value)
{
@ -1018,7 +828,6 @@ namespace OliviaAddInPro.Services
res.Error.Add("Errores en la importación: "+err_st);
return res;
}
//cambia el nombre de los campos que había truncado a 10 caracteres al exportar a shp
//solo para la capa original
resp2 = com.RestauraNomCampos(GdbFileName + "\\" + dataset + "\\" + noms_gdb[0]);
@ -1048,16 +857,10 @@ namespace OliviaAddInPro.Services
*/
public void CierraCapas()
{
if (!string.IsNullOrEmpty(OliviaGlob.Paths.PathData))
{
string capa_principal = System.IO.Path.GetFileNameWithoutExtension(OliviaGlob.Paths.PathData);
HelperGdb.CloseLayer(capa_principal);
}
if (!string.IsNullOrEmpty(OliviaGlob.Paths.PathNW))
{
string capa_principal_nw = System.IO.Path.GetFileNameWithoutExtension(OliviaGlob.Paths.PathNW);
HelperGdb.CloseLayer(capa_principal_nw);
}
string capa_principal = System.IO.Path.GetFileNameWithoutExtension(OliviaGlob.Paths.PathData);
string capa_principal_nw = System.IO.Path.GetFileNameWithoutExtension(OliviaGlob.Paths.PathNW);
HelperGdb.CloseLayer(capa_principal);
HelperGdb.CloseLayer(capa_principal_nw);
}
}
}

View File

@ -38,12 +38,10 @@ namespace OliviaAddInPro.Services
}
else
{
inst.ProgrSrc.Init("Importando resultados");
//actualiza los flags
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.FinEjecOk);
//importa resultados
string FtClssName = "";
resp = IniImport(out FtClssName);
resp = IniImport();
if (resp.HasError)
{
msg = resp.Error.First();
@ -54,13 +52,13 @@ namespace OliviaAddInPro.Services
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);
resp2 = inst.ServCom.ImportSecto(GdbFileName);
}
else if (OliviaGlob.HasFlagTipEjec(TiposEjecucion.EjecPlanif)) //Ha terminado bien la planificación
{
@ -69,7 +67,7 @@ namespace OliviaAddInPro.Services
//guarda csv
//GuardaCsv(inst); en finEjecuta3
//acciones de importación
resp2 = inst.ServCom.ImportPlanif(GdbFileName, FtClssName);
resp2 = inst.ServCom.ImportPlanif(GdbFileName);
}
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);
@ -111,8 +109,6 @@ namespace OliviaAddInPro.Services
{
if (string.IsNullOrEmpty(resp2.Value))
{
//quita modo config2
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.Config2);
if (resp2.HasError)
{
msg = resp2.Error.First();
@ -130,7 +126,7 @@ namespace OliviaAddInPro.Services
if (OliviaGlob.HasFlagTipEjec(TiposEjecucion.EjecPlanif)) //Ha terminado bien la planificación
{
//guarda csv
GuardaCsv(inst,resp2.Value);
GuardaCsv(inst);
}
msg = Resource1.String_exito;
@ -162,15 +158,8 @@ namespace OliviaAddInPro.Services
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;
string capa_principal = System.IO.Path.GetFileNameWithoutExtension(OliviaGlob.Paths.PathData);
string capa_principal_nw = System.IO.Path.GetFileNameWithoutExtension(OliviaGlob.Paths.PathNW);
try
{
@ -209,7 +198,7 @@ namespace OliviaAddInPro.Services
/*
* 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)
public static void GuardaCsv(TratamientoComun inst)
{
string auxi, nombre = null;
string[] nameDokL;
@ -221,23 +210,20 @@ namespace OliviaAddInPro.Services
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);
Path = HelperGdb.SaveFileDlg(Title, DirData, null, ArcGIS.Desktop.Catalog.ItemFilters.folders);
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);
GuardaCsv(inst);
}
else
{
@ -252,10 +238,9 @@ namespace OliviaAddInPro.Services
/*
* Inicializa la importación
*/
public Respuesta<string> IniImport(out string FtClssName)
public Respuesta<string> IniImport()
{
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))
@ -280,12 +265,6 @@ namespace OliviaAddInPro.Services
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;
}
}

View File

@ -76,10 +76,10 @@ namespace OliviaAddInPro.Services.LanzaSrv
GeneralDef.EjecGeoParamSep + GeneralDef.GG_trafic + GeneralDef.EjecGeoParamIgual + limp.Trafico + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GG_npt + GeneralDef.EjecGeoParamIgual + limp.NPtosCtrl + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GG_sec + GeneralDef.EjecGeoParamIgual + limp.NSect + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GL_anc + GeneralDef.EjecGeoParamIgual + limp.AnchoVia+ " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GL_anc + GeneralDef.EjecGeoParamIgual + limp.AnchoVia + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GG_coox + GeneralDef.EjecGeoParamIgual + limp.CoordsInstal.X + " " +//coordenadas
GeneralDef.EjecGeoParamSep + GeneralDef.GG_cooy + GeneralDef.EjecGeoParamIgual + limp.CoordsInstal.Y + " " +//coordenadas
GeneralDef.EjecGeoParamSep + GeneralDef.GG_ais + GeneralDef.EjecGeoParamIgual + (limp.IgnoAis ? 1 : 0) + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GG_ais + GeneralDef.EjecGeoParamIgual + (limp.IgnoAis?1:0) + " " +
//campos del dbf de limpieza para leer
GeneralDef.EjecGeoParamSep + GeneralDef.GAA_obser + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Campos.consulta_observ + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GAA_anch_tip + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Campos.consulta_anch_tip + " " +
@ -91,19 +91,7 @@ namespace OliviaAddInPro.Services.LanzaSrv
GeneralDef.EjecGeoParamSep + GeneralDef.GAL_acera + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Atributos.atr_acera + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GAL_peat + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Atributos.atr_peat + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GAL_ap_lin + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Atributos.atr_ap_lin + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GAL_ap_bat + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Atributos.atr_ap_bat + " " +
//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 + " ";
GeneralDef.EjecGeoParamSep + GeneralDef.GAL_ap_bat + GeneralDef.EjecGeoParamIgual + LimpiezaDef.Atributos.atr_ap_bat + " ";
base.str_cfg = str;

View File

@ -73,16 +73,7 @@ namespace OliviaAddInPro.Services.LanzaSrv
GeneralDef.EjecGeoParamSep + GeneralDef.GG_strtto + GeneralDef.EjecGeoParamIgual + NombreTratamiento + " " +
//paths de archivos
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pd + GeneralDef.EjecGeoParamIgual + OliviaGlob.Paths.PathData + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pn + GeneralDef.EjecGeoParamIgual + OliviaGlob.Paths.PathNW + " " +
//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;
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pn + GeneralDef.EjecGeoParamIgual + OliviaGlob.Paths.PathNW + " ";
}
/**
@ -108,7 +99,7 @@ namespace OliviaAddInPro.Services.LanzaSrv
GeneralDef.EjecGeoParamSep + GeneralDef.GG_port + GeneralDef.EjecGeoParamIgual + OliviaGlob.Conexion.Puerto + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GG_tout + GeneralDef.EjecGeoParamIgual + OliviaGlob.Conexion.TiempoOutSocket + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pt + GeneralDef.EjecGeoParamIgual + OliviaGlob.Paths.PathTemp + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pcfg + GeneralDef.EjecGeoParamIgual + "";
GeneralDef.EjecGeoParamSep + GeneralDef.GG_pcfg + GeneralDef.EjecGeoParamIgual + OliviaGlob.Paths.PathCfg;
pfi = new ProcessStartInfo(OliviaGlob.Paths.PathExeOlivia, args);
pfi.UseShellExecute = false;

View File

@ -61,7 +61,7 @@ namespace OliviaAddInPro.Services.LanzaSrv
else if (modo == ModosEjec.SoloPlanifica)
modo_str = GeneralDef.SockConfTodo;
var conf = ConfigServ.Serv.Leer();
//van ParamLimpN parámetros, sin incluir "CONFIGURACION", si se añaden, incrementar ParamRecoN
//van ParamLimpN parámetros, sin incluir "CONFIGURACION", si se añaden, incrementar ParamLimpN
str = GeneralDef.EjecGeoParamSep + modo_str + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GR_camp_cap + GeneralDef.EjecGeoParamIgual + conf.capac + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GR_kgM + GeneralDef.EjecGeoParamIgual + reco.KgMaxVehic + " " +
@ -79,7 +79,7 @@ namespace OliviaAddInPro.Services.LanzaSrv
GeneralDef.EjecGeoParamSep + GeneralDef.GG_trafic + GeneralDef.EjecGeoParamIgual + reco.Trafico + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GG_npt + GeneralDef.EjecGeoParamIgual + reco.NPtosCtrl + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GG_sec + GeneralDef.EjecGeoParamIgual + reco.NSect + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GR_anc + GeneralDef.EjecGeoParamIgual + reco.AnchoVehiculo+ " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GR_anc + GeneralDef.EjecGeoParamIgual + reco.AnchoVehiculo + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GR_gir + GeneralDef.EjecGeoParamIgual + reco.GiroVehic + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GG_coox + GeneralDef.EjecGeoParamIgual + reco.CoordsInstal.X + " " +//coordenadas
GeneralDef.EjecGeoParamSep + GeneralDef.GG_cooy + GeneralDef.EjecGeoParamIgual + reco.CoordsInstal.Y + " " +//coordenadas
@ -91,12 +91,7 @@ namespace OliviaAddInPro.Services.LanzaSrv
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_fechaf + GeneralDef.EjecGeoParamIgual + "0 " +
GeneralDef.EjecGeoParamSep + GeneralDef.GR_sens_modo + GeneralDef.EjecGeoParamIgual + "0 " +
GeneralDef.EjecGeoParamSep + GeneralDef.GG_ais + GeneralDef.EjecGeoParamIgual + (reco.IgnoAis?1:0) + " " +
GeneralDef.EjecGeoParamSep + GeneralDef.GR_lateral + GeneralDef.EjecGeoParamIgual + reco.TipoLate + " " +
//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 + " ";
GeneralDef.EjecGeoParamSep + GeneralDef.GR_lateral + GeneralDef.EjecGeoParamIgual + reco.TipoLate + " ";
base.str_cfg = str;

View File

@ -1,7 +1,7 @@
/*using ArcGIS.Core.Data;
using ArcGIS.Core.Data;
using ArcGIS.Core.Geometry;
using ArcGIS.Core.Internal.CIM;
using ArcGIS.Desktop.Framework.Threading.Tasks;*/
using ArcGIS.Desktop.Framework.Threading.Tasks;
using OliviaAddInPro.Helper;
using OliviaAddInPro.Model;
using System;
@ -55,8 +55,6 @@ namespace OliviaAddInPro.Services
if(!ExportaEjec(modo, out msg))
{
res.Error.Add(msg);
//cierra y borra las capas si le ha dado tiempo a exportar
FinProcServ.BorraFiles();
return res;
}
@ -166,7 +164,7 @@ namespace OliviaAddInPro.Services
public bool[] BuscAmbGdb(string pathCapa)
{
string consulta;
long numero_lin;
int numero_lin;
bool[] amb_gdb = new bool[(int)LimpiezaDef.AmbitsTra.AmbN];//se inician a false
string ftclass;

View File

@ -124,7 +124,6 @@ namespace OliviaAddInPro.Services
}
}
int result = Environment.TickCount & Int32.MaxValue; //para que el tickcount no sea negativo
if (cps.Getcancelled()) //mira a ver si ha cancelado el usuario
{
//se ha cancelado, lo envía al OliviaTask
@ -138,11 +137,11 @@ namespace OliviaAddInPro.Services
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
var pp = pide_progr();
if (pp.Value> TiposActu.ActuFinOk)
if (pp .Value> TiposActu.ActuFinOk)
fin = true;
if(pp.HasError)
{
@ -154,10 +153,8 @@ namespace OliviaAddInPro.Services
else
nint++;
}
if (pp.Value == TiposActu.ActuFinNOk)
res.Error.Add("Finalizado proceso con fallos");
actualiza(pp);
lastprog = result;
lastprog = Environment.TickCount;
}
} while (!sal);
@ -178,7 +175,7 @@ namespace OliviaAddInPro.Services
{
if (!conectado)
{
if (!soc.conecta(Ip, Puerto, Ip))
if (!soc.conecta(Ip, Puerto))
{
conectado = false;
return false;
@ -501,7 +498,6 @@ namespace OliviaAddInPro.Services
{
//cps.Status
}
/*
* Para poder actualizar la barra de progreso hay que llamar a invoke
* porque está desde otro thread
@ -517,20 +513,22 @@ namespace OliviaAddInPro.Services
else if(actu == TiposActu.ActuFinOk)
cps.SetProceso("Proceso Finalizado.");
//FALTA CAMBIAR EL NOMBRE DEL BOTÓN DE CANCELAR
/*if (actu > TiposActu.ActuFinOk)
cps.SetEstado("Calculando...");
if ((actu == TiposActu.ActuPermu) && !cancela)
cps.SetEstado("Calculando Permutaciones...");
if ((actu == TiposActu.ActuMal) || (actu == TiposActu.ActuFinNOk))
cps.PonBarColorRojo();
col = 2;
else
cps.PonBarColorVerde();
col = 1;
/*if (actu > TiposActu.ActuFinOk)
cps.SetEstado("Calculando...");
if (actu > TiposActu.ActuFinOk)
button_canc.Text = "Finalizar";
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.";*/
button_canc.Text = "Parar permu.";*/
}
/*
* Para poder actualizar la barra de progreso hay que llamar a invoke

View File

@ -28,16 +28,15 @@ namespace OliviaAddInPro.Services
*/
public int CompruebaCamposReco(string pathCapa)
{
int NCAMPS = 5;
int NCAMPS = 6;
string[] camps;
camps = new string[NCAMPS];
camps[0] = RecogidaDef.campos_def.cons_fracc;
camps[1] = RecogidaDef.campos_def.cons_nomrec;
camps[2] = RecogidaDef.campos_def.cons_lateral;
camps[3] = RecogidaDef.campos_def.cons_uds;
camps[4] = RecogidaDef.campos_def.cons_kgrec;
//camps[5] = RecogidaDef.campos_def.cons_id;
camps[0] = RecogidaDef.campos_def.cons_id;
camps[1] = RecogidaDef.campos_def.cons_fracc;
camps[2] = RecogidaDef.campos_def.cons_nomrec;
camps[3] = RecogidaDef.campos_def.cons_lateral;
camps[4] = RecogidaDef.campos_def.cons_uds;
camps[5] = RecogidaDef.campos_def.cons_kgrec;
int compCamp = HelperGdb.CheckFileds(pathCapa, camps);
ErrStr = HelperGdb.OutStr;
if (compCamp == 0)

View File

@ -8,17 +8,17 @@
mc:Ignorable="d"
Title="Olivia" Height="227" Width="449"
d:DataContext="{Binding Path=ui.MarchandoUnaDeViewModel}"
WindowStartupLocation="CenterOwner" Icon="../OliviaIconPro.ico"
ResizeMode="NoResize">
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>
<ProgressBar Minimum="0" Maximum="100" HorizontalAlignment="Left" Value="{Binding Progreso, UpdateSourceTrigger=PropertyChanged}" Height="20" Margin="29,40,0,0" VerticalAlignment="Top" Width="350"/>
<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"/>
<Button Content="{Binding TextBtn}" HorizontalAlignment="Left" Margin="304,155,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
</Grid>
</Window>

View File

@ -19,12 +19,9 @@
<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"/>
</Grid>
<xctk:PropertyGrid x:Name="Configuracion" SelectedObject="{Binding Configuracion}" HorizontalAlignment="Stretch" PropertyValueChanged="Configuracion_PropertyValueChanged" ShowDescriptionByTooltip="True">
<xctk:PropertyGrid.CategoryGroupHeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" Background="{DynamicResource Esri_BackgroundPressedBrush}" Foreground="{DynamicResource Esri_TextStyleDefaultBrush}"/>
</DataTemplate>
</xctk:PropertyGrid.CategoryGroupHeaderTemplate>
<xctk:PropertyGrid x:Name="Configuracion" SelectedObject="{Binding Configuracion}" HorizontalAlignment="Stretch" PropertyValueChanged="Configuracion_PropertyValueChanged">
<!-- Only the following properties will be displayed in the PropertyGrid -->
</xctk:PropertyGrid>
</StackPanel>

View File

@ -25,6 +25,7 @@ namespace OliviaAddInPro
public PaneConfigView()
{
InitializeComponent();
}
private void OnGuardar(object sender, RoutedEventArgs e)
{

View File

@ -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>

View File

@ -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;
}
}
}
}

View File

@ -53,8 +53,7 @@ namespace OliviaAddInPro.View.Configuracion
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);
var st = HelperGdb.SaveFileDlg("Seleccione carpeta", null, null, ArcGIS.Desktop.Catalog.ItemFilters.folders);
if (!string.IsNullOrEmpty(st))
{
Value = st;

View File

@ -43,7 +43,6 @@ namespace OliviaAddInPro.View.Configuracion
public FrameworkElement ResolveEditor(PropertyItem propertyItem)
{
Binding binding = new Binding("Value");
binding.Source = propertyItem;
binding.Mode = propertyItem.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay;

View File

@ -47,7 +47,7 @@
</ListBox.ItemTemplate>
</ListBox>
<CheckBox x:Name="checkBox_sentidocirc" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}"
Content="Respeta el sentido de circulación" IsChecked="{Binding 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.ColumnDefinitions>

View File

@ -41,7 +41,7 @@ namespace OliviaAddInPro
private void button_caparestr_Click(object sender, RoutedEventArgs e)
{
string texto = "";
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto, "", true);
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto);
if (DataContext is PaneLimpiezaSub2ViewModel mod)
{
mod.GeomRestr = geom;
@ -55,7 +55,7 @@ namespace OliviaAddInPro
private void button_capaniv_Click(object sender, RoutedEventArgs e)
{
string texto = "";
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto, "", true);
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto);
if (DataContext is PaneLimpiezaSub2ViewModel mod)
{
mod.GeomNiv = geom;
@ -69,7 +69,7 @@ namespace OliviaAddInPro
private void button_capazon_Click(object sender, RoutedEventArgs e)
{
string texto = "";
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto, "", true);
ArcGIS.Core.Geometry.Geometry geom = HelperGdb.OpenGeom(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon, out texto);
if (DataContext is PaneLimpiezaSub2ViewModel mod)
{
mod.GeomZon = geom;

View File

@ -46,7 +46,7 @@ namespace OliviaAddInPro
}
else if (DataContext is PaneRecogidaViewModel modrec)
{
modrec.Ejecuta(OliviaAddInPro.Services.ModosEjec.Planifica);
modrec.Ejecuta(OliviaAddInPro.Services.ModosEjec.SoloPlanifica);
}
}

View File

@ -43,7 +43,7 @@ namespace OliviaAddInPro
if (DataContext is PaneRecogidaViewModel mod)
{
if (mod.PaneSub1.CapaAbierta)
mod.Ejecuta(OliviaAddInPro.Services.ModosEjec.Planifica);
mod.Ejecuta(OliviaAddInPro.Services.ModosEjec.SoloPlanifica);
else
HelperGlobal.ponMsg("No se ha seleccionado ninguna capa de Recogida");
}

View File

@ -49,7 +49,7 @@
</DataTemplate>
</-->
</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="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="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>
<Label Content="Tipo de carga" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
@ -91,7 +91,7 @@
<ComboBox x:Name="comboBox_tipoCapac" IsEnabled="{Binding EnabComboCapac, Mode=TwoWay}" ItemsSource="{Binding TiposCapac, Mode=TwoWay}" HorizontalAlignment="Left" Margin="0,0,0,0"
VerticalAlignment="Top" Width="75"
SelectedIndex="{Binding TipoCapac}" SelectionChanged="comboBox_tipoCapac_SelectionChanged"/>
<TextBox x:Name="txtBox_kgCapac" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Grid.Column="1" Margin="5,0,0,3" TextWrapping="NoWrap" Text="{Binding Path=TextKgCapac, Mode = TwoWay}" TextAlignment="Right" MaxLength="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"/>
</Grid>
<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 +100,7 @@
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Margin="0,0,0,8" TextWrapping="NoWrap" Text="{Binding Path=TextTVaci, Mode = TwoWay}" TextAlignment="Right" MaxLength="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"/>
</Grid>
<Label Margin="15,0,0,0" Content="Planta de descarga" FontWeight="DemiBold"/>

View File

@ -3,7 +3,6 @@ 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;
@ -12,19 +11,10 @@ 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; }
@ -48,28 +38,14 @@ namespace OliviaAddInPro
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;
@ -77,10 +53,6 @@ namespace OliviaAddInPro
void IprocessManager.Inicia()
{
Cancelado = false;
TextBtn = "Cancelar";
EnabBtn = true;
ColorBar = System.Windows.Media.Brushes.Green;
}
void IprocessManager.SetEstado(string estado)
{
@ -116,18 +88,6 @@ namespace OliviaAddInPro
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;
}
}

View File

@ -77,9 +77,7 @@ namespace OliviaAddInPro
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());
ConfigServ.Serv.Guardar(paneConfig.Configuracion);
}
paneConfig.hay_cambios = false;
}

View File

@ -42,11 +42,8 @@ namespace OliviaAddInPro
public void OnGuardar()
{
Respuesta<bool> resp = ConfigServ.Serv.Guardar(Configuracion);
if (!resp.Value)
HelperGlobal.ponMsg(resp.Error.First());
else
HelperGlobal.ponMsg("Se ha guardado la configuración");
ConfigServ.Serv.Guardar(Configuracion);
HelperGlobal.ponMsg("Se ha guardado la configuración");
hay_cambios = false;
}

View File

@ -193,12 +193,13 @@ namespace OliviaAddInPro
public PaneLimpiezaSub1ViewModel()
{
LblCapaElems = Resource1.String_selec_capa;
timeTto = 0;
textVeloDespl = "";
timeTto = 10;
textVeloDespl = "10";
lblUdsTimeTto = "min";
lblUdsVeloDespl = "km/h";
limpServ = new LimpiezaServ(null); //no hace falta instancia limp
textAnchoVia = LimpiezaDef.Parametros.ancho_via.ToString();
}
/**
* Realiza las comprobaciones para cuando se ha abierto una capa
@ -211,10 +212,7 @@ namespace OliviaAddInPro
Ambitos.Clear();
TipoTto = -1;
VisTextAnchoVia = System.Windows.Visibility.Hidden;
TextVeloDespl = "";
cambia_tiempo_tto();
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config); //lo reinicia, por si estaba después de planificar
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.Config2);
if (string.IsNullOrEmpty(capa))
return false;
//comprueba los campos de limpieza
@ -223,7 +221,7 @@ namespace OliviaAddInPro
HelperGlobal.ponMsg(limpServ.ErrStr, System.Windows.MessageBoxImage.Warning);
return false;
}
LimpiezaDef.forma_filtros();
amb_tra_gdb = limpServ.BuscAmbGdb(capa);
bool hay_alguno = false;
foreach (bool b in amb_tra_gdb)

View File

@ -14,7 +14,6 @@ using ArcGIS.Desktop.Framework.Contracts;
using ArcGIS.Desktop.Framework.Dialogs;
using ArcGIS.Desktop.Framework.Threading.Tasks;
using ArcGIS.Desktop.Mapping;
using OliviaAddInPro.Model;
namespace OliviaAddInPro
{
@ -24,7 +23,7 @@ namespace OliviaAddInPro
{
numPtosCtrl = numSect = 3;
checkAjustSect = checkSectAuto = false;
checkIgnoAis = LimpiezaDef.Parametros.igno_ais;
checkIgnoAis = false;
enableNSect = true;
}

View File

@ -14,7 +14,6 @@ using ArcGIS.Desktop.Framework.Contracts;
using ArcGIS.Desktop.Framework.Dialogs;
using ArcGIS.Desktop.Framework.Threading.Tasks;
using ArcGIS.Desktop.Mapping;
using OliviaAddInPro.Model;
namespace OliviaAddInPro
{
@ -22,12 +21,12 @@ namespace OliviaAddInPro
{
public PaneLimpiezaSub4ViewModel()
{
textPercentTrafico = LimpiezaDef.Parametros.reduc_traf;
timeCargDesc = LimpiezaDef.Parametros.t_cardesc;
timeDespIniFin = LimpiezaDef.Parametros.t_desp;
timeIniJornada = LimpiezaDef.Parametros.h_inicio;
timeJornadaConv = LimpiezaDef.Parametros.t_conv;
timeDescPers = LimpiezaDef.Parametros.t_descanso;
textPercentTrafico = 80;
timeCargDesc = 40;
timeDespIniFin = 25;
timeIniJornada = 7 * 60 + 30;
timeJornadaConv = 8 * 60;
timeDescPers = 30;
}

View File

@ -8,8 +8,8 @@ using System.Threading.Tasks;
using System.Windows.Media.Imaging;
using OliviaAddInPro.Helper;
using static OliviaAddInPro.Model.ComunDef;
//using ArcGIS.Desktop.Framework.Threading.Tasks;
//using ArcGIS.Desktop.Framework.Contracts;
using ArcGIS.Desktop.Framework.Threading.Tasks;
using ArcGIS.Desktop.Framework.Contracts;
namespace OliviaAddInPro
{
@ -194,7 +194,7 @@ namespace OliviaAddInPro
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetEstado("");
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetProgress(0);
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetTextBtn("Cancelar");
OliviaGlob.Limp.ProgrSrc._ProgrSrc.PonBarColorVerde();
//oculta la ventana
OliviaGlob.ShowHidePane(false);

View File

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
//using System.Runtime.InteropServices.WindowsRuntime;
using System.Runtime.InteropServices.WindowsRuntime;
using OliviaAddInPro.Model;
using OliviaAddInPro.Helper;

View File

@ -274,7 +274,6 @@ namespace OliviaAddInPro
TiposVehic.Clear();
TiposCapac.Clear();
OliviaGlob.AddFlagTipEjec(TiposEjecucion.Config); //lo reinicia, por si estaba después de planificar
OliviaGlob.RemoveFlagTipEjec(TiposEjecucion.Config2);
if (string.IsNullOrEmpty(capa))
return false;

View File

@ -247,7 +247,6 @@ namespace OliviaAddInPro
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetEstado("");
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetProgress(0);
OliviaGlob.Limp.ProgrSrc._ProgrSrc.SetTextBtn("Cancelar");
OliviaGlob.Limp.ProgrSrc._ProgrSrc.PonBarColorVerde();
//oculta la ventana
OliviaGlob.ShowHidePane(false);