예제 #1
0
        public void SetUp()
        {
            _gitClientService = MockRepository.GenerateMock<IGitClientService>();
            _pageNavigationService = MockRepository.GenerateMock<IPageNavigationService<IPullRequestsWindow>>();

            _sut = CreateSut();
        }
 public CodeFactsViewModel(IPageNavigationService pageNavigationService)
     : base(pageNavigationService)
 {
     _pageNavigationService = pageNavigationService;
     DisplayName = "Code facts";
     InitializeUI();
 }
예제 #3
0
 public DecisionHolder(IPageNavigationService pageNavigation, Decision decision, int sceneID) : base(pageNavigation)
 {
     SceneID                   = sceneID;
     _decision                 = decision;
     _scenceChoice             = new ScenceChoice();
     CurrentDescisionViewModel = new DescisionPageViewModel(pageNavigation, _scenceChoice, SceneID);
 }
예제 #4
0
        public RedViewModel(IPageNavigationService pageNavigationService)
        {
            _pageNavigationService = pageNavigationService;

            NavigateCommand  = new RelayCommand(Navigate);
            IncrementCommand = new RelayCommand(Increment);
        }
예제 #5
0
        public BaseViewModel(ISharingService sharingService,
		    IPageNavigationService pageNavigationService,
		    IUnityContainer unityContainer)
        {
            _sharingService = sharingService;
            _pageNavigationService = pageNavigationService;
            _unityContainer = unityContainer;
        }
 public LoginViewModel(IUserDataService userDataService, IPageNavigationService pageNavigationService, IUserNotificationService userNotificationService, IAppRepository appRepository)
     : base(pageNavigationService)
 {
     _userDataService = userDataService;
     _pageNavigationService = pageNavigationService;
     _userNotificationService = userNotificationService;
     _appRepository = appRepository;
     //TokenData = "bogdan/aa8d8752-7404-46ab-b55f-4b40fc8b60e7";
 }
 public DaysOnFireViewModel(IPageNavigationService pageNavigationService, IUserDataService userDataService, IAppRepository appRepository, IUserNotificationService userNotificationService)
     : base(pageNavigationService)
 {
     _pageNavigationService = pageNavigationService;
     _userDataService = userDataService;
     _appRepository = appRepository;
     _userNotificationService = userNotificationService;
     DisplayName = "Days on fire";
 }
예제 #8
0
 public CommandsService(
     ExportFactory <IDiffWindowControlViewModel> diffFactory,
     ExportFactory <IPullRequestsWindowContainerViewModel> pqFactory,
     IPageNavigationService <IPullRequestsWindow> navigationService)
 {
     _diffFactory       = diffFactory;
     _pqFactory         = pqFactory;
     _navigationService = navigationService;
 }
예제 #9
0
 public SearchPageViewModel(IAPIWrapper<Show> apiWrapper, IDialogService dialogService,
     IPageNavigationService navigationService)
 {
     _apiWrapper = apiWrapper;
     _dialogService = dialogService;
     _navigationService = navigationService;
     InitViewState();
     InitCollections();
     InitCommands();
 }
예제 #10
0
 public LogInViewModel(
     IAuthenticationService authenticationService,
     IPageNavigationService pageNavigationService,
     IServerQueryService serverQueryService)
 {
     _authenticationService = authenticationService;
     _pageNavigationService = pageNavigationService;
     _serverQueryService    = serverQueryService;
     LogInCommand           = new RelayCommand(async() => await LogIn(), CanExecuteLogin);
 }
예제 #11
0
        public BlueViewModel(
            IFrameNavigationService frameNavigationService,
            IPageNavigationService pageNavigationService)
        {
            _frameNavigationService = frameNavigationService;
            _pageNavigationService  = pageNavigationService;

            NextCommand = new RelayCommand(GoNext);
            BackCommand = new RelayCommand(GoBack);
        }
