예제 #1
0
        private void SetWaitPic()
        {
            FrmFrame ff = new FrmFrame()
            {
                Width = 284, Height = 258, Text = "正在复制,请稍后..."
            };

            ControlLibrary.Control.WaitPic wp = new ControlLibrary.Control.WaitPic();
            ff.SetUserControl(wp);
            ff.Show();
            while (SROperation2.Instance.isLoading)
            {
                wp.SetReadCount();
                ff.Refresh();
            }
        }
예제 #2
0
        private void BgWorkerInit()
        {
            ThumbWidth = Convert.ToInt32(SRConfig.Instance.GetAppString("ThumbWidth"));
            ThumbHeight = Convert.ToInt32(SRConfig.Instance.GetAppString("ThumbHeight"));

            BgWorker = new BackgroundWorker();
            BgWorker.WorkerReportsProgress = true;
            BgWorker.WorkerSupportsCancellation = true;
            BgWorker.DoWork += new DoWorkEventHandler(worker_DoWork);
            BgWorker.RunWorkerCompleted += BgWorker_RunWorkerCompleted;
            BgWorker.WorkerSupportsCancellation = true;
            //显示进度窗体
            FrmFrame frm = new FrmFrame()
            {
                Text = "正在复制...",
                Width = 400,
                Height = 120,
            };
            frm.FormClosed += Frm_FormClosed;
            MyProgressBar bar = new MyProgressBar(this.BgWorker);
            frm.SetUserControl(bar);
            frm.StartPosition = FormStartPosition.CenterScreen;

            BgWorker.RunWorkerAsync();
            frm.ShowDialog(this);
        }
예제 #3
0
 private void SetWaitPic()
 {
     FrmFrame ff = new FrmFrame() { Width = 284, Height = 258, Text = "正在加载,请稍后..." };
     WaitPic wp = new WaitPic();
     ff.SetUserControl(wp);
     ff.Show();
     while (SROperation2.Instance.isLoading)
     {
         wp.SetReadCount();
         ff.Refresh();
     }
 }