Example #1
0
        public LoginPage(LoginViewModel loginPageViewModel, ITaskProgressMonitor progressMonitor)
            : this()
        {
            if (loginPageViewModel == null)
                throw new ArgumentNullException("loginPageViewModel", "loginPageViewModel is null.");
            if (progressMonitor == null)
                throw new ArgumentNullException("progressMonitor", "progressMonitor is null.");

            _viewModel = loginPageViewModel;
            _progressMonitor = progressMonitor;
        }
Example #2
0
        public void OrchestrateSystem()
        {
            PicasaUploadService picasaController = new PicasaUploadService();
            LoginViewModel loginViewModel = new LoginViewModel(picasaController);
            LoginPage loginPage = new LoginPage(loginViewModel, progressMonitor);

            this.wizard.AddPage(loginPage);

            IAlbumContext albumContext = new AlbumContext();
            AlbumsViewModel albumsViewModel = new AlbumsViewModel(picasaController, albumContext);
            AlbumsPage albumsPage = new AlbumsPage(albumsViewModel, ProgressMonitor);

            this.wizard.AddPage(albumsPage);

            UploadPhotosViewModel photosViewModel = new UploadPhotosViewModel(picasaController, albumContext);
            PhotosPage photosPage = new PhotosPage(photosViewModel, ProgressMonitor);

            this.wizard.AddPage(photosPage);

            // FIXME: There is a temporal coupling here (pages must be set before the actionbar is initialized
            wizardActionBar.Wizard = this.wizard;
        }