private async void DoInitialize()
 {
     InitializeCommands();
     InitializeCompositeCommands();
     ForecastTypes = new ObservableCollection <ForecastType>(await _forecastTypeProvider.Initialize()); // Forecasttypes are needed
     SelectedUserHandler.Initialize(this);
     InitializeDefaults();
 }
Example #2
0
        private async void InitializeAsync()
        {
            // Forecasttypes from server
            ForecastTypes = new List <ForecastType>(await _forecastTypeProvider.Initialize());
            ListOptions.InitializeForecastTypes(ForecastTypes);
            SearchOptions.InitializeForecastTypes(ForecastTypes);

            // Users from server
            var optionsResponse = await _forecastService.GetOverivewSearchOptions();

            if (optionsResponse != null)
            {
                SearchOptions.InitializeUsers(optionsResponse.Users);
            }

            // Projects from localstorage
            SearchOptions.InitializeProjects(_projectRepository.GetAllActive());

            // Companies from localstorage
            SearchOptions.InitializeCompanies(_companyRepository.GetAllActive());
        }