Exemplo n.º 1
0
 private async void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
 {
     if (ListViewGeneral.SelectedItem.ToString() == "Meine Daten")
     {
         await Navigation.PushAsync(new MyData());
     }
 }
        async void matchTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            int jsonIndex = Matches.matchesList.IndexOf(e.Item as Matches.MatchesListFormat);

            await Task.Run(async() => {
                JObject val        = JObject.Parse(MatchesDetailView.returnMatchJSONText(jsonIndex));
                JObject parameters = new JObject();
                foreach (var x in val)
                {
                    if (!x.Key.Equals("numEvents"))
                    {
                        parameters.Add(x.Key, x.Value);
                    }
                    else
                    {
                        break;
                    }
                }
                Preferences.Set("tempParams", JsonConvert.SerializeObject(parameters.ToObject <MatchFormat.EntryParams>()));
                NewMatchStart.events = MatchFormat.JSONEventsToObject(val);
                CubeDroppedDialog.saveEvents();
                Preferences.Set("timerValue", Convert.ToInt32(val.Property("timerValue").Value));
                Preferences.Set("teamStart", val.Property("team").Value.ToString());
                Device.BeginInvokeOnMainThread(() => {
                    Navigation.PushAsync(new MatchEntryEditTab()
                    {
                        Title = val.Property("team").Value.ToString()
                    });
                });
            });
        }
Exemplo n.º 3
0
        async void ResidentList_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            AccountsPage parentPage = parent as AccountsPage;
            var          listView   = ((ListView)sender);
            string       resId      = ((Resident)listView.SelectedItem).userId;

            if (parentPage.emailMode)
            {
                var result = await service.GetSpecificResident(App.Current.Properties["defaultPid"].ToString(), unitId, resId);

                if (result != null)
                {
                    if (!string.IsNullOrEmpty(result.email))
                    {
                        var uri = "mailto:" + result.email;
                        Device.OpenUri(new Uri(uri));
                    }
                    else
                    {
                        await parent.DisplayAlert("Error", "Cannot find the email of the selected user", "OK");
                    }
                }
                else
                {
                    await parent.DisplayAlert("Error", Config.CommonErrorMsg, "OK");
                }
            }
            else
            {
                await Navigation.PushAsync(new EditResident(unitId, resId));
            }
        }
        async void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            try
            {
                var contact      = e.Item as BoothResultPOCO;
                var displayAlert = await DisplayAlert("Confirm!", "Vote for " + contact.CandidateName, "YES", "NO");

                abc.IsVisible = true;
                abc.IsRunning = true;
                if (displayAlert)
                {
                    using (var httpClient = new HttpClient())
                    {
                        response = httpClient.PostAsync(BaseURL + "/VOTKWIK/" + _userId + "/AddVote?ballotNum=" + ballotCode + "&candidateId=" + contact.UserId, null).Result;
                        if (response.IsSuccessStatusCode)
                        {
                            abc.IsVisible = false;
                            abc.IsRunning = false;

                            await Navigation.PushAsync(new ThankYouPage());
                        }
                        else
                        {
                            abc.IsVisible = false;
                            abc.IsRunning = false;

                            await DisplayAlert("Retry", "Please Vote Again", "OK");
                        }
                    }
                }
            }
            catch (Exception ex) { }
        }
Exemplo n.º 5
0
        async void Device_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            BluetoothManager.Instance.StopScanning();
            try
            {
                BluetoothManager.Instance.BLEDevice = e.Item as IDevice;
                System.Diagnostics.Debug.WriteLine(e.Item);
                System.Diagnostics.Debug.WriteLine(BluetoothManager.Instance.BLEDevice);
                var device = e.Item as IDevice;
                System.Diagnostics.Debug.WriteLine(device);
                if (BluetoothManager.Instance.AdapterBLE.ConnectedDevices.Count == 0)
                {
                    await BluetoothManager.Instance.AdapterBLE.ConnectToDeviceAsync(device);

                    //Add reconnect here
                    await DisplayAlert("Bluetooth Successful!", "You are now connected to: " + device, "OK");

                    await Navigation.PopToRootAsync();
                }
                else
                {
                    await BluetoothManager.Instance.AdapterBLE.DisconnectDeviceAsync(device);
                }
            }
            catch (DeviceConnectionException ex)
            {
                await DisplayAlert("Error", "Could not connect to :" + ex.DeviceId, "OK");
            }
        }
Exemplo n.º 6
0
        void ViewExercises(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            WorkoutList item = (WorkoutList)((ListView)sender).SelectedItem;

            ((ListView)sender).SelectedItem = null;
            Navigation.PushAsync(new Workout.ViewExercisesPage(item));
        }
Exemplo n.º 7
0
        async void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            string[] selectedZone = ((YardZone)e.Item).Zone.Split(' ');

            var zoneBlocks = yardBlocks.FindAll(b => b.Id.Contains(selectedZone[1]));

            await Navigation.PushAsync(new YardBlockLists(zoneBlocks));
        }
Exemplo n.º 8
0
        void NgoListTappedEvent(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            TotalLists.SelectedNGO = TotalLists.ngoDescriptionList[((NGOObject)e.Item).index];

            //FetchCurrentLocation();

            Navigation.PushAsync(new DescriptionPage());
        }
Exemplo n.º 9
0
 async private void Tapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
 {
     tappedEmail = e.Item as Email;
     if (tappedEmail != null && tappedEmail == selectedEmail)
     {
         await Navigation.PushAsync(new ViewEmailPage(current_user, tappedEmail, true));
     }
 }
Exemplo n.º 10
0
        async void teamClicked(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            String teamName  = e.Item.ToString();
            JArray pitValues = (JArray)JObject.Parse(Preferences.Get("matchEventsString", "")) ["PitNotes"];

            Preferences.Set("teamStart", teamName);
            await Navigation.PushAsync(new PitEntry (false, teamName, true) { Title = teamName });
        }
