private void ShowBusyIndicator(bool isbusy)
        {
            Application.UseWaitCursor = isbusy;
            if (isbusy)
            {
                if (_busyIndicator == null)
                {
                    _busyIndicator = new ProgressForm();
                    _busyIndicator.Text = "请稍候...";
                    _busyIndicator.ShowDialog(this);
                }

            }
            else
            {

                if (_busyIndicator != null)
                {
                    _busyIndicator.Close();
                    _busyIndicator = null;
                }
            }
        }
Exemple #2
0
        private void StartLoader()
        {
            ProgressForm form = new ProgressForm();
            form.Text = this.Text;

            form.DoWork += new DoWorkEventHandler(form_DoWork);
            form.WorkIsDone += new RunWorkerCompletedEventHandler(form_WorkIsDone);
            form.ShowDialog(this);
        }