Exemple #1
0
 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?>();
 }
Exemple #2
0
        public CalibrationForm(DeskController controller)
        {
            _controller = controller;
            InitializeComponent();

            Shown  += CalibrationForm_Shown;
            Closed += CalibrationForm_Closed;
        }
Exemple #3
0
 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?>();
 }
Exemple #4
0
        public CalibrationForm(DeskController controller)
        {
            _controller = controller;
            InitializeComponent();

            Shown += CalibrationForm_Shown;
            Closed += CalibrationForm_Closed;
        }
Exemple #5
0
        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);
        }
Exemple #6
0
        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);
        }