예제 #1
0
 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();
     }
 }
예제 #2
0
 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();
     }
 }
예제 #3
0
 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;
     }
 }
예제 #4
0
        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);
            }
        }
예제 #5
0
 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
         {
         }
     }
 }