void MessageListenerr() { var Mee = DataBase.MEMBER_DATA_GETIR()[0]; new System.Threading.Thread(new System.Threading.ThreadStart(delegate { _timer = new System.Threading.Timer((o) => { try { var Durum = MesajlariGetir(); InvokeOnMainThread(() => { if (Durum) //İçerik Değişmişse Uygula { //ChatTableView.TranslatesAutoresizingMaskIntoConstraints = false; ChatTableView.AllowsSelection = false; ChatTableView.SeparatorStyle = UITableViewCellSeparatorStyle.None; ChatTableView.RegisterClassForCellReuse(typeof(IncomingCell), IncomingCell.CellId); ChatTableView.RegisterClassForCellReuse(typeof(OutgoingCell), OutgoingCell.CellId); ChatTableView.RegisterClassForCellReuse(typeof(OutgoingCell_Resim), OutgoingCell_Resim.CellId); ChatTableView.RegisterClassForCellReuse(typeof(IncomingCell_Resim), IncomingCell_Resim.CellId); //View.AddSubview(tableView); ChatTableView.Source = new ChatCustomTableCellSoruce(ChatDetayDTO1, this, Mee); ChatTableView.ReloadData(); if (ChatDetayDTO1.Count > 0) { var bottomIndexPath = NSIndexPath.FromRowSection(ChatTableView.NumberOfRowsInSection(0) - 1, 0); ChatTableView.ScrollToRow(bottomIndexPath, UITableViewScrollPosition.Bottom, true); } //ChatTableView.Source = new ChatCustomTableCellSoruce(ChatDetayDTO1, this, Mee); ChatTableView.BackgroundColor = UIColor.Clear; //ChatTableView.RowHeight = UITableView.AutomaticDimension; //ChatTableView.EstimatedRowHeight = 100f; //ChatTableView.ReloadData(); //ChatTableView.AllowsSelection = false; //if (ChatDetayDTO1.Count > 0) //{ // var bottomIndexPath = NSIndexPath.FromRowSection(ChatTableView.NumberOfRowsInSection(0) - 1, 0); // ChatTableView.ScrollToRow(bottomIndexPath, UITableViewScrollPosition.Bottom, true); //} MesajOkunduYap(); } }); } catch { } }, null, 0, 3000); })).Start(); }
private void KeyboardDidShow(NSNotification notification) { if (ChatDetayDTO1.Count > 0) { var bottomIndexPath = NSIndexPath.FromRowSection(ChatTableView.NumberOfRowsInSection(0) - 1, 0); try { ChatTableView.ScrollToRow(bottomIndexPath, UITableViewScrollPosition.Bottom, true); } catch { } } }
public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); KullaniciEngellemeDurumu = GetBlockedFriends(); if (!Actinmi1) { HeaderView.Hidden = true; BackButton.ContentEdgeInsets = new UIEdgeInsets(5, 5, 5, 5); FavButton.ContentEdgeInsets = new UIEdgeInsets(5, 5, 5, 5); HediyeButton.ContentEdgeInsets = new UIEdgeInsets(5, 5, 5, 5); GonderButton.ContentEdgeInsets = new UIEdgeInsets(5, 5, 5, 5); ChatTableView.BackgroundColor = UIColor.Clear; ChatTableView.SeparatorStyle = UITableViewCellSeparatorStyle.None; ChatTableView.TableFooterView = new UIView(); ChatTableView.Source = null; ChatTableView.ReloadData(); MeDTO = DataBase.MEMBER_DATA_GETIR()[0]; FavorileriCagir(); IconlariAyarla(HediyeButton); IconlariAyarla(GonderButton); Actinmi1 = true; } }
void ReleaseDesignerOutlets() { if (BackButton != null) { BackButton.Dispose(); BackButton = null; } if (ButtomKisitlamaa != null) { ButtomKisitlamaa.Dispose(); ButtomKisitlamaa = null; } if (ChatArkaHazne != null) { ChatArkaHazne.Dispose(); ChatArkaHazne = null; } if (ChatTableView != null) { ChatTableView.Dispose(); ChatTableView = null; } if (FavButton != null) { FavButton.Dispose(); FavButton = null; } if (GonderButton != null) { GonderButton.Dispose(); GonderButton = null; } if (HazirMesajlarScroll != null) { HazirMesajlarScroll.Dispose(); HazirMesajlarScroll = null; } if (HeaderView != null) { HeaderView.Dispose(); HeaderView = null; } if (HediyeButton != null) { HediyeButton.Dispose(); HediyeButton = null; } if (MesajBGVieww != null) { MesajBGVieww.Dispose(); MesajBGVieww = null; } if (MesajText != null) { MesajText.Dispose(); MesajText = null; } if (UserImageView != null) { UserImageView.Dispose(); UserImageView = null; } if (UserNameLabel != null) { UserNameLabel.Dispose(); UserNameLabel = null; } }