private void MesajAtButton_TouchUpInside(object sender, EventArgs e) { if (!KisiBilgileriTammi()) { UIAlertView alert = new UIAlertView(); alert.Title = "Buptis"; alert.AddButton("Evet"); alert.AddButton("Hayır"); alert.Message = "Yaş ve Cinsiyet Bilgilerinizi Tamamlamadan Mesaj Gönderemezsiniz. Bilgilerini güncellemek ister misiniz?"; alert.AlertViewStyle = UIAlertViewStyle.Default; alert.Clicked += (object s, UIButtonEventArgs ev) => { if (ev.ButtonIndex == 0) { alert.Dispose(); var AyarlarBaseVC1 = UIStoryboard.FromName("AyarlarBaseVC", NSBundle.MainBundle); TemelBilgilerVC controller = AyarlarBaseVC1.InstantiateViewController("TemelBilgilerVC") as TemelBilgilerVC; controller.ModalPresentationStyle = UIModalPresentationStyle.FullScreen; this.PresentViewController(controller, true, null); } else { alert.Dispose(); } }; alert.Show(); } else { MevcutMekandaChechInYapmismi(); } }
void MesajGonderGenericMetod(string Message) { if (!string.IsNullOrEmpty(Message.Trim())) { if (!KullaniciEngellemeDurumu) { if (!KisiBilgileriTammi()) { UIAlertView alert = new UIAlertView(); alert.Title = "Buptis"; alert.AddButton("Evet"); alert.AddButton("Hayır"); alert.Message = "Yaş ve Cinsiyet bilgilerinizi tamamlamadan mesaj gönderemezsiniz. Bilgilerini güncellemek ister misiniz?"; alert.AlertViewStyle = UIAlertViewStyle.Default; alert.Clicked += (object s, UIButtonEventArgs ev) => { if (ev.ButtonIndex == 0) { var AyarlarBaseVC1 = UIStoryboard.FromName("AyarlarBaseVC", NSBundle.MainBundle); TemelBilgilerVC controller = AyarlarBaseVC1.InstantiateViewController("TemelBilgilerVC") as TemelBilgilerVC; controller.ModalPresentationStyle = UIModalPresentationStyle.FullScreen; this.PresentViewController(controller, true, null); alert.Dispose(); } else { alert.Dispose(); } }; alert.Show(); } else { ChatDetayDTO chatRecyclerViewDataModel = new ChatDetayDTO() { userId = MeDTO.id, receiverId = MesajlarIcinSecilenKullanici.Kullanici.id, text = Message, key = MesajlarIcinSecilenKullanici.key }; WebService webService = new WebService(); string jsonString = JsonConvert.SerializeObject(chatRecyclerViewDataModel); var Donus = webService.ServisIslem("chats", jsonString); if (Donus != "Hata") { var Icerikk = Newtonsoft.Json.JsonConvert.DeserializeObject <KeyIslemleriIcinDTO>(Donus.ToString()); MesajText.Text = ""; SaveKeys(Icerikk); } else { KredisimiBitti(); return; } } } else { CustomAlert.GetCustomAlert(this, "Kullanıcı Engelli"); } } }