Ventana de progreso en exportacion
parent
1e77fc2ac5
commit
8cedf825db
|
|
@ -25,6 +25,8 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
protected override void OnClick()
|
protected override void OnClick()
|
||||||
{
|
{
|
||||||
|
OliviaGlob.progrDialog= new ProgressDialog(
|
||||||
|
"Procesando", "Canceled", 100, false);
|
||||||
if (OliviaGlob.TipoEjec == TiposEjecucion.Ninguno)
|
if (OliviaGlob.TipoEjec == TiposEjecucion.Ninguno)
|
||||||
{
|
{
|
||||||
OliviaGlob.TipoEjec = TiposEjecucion.Limp;
|
OliviaGlob.TipoEjec = TiposEjecucion.Limp;
|
||||||
|
|
|
||||||
|
|
@ -433,13 +433,13 @@ namespace OliviaAddInPro.Helper
|
||||||
* Forma la envolvente convexa, el mínimo polígono,
|
* Forma la envolvente convexa, el mínimo polígono,
|
||||||
* que contiene los ámbitos para exportar, a partir de ahí la red navegable ampliando a un buffer
|
* que contiene los ámbitos para exportar, a partir de ahí la red navegable ampliando a un buffer
|
||||||
*/
|
*/
|
||||||
public static Task<ArcGIS.Core.Geometry.Geometry> GetGeomConvexHull(FeatureClass fclss, ArcGIS.Core.Data.QueryFilter filter)
|
public static Task<ArcGIS.Core.Geometry.Geometry> GetGeomConvexHull(FeatureClass fclss, ArcGIS.Core.Data.QueryFilter filter, CancelableProgressorSource cps)
|
||||||
{
|
{
|
||||||
ArcGIS.Core.Geometry.Geometry geomIni = null;
|
ArcGIS.Core.Geometry.Geometry geomIni = null;
|
||||||
|
|
||||||
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<ArcGIS.Core.Geometry.Geometry>)(() =>
|
return ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<ArcGIS.Core.Geometry.Geometry>)(() =>
|
||||||
{
|
{
|
||||||
geomIni = GetGeomUnica(fclss, filter);
|
geomIni = GetGeomUnica(fclss, filter, cps);
|
||||||
if (geomIni != null)
|
if (geomIni != null)
|
||||||
{
|
{
|
||||||
ArcGIS.Core.Geometry.Geometry geomSal = null;
|
ArcGIS.Core.Geometry.Geometry geomSal = null;
|
||||||
|
|
@ -461,7 +461,7 @@ namespace OliviaAddInPro.Helper
|
||||||
/*
|
/*
|
||||||
* A partir de una capa recorre todos los elementos que cumplen el filtro y los une en una única geometría
|
* A partir de una capa recorre todos los elementos que cumplen el filtro y los une en una única geometría
|
||||||
*/
|
*/
|
||||||
public static ArcGIS.Core.Geometry.Geometry GetGeomUnica(FeatureClass fclss, ArcGIS.Core.Data.QueryFilter filtro)
|
public static ArcGIS.Core.Geometry.Geometry GetGeomUnica(FeatureClass fclss, ArcGIS.Core.Data.QueryFilter filtro, CancelableProgressorSource cps)
|
||||||
{
|
{
|
||||||
ArcGIS.Core.Geometry.Geometry geomsal = null;
|
ArcGIS.Core.Geometry.Geometry geomsal = null;
|
||||||
ReiniciaOutStr();
|
ReiniciaOutStr();
|
||||||
|
|
@ -470,6 +470,7 @@ namespace OliviaAddInPro.Helper
|
||||||
{
|
{
|
||||||
using (RowCursor rowCursor = fclss.Search(filtro))
|
using (RowCursor rowCursor = fclss.Search(filtro))
|
||||||
{
|
{
|
||||||
|
|
||||||
while (rowCursor.MoveNext())
|
while (rowCursor.MoveNext())
|
||||||
{
|
{
|
||||||
using (Row row = rowCursor.Current)
|
using (Row row = rowCursor.Current)
|
||||||
|
|
@ -515,7 +516,7 @@ namespace OliviaAddInPro.Helper
|
||||||
{
|
{
|
||||||
where = $"{fieldName} = {Quote(f)}{selFieldVals[i]}{Quote(f)}";
|
where = $"{fieldName} = {Quote(f)}{selFieldVals[i]}{Quote(f)}";
|
||||||
filtro = new ArcGIS.Core.Data.QueryFilter { WhereClause = where };
|
filtro = new ArcGIS.Core.Data.QueryFilter { WhereClause = where };
|
||||||
geomAux = GetGeomUnica(fclss, filtro);
|
geomAux = GetGeomUnica(fclss, filtro, null);
|
||||||
if(geomAux == null)
|
if(geomAux == null)
|
||||||
{
|
{
|
||||||
ok = false;
|
ok = false;
|
||||||
|
|
@ -636,13 +637,14 @@ namespace OliviaAddInPro.Helper
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool ExportShp(string pathLayerIn, SpatialQueryFilter filter, string nameShp, string outpath,out string msgOut, ProgressorSource progrDialog = null)
|
public static bool ExportShp(string pathLayerIn, SpatialQueryFilter filter, string nameShp, string outpath, CancelableProgressorSource cps, out string msgOut, ProgressorSource progrDialog = null)
|
||||||
{
|
{
|
||||||
msgOut = "";
|
msgOut = "";
|
||||||
if (!System.IO.Directory.Exists(outpath))
|
if (!System.IO.Directory.Exists(outpath))
|
||||||
System.IO.Directory.CreateDirectory(outpath);
|
System.IO.Directory.CreateDirectory(outpath);
|
||||||
ReiniciaOutStr();
|
ReiniciaOutStr();
|
||||||
System.Threading.CancellationTokenSource _cts= new System.Threading.CancellationTokenSource();
|
System.Threading.CancellationTokenSource _cts= new System.Threading.CancellationTokenSource();
|
||||||
|
cps.Status = "Guardando geometria a shp";
|
||||||
|
|
||||||
var progSrc = new CancelableProgressorSource();
|
var progSrc = new CancelableProgressorSource();
|
||||||
string[] args = { pathLayerIn, outpath };
|
string[] args = { pathLayerIn, outpath };
|
||||||
|
|
@ -664,6 +666,8 @@ namespace OliviaAddInPro.Helper
|
||||||
string msg = string.Format("{0}: {1}", new object[] { event_name, (string)o });
|
string msg = string.Format("{0}: {1}", new object[] { event_name, (string)o });
|
||||||
//progrDialog.Message = (string)o;
|
//progrDialog.Message = (string)o;
|
||||||
Debug.WriteLine(msg);
|
Debug.WriteLine(msg);
|
||||||
|
|
||||||
|
;
|
||||||
//System.Windows.MessageBox.Show(msg);
|
//System.Windows.MessageBox.Show(msg);
|
||||||
//_cts.Cancel();
|
//_cts.Cancel();
|
||||||
}
|
}
|
||||||
|
|
@ -673,6 +677,11 @@ namespace OliviaAddInPro.Helper
|
||||||
{
|
{
|
||||||
string msg2 = string.Format("{0}: {1} %", new object[] { event_name, (int)o });
|
string msg2 = string.Format("{0}: {1} %", new object[] { event_name, (int)o });
|
||||||
Debug.WriteLine(msg2);
|
Debug.WriteLine(msg2);
|
||||||
|
var av = (int)0;
|
||||||
|
if (av > 0)
|
||||||
|
{
|
||||||
|
cps.Value = (uint)(80 * av * 0.2);
|
||||||
|
}
|
||||||
// if ((int)o < 0)
|
// if ((int)o < 0)
|
||||||
//System.Windows.MessageBox.Show(msg2);
|
//System.Windows.MessageBox.Show(msg2);
|
||||||
//_cts.Cancel();
|
//_cts.Cancel();
|
||||||
|
|
@ -680,7 +689,7 @@ namespace OliviaAddInPro.Helper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).Result;
|
}).Result;
|
||||||
|
cps.Status = "Finalizando exportacion";
|
||||||
//renombrado de ficheros:
|
//renombrado de ficheros:
|
||||||
if (!RenameSHP(outpath, pathLayerIn, nameShp))
|
if (!RenameSHP(outpath, pathLayerIn, nameShp))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ using ArcGIS.Core.CIM;
|
||||||
using ArcGIS.Core.Data;
|
using ArcGIS.Core.Data;
|
||||||
using OliviaAddInPro.Services;
|
using OliviaAddInPro.Services;
|
||||||
using static OliviaAddInPro.Model.LimpiezaDef;
|
using static OliviaAddInPro.Model.LimpiezaDef;
|
||||||
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
|
using ArcGIS.Desktop.Framework.Contracts;
|
||||||
|
|
||||||
namespace OliviaAddInPro.Model
|
namespace OliviaAddInPro.Model
|
||||||
{
|
{
|
||||||
|
|
@ -46,13 +48,13 @@ namespace OliviaAddInPro.Model
|
||||||
Serv = new LimpiezaServ(this);
|
Serv = new LimpiezaServ(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TareaRes Ejecuta(ModosEjec modo)
|
public TareaRes Ejecuta(ModosEjec modo, CancelableProgressorSource cps)
|
||||||
{
|
{
|
||||||
TareaRes res = null;
|
TareaRes res = null;
|
||||||
if (modo == ModosEjec.Sectoriza)
|
if (modo == ModosEjec.Sectoriza)
|
||||||
res = Serv.Sectoriza();
|
res = Serv.Sectoriza(cps);
|
||||||
else if (modo == ModosEjec.Planifica)
|
else if (modo == ModosEjec.Planifica)
|
||||||
res = Serv.Planifica();
|
res = Serv.Planifica(cps);
|
||||||
return res;
|
return res;
|
||||||
/*if(!res)
|
/*if(!res)
|
||||||
{
|
{
|
||||||
|
|
@ -64,17 +66,18 @@ namespace OliviaAddInPro.Model
|
||||||
HelperGlobal.ponMsg(msg);
|
HelperGlobal.ponMsg(msg);
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
public async Task<TareaRes> EjecutaAsync(ModosEjec modo, Action<TareaRes> ffin)
|
public async void EjecutaAsync(ModosEjec modo, CancelableProgressorSource cps, Action<TareaRes> ffin)
|
||||||
{
|
{
|
||||||
var tarea = await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run((Func<TareaRes>)(() =>
|
await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
|
||||||
{
|
{
|
||||||
var res = Ejecuta(modo);
|
cps.Status = "Procesando";
|
||||||
|
cps.Value = 0;
|
||||||
|
var res = Ejecuta(modo, cps);
|
||||||
ffin(res);
|
ffin(res);
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
}));
|
});
|
||||||
|
|
||||||
return tarea;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ namespace OliviaAddInPro.Services
|
||||||
* Modo 0, sectorizar
|
* Modo 0, sectorizar
|
||||||
* Modo 1, planificar
|
* Modo 1, planificar
|
||||||
*/
|
*/
|
||||||
public bool ComienzaEjec(ModosEjec modo, out string ErrStr)
|
public bool ComienzaEjec(ModosEjec modo, CancelableProgressorSource cps, out string ErrStr)
|
||||||
{
|
{
|
||||||
bool fue_mal = false;
|
bool fue_mal = false;
|
||||||
ErrStr = string.Empty;
|
ErrStr = string.Empty;
|
||||||
|
|
@ -47,18 +47,20 @@ namespace OliviaAddInPro.Services
|
||||||
fue_mal = true;
|
fue_mal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cps.Status = "Exportando geometria";
|
||||||
|
|
||||||
//Obtiene la geometría que envuelve a los ámbitos
|
//Obtiene la geometría que envuelve a los ámbitos
|
||||||
Geometry geom_export = null;
|
Geometry geom_export = null;
|
||||||
if (!fue_mal)
|
if (!fue_mal)
|
||||||
{
|
{
|
||||||
geom_export = GetGeomAmbitsExport();
|
geom_export = GetGeomAmbitsExport(cps);
|
||||||
if (geom_export == null || geom_export.IsEmpty)
|
if (geom_export == null || geom_export.IsEmpty)
|
||||||
{
|
{
|
||||||
ErrStr = "No se ha podido generar geometría de los ámbitos" + com.ConsultaAmbs + ErrStr;
|
ErrStr = "No se ha podido generar geometría de los ámbitos" + com.ConsultaAmbs + ErrStr;
|
||||||
fue_mal = true;
|
fue_mal = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// cps.Value = 80;
|
||||||
//crea el filtro de exportación
|
//crea el filtro de exportación
|
||||||
if (!fue_mal)
|
if (!fue_mal)
|
||||||
{
|
{
|
||||||
|
|
@ -71,9 +73,10 @@ namespace OliviaAddInPro.Services
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cps.Value = 80;
|
||||||
|
|
||||||
if (!fue_mal)
|
if (!fue_mal)
|
||||||
fue_mal = Ejecuta(modo, out ErrStr);
|
fue_mal = Ejecuta(modo, cps, out ErrStr);
|
||||||
|
|
||||||
return fue_mal;
|
return fue_mal;
|
||||||
|
|
||||||
|
|
@ -83,7 +86,7 @@ namespace OliviaAddInPro.Services
|
||||||
/**
|
/**
|
||||||
* Prepara la geometría para exportar los ámbitos
|
* Prepara la geometría para exportar los ámbitos
|
||||||
*/
|
*/
|
||||||
public Geometry GetGeomAmbitsExport()
|
public Geometry GetGeomAmbitsExport(CancelableProgressorSource cps)
|
||||||
{
|
{
|
||||||
Geometry geomAux = null;
|
Geometry geomAux = null;
|
||||||
ErrStr = string.Empty;
|
ErrStr = string.Empty;
|
||||||
|
|
@ -95,12 +98,13 @@ namespace OliviaAddInPro.Services
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
//Primero hace la geometría de los ámbitos que cumplen la consulta
|
//Primero hace la geometría de los ámbitos que cumplen la consulta
|
||||||
geomAux = HelperGdb.GetGeomConvexHull(fc, filtro).Result;
|
geomAux = HelperGdb.GetGeomConvexHull(fc, filtro, cps).Result;
|
||||||
if (geomAux == null || geomAux.IsEmpty)
|
if (geomAux == null || geomAux.IsEmpty)
|
||||||
{
|
{
|
||||||
ErrStr = "No se ha podido generar geometría de los ámbitos" + com.ConsultaAmbs + HelperGdb.OutStr;
|
ErrStr = "No se ha podido generar geometría de los ámbitos" + com.ConsultaAmbs + HelperGdb.OutStr;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
cps.Value = 60;
|
||||||
//Hace la intersección de dicha geometría con las zonas
|
//Hace la intersección de dicha geometría con las zonas
|
||||||
if (com.GeomZon != null)
|
if (com.GeomZon != null)
|
||||||
{
|
{
|
||||||
|
|
@ -116,7 +120,7 @@ namespace OliviaAddInPro.Services
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cps.Value = 70;
|
||||||
//Hace la intersección de la geometría con los niveles
|
//Hace la intersección de la geometría con los niveles
|
||||||
if (com.GeomNiv != null)
|
if (com.GeomNiv != null)
|
||||||
{
|
{
|
||||||
|
|
@ -132,7 +136,7 @@ namespace OliviaAddInPro.Services
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cps.Value = 75;
|
||||||
//le quita las restricciones
|
//le quita las restricciones
|
||||||
if (com.GeomRestr != null)
|
if (com.GeomRestr != null)
|
||||||
{
|
{
|
||||||
|
|
@ -178,11 +182,11 @@ namespace OliviaAddInPro.Services
|
||||||
/**
|
/**
|
||||||
* Exporta y lanza proceso y ventana de proceso
|
* Exporta y lanza proceso y ventana de proceso
|
||||||
*/
|
*/
|
||||||
public bool Ejecuta(ModosEjec modo, out string msg)
|
public bool Ejecuta(ModosEjec modo, CancelableProgressorSource cps, out string msg)
|
||||||
{
|
{
|
||||||
msg = "";
|
msg = "";
|
||||||
//exporta los datos de entrada
|
//exporta los datos de entrada
|
||||||
return HelperGdb.ExportShp(com.CapaElems, filtroEspacial, com.NombreShpExport, OliviaGlob.Paths.DirData, out msg);
|
return HelperGdb.ExportShp(com.CapaElems, filtroEspacial, com.NombreShpExport, OliviaGlob.Paths.DirData, cps, out msg);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using ArcGIS.Core.Data;
|
using ArcGIS.Core.Data;
|
||||||
using ArcGIS.Core.Geometry;
|
using ArcGIS.Core.Geometry;
|
||||||
using ArcGIS.Core.Internal.CIM;
|
using ArcGIS.Core.Internal.CIM;
|
||||||
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
using OliviaAddInPro.Helper;
|
using OliviaAddInPro.Helper;
|
||||||
using OliviaAddInPro.Model;
|
using OliviaAddInPro.Model;
|
||||||
using System;
|
using System;
|
||||||
|
|
@ -27,7 +28,7 @@ namespace OliviaAddInPro.Services
|
||||||
* Modo 0, sectorizar
|
* Modo 0, sectorizar
|
||||||
* Modo 1, planificar
|
* Modo 1, planificar
|
||||||
*/
|
*/
|
||||||
public TareaRes Sectoriza()
|
public TareaRes Sectoriza(CancelableProgressorSource cps)
|
||||||
{
|
{
|
||||||
var res = new TareaRes()
|
var res = new TareaRes()
|
||||||
{
|
{
|
||||||
|
|
@ -38,7 +39,7 @@ namespace OliviaAddInPro.Services
|
||||||
|
|
||||||
com = (TratamientoComun)limp;
|
com = (TratamientoComun)limp;
|
||||||
string nombFileAmbs = string.Empty;
|
string nombFileAmbs = string.Empty;
|
||||||
|
cps.Status = "Preparando filtro para la exportacion";
|
||||||
//Prepara consulta
|
//Prepara consulta
|
||||||
ErrStr = string.Empty;
|
ErrStr = string.Empty;
|
||||||
if (!PreparaConsulta(out nombFileAmbs))
|
if (!PreparaConsulta(out nombFileAmbs))
|
||||||
|
|
@ -47,6 +48,7 @@ namespace OliviaAddInPro.Services
|
||||||
res.Errores = true;
|
res.Errores = true;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
cps.Value = 10;
|
||||||
|
|
||||||
//Prepara nombre
|
//Prepara nombre
|
||||||
string fechaHora = string.Empty;
|
string fechaHora = string.Empty;
|
||||||
|
|
@ -57,7 +59,7 @@ namespace OliviaAddInPro.Services
|
||||||
|
|
||||||
string msg = "";
|
string msg = "";
|
||||||
//comienza ejecucion
|
//comienza ejecucion
|
||||||
if(!ComienzaEjec(ModosEjec.Sectoriza, out msg))
|
if(!ComienzaEjec(ModosEjec.Sectoriza, cps, out msg))
|
||||||
{
|
{
|
||||||
res.Errores = true;
|
res.Errores = true;
|
||||||
res.msg = msg;
|
res.msg = msg;
|
||||||
|
|
@ -79,7 +81,7 @@ namespace OliviaAddInPro.Services
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TareaRes Planifica()
|
public TareaRes Planifica(CancelableProgressorSource cps)
|
||||||
{
|
{
|
||||||
TareaRes res = new TareaRes()
|
TareaRes res = new TareaRes()
|
||||||
{
|
{
|
||||||
|
|
@ -115,7 +117,9 @@ namespace OliviaAddInPro.Services
|
||||||
consulta = string.Empty;
|
consulta = string.Empty;
|
||||||
ambs_file = "";
|
ambs_file = "";
|
||||||
orstr = null;
|
orstr = null;
|
||||||
for (int i = 0; i < limp.AmbitosSel.Length; i++)
|
var n = limp.AmbitosSel.Length;
|
||||||
|
|
||||||
|
for (int i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
if (limp.AmbitosSel[i])
|
if (limp.AmbitosSel[i])
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@ using System.Threading.Tasks;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using OliviaAddInPro.Helper;
|
using OliviaAddInPro.Helper;
|
||||||
using static OliviaAddInPro.Model.LimpiezaDef;
|
using static OliviaAddInPro.Model.LimpiezaDef;
|
||||||
|
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||||
|
using ArcGIS.Desktop.Framework.Contracts;
|
||||||
namespace OliviaAddInPro
|
namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
class PaneLimpiezaViewModel : PanelViewModelBase
|
class PaneLimpiezaViewModel : PanelViewModelBase
|
||||||
|
|
@ -22,7 +23,6 @@ namespace OliviaAddInPro
|
||||||
_subPanel2ViewModel = new PaneLimpiezaSub2ViewModel();
|
_subPanel2ViewModel = new PaneLimpiezaSub2ViewModel();
|
||||||
_subPanel3ViewModel = new PaneLimpiezaSub3ViewModel();
|
_subPanel3ViewModel = new PaneLimpiezaSub3ViewModel();
|
||||||
_subPanel4ViewModel = new PaneLimpiezaSub4ViewModel();
|
_subPanel4ViewModel = new PaneLimpiezaSub4ViewModel();
|
||||||
|
|
||||||
OptionsMenu = new ObservableCollection<OptionsMenuItem>
|
OptionsMenu = new ObservableCollection<OptionsMenuItem>
|
||||||
{
|
{
|
||||||
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/Dog32.png")), Resource1.String_tto, _subPanel1ViewModel),
|
new OptionsMenuItem(new BitmapImage(new Uri("pack://application:,,,/OliviaAddInPro;component/Resources/Dog32.png")), Resource1.String_tto, _subPanel1ViewModel),
|
||||||
|
|
@ -146,23 +146,29 @@ namespace OliviaAddInPro
|
||||||
public void Ejecuta(OliviaAddInPro.Services.ModosEjec modo)
|
public void Ejecuta(OliviaAddInPro.Services.ModosEjec modo)
|
||||||
{
|
{
|
||||||
string err = "";
|
string err = "";
|
||||||
if(!Lee(out err))
|
|
||||||
|
|
||||||
|
OliviaGlob.progrDialog.Show();
|
||||||
|
var progSrc = new CancelableProgressorSource(OliviaGlob.progrDialog);
|
||||||
|
|
||||||
|
|
||||||
|
if (!Lee(out err))
|
||||||
{
|
{
|
||||||
HelperGlobal.ponMsg(err);
|
HelperGlobal.ponMsg(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Action<TareaRes> ac = finEjecuta;
|
Action<TareaRes> ac = finEjecuta;
|
||||||
var res = OliviaGlob.Limp.EjecutaAsync(modo, ac);
|
OliviaGlob.Limp.EjecutaAsync(modo, progSrc, ac);
|
||||||
//res.
|
//res.
|
||||||
}
|
}
|
||||||
public void finEjecuta(TareaRes res)
|
public void finEjecuta(TareaRes res)
|
||||||
{
|
{
|
||||||
|
OliviaGlob.progrDialog.Hide();
|
||||||
if (res.Errores)
|
if (res.Errores)
|
||||||
{
|
{
|
||||||
HelperGlobal.ponMsg(res.msg);
|
HelperGlobal.ponMsg(res.msg);
|
||||||
}
|
}
|
||||||
HelperGlobal.ponMsg("Proceso terminado");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue