public AutoUpDown(DeskController controller, Action preChangeWarning) { _timer = new Timer(TimerTick, this, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1)); _activityCheck = new Timer(ActivityTimerTick, this, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1)); _controller = controller; _preChangeWarning = preChangeWarning; NextChangeAtSubject = new Subject <DateTimeOffset?>(); }
public CalibrationForm(DeskController controller) { _controller = controller; InitializeComponent(); Shown += CalibrationForm_Shown; Closed += CalibrationForm_Closed; }
public AutoUpDown(DeskController controller, Action preChangeWarning) { _timer = new Timer(TimerTick, this, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1)); _activityCheck = new Timer(ActivityTimerTick, this, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1)); _controller = controller; _preChangeWarning = preChangeWarning; NextChangeAtSubject = new Subject<DateTimeOffset?>(); }
public MainForm() { InitializeComponent(); _controller = new DeskController(); _controller.OnStatusUpdate += (sender, args) => { if (InvokeRequired) { Invoke(new StatusUpdateDelegate(UpdateFormStatus), args); return; } UpdateFormStatus(args); }; _autoUpDown = new AutoUpDown(_controller, FlashWindow); _nextChangeSubscription = _autoUpDown.NextChangeAtSubject.Subscribe(SetNextChangeLabel); }