Пример #1
0
 public MainForm()
 {
     InitializeComponent();
     _repo          = new TimeManagementFileRepository("data\\data.json");
     _noteRepo      = new NoteFileRepository("data\\notes.json");
     _checkItemRepo = new CheckItemFileRepository("data\\checklist.json");
 }
Пример #2
0
        public WorkOrderViewModel()
        {
            _workOrderRepository      = new WorkOrderSQLServer();
            _timeManagementRepository = new TimeManagementSQLServer();
            StartButton = new DelegateCommand(StartButtonExecute);
            TimeButton  = new DelegateCommand(TimeButtonExecute);
            Time2Button = new DelegateCommand(Time2ButtonExecute);

            _timeRecorder = new TimeManagementServices(_timeManagementRepository.GetWorks());
            _displayTimer = new TimeDisplayTimer(new TimerCallback(TimeTest));
            _displayTimer.Start();
        }
        public WorkerViewModel()
        {
            _workOrderRepository      = new WorkOrderSQLServer();
            Worker1StartButton        = new DelegateCommand(Worker1StartButtonExecute);
            Worker2StartButton        = new DelegateCommand(Worker2StartButtonExecute);
            Worker3StartButton        = new DelegateCommand(Worker3StartButtonExecute);
            _timeManagementRepository = new TimeManagementSQLServer();

            observableTimer = Observable.Timer(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(2))
                              .Subscribe(_ =>
            {
                LabelContent.Value  += 1;
                WorkerWorkings.Value = new ObservableCollection <WorkingEntity>(WorkingData.GetWorkings(WorkId.Value, WorkerId.Value));
            });

            NextCommand = CanNext.Select(x => x == false).ToReactiveCommand();
            NextCommand.Subscribe(_ => { _workOrderRepository.ToNext(WorkId.Value, WorkerId.Value); });

            WorkerId.Subscribe(x =>
            {
            });
        }
Пример #4
0
 static AutoWaitModeChangeTimer()
 {
     _timer = new Timer(Callback);
     _timeManagementRepository = new TimeManagementSQLServer();
     _timeRecorder             = new TimeManagementServices(_timeManagementRepository.GetWorks());
 }