Пример #1
0
    private static void sleepFunction(Control control, int time, CallBackTag d, object Tag)
    {
        System.Threading.Thread.Sleep(time);

        if (d != null && !control.IsDisposed)
        {
            try
            {
                control.Invoke(d, Tag);
            }
            catch (Exception)
            {
            }
        }
    }
Пример #2
0
    public static void Start(Control control, int time, CallBackTag callBack, object Tag)
    {
        ActionSleep sleep = sleepFunction;

        sleep.BeginInvoke(control, time, callBack, Tag, null, null);
    }