Example #1
0
 void ReportReceived(object sender, ProcessEventArgs e)
 {
     if (++count >= randomizeInterval)
     {
         if (autoCheck.Checked)
         {
             this.BeginInvoke(new generalDelegate(ic.ApplyRandomizedFactor));
             count = 0;
         }
     }
 }
Example #2
0
        void ReportReceived(object sender, ProcessEventArgs e)
        {
            double progress = e.progress;
            int    value    = (int)Math.Round((seekBar.Maximum * e.progress));

            if (value > seekBar.Maximum)
            {
                value = seekBar.Maximum;
            }
            seekBar.BeginInvoke(new progressDelegate(ChangeProgress), new object[] { value, e.maxTimeSeconds });
            if (value == seekBar.Maximum && !repeatCheck.Checked)
            {
                playButton.BeginInvoke(new generalDelegate(ChangePlayButton));
            }
            if (value < seekBar.Maximum && playButtonIsPlay)
            {
                // if sound played but playButton is not "Pause"
                playButton.BeginInvoke(new generalDelegate(ChangePlayButton));
            }
            if (titleLabel.Text != e.title)
            {
                titleLabel.BeginInvoke(new stringDelegate(SetTitle), new object[] { e.title });
            }
        }