private void UpdateVMNbMessages(Int32 nb) { // We can update this compoent only if we are in the from thread if (tbNbVoiceMessages.InvokeRequired) { IntArgReturningVoidDelegate d = new IntArgReturningVoidDelegate(UpdateVMNbMessages); this.Invoke(d, new object[] { nb }); } else { tbNbVoiceMessages.Text = nb.ToString(); } }
public void UpdateProgressBar(int value) { if (conversionProgressBar.InvokeRequired) { IntArgReturningVoidDelegate d = new IntArgReturningVoidDelegate(UpdateProgressBar); this.Invoke(d, new object[] { value }); } else { conversionProgressBar.Value = value; conversionProgressBar.Refresh(); } }
private void SetHealth(int health) { if (this.healthIntLabel.InvokeRequired) { IntArgReturningVoidDelegate d = new IntArgReturningVoidDelegate(SetHealth); this.Invoke(d, new object[] { health }); } else { this.healthIntLabel.Text = health.ToString(); this.healthBar.Value = health; } }
private void PlaybackChangedEvent(object sender, PlaybackChangedEventArgs e) { int index = e.NowPlaying; playbackEngine.InitWriter(index); if (this.DataList.InvokeRequired) { IntArgReturningVoidDelegate d = new IntArgReturningVoidDelegate(SetList); this.Invoke(d, new object[] { index }); } else { SetList(index); } }
private void Set_Progreso(int Value) { //Al igual que el metodo SetText, para cambiar el progreso desde la funcion de //PuertoSerie_Data_Received es necesario utilizar delegados if (Barra_De_Progreso.InvokeRequired) { IntArgReturningVoidDelegate d = new IntArgReturningVoidDelegate(Set_Progreso); Invoke(d, new object[] { Value }); } else { try { Barra_De_Progreso.Value = Value; } finally { } } }