Beispiel #1
0
 public static void RepeatWithDelegate(ExecuteRepeatedlyPrintDelegate method, int seconds, int duration)
 {
     int start = 0;
     while (start<=duration)
     {
         method();
         Thread.Sleep(seconds * 1000);
         start += seconds;
     }
 }
Beispiel #2
0
        public static void RepeatWithDelegate(ExecuteRepeatedlyPrintDelegate method, int seconds, int duration)
        {
            int start = 0;

            while (start <= duration)
            {
                method();
                Thread.Sleep(seconds * 1000);
                start += seconds;
            }
        }
Beispiel #3
0
 public void RepeatWithDelegate(ExecuteRepeatedlyPrintDelegate method, int seconds, int duration)
 {
     int start = 0;
     while (start <= duration)
     {
         if (RaiseCustomEvent != null)
         {
             RaiseCustomEvent(this, e);
         }
         Thread.Sleep(seconds * 1000);
         start += seconds;
     }
 }
Beispiel #4
0
        public void RepeatWithDelegate(ExecuteRepeatedlyPrintDelegate method, int seconds, int duration)
        {
            int start = 0;

            while (start <= duration)
            {
                if (RaiseCustomEvent != null)
                {
                    RaiseCustomEvent(this, e);
                }
                Thread.Sleep(seconds * 1000);
                start += seconds;
            }
        }