private void Initialize()
 {
     TimeCounter   = new ObservableTimeCounter(_ticker);
     ValentinesDay = new ObservableValentinesDay(_ticker);
     ConsoleKey    = new ObservableConsoleKey();
     Random        = ObservableRandomizer.Create(0, 100);
 }
Esempio n. 2
0
        public Clock(ObservableTimeCounter interval, Object obj)
        {
            _obj = obj;

            interval.Subscribe(time =>
            {
                lock (_obj)
                {
                    Console.SetCursorPosition(Console.WindowWidth - 8, 0);

                    Console.WriteLine(time);

                    Console.Title = time.ToString();
                }
            });
        }