コード例 #1
0
ファイル: Form1.cs プロジェクト: mofortin/NinjaMp3Editor
        private void OnWorkerProgressChanged(object sender, ProgressChangedArgs e)
        {
            //cross thread - so you don't get the cross theading exception
            if (this.InvokeRequired)
            {
                this.BeginInvoke((MethodInvoker)delegate
                {
                    OnWorkerProgressChanged(sender, e);
                });
                return;
            }

            //change control
            this.lblProgress.Text = e.Index.ToString() + " / " + e.Count.ToString();
            this.pbProgress.Maximum = e.Count;
            this.pbProgress.Value = e.Index;
        }
コード例 #2
0
ファイル: EditWorker.cs プロジェクト: mofortin/NinjaMp3Editor
 protected void OnProgressChanged(ProgressChangedArgs e)
 {
     if (ProgressChanged != null)
     {
         ProgressChanged(this, e);
     }
 }