Example #1
0
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var listView = sender as ListView;
            var data     = tableItems[e.Position];

            AlertDialog.Builder alertDiag = new AlertDialog.Builder(Activity);
            alertDiag.SetTitle("Adiçāo ao Carrinho");
            alertDiag.SetMessage("Add Item para o Carrinho?");
            alertDiag.SetPositiveButton("Sim", (senderAlert, args) => {
                SaveItemToCart(data);
                Toast.MakeText(Activity, "Produto adicionado", ToastLength.Short).Show();
            });
            alertDiag.SetNegativeButton("Ir para o Carrinho", (senderAlert, args) => {
                var intent = new Intent(Activity, typeof(CartActivity));
                StartActivity(intent);
                alertDiag.Dispose();
            });
            Dialog diag = alertDiag.Create();

            diag.Show();



            //CarregarListaCompras();
            //var intent = new Intent(Activity, typeof(HomeActivityDetail));
            //intent.PutExtra("id", t.Id);
            //intent.PutExtra("name", t.Name);
            //StartActivity(intent);
        }
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var listView = sender as ListView;
            var l        = libros[e.Position];

            Android.Widget.Toast.MakeText(this, l.Nombre, Android.Widget.ToastLength.Short).Show();
        }
Example #3
0
        void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var listView = sender as ListView;
            var l        = empresas [e.Position];

            if (l.status == "ON")
            {
                var progressDialog = ProgressDialog.Show(this, "Aguarde...", "Carregando as categorias e os produtos.", true);

                new System.Threading.Thread(new ThreadStart(delegate {
                    MainActivity.iCodEmpresa       = Convert.ToInt32(l.codEmpresa);
                    MainActivity.sCaminhoWS        = Convert.ToString(l.caminhoWS);
                    MainActivity.sCaminhoWSReserva = Convert.ToString(l.caminhoWSReserva);
                    MainActivity.sNomeEmpresa      = Convert.ToString(l.nome);

                    sqldb_categoria.DeleteRecord();
                    carregaCategoria();

                    sqldb_produto.DeleteRecord();
                    carregaProduto();

                    RunOnUiThread(() => progressDialog.Hide());
                })).Start();
            }
            else
            {
                AlertDialog.Builder builder = new AlertDialog.Builder(this);
                builder.SetTitle("OLA!");
                builder.SetMessage("O parceiro selecionado encontra-se Offline, tente novamente mais tarde ou selecione outro parceiro!");
                builder.SetCancelable(false);
                builder.SetPositiveButton("OK", delegate {
                });
                builder.Show();
            }
        }
Example #4
0
 protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
 {
     //var moveToSurveyReviewScreen = new Intent (this, typeof(MainActivity));
     //moveToSurveyReviewScreen.PutExtra( ("selectedSurveyDetails", _responseBatches[e.Position]); //[e.Position]);
     Android.Widget.Toast.MakeText(this, "You are viewing your previous Survey with Id {" + (e.Position + 1) + "}", ToastLength.Short).Show();
     // StartActivity (moveToSurveyReviewScreen);
 }
Example #5
0
 protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
 {
     if (e.Position == 0)
     {
         var intent = new Intent(this, typeof(Information.GeneralInfoActivity));
         StartActivity(intent);
     }
     else if (e.Position == 1)
     {
         var intent = new Intent(this, typeof(Tunneling.TunnelingActivity));
         StartActivity(intent);
     }
     else if (e.Position == 2)
     {
         var intent = new Intent(this, typeof(IntegratedAuth.IntegratedAuthenticationActivity));
         StartActivity(intent);
     }
     else if (e.Position == 3)
     {
         var intent = new Intent(this, typeof(CustomSettingsActivity));
         StartActivity(intent);
     }
     else if (e.Position == 4)
     {
         var intent = new Intent(this, typeof(DLPSettingsActivity));
         StartActivity(intent);
     }
 }
Example #6
0
            protected void OnListItemCityClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
            {
                // ADD to FAVORITE


                if (tableItemsCity[e.Position].ImageResourceId != Resource.Drawable.star_icon)
                {
                    var t = tableItemsCity[e.Position];
                    try
                    {
                        ConnectionDB = new SqliteConnection("Data Source=" + dbPath);

                        using (var commander = ConnectionDB.CreateCommand())
                        {
                            ConnectionDB.Open();
                            commander.CommandText = "INSERT INTO FavorCity VALUES(" + t.Id.ToString() + ");";
                            commander.CommandType = CommandType.Text;
                            commander.ExecuteNonQuery();
                            ConnectionDB.Close();

                            // change star and refresh
                            tableItemsCity[e.Position].ImageResourceId = Resource.Drawable.star_icon;
                            listViewCity.Adapter = new CityAdapter(this.Activity, tableItemsCity);
                        }
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine("Can not UPDATE Record becase: " + ex);
                    }
                }
                else
                {
                    Android.Widget.Toast.MakeText(Activity, "Уже в Избранном", Android.Widget.ToastLength.Short).Show();
                }
            }
