Exemple #1
0
 // private Stopwatch _stopwatch;
 public TimerInterrigationService(IDataLoadingService dataLoadingService, IApplicationSettingsService settingsService)
 {
     _dataLoadingService = dataLoadingService;
     _settingsService    = settingsService;
     _semaphoreSlim      = new SemaphoreSlim(1, 1);
     // _stopwatch=new Stopwatch();
     //  _stopwatch.Start();
 }
Exemple #2
0
 protected override void OnDisposing()
 {
     StopInterrogation();
     _runtimeDevice = null;
     _dataLoadingService.Dispose();
     _dataLoadingService = null;
     base.OnDisposing();
 }
        public MainViewModel(IDataLoadingService dataLoadingService, IPurchaseService purchaseService)
        {
            _dataLoadingService = dataLoadingService;
            _purchaseService = purchaseService;

            LoadAccountsCommand = new DelegateCommand(loadAccounts);
            LoadOrdersHistoryCommand = new DelegateCommand(loadOrdersHistory, canLoadOrdersHistory);
            LoadProductsCommand = new DelegateCommand(loadProducts);
            CalculateTotalsCommand = new DelegateCommand(calculateTotals, canCalculateTotals);
            PurchaseCommand = new DelegateCommand(purchase, canPurchase);
        }
Exemple #4
0
 public LocationController(ILocationService locationService, IDataLoadingService dataLoadingService)
 {
     _locationService    = locationService;
     _dataLoadingService = dataLoadingService;
 }
Exemple #5
0
        /// <summary>
        ///     Create a instance of <see cref="SchemeModeRuntimeViewModel"/>
        /// </summary>
        public SchemeModeRuntimeViewModel(IInteractionService interactionService,
                                          IPersistanceService persistanceService, IRuntimeModeDevicesServices devicesServices,
                                          IRuntimeModeDriversService driversService, IDeviceCommandQueueViewModel deviceCommandQueueViewModel,
                                          IDataLoadingService dataLoadingService, IGlobalDefectAcknowledgingService globalDefectAcknowledgingService,
                                          ILogInteractionViewModel logInteractionViewModel,
                                          IOutgoingLinesViewModelFactory outgoingLinesViewModelFactory, IAnalogMeterViewModelFactory analogMeterViewModelFactory, IUnityContainer container)
        {
            Guard.AgainstNullReference(interactionService, "interactionService");
            Guard.AgainstNullReference(persistanceService, "persistanceService");
            Guard.AgainstNullReference(devicesServices, "devicesServices");
            Guard.AgainstNullReference(driversService, "driversService");
            this._interactionService          = interactionService;
            this._persistanceService          = persistanceService;
            this._devicesServices             = devicesServices;
            this._driversService              = driversService;
            _dataLoadingService               = dataLoadingService;
            _globalDefectAcknowledgingService = globalDefectAcknowledgingService;
            _logInteractionViewModel          = logInteractionViewModel;
            _outgoingLinesViewModelFactory    = outgoingLinesViewModelFactory;
            _analogMeterViewModelFactory      = analogMeterViewModelFactory;
            _container = container;
            DeviceCommandQueueViewModel = deviceCommandQueueViewModel;

            this.BusLinkVisibleCollection = new ObservableCollection <bool>(new List <bool> {
                false, false, false
            });

            this.Starter1ToResistorsLink = new ObservableCollection <bool>(new List <bool>(8))
            {
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false
            };
            this.Starter2ToResistorsLink =
                new ObservableCollection <bool>(new List <bool>(8)
            {
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false
            });
            this.Starter3ToResistorsLink =
                new ObservableCollection <bool>(new List <bool>(8)
            {
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false,
                false
            });
            this._linksCollections    = new ObservableCollection <bool> [3];
            this._linksCollections[0] = Starter1ToResistorsLink;
            this._linksCollections[1] = Starter2ToResistorsLink;
            this._linksCollections[2] = Starter3ToResistorsLink;

            OpenPicon2ModuleInformationCommand = new DelegateCommand(OnOpenPicon2ModuleInformationExecute);
        }
Exemple #6
0
 public AnalogTimerInterrogationService(IDataLoadingService dataLoadingService, IApplicationSettingsService settingsService)
 {
     _dataLoadingService = dataLoadingService;
     _settingsService    = settingsService;
     _semaphoreSlim      = new SemaphoreSlim(1, 1);
 }