Esempio n. 1
0
        private void LoadingProcess(object parent)
        {
            Form parent1 = parent as Form;

            wait = new WaitForm(parent1);
            wait.ShowDialog();
        }
Esempio n. 2
0
        public void Close()
        {
            if (wait != null)
            {
                string newText = "Done";
                wait.lblTitle.Invoke((MethodInvoker) delegate
                {
                    // Running on the UI thread
                    wait.lblTitle.Text = newText;
                });

                string doneImage = @"Image_Icon/checked.png";
                wait.label1.Invoke((MethodInvoker) delegate
                {
                    // Running on the UI thread
                    wait.label1.Image = Image.FromFile(doneImage);
                });

                // 1 luồng khác với luồng tạo
                wait.BeginInvoke(new System.Threading.ThreadStart(wait.CloseWaitForm));

                wait       = null;
                loadthread = null;
            }
        }
 public void Close()
 {
     if (wait != null)
     {
         wait.BeginInvoke(new System.Threading.ThreadStart(wait.CloseWaitForm));
         wait       = null;
         loadthread = null;
     }
 }
Esempio n. 4
0
 private void LoadingProcess()
 {
     wait = new WaitForm();
     wait.ShowDialog();
 }