Esempio n. 1
0
        public FGfcuViewModel(ICompositeCommands applicationCommands, IRegionManager regionManager, IEventAggregator eventAggregator, IFCUServices fcuServices, IFCUTimerSevices timerServices)
        {
            this.regionManager   = regionManager;
            this.fcuServices     = fcuServices;
            this.timerServices   = timerServices;
            this.eventAggregator = eventAggregator;
            this.eventAggregator.GetEvent <AuthenticatedUserEvent>().Subscribe(InitAuthenticatedUser);
            this.eventAggregator.GetEvent <FilterTextBoxEvent>().Subscribe(InitTextBoxSearch);
            this.eventAggregator.GetEvent <FCU_ItemMessageEvent>().Subscribe(ConsumeItemMessage);

            IsEnableAutoRefresh   = true;
            OnLoadedCommand       = new DelegateCommand(OnLoaded);
            OpenFCUDetailsCommand = new DelegateCommand <FCU>(OpenFCUDetails);
            _IsSelected           = new DelegateCommand <object>(CheckBoxIsSelected);
            _checkedAllCommand    = new DelegateCommand(() =>
            {
                SetIsSelectedProperty(true);
            });
            _unCheckedAllCommand = new DelegateCommand(() =>
            {
                SetIsSelectedProperty(false);
            });

            ImportFGCommand = new DelegateCommand(Import, CanImport);
            ExportFGCommand = new DelegateCommand(Export, CanExport);
            PrintLblCommand = new DelegateCommand(PrintLabel, CanPrint);
            DeleteFGCommand = new DelegateCommand(Delete, CanDelete);
            OKCommand       = new DelegateCommand(OKImport);
            XOKCommand      = new DelegateCommand(OnLoaded);
        }
Esempio n. 2
0
        public FGfcuDetailsViewModel(IUnityContainer _Container, IRegionManager _RegionManager, IEventAggregator _EventAggregator, IFCUServices _fcuServices)
        {
            Container       = _Container;
            RegionManager   = _RegionManager;
            EventAggregator = _EventAggregator;
            fcuServices     = _fcuServices;

            GoBackCommand = new DelegateCommand(GoBack);
        }