81 lines
1.9 KiB
C#
81 lines
1.9 KiB
C#
using ArcGIS.Desktop.Framework.Contracts;
|
|
using OliviaAddInPro.Model.contract;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace OliviaAddInPro
|
|
{
|
|
public class MarchandoUnaDeViewModel : PropertyChangedBase, IprocessManager
|
|
{
|
|
public MarchandoUnaDeViewModel()
|
|
{
|
|
Cancelado = false;
|
|
}
|
|
public bool Cancelado { get; set; }
|
|
|
|
private string textProceso;
|
|
public string TextProceso
|
|
{
|
|
get { return textProceso; }
|
|
set { base.SetProperty(ref textProceso, value, () => TextProceso); }
|
|
}
|
|
|
|
private string textEstado;
|
|
public string TextEstado
|
|
{
|
|
get { return textEstado; }
|
|
set { base.SetProperty(ref textEstado, value, () => TextEstado); }
|
|
}
|
|
private double progreso;
|
|
|
|
public double Progreso
|
|
{
|
|
get { return progreso; }
|
|
set { base.SetProperty(ref progreso, value, () => Progreso); }
|
|
}
|
|
|
|
void IprocessManager.SetProceso(string proceso)
|
|
{
|
|
TextProceso = proceso;
|
|
}
|
|
void IprocessManager.Inicia()
|
|
{
|
|
Cancelado = false;
|
|
}
|
|
void IprocessManager.SetEstado(string estado)
|
|
{
|
|
TextEstado = estado;
|
|
}
|
|
|
|
void IprocessManager.SetProgress(double progresPorcent)
|
|
{
|
|
Progreso = progresPorcent;
|
|
}
|
|
|
|
double IprocessManager.GetProgress()
|
|
{
|
|
return Progreso;
|
|
}
|
|
|
|
bool IprocessManager.Getcancelled()
|
|
{
|
|
return Cancelado;
|
|
}
|
|
|
|
void IprocessManager.Setcancelled()
|
|
{
|
|
CancelaOperacion();
|
|
}
|
|
public void CancelaOperacion()
|
|
{
|
|
TextProceso = "Cancelando proceso";
|
|
Cancelado = true;
|
|
}
|
|
|
|
}
|
|
}
|