public StocksController( IStocksService stocksService, IDataUpdateService dataUpdateService) { _stocksService = stocksService ?? throw new ArgumentNullException(nameof(stocksService)); _dataUpdateService = dataUpdateService ?? throw new ArgumentNullException(nameof(dataUpdateService)); }
public ApplicationController(ShellViewModel shellViewModel, MainMonitoringController mainMonitoringController, NetworkAccessThreadController networkAccessThreadController, StatusBarController statusBarController, AttitudeMonitoringController attitudeMonitoringController, AltitudeMonitoringController altitudeMonitoringController, NavigationMonitoringController navigationMonitoringController, IDataFetchService dataFetchService, IDataUpdateService dataUpdateService, IGuiUpdateService guiUpdateService, IGeneralService generalService, ISettingsService settingsService, IShellService shellService) { this.shellViewModel = shellViewModel; this.mainMonitoringController = mainMonitoringController; this.networkAccessThreadController = networkAccessThreadController; this.attitudeMonitoringController = attitudeMonitoringController; this.altitudeMonitoringController = altitudeMonitoringController; this.navigationMonitoringController = navigationMonitoringController; this.statusBarController = statusBarController; this.dataFetchService = dataFetchService; this.dataUpdateService = dataUpdateService; this.generalService = generalService; this.settingsService = settingsService; this.shellService = shellService; this.guiUpdateService = guiUpdateService; dataUpdateService.ResetDataEvent += Reset; ChangeTabCommand = new DelegateCommand(ChangeTab_Command); }
public GetQuotesFunction( IDataUpdateService dataUpdateService, ISettings settings) { _dataUpdateService = dataUpdateService ?? throw new ArgumentNullException(nameof(dataUpdateService)); _settings = settings ?? throw new ArgumentNullException(nameof(settings)); }
/// <summary> /// Construct a new instance of the builder. /// </summary> /// <param name="loggerFactory"> /// Factory used to create loggers for the engine /// </param> /// <param name="dataUpdateService"> /// Data update service used to keep the engine's data up to date. /// </param> public DeviceDetectionHashEngineBuilder( ILoggerFactory loggerFactory, IDataUpdateService dataUpdateService) : base(dataUpdateService) { _loggerFactory = loggerFactory; }
/// <summary> /// Constructor /// </summary> /// <param name="dataUpdateService"></param> public FiftyOneOnPremiseAspectEngineBuilderBase( IDataUpdateService dataUpdateService) : base(dataUpdateService) { SetDataUpdateUrl(new Uri("https://distributor.51degrees.com/api/v2/download")); SetDataUpdateUrlFormatter(new FiftyOneUrlFormatter()); }
public EntryBaseInfoPageViewModel(INavigationService navigationService, IApplicationState applicationState, IDataUpdateService dataUpdateService, IDatabaseService databaseService) { _navigationService = navigationService; _dataUpdateService = dataUpdateService; _databaseService = databaseService; ContinueCommand = new DelegateCommand(() => OnContinueCommand().IgnoreResult()).ObservesCanExecute(() => CanContinue); CancelCommand = new DelegateCommand(() => OnCancelCommand().IgnoreResult()); DateSelectedCommand = new DelegateCommand(() => OnDateSelectedCommand().IgnoreResult()); ServiceChangedCommand = new DelegateCommand(() => { if (EntryBaseInfoPageModel.SelectedService != null) { DisplayServiceNotEntered = false; } }); LocationChangedCommand = new DelegateCommand(() => { if (EntryBaseInfoPageModel.SelectedLocation != null) { DisplayLocationNotEntered = false; } }); var now = DateTime.Now; MinDateOfService = now.Date; }
public DataFetchService(ISettingsService settingsService, IDataUpdateService dataUpdateService) { this.settingsService = settingsService; this.dataUpdateService = dataUpdateService; dataUpdateService.ResetDataEvent += ResetEventHandler; dataLock = new object(); AllDataSets = new List <DataSet>(); }
/// <summary> /// Internal constructor /// This builder should only be created through the /// <see cref="DeviceDetectionPipelineBuilder"/> /// </summary> /// <param name="loggerFactory"> /// The <see cref="ILoggerFactory"/> to use when creating loggers. /// </param> /// <param name="dataUpdateService"> /// The <see cref="IDataUpdateService"/> to use when registering /// data files for automatic updates. /// </param> /// <param name="httpClient"> /// The <see cref="HttpClient"/> to use for any web requests. /// </param> internal DeviceDetectionOnPremisePipelineBuilder( ILoggerFactory loggerFactory, IDataUpdateService dataUpdateService, HttpClient httpClient) : base(loggerFactory) { _dataUpdateService = dataUpdateService; _httpClient = httpClient; }
/// <summary> /// Constructor /// </summary> /// <param name="loggerFactory"> /// The factory to use for creating loggers within the pipeline. /// </param> /// <param name="httpClient"> /// The HTTP client to use within the pipeline. /// </param> /// <param name="dataUpdateService"> /// The DataUpdateService to use when checking for data updates. /// </param> public DeviceDetectionPipelineBuilder( ILoggerFactory loggerFactory, HttpClient httpClient, IDataUpdateService dataUpdateService) { _loggerFactory = loggerFactory; _httpClient = httpClient; _dataUpdateService = dataUpdateService; }
public RequiredServiceElementBuilder( ILoggerFactory loggerFactory, EmptyService service, IDataUpdateService updateService) { LoggerFactory = loggerFactory; Service = service; UpdateService = updateService; }
public GuiUpdateService(ISettingsService settingsService, IGeneralService generalService, IDataFetchService dataFetchService, IDataUpdateService dataUpdateService) { this.settingsService = settingsService; this.generalService = generalService; this.dataFetchService = dataFetchService; this.dataUpdateService = dataUpdateService; }
/// <summary> /// Constructor /// </summary> /// <param name="loggerFactory"> /// The factory to use for creating loggers within the pipeline. /// </param> /// <param name="httpClient"> /// The HTTP client to use within the pipeline. /// </param> public DeviceDetectionPipelineBuilder( ILoggerFactory loggerFactory, HttpClient httpClient) { _loggerFactory = loggerFactory; _httpClient = httpClient; _dataUpdateService = new DataUpdateService( _loggerFactory.CreateLogger <DataUpdateService>(), _httpClient); }
public CompleteSessionWizardController(CaseValidation sessionInProgress, INavigationService navigationService, IDataUpdateService dataUpdateService, IDatabaseService databaseService, ISessionUpdateService sessionUpdateService, IApplicationState applicationState) { _navigationService = navigationService; _dataUpdateService = dataUpdateService; _databaseService = databaseService; _sessionUpdateService = sessionUpdateService; _applicationState = applicationState; _sessionInProgress = sessionInProgress; }
public RequiredServiceElement( ILoggerFactory loggerFactory, EmptyService service, IDataUpdateService updateService) : base(loggerFactory.CreateLogger <RequiredServiceElement>()) { LoggerFactory = loggerFactory; Service = service; UpdateService = updateService; }
public NavigationMonitoringController(NavigationMonitoringViewModel navigationMonitoringViewModel, IShellService shellService, IDataUpdateService dataUpdateService, ISettingsService settingsService, IGuiUpdateService guiUpdateService) { this.navigationMonitoringViewModel = navigationMonitoringViewModel; this.shellService = shellService; this.dataUpdateService = dataUpdateService; this.settingsService = settingsService; this.guiUpdateService = guiUpdateService; shellService.PropertyChanged += ShellService_PropertyChanged; dataUpdateService.DataUpdateEvent += DataUpdateEventHandler; TabChangeCommand = new DelegateCommand(TabChange_Command); navXEstBuffer = new List <LogPoint>(); navXMeasBuffer = new List <LogPoint>(); navXRefBuffer = new List <LogPoint>(); navYEstBuffer = new List <LogPoint>(); navYMeasBuffer = new List <LogPoint>(); navYRefBuffer = new List <LogPoint>(); posBuffersFull = false; navXVelBuffer = new List <LogPoint>(); navYVelBuffer = new List <LogPoint>(); velBuffersFull = false; navTrackingEstBuffer = new List <PosistionPoint>(); navTrackingMeasBuffer = new List <PosistionPoint>(); navTrackingRefBuffer = new List <PosistionPoint>(); GearedValues <PosistionPoint> estpoints = new GearedValues <PosistionPoint>().WithQuality(Quality.Medium); GearedValues <PosistionPoint> measpoints = new GearedValues <PosistionPoint>().WithQuality(Quality.Medium); GearedValues <PosistionPoint> refpoints = new GearedValues <PosistionPoint>().WithQuality(Quality.Medium); for (int i = 0; i < settingsService.TrackingTimeFrame * 1000; i++) { estpoints.Add(new PosistionPoint(0, 0)); measpoints.Add(new PosistionPoint(0, 0)); refpoints.Add(new PosistionPoint(0, 0)); } navigationMonitoringViewModel.NavTrackingEstPoints = estpoints; navigationMonitoringViewModel.NavTrackingMeasPoints = measpoints; navigationMonitoringViewModel.NavTrackingRefPoints = refpoints; currentIndex = 0; posUpdating = false; velUpdating = false; trackingUpdating = false; coorLast = true; framePosCount = 0; frameVelCount = 0; }
public SessionStartPageViewModel(INavigationService navigationService, IConnectivity connectivity, IDatabaseService databaseService, IApplicationState applicationState, IDataUpdateService dataUpdateService) : base(applicationState) { _navigationService = navigationService; _databaseService = databaseService; _applicationState = applicationState; _dataUpdateService = dataUpdateService; _connectivity = connectivity; BeginSessionCommand = new DelegateCommand(() => OnBeginSessionCommand().IgnoreResult()); CancelCommand = new DelegateCommand(() => OnCancelCommand().IgnoreResult()); StartPreCheckClickedCommand = new DelegateCommand(() => OnStartPreCheckClickedCommand().IgnoreResult()); StartSessionCommand = new DelegateCommand <CaseValidation>((caseValidation) => StartSessionCommandCommand(caseValidation).IgnoreResult()); }
public SelectedCasePageViewModel(INavigationService navigationService, IApplicationState applicationState, IDatabaseService databaseService, IDataUpdateService dataUpdateService, ISessionUpdateService sessionUpdateService, IConnectivity connectivity) : base(applicationState) { _navigationService = navigationService; _applicationState = applicationState; _databaseService = databaseService; _dataUpdateService = dataUpdateService; _sessionUpdateService = sessionUpdateService; _connectivity = connectivity; HomeSessionClicked = new DelegateCommand(() => OnHomeSessionClicked().IgnoreResult()); ManualTimeClicked = new DelegateCommand(() => OnManualTimeClicked().IgnoreResult()); ViewDetailsClicked = new DelegateCommand(() => OnViewDetailsClicked().IgnoreResult()); }
public StatusBarController(StatusBarViewModel statusBarViewModel, IGeneralService generalService, IShellService shellService, IDataUpdateService dataUpdateService) { this.statusBarViewModel = statusBarViewModel; generalService.PropertyChanged += GeneralService_PropertyChanged; this.generalService = generalService; this.shellService = shellService; this.dataUpdateService = dataUpdateService; DisconnectCommand = new DelegateCommand(Disconnect_Command); ResetCommand = new DelegateCommand(Reset_Command); }
public ActiveSessionPageViewModel(INavigationService navigationService, IDataUpdateService dataUpdateService, IDatabaseService databaseService, ISessionUpdateService sessionUpdateService, IApplicationState applicationState) : base(applicationState) { _navigationService = navigationService; _dataUpdateService = dataUpdateService; _databaseService = databaseService; _sessionUpdateService = sessionUpdateService; _applicationState = applicationState; AddNotesClicked = new DelegateCommand(() => OnAddNotesClicked().IgnoreResult()); CompleteSessionClicked = new DelegateCommand(() => OnCompleteSessionClicked().IgnoreResult()); Device.StartTimer(TimeSpan.FromSeconds(5), () => { UpdateDuration(); return(_timerRunning); }); }
public InitializationForm( IDataUpdateService dataUpdateService, Func <MainWindow> mainWindowFactory, Func <UpdateCheck> updateConfirmationFactory, ICredentialService credentialService) { _dataUpdateService = dataUpdateService; _mainWindowFactory = mainWindowFactory; _updateConfirmationFactory = updateConfirmationFactory; _credentialService = credentialService; InitializeComponent(); StatusStrip.BackColor = Color.FromArgb(57, 109, 166); }
public PreCheckWizardController(Case thisCase, INavigationService navigationService, IDataUpdateService dataUpdateService, IDatabaseService databaseService, IApplicationState applicationState) { _navigationService = navigationService; _dataUpdateService = dataUpdateService; _databaseService = databaseService; _applicationState = applicationState; var now = DateTime.Now; _entryBaseInfoPageModel.Case = thisCase; _entryBaseInfoPageModel.DateOfService = now.Date; _entryBaseInfoPageModel.StartTime = (now - now.Date).RoundUpTo(15); _entryBaseInfoPageModel.EndTime = _entryBaseInfoPageModel.StartTime + TimeSpan.FromMinutes(30); }
public AboutPageViewModel(IVersionService versionService, ISettingsService settingsService, IDataUpdateService dataUpdateService, IEmailTask emailTask) { _versionService = versionService; _settingsService = settingsService; _dataUpdateService = dataUpdateService; _emailTask = emailTask; GetLatestInformation(); CheckForUpdate = new DelegateCommand(() => OnCheckForUpdate().IgnoreResult()); SendEmail = new DelegateCommand(() => OnSendEmail()); OpenUserGuide = new DelegateCommand(() => OnOpenUserGuide()); CanSendEmail = _emailTask.CanSendEmail; }
public DataUpdateJob(ISettingsManager settingsManager, IDatabaseManager databaseManager, IDataUpdateService updateService) { _settingsManager = settingsManager; _databaseManager = databaseManager; _updateService = updateService; _options = new OptionSet { { "d|directory=", "Backup folder name", v => _directory = v }, { "content-split", "Split content table by site", v => _contentSplit = v != null }, { "h|help", "Display help", v => _isHelp = v != null } }; }
public AttitudeMonitoringController(AttitudeMonitoringViewModel attitudeMonitoringViewModel, IShellService shellService, IDataUpdateService dataUpdateService, ISettingsService settingsService, IGuiUpdateService guiUpdateService) { this.attitudeMonitoringViewModel = attitudeMonitoringViewModel; this.shellService = shellService; this.dataUpdateService = dataUpdateService; this.settingsService = settingsService; this.guiUpdateService = guiUpdateService; dataUpdateService.DataUpdateEvent += DataUpdateEventHandler; shellService.PropertyChanged += ShellService_PropertyChanged; TabChangeCommand = new DelegateCommand(TabChange_Command); attRollEstBuffer = new List <LogPoint>(); attRollMeasBuffer = new List <LogPoint>(); attRollRefBuffer = new List <LogPoint>(); attPitchEstBuffer = new List <LogPoint>(); attPitchMeasBuffer = new List <LogPoint>(); attPitchRefBuffer = new List <LogPoint>(); attYawEstBuffer = new List <LogPoint>(); attYawMeasBuffer = new List <LogPoint>(); attYawRefBuffer = new List <LogPoint>(); attRotBuffersfull = false; attVelXBuffer = new List <LogPoint>(); attVelYBuffer = new List <LogPoint>(); attVelZBuffer = new List <LogPoint>(); attVelBuffersFull = false; motorFLBuffer = new List <LogPoint>(); motorFRBuffer = new List <LogPoint>(); motorBLBuffer = new List <LogPoint>(); motorBRBuffer = new List <LogPoint>(); attMotBuffersFull = false; rotLast = true; rotUpdating = false; velUpdating = false; motUpdating = false; frameRotCount = 0; frameVelCount = 0; frameMotCount = 0; }
public MainMonitoringController(MainMonitoringViewModel mainMonitoringViewModel, IDataUpdateService dataUpdateService, IShellService shellService, ISettingsService settingsService, IGeneralService generalService) { this.mainMonitoringViewModel = mainMonitoringViewModel; this.dataUpdateService = dataUpdateService; this.shellService = shellService; this.settingsService = settingsService; this.generalService = generalService; dataUpdateService.DataUpdateEvent += DataUpdateEventHandler; generalService.PropertyChanged += GeneralService_PropertyChanged; shellService.PropertyChanged += ShellService_PropertyChanged; isVisible = true; attRollEstBuffer = new List <LogPoint>(); attRollMeasBuffer = new List <LogPoint>(); attRollRefBuffer = new List <LogPoint>(); attPitchEstBuffer = new List <LogPoint>(); attPitchMeasBuffer = new List <LogPoint>(); attPitchRefBuffer = new List <LogPoint>(); attYawEstBuffer = new List <LogPoint>(); attYawMeasBuffer = new List <LogPoint>(); attYawRefBuffer = new List <LogPoint>(); attBuffersFull = false; altEstBuffer = new List <LogPoint>(); altMeasBuffer = new List <LogPoint>(); altRefBuffer = new List <LogPoint>(); altBuffersFull = false; navXEstBuffer = new List <LogPoint>(); navXMeasBuffer = new List <LogPoint>(); navXRefBuffer = new List <LogPoint>(); navYEstBuffer = new List <LogPoint>(); navYMeasBuffer = new List <LogPoint>(); navYRefBuffer = new List <LogPoint>(); navBuffersFull = false; mainMonitoringViewModel.MinValue = 0; mainMonitoringViewModel.MaxValue = settingsService.TimeFrame; attUpdating = false; altUpdating = false; navUpdating = false; }
public LoginPageViewModel(INavigationService navigationService, IAccountService accountService, IApplicationState applicationState, IConnectivity connectivity, IOfflineServices offlineServices, ISecureAppStorage secureAppStorage, IDataUpdateService dataUpdateService, IDatabaseService databaseService, ISessionUpdateService sessionUpdateService, ISettingsService settingsService, IUpdateService updateService, IPageDialogService pageDialogService) { _navigationService = navigationService; _accountService = accountService; _applicationState = applicationState; _connectivity = connectivity; _offlineServices = offlineServices; _secureAppStorage = secureAppStorage; _dataUpdateService = dataUpdateService; _databaseService = databaseService; _sessionUpdateService = sessionUpdateService; _settingsService = settingsService; _updateService = updateService; _pageDialogService = pageDialogService; Login = new DelegateCommand(() => OnLoginCommand().IgnoreResult()); Update = new DelegateCommand(() => OnUpdateCommand().IgnoreResult()); }
/// <summary> /// Updates the settings. /// </summary> /// <returns>Task.</returns> async Task UpdateSettings() { try { IConnectivity _connectivity = Container.Resolve <IConnectivity>(); if (_connectivity.IsConnected) { // update the current settings IDataUpdateService dataUpdateService = Container.Resolve <IDataUpdateService>(); ISettingsService settingsService = Container.Resolve <ISettingsService>(); var initialData = await dataUpdateService.GetInitialData(); await settingsService.UpdateSettings(initialData.Settings); } } catch { // ignore any errors } }
public AltitudeMonitoringController(AltitudeMonitoringViewModel altitudeMonitoringViewModel, IShellService shellService, IGeneralService generalService, IDataUpdateService dataUpdateService, ISettingsService settingsService) { this.altitudeMonitoringViewModel = altitudeMonitoringViewModel; this.shellService = shellService; this.dataUpdateService = dataUpdateService; this.generalService = generalService; this.settingsService = settingsService; altEstBuffer = new List <LogPoint>(); altMeasBuffer = new List <LogPoint>(); altRefBuffer = new List <LogPoint>(); altBuffersFull = false; shellService.PropertyChanged += ShellService_PropertyChanged; dataUpdateService.DataUpdateEvent += DataUpdateEventHandler; updating = false; }
private bool disposedValue = false; // To detect redundant calls /// <summary> /// Dispose of this instance /// </summary> /// <param name="disposing"> /// True if this is called from the Dispose method. /// False if this is called from the finalizer. /// </param> protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { if (_dataUpdateService != null) { _dataUpdateService.UnRegisterDataFile(this); _dataUpdateService = null; } if (FileWatcher != null) { FileWatcher.Dispose(); } if (Timer != null) { Timer.Dispose(); } } disposedValue = true; } }
public SessionUpdateService(IDatabaseService databaseService, IDataUpdateService dataUpdateService, IConnectivity connectivity) { _databaseService = databaseService; _dataUpdateService = dataUpdateService; _connectivity = connectivity; }