/// <summary> /// Initializes class instance. /// </summary> public WelcomeViewModel() { _pageNavigation = DependencyService.Get <IPageNavigation>(); _findPlaceService = DependencyService.Get <IFindPlaceService>(); GoToPlacesPageCommand = new Command(ExecuteGoToPlacesPageAsync); }
public CommentPhotoPage( IPageNavigation navigation, IDictionary <string, string> parameters, IProtocolCommunication protocolCommunication ) { _navigation = navigation; _protocolCommunication = protocolCommunication; parameters.TryGetValue("username", out _username); if (_username == null) { throw new Exception("Parameter \"username\" required"); } parameters.TryGetValue("photoName", out _photoName); if (_photoName == null) { throw new Exception("Parameter \"photoName\" required"); } _retryMenu = new Menu( options: new List <(string, string)> { (RetryAction, "Retry"), (GoBackAction, "Back") },
public LoginPageViewModel() { _navigation = DependencyService.Get <IPageNavigation>(); GoBackToMessengerPageCommand = new Command(ExecuteGoBackToMessengerPage); AddFriend = new Command(ExecuteAddFriend); RemoveFriend = new Command(ExecuteRemoveFriend); SendCommand = new Command(ExecuteSendCommand); client.LoginOK += new EventHandler(_LoginOK); client.RegisterOK += new EventHandler(_RegisterOK); client.LoginFailed += new ErrorEventHandler(_LoginFailed); client.RegisterFailed += new ErrorEventHandler(_RegisterFailed); client.Disconnected += new EventHandler(_Disconnected); client.UserAvailable += new AvailableEventHandler(_UserAvailable); client.MessageReceived += new ReceivedEventHandler(_MessegeReceived); }
/// <summary> /// Initializes QRCodeViewModel class instance. /// </summary> public QRCodeViewModel() { _navigation = DependencyService.Get <IPageNavigation>(); GoToPreviousPageCommand = new Command(ExecuteGoToPreviousPageCommand); ImagePath = MainModel.Instance.Generate(); }
private static void PageRightExecute(object sender, ExecutedRoutedEventArgs e) { IPageNavigation navigation = e.Parameter as IPageNavigation; if (navigation != null) { navigation.PageRight(); } }
private static void PageUpExecute(object sender, ExecutedRoutedEventArgs args) { IPageNavigation navigation = args.Parameter as IPageNavigation; if (navigation != null) { navigation.PageUp(); } }
public LandingPage(IPageNavigation navigation) { _navigation = navigation; _menu = new Menu( options: new List <(string, string)> { (IPageNavigation.LoginPage, "Login"), (IPageNavigation.SignUpPage, "Sign up"), (null, "Exit"), },
public HomePage(IPageNavigation navigation) { _navigation = navigation; _menu = new Menu( options: new List <(string, string)> { (UploadPhotoAction, "Upload new photo"), (UsersListAction, "Show users"), (LogOutAction, "Logout"), },
private static void PageLeftCanExecute(object sender, CanExecuteRoutedEventArgs e) { e.Handled = true; IPageNavigation navigation = e.Parameter as IPageNavigation; if (navigation != null) { e.CanExecute = navigation.CanPageLeft(); } }
public SignUpPage(IPageNavigation navigation, IProtocolCommunication protocolCommunication) { _navigation = navigation; _protocolCommunication = protocolCommunication; _menu = new Menu( options: new List <(string, string)> { (RetryAction, "Try Again"), (BackAction, "Back"), (ExitAction, "Exit"), },
public UploadPhotoPage( IPageNavigation navigation, IProtocolCommunication protocolCommunication ) { _navigation = navigation; _protocolCommunication = protocolCommunication; _retryMenu = new Menu( options: new List <(string, string)> { (RetryAction, "Retry"), (GoBackAction, "Back") },
public GeneratorPageNavigation(IPageNavigation goTo) { if (goTo.BeforeObject != null && goTo.BeforeObjectEvent != null) { BeforeObject = GeneratorObject.GeneratorObjectMap[goTo.BeforeObject]; BeforeObjectEvent = GeneratorObjectEvent.GeneratorObjectEventMap[goTo.BeforeObjectEvent]; } if (goTo.GoToObject != null && goTo.GoToObjectProperty != null) { GoToPage = null; IsExternal = true; GoToObject = GeneratorObject.GeneratorObjectMap[goTo.GoToObject]; GoToObjectProperty = (IGeneratorObjectPropertyReadonlyString)GeneratorObjectProperty.GeneratorObjectPropertyMap[goTo.GoToObjectProperty]; } else { if (goTo.GoToPage == Page.CurrentPage) { GoToPage = GeneratorPage.CurrentPage; } else if (goTo.GoToPage == Page.PreviousPage) { GoToPage = GeneratorPage.PreviousPage; } else if (goTo.GoToPage == Page.AnyPage) { GoToPage = GeneratorPage.AnyPage; } else { GoToPage = GeneratorPage.GeneratorPageMap[goTo.GoToPage]; } IsExternal = goTo.IsExternal; GoToObject = null; GoToObjectProperty = null; } if (goTo.AfterObject != null && goTo.AfterObjectEvent != null) { AfterObject = GeneratorObject.GeneratorObjectMap[goTo.AfterObject]; AfterObjectEvent = GeneratorObjectEvent.GeneratorObjectEventMap[goTo.AfterObjectEvent]; } }
public BaseViewModel() { this._navigationService = DependencyService.Get <IPageNavigation>(); //this._dialogService = DependencyService.Get<IDialog>(); }
/// <summary> /// Initializes MainViewModel class instance /// </summary> public MainViewModel() { _navigation = DependencyService.Get <IPageNavigation>(); GoToInstructionPageCommand = new Command(ExecuteGoToInstructionPageCommand); }
public NavigationService(IPageFactory pageFactory, IPageNavigation pageNavigation) { ServiceProvider = BuildingBlocksApplication.ServiceProvider; PageFactory = pageFactory; PageNavigation = pageNavigation; }
/// <summary> /// Initializes class instance. /// </summary> public MainViewModel() { _navigation = DependencyService.Get <IPageNavigation>(); InitCommands(); }