Example #1
0
        public void SetView(IStoplightView view)
        {
            this.view                = view;
            view.PropertyChanged    += OnViewPropertyChanged;
            view.UpdateClicked      += OnViewUpdateClicked;
            view.ForceChangeClicked += OnViewForceChangeClicked;

            Stoplight.Changed += OnStoplightChanged;

            view.GreenDuration  = "3000";
            view.YellowDuration = "500";
            view.RedDuration    = "5000";
            view.CurrentColor   = Color.Green;

            Schedule.Update(TimeSpan.FromMilliseconds(3000),
                            TimeSpan.FromMilliseconds(500),
                            TimeSpan.FromMilliseconds(5000));
            Schedule.Start();
        }
Example #2
0
		public void SetView(IStoplightView view)
		{
			this.view = view;
			view.PropertyChanged += OnViewPropertyChanged;
			view.UpdateClicked += OnViewUpdateClicked;
			view.ForceChangeClicked += OnViewForceChangeClicked;

			Stoplight.Changed += OnStoplightChanged;

			view.GreenDuration = "3000";
			view.YellowDuration = "500";
			view.RedDuration = "5000";
			view.CurrentColor = Color.Green;

			Schedule.Update(TimeSpan.FromMilliseconds(3000),
						 TimeSpan.FromMilliseconds(500),
						 TimeSpan.FromMilliseconds(5000));
			Schedule.Start();
		}