Пример #1
0
        public LoggedInApplicationMode(IApplicationStateService applicationStateService, ICentronService centronService, ILoadingService loadingService, IHelpdeskGroupsService helpdeskGroupsService, IEventAggregator eventAggregator)
        {
            this._applicationStateService = applicationStateService;
            this._centronService          = centronService;
            this._loadingService          = loadingService;
            this._helpdeskGroupsService   = helpdeskGroupsService;
            this._eventAggregator         = eventAggregator;

            this._dashboardItem        = new NavigatingHamburgerItem(SBoardResources.Get("Navigation.Dashboard"), Symbol.Home, typeof(DashboardViewModel));
            this._logoutItem           = new ClickableHamburgerItem(SBoardResources.Get("Navigation.Logout"), SymbolEx.Logout, this.Logout);
            this._newHelpdeskGroupItem = new NavigatingHamburgerItem(SBoardResources.Get("Navigation.NewHelpdeskGroup"), Symbol.Add, typeof(NewHelpdeskGroupViewModel));
            this._helpdeskGroupItems   = new List <NavigatingHamburgerItem>();
        }
Пример #2
0
        public LoginViewModel([NotNull] ICentronService centronService, [NotNull] IApplicationStateService applicationStateService, [NotNull] IApplication application)
        {
            Guard.NotNull(centronService, nameof(centronService));
            Guard.NotNull(applicationStateService, nameof(applicationStateService));
            Guard.NotNull(applicationStateService, nameof(applicationStateService));

            this._centronService          = centronService;
            this._applicationStateService = applicationStateService;
            this._application             = application;

            this.DisplayName = SBoardResources.Get("ViewModel.Login");

            var canLogin = this.WhenAnyValue(f => f.WebServiceAddress, f => f.Username, f => f.Password, (webServiceAddress, username, password) =>
                                             string.IsNullOrWhiteSpace(webServiceAddress) == false &&
                                             string.IsNullOrWhiteSpace(username) == false &&
                                             string.IsNullOrWhiteSpace(password) == false);

            this.Login = ReactiveCommand.CreateAsyncTask(canLogin, _ => this.LoginImpl());
            this.Login.AttachExceptionHandler();
            this.Login.AttachLoadingService(SBoardResources.Get("Loading.Login"));
        }
Пример #3
0
 public SearchCustomersQueryHandler(ICentronService centronService)
 {
     this._centronService = centronService;
 }
Пример #4
0
 public HelpdeskTypesQueryHandler(ICentronService centronService)
 {
     this._centronService = centronService;
 }
Пример #5
0
 public HelpdeskGroupQueryHandler(ICentronService centronService, IHelpdeskGroupsService helpdeskGroupsService, IScriptEngine scriptEngine)
 {
     this._centronService        = centronService;
     this._helpdeskGroupsService = helpdeskGroupsService;
     this._scriptEngine          = scriptEngine;
 }