protected virtual void OnProgress(ConvertProgressEventArgs e)
 {
     Progress?.Invoke(this, e);
 }
Exemple #2
0
        private void SetProgress(Dictionary <string, FileControl> controls, List <string> converted, ConvertProgressEventArgs e)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new Action(() => SetProgress(controls, converted, e)));
                return;
            }

            if (e.Done && e.Exception == null)
            {
                converted.Add(e.FileName);
            }

            var control = controls[e.FileName];

            if (e.Done)
            {
                control.Dispose();
            }
            else
            {
                control.Progress = e.Progress;
            }
        }