Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:Chat.iOS.Views.ClientsListViewController"/> class.
        /// </summary>
        /// <param name="presenter">Presenter.</param>
        public ClientsListViewController(ClientsListPresenter presenter)
        {
            _presenter = presenter;

            _source = new ClientsTableSource();
            _source.ItemSelected += (sender, e) =>
            {
                if (ClientSelected != null)
                {
                    ClientSelected(this, new ClientSelectedEventArgs(e));
                }
            };
        }
Exemplo n.º 2
0
        /// <summary>
        /// Ons the create.
        /// </summary>
        /// <returns>The create.</returns>
        /// <param name="bundle">Bundle.</param>
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            ListView.SetBackgroundColor(Color.White);

            var app = ChatApplication.GetApplication(this);

            app.CurrentActivity = this;

            _presenter = app.Presenter as ClientsListPresenter;
            _presenter.SetView(this);

            _adapter    = new ClientsListAdapter(this);
            ListAdapter = _adapter;
        }