Example #1
0
 public StaffPresenter(IStaffView view, IStaffRepository repository)
 {
     _view = view;
     view.StaffPresenter = this;
     _repository         = repository;
     UpdateListView();
 }
Example #2
0
        /// <summary>
        /// Add a view to the list of observers, and subscribe to their events.
        /// </summary>
        /// <param name="view"></param>
        public void addObserver(IStaffView view)
        {
            view.addStaffRequest      += V_addStaffRequest;
            view.populateStaffRequest += V_populateStaffRequest;
            view.deleteStaffRequest   += V_deleteStaffRequest;

            views.Add(view);
        }
Example #3
0
        public StaffPresenter(IStaffRepository staffRepository,
                              IPermissionRepository permissionRepository, IStaffView staffView)
        {
            _view = staffView;
            _permissionRepository = permissionRepository;
            _repository           = staffRepository;

            SetPermissionComboBox();
        }
Example #4
0
        public StaffController(ISymbolsFactory symbolsFactory, IStaffView staffView)
        {
            _symbolsFactory = symbolsFactory;
            _staffView      = staffView;

            Observable.EveryUpdate()
            .Where(_ => Input.GetKey(KeyCode.M))
            .Subscribe(
                _ =>
            {
                staffView.Advance(10f);
            })
            .AddTo(_disposables);

            Observable.EveryUpdate()
            .Where(_ => Input.GetKeyDown(KeyCode.R))
            .Subscribe(_ => { PlaceNotes(GetRandomNotes()); })
            .AddTo(_disposables);

            Observable.EveryUpdate()
            .Where(_ => Input.GetKeyDown(KeyCode.L))
            .Subscribe(_ => { PlaceNotes(GetLick()); })
            .AddTo(_disposables);
        }
 public StaffService(IStaffView view)
 {
     _staffView = view;
     _staffDb   = new StaffRepo(this);
 }
 public StaffPresenter(IStaffView staffView)
 {
     this.staffView = staffView;
     Initialize();
 }