Exemple #1
0
        private static void CreateDataTransferInstance(Type FormType)
        {
            object obj = FormType.InvokeMember(null,
                                               BindingFlags.DeclaredOnly |
                                               BindingFlags.Public | BindingFlags.NonPublic |
                                               BindingFlags.Instance | BindingFlags.CreateInstance, null, null, null);

            TransferForm = (frmDataTransfer)obj;
            if (TransferForm == null)
            {
                throw (new Exception("Waiting Form must inherit from System.Windows.Forms.Form"));
            }
        }
Exemple #2
0
 /// <summary>
 /// Colse the SplashForm
 /// </summary>
 public static void CloseDataTransfer()
 {
     if (waitingThread == null || TransferForm == null) return;
     try
     {
         TransferForm.Invoke(new MethodInvoker(TransferForm.Close));
     }
     catch (Exception)
     {
     }
     waitingThread = null;
     TransferForm = null;
 }
Exemple #3
0
 /// <summary>
 /// Colse the SplashForm
 /// </summary>
 public static void CloseDataTransfer()
 {
     if (waitingThread == null || TransferForm == null)
     {
         return;
     }
     try
     {
         TransferForm.Invoke(new MethodInvoker(TransferForm.Close));
     }
     catch (Exception)
     {
     }
     waitingThread = null;
     TransferForm  = null;
 }
Exemple #4
0
 private static void CreateDataTransferInstance(Type FormType)
 {
     object obj = FormType.InvokeMember(null,
         BindingFlags.DeclaredOnly |
         BindingFlags.Public | BindingFlags.NonPublic |
         BindingFlags.Instance | BindingFlags.CreateInstance, null, null, null);
     TransferForm = (frmDataTransfer)obj;
     if (TransferForm == null)
     {
         throw (new Exception("Waiting Form must inherit from System.Windows.Forms.Form"));
     }
 }