private async void MakeFold(AlertDialog.Builder alert) { using (var client = ClientHelper.GetClient(CrossSettings.Current.GetValueOrDefault("token", ""))) { BoxService.InitializeClient(client); var o_data = new ServiceResponseObject <SuccessResponse>(); o_data = await BoxService.FoldContainer(StaticBox.id); if (o_data.Status == HttpStatusCode.OK) { alert.Dispose(); Android.App.AlertDialog.Builder alert1 = new Android.App.AlertDialog.Builder(Activity); alert1.SetTitle("Сложить контейнер"); alert1.SetMessage(o_data.ResponseData.Message); alert1.SetPositiveButton("Закрыть", (senderAlert1, args1) => { }); Dialog dialog1 = alert1.Create(); dialog1.Show(); btn_fold.Text = "Разложить"; BoxTextFold.Text = "Сложен"; FragmentTransaction transaction1 = this.FragmentManager.BeginTransaction(); BoxActivity content2 = new BoxActivity(); transaction1.Replace(Resource.Id.frameDriverlayout, content2); transaction1.Commit(); } } }
private async void MakeLockRollete(AlertDialog.Builder alert) { using (var client = ClientHelper.GetClient(CrossSettings.Current.GetValueOrDefault("token", ""))) { BoxService.InitializeClient(client); var o_data = new ServiceResponseObject <SuccessResponse>(); o_data = await BoxService.LockRollete(StaticBox.id); if (o_data.Status == HttpStatusCode.OK) { alert.Dispose(); Android.App.AlertDialog.Builder alert1 = new Android.App.AlertDialog.Builder(Activity); alert1.SetTitle("Опустить роллету"); alert1.SetMessage(o_data.Message); alert1.SetPositiveButton("Закрыть", (senderAlert1, args1) => { }); Dialog dialog1 = alert1.Create(); dialog1.Show(); btn_gate.Text = "Поднять"; BoxTextGate.Text = "Закрыта"; FragmentTransaction transaction1 = this.FragmentManager.BeginTransaction(); BoxActivity content2 = new BoxActivity(); transaction1.Replace(Resource.Id.frameDriverlayout, content2); transaction1.Commit(); } else { Toast.MakeText(Activity, o_data.Message, ToastLength.Long).Show(); } } }
private void Work_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { swipe.Refreshing = false; BoxActivity content = new BoxActivity(); FragmentTransaction transaction1 = this.FragmentManager.BeginTransaction(); transaction1.Replace(Resource.Id.frameDriverlayout, content); transaction1.Commit(); }
public override View GetView(int position, View convertView, ViewGroup parent) { View view = convertView; if (view == null) { view = LayoutInflater.From(_context).Inflate(Resource.Layout.box_book_parameters, null); } view.FindViewById <TextView>(Resource.Id.txtBoxName).Text = _boxes[position].BoxId; var txt_order_id = view.FindViewById <TextView>(Resource.Id.txt123); txt_order_id.Text = _boxes[position].OrderId; if (_boxes[position].OrderId == "нет заказа") { txt_order_id.SetTextColor(Color.Gray); txt_order_id.Clickable = false; } else { txt_order_id.SetTextColor(Color.SkyBlue); txt_order_id.Clickable = true; txt_order_id.Click += delegate { try { StaticOrder.Order_id = _boxes[position].OrderId; MainOrderStatusActivity content2 = new MainOrderStatusActivity(); _manager.Replace(Resource.Id.frameDriverlayout, content2); _manager.Commit(); } catch (Exception ex) { Toast.MakeText(_context, ex.Message, ToastLength.Long).Show(); } }; } view.FindViewById <ImageView>(Resource.Id.img_box).SetImageResource(_boxes[position].ImageView); view.FindViewById <TextView>(Resource.Id.txt_alarm).Text = _boxes[position].AlarmDescription; var btn_info_box = view.FindViewById <Button>(Resource.Id.btn_info_box); btn_info_box.Click += delegate { StaticBox.id = _boxes[position].Id; StaticOrder.Order_id = _boxes[position].OrderId; try { BoxActivity content2 = new BoxActivity(); _manager.Replace(Resource.Id.frameDriverlayout, content2); _manager.Commit(); } catch (Exception ex) { Toast.MakeText(_context, ex.Message, ToastLength.Long).Show(); } }; //var listView = view.FindViewById<ExpandableListView>(Resource.Id.expandableListView2); //SensorData.SampleChildData(view); //listView.SetAdapter(new ExpandableSensorDataAdapter(_context, SensorData.listDataHeader, SensorData.listDataChild)); //listView.SetOnGroupClickListener(new Activity.Order.OnExpandedListenerService()); return(view); }