예제 #1
0
        private void ImageProcessDone(IAsyncResult result)
        {
            AysnImageProcessDelegate aysnDelegate = result.AsyncState as AysnImageProcessDelegate;

            if (aysnDelegate != null)
            {
                pictureBox1.Image = (Image)curBitmap;
            }
            this.Invoke((EventHandler) delegate
            {
                toolStripStatusLabel3.Text      = "当前进度:完成";
                toolStripStatusLabel3.BackColor = Color.Transparent;
                processing = false;
            });
        }
예제 #2
0
        private void BeginImageProcess(int id)
        {
            if (processing)
            {
                MessageForm mf = new MessageForm("正在处理中,请稍候!");
                {
                    mf.ShowDialog();
                }
                return;
            }
            this.Invoke((EventHandler) delegate
            {
                toolStripStatusLabel3.Text      = "当前进度:正在处理中......";
                toolStripStatusLabel3.BackColor = Color.Red;
                processing = true;
            });
            AysnImageProcessDelegate sysndelegate = new AysnImageProcessDelegate(ImageProcessing);

            sysndelegate.BeginInvoke(id, ImageProcessDone, sysndelegate);
            //return sysndelegate.BeginInvoke(id, ImageProcessDone, sysndelegate);
        }