66 lines
2.0 KiB
C#
66 lines
2.0 KiB
C#
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;
|
|
|
|
namespace OliviaAddInPro.Model
|
|
{
|
|
public class Limpieza : TratamientoComun
|
|
{
|
|
//**********************************************
|
|
//Se recogen en PaneLimpiezaSub1
|
|
/**
|
|
* Tipo de tratamiento elegidos
|
|
*/
|
|
public int TipoTto { get; set; } = -1;
|
|
/**
|
|
* Á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;
|
|
/**
|
|
* Path a una capa auxiliar que almacena las columnas de sectorización y planif
|
|
*/
|
|
public string CapaAuxPlanif = string.Empty;
|
|
/**
|
|
* Instancia para las funciones de exportación y demás
|
|
*/
|
|
public LimpiezaServ Serv { get; set; } = null;
|
|
public Limpieza()
|
|
{
|
|
Serv = new LimpiezaServ(this);
|
|
}
|
|
public void Ejecuta(ModosEjec modo)
|
|
{
|
|
bool bien = true;
|
|
if (modo == ModosEjec.Sectoriza)
|
|
bien = Serv.Sectoriza();
|
|
else if (modo == ModosEjec.Planifica)
|
|
bien=Serv.Planifica();
|
|
if(!bien)
|
|
{
|
|
string msg;
|
|
if (Serv.ErrStr.Length > 0)
|
|
msg = Serv.ErrStr;
|
|
else
|
|
msg = "Han ocurrido errores al comenzar la ejeción.";
|
|
HelperGlobal.ponMsg(msg);
|
|
}
|
|
}
|
|
}
|
|
}
|