Example #7
0
        private void OnItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            TextView        view            = (TextView)e.View;
            string          address         = view.Text.Split('\n')[1];
            BluetoothDevice bluetoothDevice = BluetoothAdapter.DefaultAdapter.GetRemoteDevice(address);

            BuildConnection(bluetoothDevice, bluetoothDevice.GetUuids()[0].Uuid.ToString());
        }
Example #8
0
        void List_Click(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var intent = new Intent(this.BaseContext, typeof(DetailActivity));

            intent.PutExtra("imageUrl", memes[e.Position].ImageUrl);

            StartActivity(intent);
        }
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            MainActivity.isFeatureSamples = false;
            Intent intent = new Intent(this.Activity, typeof(NewSampleActivityPage));

            CurrentIndex = e.Position;
            StartActivity(intent);
        }
Example #10
0
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var listView = sender as ListView;
            var t        = tableItems[e.Position];

            Android.Widget.Toast.MakeText(this, t.Heading + "(" + t.SubHeading + ")", Android.Widget.ToastLength.Short).Show();
            Console.WriteLine("Klikkisid " + t.Heading);
        }
Example #11
0
        //void mSwipeRefreshLayout_Refresh(object sender, EventArgs f)
        //{
        //    BackgroundWorker worker = new BackgroundWorker();
        //    worker.DoWork += worker_DoWork;
        //    worker.RunWorkerCompleted += worker_RunWorkerCompleted;
        //    worker.RunWorkerAsync();
        //}

        //void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs f)
        //{
        //    RunOnUiThread(() => { mSwipeRefreshLayout.Refreshing = false; });
        //}

        //void worker_DoWork(object sender, DoWorkEventArgs f)
        //{
        //    //Will run on separate thread
        //    Thread.Sleep(2000);

        //}

        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var listView = sender as ListView;
            var t        = tableItems[e.Position];

            Android.Widget.Toast.MakeText(this, t.Nimi, Android.Widget.ToastLength.Short).Show();
            Console.WriteLine("Clicked on " + t.Nimi);
        }
Example #12
0
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var selectedTask = taskRecords[e.Position];
            var intent       = new Intent(this, typeof(Detail));

            intent.PutExtra("CLIENT_ID", selectedTask.client_id.ToString());
            intent.PutExtra("TASK_ID", selectedTask._id.ToString());
            StartActivityForResult(intent, 0);
        }
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var listView = sender as ListView;
            var t        = tableItems[e.Position];

            globals.compId = t.Id;

            StartActivity(typeof(Activitys.Activity2_contests));
        }
Example #14
0
        protected void OnListItemClick1(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            Intent intent = new Intent(this, typeof(NewSampleActivityPage));

            isFeatureSamples = true;
            SelectedIntent   = intent;
            intent.PutExtra("sample", e.Position);
            StartActivity(intent);
        }
Example #15
0
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var obj  = listView.Adapter.GetItem(e.Position);
            var curs = (ICursor)obj;
            var text = "Rarity: " + curs.GetString(2) + " Weapon Type: " + curs.GetString(3) + " Skill 1: " + curs.GetString(4) + " Skill 2: " + curs.GetString(5) + " Skill 3: " + curs.GetString(6); // 'name' is column 1

            Android.Widget.Toast.MakeText(this, text, Android.Widget.ToastLength.Short).Show();
            System.Console.WriteLine("Clicked on " + text);
        }
Example #16
0
        protected void OnListItemClick(Object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
//			var listView = sender as ListView;
            var    historyItem = historyItems[e.Position];
            Intent i           = new Intent(this, typeof(IntrusionReport));

            i.PutExtra("id", e.Position);
            StartActivity(i);
        }
Example #17
0
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var sample = aSamples[e.Position];

            Intent intent = new Intent(this, typeof(AllControlsSamplePage));

            SelectedIntent = intent;
            intent.PutExtra("sample", sample);
            StartActivity(intent);
        }
Example #18
0
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            int pos = e.Position;

            String url = _links.getList()[pos].url;
            Intent i   = new Intent(Intent.ActionView);

            i.SetData(Android.Net.Uri.Parse(url));
            StartActivity(i);
        }
Example #19
0
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var detailview = new Intent(this, typeof(detailview));
            var listView   = sender as ListView;
            var t          = tableItems[e.Position];

            Android.Widget.Toast.MakeText(this, t.Heading, Android.Widget.ToastLength.Short).Show();
            Console.WriteLine("Clicked on " + t.Heading);
            StartActivity(detailview);
        }
Example #20
0
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var listView = sender as ListView;
            var t        = tableItems[e.Position];
            var intent   = new Intent(Activity, typeof(HomeActivityDetail));

            intent.PutExtra("id", t.Id);
            intent.PutExtra("name", t.Name);
            StartActivity(intent);
        }
