Пример #1
0
        private void BackgroundWorker_RepaintBmpDelay_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            //
            // 后台更新位图完成,重绘位图。
            //

            if (Bmp != null)
            {
                Panel_GraphArea.CreateGraphics().DrawImage(Bmp, new Point(0, 0));
            }
        }
Пример #2
0
        private void RepaintBmp()
        {
            //
            // 更新并重绘位图。
            //

            if (Panel_GraphArea.Visible && (Panel_GraphArea.Width > 0 && Panel_GraphArea.Height > 0))
            {
                UpdateBmp();

                if (Bmp != null)
                {
                    Panel_GraphArea.CreateGraphics().DrawImage(Bmp, new Point(0, 0));
                }
            }
        }