Exemple #1
0
        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();
        }
Exemple #2
0
 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;
     }
 }