示例#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
文件: MainForm.cs 项目: fritzh/PsDesk
        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);
        }