コード例 #1
0
        public EventDetailsViewModel(long id)
        {
            _eventadorApi  = EventadorApi.ResolveApi();
            Item           = _eventadorApi.GetEventById(id).Result;
            Item.ImageUrls = new[]
            { "event2.png", "event3.png" };

            var userId = long.Parse(SecureStorage.GetAsync("UserId").Result);

            isAuthor = Item.AuthorId == userId;
        }
コード例 #2
0
        public MainPage()
        {
            _eventadorApi = EventadorApi.ResolveApi();

            RequestUserData();
            BindingContext = MainViewModel;

            NavigationPage.SetHasNavigationBar(this, false);

            MessagingCenter.Unsubscribe <MessageBus, int>(this, Consts.NavigationTabPageMessage);
            MessagingCenter.Subscribe <MessageBus, int>(this, Consts.NavigationTabPageMessage, NavigationTabPageCallback);

            InitializeComponent();
        }
コード例 #3
0
 public ProfileViewModel()
 {
     _eventadorApi = EventadorApi.ResolveApi();
     _authService  = DependencyService.Resolve <AuthService>();
     GetUserInfo();
 }
コード例 #4
0
 public RegisterViewModel()
 {
     RegisterModel = new RegisterModel();
     _eventadorApi = EventadorApi.ResolveApi();
 }