예제 #12
0
        internal void Application_Startup(object sender, StartupEventArgs e)
        {
            MainWindow main = new MainWindow();

            NavigationService = new PageNavigationService(main.NavigationService);
            main.Show();
            HomePage homePage = new HomePage();

            NavigationService.Navigate(homePage);
        }
 public UserFactsViewModel(IPageNavigationService pageNavigationService, IUserDataService userDataService,
     IAppRepository appRepository, IUserNotificationService userNotificationService)
     : base(pageNavigationService)
 {
     _pageNavigationService = pageNavigationService;
     _userDataService = userDataService;
     _appRepository = appRepository;
     _userNotificationService = userNotificationService;
     DisplayName = "Behavior facts";
 }
        public MainPageViewModel(
            IPageNavigationService pageNavigationService,
            IAppInfoService appInfoService)
        {
            _pageNavigationService = pageNavigationService;
            _appInfoService        = appInfoService;

            Items            = new ObservableKeyGroupsCollection <string, CommandAction>();
            GoToEmptyCommand = new RelayCommand(GoToEmpty);
        }
        //private ICommand _navigateToVideoPlayerPageCommand;
        public VideosCollectionPageViewModel(IUnityContainer unityContainer,
            IPageNavigationService pageNavigationService,
            ISharingService sharingService)
            : base(sharingService, pageNavigationService, unityContainer)
        {
            _unityContainer = unityContainer;
            _pageNavigationService = pageNavigationService;
            _sharingService = sharingService;

            InitializeData();
        }
        public void SetUp()
        {
            _gitClientService       = MockRepository.GenerateMock <IGitClientService>();
            _gitService             = MockRepository.GenerateMock <IGitService>();
            _pageNavigationService  = MockRepository.GenerateMock <IPageNavigationService <IPullRequestsWindow> >();
            _eventAggregator        = new EventAggregatorService();
            _treeStructureGenerator = MockRepository.GenerateMock <ITreeStructureGenerator>();
            _commandsService        = MockRepository.GenerateMock <ICommandsService>();


            _sut = CreateSut();
        }
예제 #17
0
        public ServersViewModel(IPageNavigationService navigationService)
        {
            _navigationService = navigationService;
            LogOffCommand      = new RelayCommand(LogOff);

            if (navigationService.Parameter is IList <Server> servers)
            {
                Servers = new BindingList <Server>(servers);
            }
            else
            {
                Servers = new BindingList <Server>();
            }
        }
예제 #18
0
        public void SetUp()
        {
            _gitClientService         = MockRepository.GenerateMock <IGitClientService>();
            _gitService               = MockRepository.GenerateMock <IGitService>();
            _pageNavigationService    = MockRepository.GenerateMock <IPageNavigationService <IPullRequestsWindow> >();
            _eventAggregator          = new EventAggregatorService();
            _treeStructureGenerator   = MockRepository.GenerateMock <ITreeStructureGenerator>();
            _commandsService          = MockRepository.GenerateMock <ICommandsService>();
            _pullRequestDiffViewModel = MockRepository.GenerateMock <IPullRequestDiffViewModel>();

            _pullRequestDiffViewModel.Stub(x => x.ThrowableCommands).Return(new List <ReactiveCommand>());

            _sut = CreateSut();
        }
예제 #19
0
        public ItemDetailsPageViewModel(IPageNavigationService pageNavigationService,
            ISharingService sharingService,
            List<Item> items,
            Item selectedItem,
            IUnityContainer unityContainer,
            ILiveTileService liveTileService)
            : base(sharingService, pageNavigationService, unityContainer)
        {
            _sharingService = sharingService;
            _liveTileService = liveTileService;

            ItemsCollection = items;
            SelectedItem = selectedItem;
        }
