public override void OnBindElements(View view) { UserEditUsername = view.FindViewById <EditText>(Resource.Id.UserEditUsername); UserEditEmail = view.FindViewById <EditText>(Resource.Id.UserEditEmail); UserEditRolesList = view.FindViewById <Spinner>(Resource.Id.UserEditRolesList); UserEditPassword = view.FindViewById <EditText>(Resource.Id.UserEditPassword); UserEditClaims = view.FindViewById <ListView>(Resource.Id.UserEditClaims); UserEditUsername.AfterTextChanged += AfterTextChanged; UserEditEmail.AfterTextChanged += AfterTextChanged; UserEditPassword.AfterTextChanged += AfterTextChanged; UserEditRolesList.OnItemSelectedListener = this; _roleSpinnerAdapter = new SpinnerDefaultValueAdapter <Models.Role>(Context); _roleSpinnerAdapter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem); UserEditRolesList.Adapter = _roleSpinnerAdapter; UserEditUsername.Text = Entity.Username; UserEditEmail.Text = Entity.Email; Task.Run(async() => { await Load(); }); }
public override void OnBindElements(View view) { AddInvoiceType = view.FindViewById <Spinner>(Resource.Id.AddInvoiceType); AddInvoiceCounterparty = view.FindViewById <AutoCompleteTextView>(Resource.Id.AddInvoiceCounterparty); AddInvoiceDocumentId = view.FindViewById <EditText>(Resource.Id.AddInvoiceDocumentId); AddInvoiceIssueDate = view.FindViewById <EditText>(Resource.Id.AddInvoiceIssueDate); AddInvoiceCompletionDate = view.FindViewById <EditText>(Resource.Id.AddInvoiceCompletionDate); AddInvoiceCity = view.FindViewById <AutoCompleteTextView>(Resource.Id.AddInvoiceCity); AddInvoicePaymentMethod = view.FindViewById <Spinner>(Resource.Id.AddInvoicePaymentMethod); AddInvoiceProducts = view.FindViewById <ListView>(Resource.Id.AddInvoiceProducts); AddInvoiceAddProductButton = view.FindViewById <ImageButton>(Resource.Id.AddInvoiceAddProductButton); _dialog = CreateDatePickerDialog(this); AddInvoiceIssueDate.OnFocusChangeListener = this; AddInvoiceCompletionDate.OnFocusChangeListener = this; AddInvoiceAddProductButton.SetOnClickListener(this); _invoiceTypeAdapter = new SpinnerDefaultValueAdapter <Models.KeyValue>(Context); _paymentMethodAdapter = new SpinnerDefaultValueAdapter <Models.KeyValue>(Context); _counterPartyAdapter = new BaseArrayAdapter <Models.Counterparty>(Context); _cityAdapter = new BaseArrayAdapter <City>(Context); _productsAdapter = new AddInvoiceEntryRowItemAdapter(Context); AddInvoiceProducts.Adapter = _productsAdapter; _productsAdapter.IOnClickListener = this; _productsAdapter.UpdateList(Entity.Products); AddInvoiceType.Adapter = _invoiceTypeAdapter; AddInvoicePaymentMethod.Adapter = _paymentMethodAdapter; AddInvoiceCounterparty.Adapter = _counterPartyAdapter; AddInvoiceCounterparty.ItemClick += OnAutocompleteCounterpartyClick; AddInvoiceCity.Adapter = _cityAdapter; AddInvoiceCity.ItemClick += OnAutocompleteCityClick; AddInvoiceCity.AfterTextChanged += AfterTextChanged; AddInvoiceCounterparty.AfterTextChanged += AfterTextChanged; var currentDate = DateTime.Now; var currentDateFormat = currentDate.ToLongDateString(); AddInvoiceIssueDate.Text = currentDateFormat; AddInvoiceIssueDate.Tag = new JavaObjectWrapper <DateTime>(currentDate); AddInvoiceCompletionDate.Text = currentDateFormat; AddInvoiceCompletionDate.Tag = new JavaObjectWrapper <DateTime>(currentDate); AddInvoiceDocumentId.Text = string.Format("FAK/{0:yyyyMMddhhmmss}", currentDate); var token = CancelAndSetTokenForView(AddButton); Task.Run(async() => { await Load(token); }, token); }
public override void OnBindElements(View view) { AddUserName = view.FindViewById <EditText>(Resource.Id.AddUserUsername); AddUserEmail = view.FindViewById <EditText>(Resource.Id.AddUserEmail); AddUserPassword = view.FindViewById <EditText>(Resource.Id.AddUserPassword); AddUserRolesList = view.FindViewById <Spinner>(Resource.Id.AddUserRolesList); AddUserPermissionsList = view.FindViewById <ListView>(Resource.Id.AddUserPermissionsList); AddUserName.AfterTextChanged += AfterTextChanged; AddUserEmail.AfterTextChanged += AfterTextChanged; AddUserPassword.AfterTextChanged += AfterTextChanged; AddUserRolesList.OnItemSelectedListener = this; _roleSpinnerAdapter = new SpinnerDefaultValueAdapter <Models.Role>(Context); _roleSpinnerAdapter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem); AddUserRolesList.Adapter = _roleSpinnerAdapter; Task.Run(Load); }