Multilinea en marchando una de.
Cambio de texto en boton finalizar/cancelarElena/develop
parent
e2ec0d2dc6
commit
ba8e0579be
|
|
@ -10,6 +10,7 @@ namespace OliviaAddInPro.Model.contract
|
|||
{
|
||||
void SetProceso(string proceso);
|
||||
void SetEstado(string estado);//estado del proceso
|
||||
void SetTextBtn(string textbtn);
|
||||
void SetProgress(double progresPorcent);
|
||||
double GetProgress();
|
||||
bool Getcancelled();
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ namespace OliviaAddInPro.Services
|
|||
//borra los archivos que le toca borrar
|
||||
BorraFiles();
|
||||
});
|
||||
task.Wait();
|
||||
//task.Wait();
|
||||
//borra los archivos que le toca borrar
|
||||
//BorraFiles();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -425,6 +425,7 @@ namespace OliviaAddInPro.Services
|
|||
{
|
||||
pon_progr(100);
|
||||
pon_texto("Finalizado proceso con éxito");
|
||||
pon_textBtn("Finalizar");
|
||||
break;
|
||||
}
|
||||
case TiposActu.ActuFinNOk:
|
||||
|
|
@ -432,12 +433,14 @@ namespace OliviaAddInPro.Services
|
|||
pon_progr(100);
|
||||
err_str = "Finalizado proceso con fallos\n" + tarea;
|
||||
pon_texto(err_str);
|
||||
pon_textBtn("Finalizar");
|
||||
break;
|
||||
}
|
||||
case TiposActu.ActuSect:
|
||||
{
|
||||
pon_progr(100);
|
||||
pon_texto("Finalizada sectorización\n" + tarea);
|
||||
pon_textBtn("Finalizar");
|
||||
break;
|
||||
}
|
||||
case TiposActu.ActuPlan:
|
||||
|
|
@ -480,6 +483,11 @@ namespace OliviaAddInPro.Services
|
|||
{
|
||||
cps.SetEstado(txt);
|
||||
}
|
||||
private void pon_textBtn(String txt)
|
||||
{
|
||||
cps.SetTextBtn(txt);
|
||||
}
|
||||
|
||||
/*
|
||||
* Para poder actualizar la barra de progreso hay que llamar a invoke
|
||||
* porque está desde otro thread
|
||||
|
|
|
|||
|
|
@ -6,14 +6,19 @@
|
|||
xmlns:ui="clr-namespace:OliviaAddInPro"
|
||||
xmlns:local="clr-namespace:OliviaAddInPro"
|
||||
mc:Ignorable="d"
|
||||
Title="MarchandoUnaDe" Height="168" Width="481"
|
||||
Title="Olivia" Height="227" Width="449"
|
||||
d:DataContext="{Binding Path=ui.MarchandoUnaDeViewModel}"
|
||||
ResizeMode="NoResize">
|
||||
|
||||
<Grid>
|
||||
<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"/>
|
||||
<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>
|
||||
</Window>
|
||||
|
|
@ -14,6 +14,7 @@ namespace OliviaAddInPro
|
|||
public MarchandoUnaDeViewModel()
|
||||
{
|
||||
Cancelado = false;
|
||||
textBtn = "Cancelar";
|
||||
}
|
||||
public bool Cancelado { get; set; }
|
||||
|
||||
|
|
@ -30,6 +31,13 @@ namespace OliviaAddInPro
|
|||
get { return 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;
|
||||
|
||||
public double Progreso
|
||||
|
|
@ -50,7 +58,10 @@ namespace OliviaAddInPro
|
|||
{
|
||||
TextEstado = estado;
|
||||
}
|
||||
|
||||
void IprocessManager.SetTextBtn(string textbtn)
|
||||
{
|
||||
TextBtn = textbtn;
|
||||
}
|
||||
void IprocessManager.SetProgress(double progresPorcent)
|
||||
{
|
||||
Progreso = progresPorcent;
|
||||
|
|
@ -72,7 +83,10 @@ namespace OliviaAddInPro
|
|||
}
|
||||
public void CancelaOperacion()
|
||||
{
|
||||
TextProceso = "Cancelando proceso";
|
||||
if(textBtn== "Cancelar")
|
||||
TextProceso = "Cancelando proceso";
|
||||
else
|
||||
TextProceso = "Proceso finalizado.";
|
||||
Cancelado = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue