123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Text;
- using System.Windows.Forms;
- namespace LYFZ.ComponentLibrary
- {
- public class WaitForm
- {
-
- private LYFZ.ComponentLibrary.FrmLoadHandling fWait;
-
-
- private object someLongTimeMethod(object someArg)
- {
- return someArg;
- }
- public void ShowForm(IWin32Window owner)
- {
- try
- {
- System.Threading.Thread.Sleep(1);
-
- fWait = new LYFZ.ComponentLibrary.FrmLoadHandling(false);
-
-
- fWait.StartPosition = FormStartPosition.CenterScreen;
- fWait.Show(owner);
- fWait.Name = "fwit" + DateTime.Now.ToString("yyyyMMddhhmmssff");
- Application.DoEvents();
-
- }
- catch { }
- }
- public void CloseForm()
- {
- try
- {
- System.Threading.Thread.Sleep(15);
-
- if (fWait != null)
- {
- fWait.Close();
- fWait.Dispose();
-
-
-
-
-
- }
- }
- catch { }
- }
- }
- }
|