예제 #20
0
        public AlbumPhotosPageViewModel(
            IPageNavigationService pageNavigationService,
            List<FlickrImage> flickrImages,
            ISharingService sharingService,
            ILiveTileService liveTileService,
            ILockScreenService lockScreenService,
            IUnityContainer unityContainer)
            : base(sharingService, pageNavigationService, unityContainer)
        {
            _sharingService = sharingService;
            _liveTileService = liveTileService;
            _lockScreenService = lockScreenService;

            FlickrImagesCollection = flickrImages;
            SelectedFlickrImage = FlickrImagesCollection[0];
        }
 public ActionViewModel(IPageNavigationService pageNavigation, List <DataModels.Action> actionElements) : base(pageNavigation)
 {
     _actionElements = actionElements;
     FireAction      = new DataModels.Action()
     {
         ActionEnum = Actions.Fire
     };
     SmokeAction = new DataModels.Action()
     {
         ActionEnum = Actions.Smoke
     };
     Extingshuer = new DataModels.Action()
     {
         ActionEnum = Actions.Extingishuer
     };
 }
예제 #22
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            MainWindow mainWindow = new MainWindow();

            mainWindow.Show();

            MainFrame      = mainWindow.MainFrame;
            pageNavigation = new PageNavigationService(mainWindow.MainFrame);

            var x = (ViewModelLocator)Current.Resources["ViewModelLocator"];

            mainWindow.DataContext = x.Main;

            pageNavigation.Navigate <MainPage>();
        }
예제 #23
0
 public CreateChatViewModel(
     IChatsListManager chatsListManager,
     IChatService chatService,
     IPageNavigationService pageNavigationService,
     IChatLocalizedStrings localizedStrings,
     IFormatService formatService,
     IUploadImageService uploadImageService,
     IDialogsService dialogsService)
 {
     _chatsListManager      = chatsListManager;
     _chatService           = chatService;
     _pageNavigationService = pageNavigationService;
     _formatService         = formatService;
     _uploadImageService    = uploadImageService;
     _dialogsService        = dialogsService;
     LocalizedStrings       = localizedStrings;
 }
        public MainPageViewModel(IPageNavigationService pageNavigationService)
        {
            _pageNavigationService = pageNavigationService;

            Items = new ObservableRangeCollection <CommandAction>(
                new List <CommandAction>
            {
                new CommandAction(new RelayCommand(PerformSimpleNavigation), "Simple Navigation"),
                new CommandAction(new RelayCommand(PerformMasterDetailNavigation), "Master Detail Navigation"),
                new CommandAction(new RelayCommand(Dialogs), "Dialogs"),
                new CommandAction(new RelayCommand(AsyncCommands), "Async Commands"),
                new CommandAction(new RelayCommand(Permissions), "Permissions"),
                new CommandAction(new RelayCommand(Validation), "Validation"),
                new CommandAction(new RelayCommand(PaginationSearch), "Pagination Search"),
                new CommandAction(new RelayCommand(Remote), "Remote")
            });
        }
예제 #25
0
        public ChatMessagesViewModel(
            IImagePickerService imagePicker,
            IPageNavigationService pageNavigationService,
            IChatLocalizedStrings localizedStrings,
            IFormatService formatService,
            ChatManager chatManager,
            ConnectionStatusViewModel connectionStatusViewModel)
        {
            _imagePicker           = imagePicker;
            _pageNavigationService = pageNavigationService;
            _localizedStrings      = localizedStrings;
            _formatService         = formatService;
            _chatManager           = chatManager;

            ConnectionStatus = connectionStatusViewModel;

            BackCommand     = new RelayCommand(_pageNavigationService.GoBack, () => _pageNavigationService.CanGoBack);
            ShowInfoCommand = new RelayCommand(ShowInfo);
        }
