Merge branch 'Gerardo/ArreglosMarchandoUnaDe' into develop
# Conflicts: # Services/FinProcServ.csElena/develop
commit
52f5993ce1
|
|
@ -10,6 +10,7 @@ namespace OliviaAddInPro.Model.contract
|
||||||
{
|
{
|
||||||
void SetProceso(string proceso);
|
void SetProceso(string proceso);
|
||||||
void SetEstado(string estado);//estado del proceso
|
void SetEstado(string estado);//estado del proceso
|
||||||
|
void SetTextBtn(string textbtn);
|
||||||
void SetProgress(double progresPorcent);
|
void SetProgress(double progresPorcent);
|
||||||
double GetProgress();
|
double GetProgress();
|
||||||
bool Getcancelled();
|
bool Getcancelled();
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,9 @@ namespace OliviaAddInPro.Services
|
||||||
//borra los archivos que le toca borrar
|
//borra los archivos que le toca borrar
|
||||||
BorraFiles();
|
BorraFiles();
|
||||||
});
|
});
|
||||||
task.Wait();
|
//task.Wait();
|
||||||
|
//borra los archivos que le toca borrar
|
||||||
|
//BorraFiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -425,6 +425,7 @@ namespace OliviaAddInPro.Services
|
||||||
{
|
{
|
||||||
pon_progr(100);
|
pon_progr(100);
|
||||||
pon_texto("Finalizado proceso con éxito");
|
pon_texto("Finalizado proceso con éxito");
|
||||||
|
pon_textBtn("Finalizar");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TiposActu.ActuFinNOk:
|
case TiposActu.ActuFinNOk:
|
||||||
|
|
@ -432,12 +433,14 @@ namespace OliviaAddInPro.Services
|
||||||
pon_progr(100);
|
pon_progr(100);
|
||||||
err_str = "Finalizado proceso con fallos\n" + tarea;
|
err_str = "Finalizado proceso con fallos\n" + tarea;
|
||||||
pon_texto(err_str);
|
pon_texto(err_str);
|
||||||
|
pon_textBtn("Finalizar");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TiposActu.ActuSect:
|
case TiposActu.ActuSect:
|
||||||
{
|
{
|
||||||
pon_progr(100);
|
pon_progr(100);
|
||||||
pon_texto("Finalizada sectorización\n" + tarea);
|
pon_texto("Finalizada sectorización\n" + tarea);
|
||||||
|
pon_textBtn("Finalizar");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TiposActu.ActuPlan:
|
case TiposActu.ActuPlan:
|
||||||
|
|
@ -480,6 +483,11 @@ namespace OliviaAddInPro.Services
|
||||||
{
|
{
|
||||||
cps.SetEstado(txt);
|
cps.SetEstado(txt);
|
||||||
}
|
}
|
||||||
|
private void pon_textBtn(String txt)
|
||||||
|
{
|
||||||
|
cps.SetTextBtn(txt);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Para poder actualizar la barra de progreso hay que llamar a invoke
|
* Para poder actualizar la barra de progreso hay que llamar a invoke
|
||||||
* porque está desde otro thread
|
* porque está desde otro thread
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,19 @@
|
||||||
xmlns:ui="clr-namespace:OliviaAddInPro"
|
xmlns:ui="clr-namespace:OliviaAddInPro"
|
||||||
xmlns:local="clr-namespace:OliviaAddInPro"
|
xmlns:local="clr-namespace:OliviaAddInPro"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="MarchandoUnaDe" Height="168" Width="481"
|
Title="Olivia" Height="227" Width="449"
|
||||||
d:DataContext="{Binding Path=ui.MarchandoUnaDeViewModel}"
|
d:DataContext="{Binding Path=ui.MarchandoUnaDeViewModel}"
|
||||||
ResizeMode="NoResize">
|
ResizeMode="NoResize">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Label Content="{Binding TextProceso}" HorizontalAlignment="Left" Margin="76,10,0,0" VerticalAlignment="Top" Width="303" Height="26"/>
|
<Label Content="{Binding TextProceso}" HorizontalAlignment="Left" Margin="76,10,0,0" VerticalAlignment="Top" Width="303" Height="26"/>
|
||||||
<ProgressBar Minimum="0" Maximum="100" HorizontalAlignment="Left" Value="{Binding Progreso, UpdateSourceTrigger=PropertyChanged}" Height="20" Margin="76,40,0,0" VerticalAlignment="Top" Width="303"/>
|
<ProgressBar Minimum="0" Maximum="100" HorizontalAlignment="Left" Value="{Binding Progreso, UpdateSourceTrigger=PropertyChanged}" Height="20" Margin="76,40,0,0" VerticalAlignment="Top" Width="303"/>
|
||||||
<Label Content="{Binding TextEstado}" HorizontalAlignment="Left" Margin="76,70,0,0" VerticalAlignment="Top" Width="303" Height="28"/>
|
|
||||||
<Button Content="Cancelar" HorizontalAlignment="Left" Margin="304,103,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
|
<Grid HorizontalAlignment="Left" Margin="76,70,0,0" VerticalAlignment="Top" Width="303" 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" Click="Button_Click"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|
@ -14,6 +14,7 @@ namespace OliviaAddInPro
|
||||||
public MarchandoUnaDeViewModel()
|
public MarchandoUnaDeViewModel()
|
||||||
{
|
{
|
||||||
Cancelado = false;
|
Cancelado = false;
|
||||||
|
textBtn = "Cancelar";
|
||||||
}
|
}
|
||||||
public bool Cancelado { get; set; }
|
public bool Cancelado { get; set; }
|
||||||
|
|
||||||
|
|
@ -30,6 +31,13 @@ namespace OliviaAddInPro
|
||||||
get { return textEstado; }
|
get { return textEstado; }
|
||||||
set { base.SetProperty(ref textEstado, value, () => TextEstado); }
|
set { base.SetProperty(ref textEstado, value, () => TextEstado); }
|
||||||
}
|
}
|
||||||
|
private string textBtn;
|
||||||
|
public string TextBtn
|
||||||
|
{
|
||||||
|
get { return textBtn; }
|
||||||
|
set { base.SetProperty(ref textBtn, value, () => TextBtn); }
|
||||||
|
}
|
||||||
|
|
||||||
private double progreso;
|
private double progreso;
|
||||||
|
|
||||||
public double Progreso
|
public double Progreso
|
||||||
|
|
@ -50,7 +58,10 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
TextEstado = estado;
|
TextEstado = estado;
|
||||||
}
|
}
|
||||||
|
void IprocessManager.SetTextBtn(string textbtn)
|
||||||
|
{
|
||||||
|
TextBtn = textbtn;
|
||||||
|
}
|
||||||
void IprocessManager.SetProgress(double progresPorcent)
|
void IprocessManager.SetProgress(double progresPorcent)
|
||||||
{
|
{
|
||||||
Progreso = progresPorcent;
|
Progreso = progresPorcent;
|
||||||
|
|
@ -72,7 +83,10 @@ namespace OliviaAddInPro
|
||||||
}
|
}
|
||||||
public void CancelaOperacion()
|
public void CancelaOperacion()
|
||||||
{
|
{
|
||||||
TextProceso = "Cancelando proceso";
|
if(textBtn== "Cancelar")
|
||||||
|
TextProceso = "Cancelando proceso";
|
||||||
|
else
|
||||||
|
TextProceso = "Proceso finalizado.";
|
||||||
Cancelado = true;
|
Cancelado = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue