public MainPageViewModel(INavigationService navigationService, IPageDialogService dialogService)
 {
     CommandLogarFacebook = new DelegateCommand(LogarFacebook);
     CommandLogar = new DelegateCommand(Autenticar);
     _navigationService = navigationService;
     _dialogservice = dialogService;
 }
Example #2
0
 public MoviesPageViewModel(INavigationService navigationService)
 {
     this._navigationService = navigationService;
     this.IsMainGrid = true;
     MoviesItemsCommand = new DelegateCommand<ItemClickEventArgs>(MoviesClickedMethod);
     MovieTrailerTappedCommand = new DelegateCommand(MovieTrailerTappedMethod);
 }
 public AlbumsGroupUserControlViewModel(IDataService dataService, INavigationService navigationService)
 {
     this.m_dataService = dataService;
     this.m_navigationService = navigationService;
     this.DataGroup = new DataGroupViewModel();
     this.LoadData();
 }
Example #4
0
 public LoginViewModel(RegistrationService registrationService, INavigationService navigationService)
 {
     _registrationService = registrationService;
     _navigationService = navigationService;
     _registrationService.AuthorizationFinished += OnAuthorizationFinished;
     UserName = "******";
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="MainViewModel"/> class.
        /// </summary>
        /// <param name="televisionService">An instance of television data service.</param>
        /// <param name="navigationService">An instance of application navigation service.</param>
        public MainViewModel(ITelevisionService televisionService, INavigationService navigationService)
        {
            this.televisionService = televisionService;
            this.navigationService = navigationService;

            this.InitializeCommands();
        }
 public FavoritesViewModel(IFavoritesService favoritesService, IDialogService dialogService, INavigationService navigationService)
 {
     _favoritesService = favoritesService;
     _dialogService = dialogService;
     _navigationService = navigationService;
     Init();
 }
 public StopSelectionViewModel(IUnitOfWork unitOfWork, AppUse appUse, INavigationService navigationService)
     : base(appUse, ApplicationPage.StopSelection, unitOfWork, navigationService)
 {
     this.timerSearch = new DispatcherTimer();
     this.timerSearch.Interval = new TimeSpan(0, 0, 1);
     this.timerSearch.Tick += TimerTickSearch;
 }
 public CommandActionsEntryPoint(ICommandManager commandManager, IPresentationManager presentationManager, IPlaybackManager playbackManager, INavigationService navigationService, IScreensaverManager screensaverManager, ILogManager logManager)
 {
     _commandManager = commandManager;
     _defaultCommandActionMap = new DefaultCommandActionMap(presentationManager, playbackManager, navigationService, screensaverManager, logManager);
 
     _logger = logManager.GetLogger(GetType().Name);
 }
  public EntityListPageViewModel(IEntityRepository entityRepository, INavigationService navService, IEventAggregator eventAggregator) {
      _entityRepository = entityRepository;
      _navService = navService;
      _eventAggregator = eventAggregator;
      NavCommand = new DelegateCommand<Entity>(OnNavCommand);
      EntityDetailNavCommand = new DelegateCommand(() => _navService.Navigate("EntityDetail", 0));
 }
Example #10
0
        public MainViewModel(INavigationService navigationService = null)
        {
            _navigationService = navigationService;

            //userFound = new ObservableCollection<User>();

        }
Example #11
0
        public MainViewModel(INavigationService navigationService, IPlatformEvents platformEvents)
        {
            _navigationService = navigationService;
            _platformEvents = platformEvents;

            _platformEvents.BackButtonPressed += BackButtonPressed;
        }
 public NavigationItemViewModel(NavigationDescriptor descriptor, string regionName)
 {
     _navigationDescriptor = descriptor;
     RegionName = regionName;
     _navigationService = ServiceLocator.Current.GetInstance<INavigationService>();
     _navigationService.NavigationStart += OnNavigationStart;
 }
Example #13
0
        protected ViewModel(INavigationService navigationService)
        {
            PhoneApplicationService.Current.Deactivated += this.OnDeactivated;
            PhoneApplicationService.Current.Activated += this.OnActivated;

            this.navigationService = navigationService;
        }
Example #14
0
        public RegisterViewModel(INavigationService navigationService)
        {
            this.User = new User();
            this.navigationService = navigationService;
            this.dataService = SimpleIoc.Default.GetInstance<IDataService>();

            this.BackCommand = new RelayCommand<string>((s) =>
            {
                this.navigationService.GoBack();
            });

            this.RegisterCommand = new RelayCommand(async() =>
            {
                if (this.User.Password == this.User.RepeatedPassword)
                {
                    await dataService.CreateUser(this.User.Username, this.User.Password, this.User.Email);

                    //if registration is faild
                    if (((App)App.Current).AuthenticatedUser != null && ((App)App.Current).AuthenticatedUser.IsAuthenticated)
                    {
                        this.navigationService.Navigate(ViewsType.Groups);
                    }
                }
                else
                {
                    new MessageDialog("Двете пароли не съвпадат").ShowAsync();
                }
            });
        }
 public ProximityViewModel(INavigationService navigationService, IFavoriteService favoriteService)
     : base(navigationService, favoriteService)
 {
     this.navigationService = navigationService;
     this.ProximityProcess = new ProximityProcess();
     this.ProximityProcess.PropertyChanged += ProximityProcess_PropertyChanged;
 }
 public PivotRunTimeCalculatorViewModel(INavigationService navigationService, IEventAggregator eventAggregator, string title)
     : base(navigationService, eventAggregator, title)
 {
     _navigationService = navigationService;
     _eventAggregator = eventAggregator;
     initializePivotRunTimeCalculatorViewModel();
 }
Example #17
0
        public void Initialize( INavigationService navigationService )
        {
            Container.Bind<IMapService, MapService>();
            Container.Bind<IPluginSettings, PluginSettings>();

            Messenger.Register<MapSearchRequest>( navigationService.NavigateTo<MainViewModel, MapSearchRequest> );
        }
Example #18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MainPageViewModel" /> class.
 /// </summary>
 /// <param name="navigationService">The navigation service.</param>
 public MainPageViewModel(INavigationService navigationService)
     : base(navigationService)
 {
     MainMenuItems = new BindableCollection<MainPageMenuItemViewModel>
     {
         new MainPageMenuItemViewModel
         {
             Text = "Define New Quiz",
             Image = new BitmapImage(new Uri(@"ms-appx:///Assets/DefineQuiz.jpg")),
             NavigateTo = typeof(DefineQuizView)
         },
         new MainPageMenuItemViewModel
         {
             Text = "Edit Existing Quiz",
             Image = new BitmapImage(new Uri(@"ms-appx:///Assets/EditQuiz.jpg")),
             NavigateTo = null // TODO
         },
         new MainPageMenuItemViewModel
         {
             Text = "Take Quiz",
             Image = new BitmapImage(new Uri(@"ms-appx:///Assets/TakeQuiz.jpg")),
             NavigateTo = null // TODO
         },
     };
 }
        public ListingViewModel( INavigationService navigationService, IEventRepository eventRepository)
        {
            _navigationService = navigationService;
            _eventRepository = eventRepository;

            PageTitle = "Teams Listing";
        }
Example #20
0
        /// <summary>
        /// Initializes a new instance of the GuideViewModel class.
        /// </summary>
        public GuideViewModel(INavigationService navigationService, IConnectionManager connectionManager)
            : base(navigationService, connectionManager)
        {
            if (IsInDesignMode)
            {
                SelectedChannel = new ChannelInfoDto
                {
                    Name = "BBC One",
                    Number = "1"
                };

                Programmes = new ObservableCollection<BaseItemDto>
                {
                    new BaseItemDto
                    {
                        StartDate = new DateTime(2014, 1, 16, 6, 0, 0),
                        Name = "Breakfast News",
                        EpisodeTitle = "16/01/2013",
                        Overview = "The latest news, sport, business and weather from the BBC's Breakfast Team"
                    },
                    new BaseItemDto
                    {
                        StartDate = new DateTime(2014, 1, 16, 9, 15, 0),
                        Name = "Wanted Down Under",
                        EpisodeTitle = "Series 8, Davidson Family",
                        Overview = "A mum and son want to move toAustralia, but can they presaude the rest of the family?"
                    }
                };
            }
        }
        /// <summary>
        /// Erzeugt eine Instanz der Klasse LoginViewModel.
        /// </summary>
        /// <param name="navService">Referenz auf den Navigationsdienst der Anwendung.</param>
        /// <param name="errorMapper">Referenz auf den Fehlerdienst der Anwendung.</param>
        public LoginViewModel(INavigationService navService, IErrorMapper errorMapper)
            : base(navService, errorMapper)
        {
            loginController = new LoginController(this);

            LoginCommand = new AsyncRelayCommand(param => executeLoginCommand());
        }
		public MainMenuViewModel()
		{
			Groups = new BindableCollection<MenuGroup>();

			if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
			{
				_running = IoC.Get<RunExperimentViewModel>();
				_runThresholdTest = IoC.Get<RunThresholdTestViewModel>();
				_permutations = IoC.Get<PermutationViewModel>();
				_nbsmConfig = IoC.Get<NBSmConfigViewModel>();

				_eventAggregator = IoC.Get<IEventAggregator>();
				_navService = IoC.Get<INavigationService>();
				_regionService = IoC.Get<IRegionService>();
				_subjectService = IoC.Get<ISubjectDataService>();
				_subjectFilterService = IoC.Get<ISubjectFilterService>();
				_computeService = IoC.Get<IComputeService>();

				var regionsVM = IoC.Get<RegionsViewModel>();

				Groups.Add(new MenuGroup { Title = "Source", Items = { regionsVM, IoC.Get<SubjectsViewModel>(), IoC.Get<GroupsViewModel>() } });
				Groups.Add(new MenuGroup { Title = "Config", Items = { _permutations, _nbsmConfig } });
				Groups.Add(new MenuGroup { Title = "Compute", Items = { _runThresholdTest, _running } });
				Groups.Add(new MenuGroup { Title = "Global", Items = { IoC.Get<GlobalStrengthViewModel>() } });
				Groups.Add(new MenuGroup { Title = "Component", Items = { IoC.Get<IntermodalViewModel>(), IoC.Get<IntraSummaryViewModel>()/*, new MenuItem { Title = "Associations" },*/ } });
				Groups.Add(new MenuGroup { Title = "Nodal", Items = { IoC.Get<NodalStrengthDataTypeViewModel>() } });
				Groups.Add(new MenuGroup { Title = "Edge", Items = { IoC.Get<EdgeSignificanceViewModel>() } });
			}
		}
 public ServiceConfigurationBuilder(INavigationService navigationService, IActionInvokerFactory invokerFactory)
 {
     _navigationService = navigationService;
     _configuration = ServiceConfiguration.CreateSilently(
         "My configuration name", "http://baseuri",
         _navigationService, invokerFactory);
 }
        public MainViewModel(INavigationService navigationService)
        {
            if (navigationService == null) throw new ArgumentNullException(nameof(navigationService));
            _navigationService = navigationService;

            ShowMessageCommand = new RelayCommand(ShowMessage);
        }
 public StarWarsMoviesViewModel(IStarWarsRepository rep, INavigationService nav)
 {
     repo = rep;
     this.nav = nav;
     
     LoadCommands();
 }
        public DomainViewModel(ISentenceService sentenceService, INavigationService navigationService)
        {
            _sentenceService = sentenceService;
            _navigationService = navigationService;

            LoadDomains();
        }
        public SaveChanges_ViewModel(ILogger Logger_, INavigationService NavigationService_)
        {
            if (!IsInDesignMode)
            {
                Logger = Logger_;
                NavigationService = NavigationService_;
                CommandDispatcher = new MvxCommand<string>(CmdDispatcher);
            }

            if (IsInDesignMode)
            {
                LearningItem li1 = new LearningItem { Name = "Mazzy" };
                LearningItem li2 = new LearningItem { Name = "Futurama" };

                Changes = new ObservableCollection<Entity>
                {
                    new Entity {
                        HardReference = li1,
                        Obj = new WeakReference<Base>(li1),
                        Order = 1,
                        State = Entity.EntityState.Added,
                        Type = li1.GetType()
                    },
                    new Entity {
                        HardReference = li2,
                        Obj = new WeakReference<Base>(li2),
                        Order = 2,
                        State = Entity.EntityState.Added,
                        Type = li1.GetType()
                    }
                };
            }

        }
Example #28
0
        public LoadingPage()
        {
            _navigationService = SimpleIoc.Default.GetInstance<INavigationService>();

            InitializeComponent();
            this.progressBar.IsIndeterminate = true;
        }
Example #29
0
		public MainViewModel(IRouteRepository routeRepository, INavigationService navigationService)
		{
			_routeRepository = routeRepository;
			_navigationService = navigationService;
			this.SearchCommand = new Command (this.SearchAsync);
			this.SearchAsync ();
		}			
Example #30
0
 public SalesModule(IEventAggregator eventAggregator, INavigationService navigationService, IUnityContainer container, IRegionManager regionManager)
 {
     _container = container;
     _regionManager = regionManager;
     _navigationService = navigationService;
     _eventAggregator = eventAggregator;
 }
Example #31
0
 public VisitScheduleViewModel(INavigationService navigationService) : base(navigationService)
 {
 }
Example #32
0
 public ContractItemViewModel(INavigationService navigationService)
 {
     _navigationService = navigationService;
 }
Example #33
0
 public ResultPageViewModel(INavigationService navigationService)
     : base(navigationService)
 {
 }
Example #34
0
 public ViewModelBase(INavigationService navigationService)
 {
     NavigationService = navigationService;
 }
Example #35
0
 public PotsPageViewModel(IDataService dataService, INavigationService navigationService)
 {
     _dataService       = dataService;
     _navigationService = navigationService;
     Initialize();
 }
 public MentionedOnCardNotificationViewModel(INavigationService navigation)
 {
     _navigation = navigation;
 }
 public MainPageViewModel(INavigationService navigationService)
     : base(navigationService)
 {
     Title = "Main Page";
     LoadData();
 }
Example #38
0
 public GaleriaPageViewModel(INavigationService navigationService) : base(navigationService)
 {
 }
Example #39
0
 public SplashPageViewModel(INavigationService navigationService, ILoggerService loggerService, ITermsUpdateService termsUpdateService) : base(navigationService)
 {
     _termsUpdateService = termsUpdateService;
     _loggerService      = loggerService;
 }
Example #40
0
 public MainViewModel(INavigationService navigationService, ISettingsService settingsService, IStravaService stravaService, IOService ioService) : base(navigationService)
 {
     _settingsService = settingsService;
     _stravaService   = stravaService;
     _ioService       = ioService;
 }
Example #41
0
 public UriBuilder <TViewModel> AttachTo(INavigationService navigationService)
 {
     _navigationService = navigationService;
     return(this);
 }
Example #42
0
 public StatsViewModel(INavigationService navService, IDataRetrievalService dataRetrievalService, IDataDownloadService dataDownloadService, IStateService stateService, ILoggingService loggingService, IMemoryReporterService memoryReporterService)
     : base(navService, dataRetrievalService, dataDownloadService, stateService, loggingService, memoryReporterService)
 {
 }
Example #43
0
        /// <summary>
        /// Selects a Tab of the TabbedPage parent.
        /// </summary>
        /// <param name="name">The name of the tab to select</param>
        /// <param name="parameters">The navigation parameters</param>
        public static async Task <INavigationResult> SelectTabAsync(this INavigationService navigationService, string name, INavigationParameters parameters = null)
        {
            try
            {
                var currentPage = ((IPageAware)navigationService).Page;

                var canNavigate = await PageUtilities.CanNavigateAsync(currentPage, parameters);

                if (!canNavigate)
                {
                    throw new Exception($"IConfirmNavigation for {currentPage} returned false");
                }

                TabbedPage tabbedPage = null;

                if (currentPage.Parent is TabbedPage parent)
                {
                    tabbedPage = parent;
                }
                else if (currentPage.Parent is NavigationPage navPage)
                {
                    if (navPage.Parent != null && navPage.Parent is TabbedPage parent2)
                    {
                        tabbedPage = parent2;
                    }
                }

                if (tabbedPage == null)
                {
                    throw new Exception("No parent TabbedPage could be found");
                }

                var tabToSelectedType = PageNavigationRegistry.GetPageType(UriParsingHelper.GetSegmentName(name));
                if (tabToSelectedType is null)
                {
                    throw new Exception($"No View Type has been registered for '{name}'");
                }

                Page target = null;
                foreach (var child in tabbedPage.Children)
                {
                    if (child.GetType() == tabToSelectedType)
                    {
                        target = child;
                        break;
                    }

                    if (child is NavigationPage childNavPage)
                    {
                        if (childNavPage.CurrentPage.GetType() == tabToSelectedType ||
                            childNavPage.RootPage.GetType() == tabToSelectedType)
                        {
                            target = child;
                            break;
                        }
                    }
                }

                if (target is null)
                {
                    throw new Exception($"Could not find a Child Tab for '{name}'");
                }

                var tabParameters = UriParsingHelper.GetSegmentParameters(name, parameters);

                tabbedPage.CurrentPage = target;
                PageUtilities.OnNavigatedFrom(currentPage, tabParameters);
                PageUtilities.OnNavigatedTo(target, tabParameters);
            }
            catch (Exception ex)
            {
                return(new NavigationResult {
                    Exception = ex
                });
            }

            return(new NavigationResult {
                Success = true
            });
        }
Example #44
0
 public AboutPageViewModel(INavigationService navigationService, IStringLocalizer <AboutPageViewModel> stringLocalizer)
     : base(navigationService, stringLocalizer)
 {
     AppVersion = $"{VersionTracking.CurrentVersion} ({VersionTracking.CurrentBuild})";
 }
Example #45
0
 public VideoPlayerViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator) : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)
 {
     IsoFileName = StateService.IsoFileName;
     StateService.IsoFileName = null;
 }
 public WalkDistancePageViewModel(INavigationService navService) : base(navService)
 {
 }
Example #47
0
        public MoviesViewModel(IEventAggregator eventAggregator, IMoviesService moviesService, INavigationService navigationService)
        {
            _eventAggregator = eventAggregator;
            _moviesService = moviesService;
            _navigationService = navigationService;

            ItemTapedCommand = new DelegateCommand<MovieModel>(ItemTaped);
            Title = "Movies Demo";

            eventAggregator.GetEvent<AppearingEvent>().Subscribe(OnAppearingEventReceived);
        }
 public ItemDetailViewModel(INavigationService navigationService, ITalao talao, IMultasRealizadas multasRealizadas) : base(navigationService, talao)
 {
     this.multasRealizadas = multasRealizadas;
 }
 public BasePageViewModel(INavigationService navigationService) : base(navigationService)
 {
 }
Example #50
0
 public ExpanderViewPageViewModel(INavigationService navigationService)
 {
     _navigationService = navigationService;
 }
Example #51
0
 public BaseViewModel(INavigationService navigationService, IPageDialogService pageDialogService = null)
 {
     NavigationService = navigationService;
     PageDialogService = pageDialogService;
 }
 public UserConfigurationPageViewModel(INavigationService navigationService) : base(navigationService)
 {
     UserName = Preferences.Get("EventCom.UserName", string.Empty);
 }
 public PdfViewModel(INavigationService navigationService)
 {
     _navigationService = navigationService;
 }
