Ejemplo n.º 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?>();
 }
Ejemplo n.º 2
0
        public CalibrationForm(DeskController controller)
        {
            _controller = controller;
            InitializeComponent();

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

            Shown += CalibrationForm_Shown;
            Closed += CalibrationForm_Closed;
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }