private void LoadingProcessEx(object parent)
        {
            Form Cparent = parent as Form;

            loadingForm = new WaitForm(Cparent);
            loadingForm.ShowDialog();
        }
 public void Close()
 {
     if (loadingForm != null)
     {
         loadingForm.BeginInvoke(new System.Threading.ThreadStart(loadingForm.CloseLoadingForm));
         loadingForm = null;
         loadthread  = null;
     }
 }
 private void LoadingProcessEx()
 {
     loadingForm = new WaitForm();
     loadingForm.ShowDialog();
 }