Exemplo n.º 1
0
        public MenuViewModel(AppViewModel app, IServicesAggregator services)
        {
            this.services = services;
            this.app      = app;

            DragDropModes = new DragDropModesViewModel();
            DragDropModes.DragDropModeChanged    += DragDropModes_DragDropModeChanged;
            services.AppEvents.OnSettingsChanged += AppEvents_SettingsChanged;
        }
Exemplo n.º 2
0
        public SettingsViewModel(IAppWindowsService appWindowsService, IAppSettingsService appSettingsService,
                                 IAppDialogsService appDialogsService, ILoggerService loggerService, IAppEvents appEvents)
        {
            this.appWindowsService  = appWindowsService;
            this.appSettingsService = appSettingsService;
            this.appDialogsService  = appDialogsService;
            this.loggerService      = loggerService;
            this.appEvents          = appEvents;

            generationData = new GenerationBaseDataViewModel();
            DragDropModes  = new DragDropModesViewModel();

            SaveCommand           = new DelegateCommand(Save);
            CloseCommand          = new DelegateCommand(() => OnClose?.Invoke());
            SetStoragePathCommand = new DelegateCommand(SetStoragePath);
            RawSettingsCommand    = new DelegateCommand(RawSettings);

            InitializeAddModes(BarcodeAddModes);
            InitializeAddModes(WorkspaceAddModes);
            InitializeStartupModes();

            LoadSettings();
        }