Example #54
0
 public BasePageModel()
 {
     //DialogService = ViewModelLocator.Resolve<IDialogService>();
     NavigationService = PageModelLocator.Resolve <INavigationService>();
     //GlobalSetting.Instance.BaseEndpoint = Settings.UrlBase;
 }
 public HomeViewModel(INavigationService navigationService) : base(navigationService)
 {
     this.navigationService = navigationService;
 }
 public DetailPageViewModel(INavigationService navigationService)
     : base(navigationService)
 {
 }
Example #57
0
        public CallsPrivacyViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)
            : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)
        {
            EventAggregator.Subscribe(this);

            _rules = StateService.PrivacyRules;
            StateService.PrivacyRules = null;

            MainRules = new List <TLPrivacyRuleBase>
            {
                new TLPrivacyValueAllowAll {
                    Label = AppResources.Everybody
                },
                new TLPrivacyValueAllowContacts {
                    Label = AppResources.MyContacts
                },
                new TLPrivacyValueDisallowAll {
                    Label = AppResources.Nobody
                }
            };

            _selectedMainRule           = GetSelectedMainRule(MainRules, _rules, MainRules[0], MainRules[2]);
            _selectedMainRule.IsChecked = true;
            _selectedAllowUsers         = GetSelectedRule <TLPrivacyValueAllowUsers>(_rules) ?? new TLPrivacyValueAllowUsers {
                Users = new TLVector <TLInt>()
            };
            _selectedDisallowUsers = GetSelectedRule <TLPrivacyValueDisallowUsers>(_rules) ?? new TLPrivacyValueDisallowUsers {
                Users = new TLVector <TLInt>()
            };
            SwitchUsersVisibility(true);
            PropertyChanged += OnPropertyChanged;
        }
Example #58
0
 public PrivacySecurityViewModel(ICacheService cacheService, ICommonErrorHandler errorHandler, IStateService stateService, INavigationService navigationService, IMTProtoService mtProtoService, ITelegramEventAggregator eventAggregator)
     : base(cacheService, errorHandler, stateService, navigationService, mtProtoService, eventAggregator)
 {
     EventAggregator.Subscribe(this);
 }
 public VeterinaryMasterDetailPageViewModel(INavigationService navigationService) : base(navigationService)
 {
     _navigationService = navigationService;
     LoadMenus();
 }
Example #60
0
 public ConsolidadoPageViewModel(INavigationService navigationService) : base(navigationService)
 {
 }