Example #21
0
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var    listView     = sender as ListView;
            var    t            = _RepeatStrs[e.Position];
            Intent ParentIntent = new Intent(this, typeof(NewBigDays));

            ParentIntent.PutExtra("Num", e.Position);
            SetResult(Result.Ok, ParentIntent);
            Finish();
        }
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var listView = sender as ListView;
            var t        = tableItems[e.Position];

            Toast.MakeText(this, t.ToString(), ToastLength.Long).Show();
            Intent intent = new Intent(this, typeof(hawai));

            StartActivity(intent);
        }
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var contacto = lvadapter[e.Position];
            //Toast.MakeText (this, "Nombre ="+ contacto.Get<string>("nombre"), ToastLength.Long).Show();

            var id = new Intent(this, typeof(EditarActivity));

            id.PutExtra("id", contacto.ObjectId);
            StartActivity(id);
        }
Example #24
0
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var listView = sender as ListView;
            var t        = tableItems[e.Position];
            //Android.Widget.Toast.MakeText(this, links[e.Position], Android.Widget.ToastLength.Short).Show();
            var uri    = Android.Net.Uri.Parse(links[e.Position]);
            var intent = new Intent(Intent.ActionView, uri);

            StartActivity(intent);
            Console.WriteLine("Clicked on " + t.Heading);
        }
Example #25
0
        private void Control_ItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var view = e.View;

            view.SetBackgroundColor(Android.Graphics.Color.Transparent);
            int position = e.Position - 1;

            var listView = this.Element as MaterialDialogListView;

            listView?.ItemSelectedCommand?.Execute(position);
        }
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            //RECUPERAMOS EL CONTACTO DEL ADAPTER
            var contacto = lvadapter[e.Position];

            //CREAMOS INTENT PARA PASAR EL ID DEL CONTACTO SELECCIONADO A LA ACTIVIDAD DE EDITAR
            var id = new Intent(this, typeof(EditarContacto));

            id.PutExtra("id", contacto.Id);
            StartActivity(id);
        }
        //public static string GetDeviceStatus(WifiP2pDevice device)
        //{
        //    var oldStatus = StatusByMacAddress.GetValueOrDefault(device.DeviceAddress, WifiP2pDeviceState.Unavailable);
        //    if (!StatusByMacAddress.ContainsKey(device.DeviceAddress))
        //    {
        //        Log.Debug(WiFiDirectActivity.Tag, $"Peer '{device.DeviceName}' registered with status {device.Status}.");
        //        StatusByMacAddress.Add(device.DeviceAddress, device.Status);
        //    }
        //    else if (oldStatus != device.Status)
        //    {
        //        Log.Debug(WiFiDirectActivity.Tag, $"Peer '{device.DeviceName}' changed status from {oldStatus} to {device.Status}.");
        //        StatusByMacAddress[device.DeviceAddress] = device.Status;
        //    }

        //    string result = device.Status.ToString();
        //    if (device.Status == WifiP2pDeviceState.Connected)
        //    {
        //        var i = AddressBook.Names.IndexOf(device.DeviceName);
        //        if (i >= 0)
        //        {
        //            result = $"Connected as {AddressBook.IPaddresses[i]}";
        //        }
        //    }

        //    return result;
        //}

        public void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            // Abort scanning if currently doing so
            SetScanListenState(true, false);
            bluetoothAdapter.CancelDiscovery();

            // Set the currently selected device index, reorder the list, and then update things accordingly.
            selectedDeviceIndex = e.Position;
            _device             = _peers[selectedDeviceIndex];
            ReorderList();
            RefreshDetails();
        }
Example #28
0
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            //Android.Widget.Toast.MakeText(this, "You are viewing your previous Survey with Id {" + (e.Position + 1) + "}", ToastLength.Short).Show();
            var moveToSurveyReviewScreen = new Intent(this, typeof(MySurveysDetailActivity));

            moveToSurveyReviewScreen.PutExtra("selectedHospitalRef", _responseBatches[e.Position].hospitalRef);
            moveToSurveyReviewScreen.PutExtra("selectedHospitalName", _responseBatches[e.Position].hospitalName);
            moveToSurveyReviewScreen.PutExtra("selectedPatientRef", _responseBatches[e.Position].patientRef);
            moveToSurveyReviewScreen.PutExtra("selectedDateTimeStamp", _responseBatches[e.Position].dateTimeStamp);
            moveToSurveyReviewScreen.PutExtra("selectedDateTimeStampRaw", _responseBatches[e.Position].dateTimeStampRaw.ToString());
            StartActivity(moveToSurveyReviewScreen);
        }
Example #29
0
        void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var listView = sender as ListView;
            var l        = item_categoria [e.Position];

            MainActivity.id_item_categorira = Convert.ToInt32(l.codigo);

            if (listView != null)
            {
                StartActivity(typeof(CardItemDetalhes));
            }
        }
        protected void OnListItemClick(object sender, Android.Widget.AdapterView.ItemClickEventArgs e)
        {
            var t = tableItems[e.Position];

            Android.Widget.Toast.MakeText(this, t.Heading, Android.Widget.ToastLength.Short).Show();
            Console.WriteLine("Clicked on " + t.Heading);

            var countryInfoactivity = new Intent(this, typeof(CountryInfoActivity));

            countryInfoactivity.PutExtra("city_name", t.Heading);
            StartActivity(countryInfoactivity);
        }