Пример #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?>();
 }
Пример #2
0
        public CalibrationForm(DeskController controller)
        {
            _controller = controller;
            InitializeComponent();

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

            Shown += CalibrationForm_Shown;
            Closed += CalibrationForm_Closed;
        }
Пример #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);
        }
Пример #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);
        }