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

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