예제 #26
0
        public ChatsListViewModel(
            IPageNavigationService pageNavigationService,
            IDialogsService dialogsService,
            IChatLocalizedStrings localizedStrings,
            IChatsListManager chatsListManager,
            ConnectionStatusViewModel connectionStatusViewModel)
        {
            _pageNavigationService = pageNavigationService;
            _dialogsService        = dialogsService;
            _chatsListManager      = chatsListManager;

            LocalizedStrings          = localizedStrings;
            ConnectionStatusViewModel = connectionStatusViewModel;

            Chats = _chatsListManager.ChatsCollection;

            CreateChatCommand = new RelayCommand(CreateChat);
            LeaveChatCommand  = new AsyncCommand <ChatSummaryViewModel>(LeaveChatAsync);
            DeleteChatCommand = new AsyncCommand <ChatSummaryViewModel>(DeleteChatAsync);
        }
        public CreateIssueViewModel(
            IYouTrackClientService youTrackClientService,
            IPageNavigationService <IYouTrackIssuesWindow> pageNavigationService,
            IEventAggregatorService eventAggregator,
            IUserInformationService userInfoService,
            ICommandsService commandsService,
            IDataNotifier dataNotifier,
            IPullRequestDiffViewModel pullRequestDiffViewModel
            )
        {
            _youTrackClientService = youTrackClientService;

            _pageNavigationService = pageNavigationService;
            _eventAggregator       = eventAggregator;

            _dataNotifier = dataNotifier;

            PullRequestDiffViewModel = pullRequestDiffViewModel;

            _userInfoService  = userInfoService;
            SelectedReviewers = new ReactiveList <GitUser>();
        }
예제 #28
0
        public NewChatViewModel(
            IChatService chatService,
            IChatsListManager chatsListManager,
            IChatLocalizedStrings localizedStrings,
            IPageNavigationService pageNavigationService,
            ILogManager logManager)
        {
            _searchContactsStrategy = new CreateChatSearchContactsStrategy(chatService);
            _chatsListManager       = chatsListManager;
            LocalizedStrings        = localizedStrings;
            _pageNavigationService  = pageNavigationService;
            _logger         = logManager.GetLogger <NewChatViewModel>();
            NoResultVisible = false;

            PaginationViewModel = new PaginationViewModel <ChatUserViewModel, ChatUserModel>(
                new ChatUserViewModelFactory(),
                SearchLoader,
                SearchFilter,
                DefaultSearchResultsPageSize);
            SearchCommand             = new AsyncCommand(DoSearch);
            CancelCommand             = new RelayCommand(GoBack);
            CreateGroupChatCommand    = new RelayCommand(() => _pageNavigationService.NavigateToViewModel <CreateChatViewModel>());
            CreatePersonalChatCommand = new RelayCommand <ChatUserViewModel>(CreatePersonalChat);
        }
예제 #29
0
 public PennyViewModel(IPageNavigationService pageNavigationService, IContactService contactService)
     : base(pageNavigationService)
 {
     _contactService = contactService;
 }
예제 #30
0
 public MainViewModel(IPageNavigationService navigationService)
 {
     _navigationService = navigationService;
 }
 public PageFluentNavigatorTests()
 {
     _pageNavigationService = Substitute.For <IPageNavigationService>();
     _navigator             = new PageFluentNavigator <ViewModelStub>(_pageNavigationService);
 }
예제 #32
0
 public MainPageViewModel(IPageNavigationService pageNavigationService)
     : base(pageNavigationService)
 {
 }
예제 #33
0
        public MainPageViewModel(
            IPageNavigationService pageNavigationService,
            IItemsService dataService,
            ITweetsService tweetsService,
            IVideosService youtubeChannelService,
            ISettingsService settingsService,
            IUnityContainer unityContainer,
            IItemsRepository itemsRepository,
            ITweetsRepository tweetsRepository,
            IImagesRepository imagesRepository,
            IVideosRepository videosRepository,
            ICarsRepository carsRepository,
            IFlickrService flickrService,
            ISharingService sharingService)
            : base(
                sharingService,
                pageNavigationService,
                unityContainer)
        {
            _pageNavigationService = pageNavigationService;
            _dataService = dataService;
            _tweetsService = tweetsService;
            _youtubeChannelService = youtubeChannelService;
            _unityContainer = unityContainer;
            _itemsRepository = itemsRepository;
            _tweetsRepository = tweetsRepository;
            _imagesRepository = imagesRepository;
            _videosRepository = videosRepository;
            _flickrService = flickrService;
            _carsRepository = carsRepository;

            //CarModelsCollection = carsRepository.GetAll();

#if WINDOWS_PHONE
            if (DesignerProperties.IsInDesignTool)
#else // !WINDOWS_PHONE
			if (DesignMode.DesignModeEnabled)
#endif
            {
                //InitializeDataForDesignMode();
                InitializeDataFromOnlineAsync();
            }
        }