Exemplo n.º 11
0
        void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            var    listView   = (ListView)sender;
            People itemTapped = (People)listView.SelectedItem;
            var    uri        = new Uri(itemTapped.Url);

            Device.OpenUri(uri);
        }
Exemplo n.º 12
0
        async void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            var mydetails = e.Item as MyVideoModel;

            // App.Current.MainPage = new MyVideoDetailPage(mydetails.VideoURl);

            await Navigation.PushAsync(new MyVideoDetailPage(mydetails.VideoURl, mydetails.Title));
        }
Exemplo n.º 13
0
        void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            var context = e.Item;

            (BindingContext as FilterDetailPageModel).ItemTappedCommand.Execute(context);

            list.SelectedItem = null;
        }
Exemplo n.º 14
0
 void OnItemTapped(System.Object sender, Xamarin.Forms.ItemTappedEventArgs e)
 {
     if (e == null)
     {
         return;
     }
     ((ListView)sender).SelectedItem = null;
 }
Exemplo n.º 15
0
        void OnTeamItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            var team = e.Item as Team;

            var vm = BindingContext as MyTeamsViewModel;

            vm?.HideOrShowTeamDetails(team);
        }
Exemplo n.º 16
0
        void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            ExerciseList item = (ExerciseList)((ListView)sender).SelectedItem;

            ((ListView)sender).SelectedItem = null;
            Navigation.PushAsync(new ViewSetsPage(item));
            //Navigation.RemovePage(this);
        }
Exemplo n.º 17
0
 void OnItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
 {
     if (e.Item != null)
     {
         var model = e.Item as ShiShenModel;
         Navigation.PushAsync(new ShiShenPage(model.ID));
     }
 }
Exemplo n.º 18
0
 async void OnItemTapped(System.Object sender, Xamarin.Forms.ItemTappedEventArgs e)
 {
     if (!isEditing)
     {
         var animalSelected = (Animal)e.Item;
         await this.Navigation.PushAsync(new AnimalDetails(animalSelected));
     }
 }
        void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            StoredChannel        item     = (StoredChannel)e.Item;
            NotificationSetting  settings = App.ChannelsDatastore.GetSetting(item.ChannelId);
            NotificationSettings notificationSettingsView = new NotificationSettings(settings);

            Navigation.PushModalAsync(notificationSettingsView);
        }
Exemplo n.º 20
0
        async void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            var comune = e.Item as Comune;
            // DisplayAlert("Tapped", comune.Name, "Ok");
            await Navigation.PopModalAsync();

            MessagingCenter.Send(this, Events.AddComuneLabel, comune.Name);
        }
Exemplo n.º 21
0
        void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            var           content       = e.Item as ContentListItem;
            ProductDetail productDetail = new ProductDetail();

            productDetail.BindingContext = content;
            Navigation.PushAsync(productDetail);
        }
Exemplo n.º 22
0
        //private void OnMenuItemSelected(object sender, SelectedItemChangedEventArgs e)
        //{

        //    var item = (MasterPageItem)e.SelectedItem;
        //    Type page = item.TargetType;
        //    Detail = new NavigationPage((Page)Activator.CreateInstance(page));
        //    IsPresented = false;
        //}


        void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            var  item = (MasterPageItem)e.Item;
            Type page = item.TargetType;

            Detail      = new NavigationPage((Page)Activator.CreateInstance(page));
            IsPresented = false;
        }
Exemplo n.º 23
0
        async void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            Analytics.TrackEvent("User tapped on food item");

            var    selected = (Yelp.Api.Models.BusinessResponse)e.Item;
            string fixedurl = selected.Url.ToString();
            await Navigation.PushAsync(new WebPage(fixedurl), true);
        }
Exemplo n.º 24
0
        private void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            var    Cellindex = (FoldersListView.ItemsSource as List <Folder>).IndexOf(e.Item as Folder).ToString();
            Folder FolderKey = e.Item as Folder;

            // DataEngine.GetItemsByFolderID(FolderKey.Key);
            Application.Current.MainPage = new ItemsPage(FolderKey.BelongsTo);
        }
Exemplo n.º 25
0
        async void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            Result = e.Item;

            list.SelectedItem = null;

            await PopupNavigation.Instance.PopAllAsync();
        }
Exemplo n.º 26
0
 void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
 {
     if (e == null)
     {
         return;                             // has been set to null, do not 'process' tapped event
     }
     ((ListView)sender).SelectedItem = null; // de-select the row
 }
Exemplo n.º 27
0
 void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
 {
     if (e.Item is Photo photo)
     {
         (sender as ListView).SelectedItem = null;
         viewModel.NavigateToPhotoCommand.Execute(photo);
     }
 }
        async void teamClicked(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            var    x    = (listView.ItemsSource as IEnumerable <RankStruct>).ToList();
            String item = x.Find(y => y.Equals(e.Item)).Key;

            teamSend = item;
            await Navigation.PushAsync(new RankingsDetailView (mainRank.returnTeamTimes(item)) { Title = item });
        }
Exemplo n.º 29
0
        async void Handle_ItemTappedAsync(object sender, Xamarin.Forms.ItemTappedEventArgs e)
        {
            var list      = (ListView)sender;
            var trackName = (String)list.SelectedItem;
            var group     = (TrackList)e.Group;

            await App.MasterDetail.Detail.Navigation.PushAsync(new DefectPage(ViewModel.trackDictionary[trackName], group.IsUrgent));
        }
 async void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e)
 {
     //show the list of fb users modally
     if (listView.SelectedItem != null)
     {
         await Navigation.PushModalAsync(selectFBUserPage);
     }
 }