Exemplo n.º 1
0
        void OnBackButtonClicked(object sender, EventArgs e)
        {
            Button button = (Button)sender;
            Page   page   = (Page)Activator.CreateInstance(typeof(EventsPage));

            NavigationUtil.SwitchDetailPage(page);
        }
Exemplo n.º 2
0
        void OnRidesButtonClicked(object sender, EventArgs e)
        {
            Button    button  = (Button)sender;
            Int32     eventId = (Int32)button.CommandParameter;
            RidesPage page    = new RidesPage(eventId);//(RidesPage)Activator.CreateInstance(typeof(RidesPage));

            NavigationUtil.SwitchDetailPage(page);
        }
Exemplo n.º 3
0
        void OnOfferRideButtonClicked(object sender, EventArgs e)
        {
            Button         button   = (Button)sender;
            OrgEvent       orgEvent = (OrgEvent)button.CommandParameter;
            OfferRidesPage page     = new OfferRidesPage(orgEvent);

            NavigationUtil.SwitchDetailPage(page);
        }
Exemplo n.º 4
0
 public LoginPage()
 {
     InitializeComponent();
     if (UserService.getInstance().GetUser() != null)
     {
         NavigationUtil.SwitchDetailPage(typeof(EventsPage), "Events");
     }
 }
        void OnJoinButtonClicked(object sender, EventArgs e)
        {
            Button button = (Button)sender;
            Int16  orgId  = (Int16)button.CommandParameter;
            User   user   = UserService.getInstance().GetUser();

            if (!user.Organizations.Contains(orgId))
            {
                user.Organizations.Add(orgId);
                UserService.getInstance().SaveUser(user);
                Console.WriteLine("Org ID " + orgId + " is added");
                NavigationUtil.SwitchDetailPage(typeof(EventsPage), "events");
            }
        }
Exemplo n.º 6
0
        void OnLoginButtonClicked(object sender, EventArgs e)
        {
            User user = UserService.getInstance().GetUser(emailEntry.Text, passwordEntry.Text);

            if (user != null)
            {
                NavigationUtil.SwitchDetailPage(typeof(EventsPage), "Events");
            }
            else
            {
                messageLabel.Text  = "Login failed";
                passwordEntry.Text = string.Empty;
            }
        }
        protected override void OnAppearing()
        {
            base.OnAppearing();
            User user = UserService.getInstance().GetUser();

            if (user != null)
            {
                if (user.Organizations.Count > 0)
                {
                    NavigationUtil.SwitchDetailPage(typeof(EventsPage), "Events");
                }
                else
                {
                    NavigationUtil.SwitchDetailPage(typeof(OrganizationPicker), "Join Organization");
                }
            }
        }
Exemplo n.º 8
0
 public void OnRegisterButtonClicked(object sender, EventArgs e)
 {
     NavigationUtil.SwitchDetailPage(typeof(RegisterPage), "Register");
 }