Esempio n. 1
0
        public CrypCloudManager()
        {
            var crypCloudPresentation = new CrypCloudPresentation();

            Presentation = crypCloudPresentation;
            AddScreensToNavigator(crypCloudPresentation);

            var jobListVM = (JobListVM)crypCloudPresentation.JobList.DataContext;

            jobListVM.Manager = this;
            Logger logger = Logger.GetLogger();

            logger.LoggOccured += logger_Logged;
        }
Esempio n. 2
0
        private void AddScreensToNavigator(CrypCloudPresentation crypCloudPresentation)
        {
            //viewmodels are created in the xaml file due to autocomplete and typesafty reasons
            var loginVm = (BaseViewModel)crypCloudPresentation.Login.DataContext;

            screenNavigator.AddScreenWithPath(loginVm, ScreenPaths.Login);

            var jobListVm = (BaseViewModel)crypCloudPresentation.JobList.DataContext;

            screenNavigator.AddScreenWithPath(jobListVm, ScreenPaths.JobList);

            var jobCreateVm = (BaseViewModel)crypCloudPresentation.JobCreation.DataContext;

            screenNavigator.AddScreenWithPath(jobCreateVm, ScreenPaths.JobCreation);

            var createAccountVm = (BaseViewModel)crypCloudPresentation.CreateAccount.DataContext;

            screenNavigator.AddScreenWithPath(createAccountVm, ScreenPaths.CreateAccount);

            var resetPasswordVm = (BaseViewModel)crypCloudPresentation.ResetPassword.DataContext;

            screenNavigator.AddScreenWithPath(resetPasswordVm, ScreenPaths.ResetPassword);
        }