private void BtnLogIn_Click(object sender, EventArgs e) { try { HideKeyBoard.hideSoftInput(this); string profileName = txtUserName.Text.Trim(); var userinfo = new UserInfo { LoginType = "E", ProfileName = profileName, UserName = userName }; if (profileName == "") { AlertBox.Create("Error", "Please enter your name.", this); txtUserName.RequestFocus(); return; } new LogInBackGround(userinfo, this).Execute(); } catch (System.Exception ex) { new CrashReportAsync("AddUserName", "BtnLogIn_Click", ex.Message + ex.StackTrace).Execute(); } }
private void BtnLogIn_Click(object sender, EventArgs e) { try { HideKeyBoard.hideSoftInput(this); string username = txtUserName.Text.Trim(); string password = txtPassword.Text.Trim(); if (username == "") { AlertBox.Create("Error", "Please enter username.", this); txtUserName.RequestFocus(); return; } if (password == "") { AlertBox.Create("Error", "Please enter password.", this); txtPassword.RequestFocus(); return; } new LogInWeClip(username, password, this).Execute(); } catch (Java.Lang.Exception ex) { new CrashReportAsync("LoginActivity", "OnCreate", ex.Message + ex.StackTrace).Execute(); } }
private void ImgButton_Click(object sender, EventArgs e) { try { HideKeyBoard.hideSoftInput(Activity); UserProfile objUP = new UserProfile(); objUP.UserName = userName.Text.Trim(); objUP.Bio = etBio.Text.Trim(); if (!string.IsNullOrEmpty(uploadImagePath)) { progressDialog.Show(); progressDialog.SetMessage("Profile updating..."); var uploadfile = new UploadProfilePic(Activity, uploadImagePath, progressDialog, objUP, drawerProfile_pic, drawerUsername); uploadfile.Execute(); } else { progressDialog.Show(); progressDialog.SetMessage("Profile updating..."); new UploadProfileData(progressDialog, objUP, Activity, drawerUsername).Execute(); } } catch (Java.Lang.Exception ex) { new CrashReportAsync("EditProfile", "ImgButton_Click", ex.Message + ex.StackTrace).Execute(); } }
private void EventDate_Click(object sender, EventArgs e) { HideKeyBoard.hideSoftInput(this); DatePickerFragment dpFragment = DatePickerFragment.NewInstance(delegate(DateTime time) { eventDate.Text = string.Format("{0:dd MMM yyyy}", time.Date); }); dpFragment.Show(SupportFragmentManager, DatePickerFragment.TAG); }
private void IvPostWeClipBack_Click(object sender, EventArgs e) { HideKeyBoard.hideSoftInput(this); Intent intent = new Intent(this, typeof(ThemeActivity)); // intent.PutExtra("strMusicView", strWeClipdata); intent.PutExtra("strEventGalleryView", strWeClipdata); StartActivity(intent); this.Finish(); }
private void BtnSumitForgotPassword_Click(object sender, EventArgs e) { string username = txtForgotUsername.Text; HideKeyBoard.hideSoftInput(this); if (username == "") { AlertBox.Create("Error", "Please enter username!", this); return; } new callForgotPassword(this, username).Execute(); }
private void ImgBack_Click(object sender, EventArgs e) { try { HideKeyBoard.hideSoftInput(this); Intent intent = new Intent(this, typeof(CreateEvent)); intent.PutExtra("strAddEventPic", eventData); this.StartActivity(intent); this.Finish(); } catch (Java.Lang.Exception ex) { new CrashReportAsync("AddEventPic", "ImgBack_Click", ex.Message + ex.StackTrace).Execute(); } }
private void IvCreateWeClip_Click(object sender, EventArgs e) { wcHolder.Tag = etWecliptag.Text; wcHolder.Title = etWeClipTitle.Text; if (wcHolder.Title.Trim() == "") { AlertBox.Create("Error", "Please enter title.", this); return; } HideKeyBoard.hideSoftInput(this); CreateWeClip createWeClip = new CreateWeClip(this, wcHolder); createWeClip.Execute(); }
private void EventTime_Click(object sender, EventArgs e) { HideKeyBoard.hideSoftInput(this); if (model != null) { if (!string.IsNullOrEmpty(model.EventStartTime.ToString())) { Android.Support.V4.App.DialogFragment newFragment = new TimePickerFragment(this, eventTime, model.EventStartTime.Value); newFragment.Show(SupportFragmentManager, "TimePicker"); } else { Android.Support.V4.App.DialogFragment newFragment = new TimePickerFragment(this, eventTime, DateTime.Now); newFragment.Show(SupportFragmentManager, "TimePicker"); } } }
private void btnRegister_click(object sender, EventArgs e) { HideKeyBoard.hideSoftInput(this); if (string.IsNullOrEmpty(txtPhone.Text)) { AlertBox.Create("Error", "Please enter phone number.", this); txtPhone.RequestFocus(); return; } if (string.IsNullOrEmpty(txtPassword.Text)) { AlertBox.Create("Error", "Please enter password.", this); txtPassword.RequestFocus(); return; } if (string.IsNullOrEmpty(txtConfirmPassword.Text)) { AlertBox.Create("Error", "Please enter confirm password.", this); txtConfirmPassword.RequestFocus(); return; } if (txtPassword.Text != txtConfirmPassword.Text) { AlertBox.Create("Error", "Password and confirm password does not match.", this); txtPassword.RequestFocus(); return; } RegistrationModel reg = new RegistrationModel(); reg.Password = txtPassword.Text; reg.DeviceID = ""; reg.ConfirmPassword = txtConfirmPassword.Text; reg.PhoneNumber = txtPhone.Text; new RegistrationInBackGround(reg, this).Execute(); }
private void ImgCreateEvent_Click(object sender, EventArgs e) { try { eventModel.EventTag = eventTag.Text; HideKeyBoard.hideSoftInput(this); if (!string.IsNullOrEmpty(uploadImagePath)) { var uploadfile = new UploadFileBackGround(this, eventModel, uploadImagePath); uploadfile.Execute(); } else { ProgressDialog p = ProgressDialog.Show(this, "Uploading Data", "Please wait..."); var addUpdateEvent = new CreateEventInBackGround(eventModel, this, p); addUpdateEvent.Execute(); } } catch (Java.Lang.Exception ex) { new CrashReportAsync("AddEventPic", "ImgCreateEvent_Click", ex.Message + ex.StackTrace).Execute(); } }
private void ImgCreateEvent_Click(object sender, EventArgs e) { try { HideKeyBoard.hideSoftInput(this); if (eventTitle.Text.Trim() == "") { AlertBox.Create("Error", "Please enter event title.", this); return; } if (eventDate.Text.Trim() == "") { AlertBox.Create("Error", "Please enter event date.", this); return; } model.UserID = Convert.ToInt64(GlobalClass.UserID); model.EventName = eventTitle.Text; if (eventDate.Text != "") { model.EventDate = DateTime.ParseExact(eventDate.Text, "dd MMM yyyy", cultureInfo); } if (eventTime.Text != "") { string StartTimeInput = eventTime.Text; var timeFromInput = DateTime.ParseExact(StartTimeInput, "H:m", cultureInfo); model.EventStartTime = timeFromInput; } else { model.EventStartTime = null; } model.EventLocation = eventLocation.Text; model.EventDescription = EventInfo.Text == null ? "" : EventInfo.Text; int selectedId = rgPrivacy.CheckedRadioButtonId; var rbselected = FindViewById <RadioButton>(selectedId); if (rbselected.Text == "Public") { category = "Public"; } else { category = "Personal"; } model.EventCategory = category; Intent intent = new Intent(this, typeof(EventCreateAddEventProfilePic)); intent.PutExtra("strCreateEvent", JsonConvert.SerializeObject(model)); this.StartActivity(intent); this.Finish(); } catch (Exception ex) { new CrashReportAsync("CreateEvent", "ImgCreateEvent_Click", ex.Message + ex.StackTrace).Execute(); } }