protected override void AssignInfo(GameObject o, Event n)
    {
        IItemListView <Event> o_view = o.GetComponent <IItemListView <Event> >();

        if (o_view != null)
        {
            o_view.Allocate(n);
        }
    }
        public ItemListPresenter(IItemListView view)
        {
            _view       = view;
            _repository = new ItemMasterSrv();

            _view.Form_Load     += Form_Load;
            _view.Filter_Click  += Filter_Click;
            _view.Clear_Click   += Clear_Click;
            _view.Selecting_Row += Selecting_Row;
            _view.OK_Click      += OK_Click;
            _view.PreviousPage  += PreviousPage;
            _view.NextPage      += NextPage;
        }
 public void SetView(List <Alarm> list)
 {
     foreach (Alarm a in list)
     {
         GameObject o;
         if (a.report)
         {
             o = Instantiate(ReportItem);
         }
         else
         {
             o = Instantiate(ViewItem);
         }
         o.transform.SetParent(ViewList.transform);
         o.transform.localScale = Vector3.one;
         IItemListView <Alarm> o_view = o.GetComponent <IItemListView <Alarm> >();
         if (o_view)
         {
             o_view.Allocate(a);
         }
     }
 }
Пример #4
0
 /// <summary>
 ///
 /// </summary>
 /// <remarks>
 /// It is assumed that the presenter is created from the thread,
 /// to which view-calls should be synchronized.
 /// </remarks>
 public ItemListPresenter(IItemListView itemListView, IActionManager cmdManager)
 {
     _view     = itemListView;
     _mngr     = cmdManager;
     _syncCtxt = SynchronizationContext.Current; // let's assume we're constructed from the UI thread.
 }