예제 #34
0
 public MyViewModel1(IPageNavigationService navigator, IDestinationViewModel destination)
 {
     GoToPageCommand = new RelayCommand(() =>
                                        navigator.NavigateToDestinationPage(destination));
 }
 public ExtendedSplashViewModel(IPageNavigationService pageNavigationService, IAppRepository appRepository, IUserNotificationService userNotificationService) : base(pageNavigationService)
 {
     _pageNavigationService = pageNavigationService;
     _appRepository = appRepository;
     _userNotificationService = userNotificationService;
 }
예제 #36
0
 /// <summary>
 /// Initializes a new instance of the SummaryViewModel class.
 /// </summary>
 public SummaryViewModel(IDataService dataService, IPageNavigationService navigationService)
 {
     _dataService       = dataService;
     _navigationService = navigationService;
 }
 public MainPageViewModel(IPageNavigationService pageNavigation, ScenarioStorer scenarioStorer, IFormatConvert formatConvert) : base(pageNavigation)
 {
     _scenariostorer = scenarioStorer;
     FormatConvert   = formatConvert;
 }
예제 #38
0
 public EventViewModel(IPageNavigationService pageNavigationService, IPhinugService phinugService) : base(pageNavigationService)
 {
     _phinugService = phinugService;
 }
        public FirstPageViewModel(IPageNavigationService pageNavigationService)
        {
            _pageNavigationService = pageNavigationService;

            NextLevelCommand = new RelayCommand(NextLevel);
        }
예제 #40
0
 public BaseViewModel(IPageNavigationService page)
 {
     pagenav = page;
 }
예제 #41
0
 protected ViewModelBase(IPageNavigationService pageNavigationService, IApiService apiService, IApplicationService applicationService)
 {
     this.PageNavigationService = pageNavigationService;
     this.ApiService            = apiService;
     this.ApplicationService    = applicationService;
 }
        public SecondPageViewModel(IPageNavigationService pageNavigationService)
        {
            _pageNavigationService = pageNavigationService;

            BackCommand = new RelayCommand(Back);
        }
예제 #43
0
 public MainPageViewModel(IPageNavigationService navigationService)
 {
     _navigationService = navigationService;
     InitCommands();
 }
 protected ViewModelBase(IPageNavigationService pageNavigationService)
 {
     PageNavigationService = pageNavigationService;
 }
예제 #45
0
 protected ViewModelBase(IPageNavigationService pageNavigationService)
 {
     _pageNavigationService = pageNavigationService;
 }
예제 #46
0
        public MainPageViewModel(IPageNavigationService pageNavigationService, IUserNotificationService userNotificationService) : base(pageNavigationService)
        {


            this.UserNotificationService = userNotificationService;
            //this.PageNavigationService = pageNavigationService;


        }
예제 #47
0
 public SearchPageViewModel(DrugsRepositoryAsync repositoryAsync, IPageNavigationService navigationService, IDialogService dialogService)
 {
     _repositoryAsync = repositoryAsync;
     _navigationService = navigationService;
     _dialogService = dialogService;
     InitCommands();
     Task initCollections = InitCollections();
     InitViewModel();
 }
예제 #48
0
 /// <summary>
 /// Initializes a new instance of the AddExpenseViewModel class.
 /// </summary>
 public AddExpenseViewModel(IDataService dataService, IPageNavigationService navigationService)
 {
     _dataService       = dataService;
     _navigationService = navigationService;
     ClearData();
 }