private void SwitchDateTimeClick(object sender, EventArgs e) { if (s_shipment_time.Focusable == false && s_shipping_date.Focusable == false) { s_shipment_time.Focusable = true; s_shipment_time.Enabled = true; LInputTime.SetBackgroundColor(Color.ParseColor("#FFFFFF")); s_shipping_date.Focusable = true; s_shipping_date.Enabled = true; LInputDate.SetBackgroundColor(Color.ParseColor("#FFFFFF")); } else { s_shipment_time.Focusable = false; s_shipment_time.Enabled = false; LInputTime.SetBackgroundColor(Color.ParseColor("#E6E3E3")); s_shipment_time.Text = ""; s_shipping_date.Focusable = false; s_shipping_date.Enabled = false; LInputDate.SetBackgroundColor(Color.ParseColor("#E6E3E3")); s_shipping_date.Text = ""; } }
private void SwitchContactPersonClick(object sender, EventArgs e) { if (s_contact_person.Visibility == ViewStates.Invisible) { s_contact_person.Visibility = ViewStates.Visible; LInputContactPerson.SetBackgroundColor(Color.ParseColor("#FFFFFF")); } else { s_contact_person.Visibility = ViewStates.Invisible; s_contact_person.Text = ""; LInputContactPerson.SetBackgroundColor(Color.ParseColor("#E6E3E3")); } }
// private void callDatePicker() // { // // получаем текущую дату // Calendar cal = new Calendar(); // var mYear = cal.GetYear(DateTime.Now); // var mMonth = cal.GetMonth(DateTime.Now); // var mDay = cal.GetDayOfWeek(DateTime.Now); // // инициализируем диалог выбора даты текущими значениями // DatePickerDialog datePickerDialog = new DatePickerDialog(this, // new DatePickerDialog.OnDateSetListener() { // @Override // public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) // { // String editTextDateParam = dayOfMonth + "." + (monthOfYear + 1) + "." + year; // editTextDate.setText(editTextDateParam); // } // }, mYear, mMonth, mDay); // datePickerDialog.show(); //} private void SwitchCargoInsuranceClick(object sender, EventArgs e) { if (s_value.Visibility == ViewStates.Invisible) { s_value.Visibility = ViewStates.Visible; LInputCargoInsurance.SetBackgroundColor(Color.ParseColor("#FFFFFF")); } else { s_value.Visibility = ViewStates.Invisible; s_value.Text = ""; LInputCargoInsurance.SetBackgroundColor(Color.ParseColor("#E6E3E3")); } }
private void Spinner_ItemSelected(object sender, AdapterView.ItemSelectedEventArgs e) { var spinner = sender as Spinner; a_cargo_characteristic = spinner.GetItemAtPosition(e.Position).ToString(); if (a_cargo_characteristic != "Тарно-штучные") { s_height.Enabled = false; s_width.Enabled = false; s_length.Enabled = false; s_sum_seats.Enabled = false; s_height.Text = "0"; s_sum_seats.Text = "1"; s_width.Text = "0"; s_length.Text = "0"; s_size.Enabled = true; SizeInputLayout.SetBackgroundColor(Color.Transparent); //s_size.Visibility = ViewStates.Visible; //s_size.TextChanged += S_size_TextChanged } else { s_height.Enabled = true; s_width.Enabled = true; s_length.Enabled = true; s_sum_seats.Enabled = true; s_size.Enabled = false; SizeInputLayout.SetBackgroundResource(Resource.Drawable.StyleInputLayout); //s_size.Focusable = false; //s_size.Clickable = false; //s_size.Enabled = false; //s_size.Visibility = ViewStates.Invisible; //SizeInputLayout.SetBackgroundResource(Resource.Drawable.StyleInputLayout); } }