Example #1
0
 public CommandPacket()
 {
     OneTimeTimer.Run(() =>
     {
         debugInfo = this.ToJsonText();
     }, 100);
 }
Example #2
0
        public static void DelayRaise(this INotifyPropertyChanged obj, string propertyName, int milliseconds, Func <PropertyChangedEventHandler> funcGetHandler)
        {
            var timer = new OneTimeTimer(milliseconds);

            timer.Start(() =>
            {
                var propertyChangedDelegate = funcGetHandler();

                if (propertyChangedDelegate != null)
                {
                    propertyChangedDelegate(obj, new PropertyChangedEventArgs(propertyName));
                }
            });
        }
Example #3
0
        public static void Run(Action action, int timeSpan)
        {
            var timer = new OneTimeTimer(timeSpan);

            timer.Start(action);
        }