예제 #1
0
 public SettingsWindow(IEventAggregator eventAggregator, IGlobalParametersService globalParametersService, IUnityContainer container, ILogService logService) {
   _eventAggregator = eventAggregator;
   _globalParametersService = globalParametersService;
   _container = container;
   _logService = logService;
   InitializeComponent();
   Closing += SettingsWindowClosing;
   DataContext = new SettingWindowViewModel(this,_eventAggregator, _globalParametersService, _container, _logService);
 }
 public SettingsWindow(IEventAggregator eventAggregator, IGlobalParametersService globalParametersService, IUnityContainer container, ILogService logService)
 {
     _eventAggregator         = eventAggregator;
     _globalParametersService = globalParametersService;
     _container  = container;
     _logService = logService;
     InitializeComponent();
     Closing    += SettingsWindowClosing;
     DataContext = new SettingWindowViewModel(this, _eventAggregator, _globalParametersService, _container, _logService);
 }
예제 #3
0
 public ImageViewModel(IGlobalParametersService globalParametersService, IEventAggregator eventAggregator) {
   MessageQueue = new Queue<string>();
   _globalParametersService=globalParametersService;
   _eventAggregator=eventAggregator;
   BorderColor=new LinearGradientBrush(Colors.RoyalBlue, Colors.Blue, new Point(0, 0), new Point(1, 1));
   OnLoadCommand=new DelegateCommand(OnLoad);
   NextImageCommand = new DelegateCommand(NextImage);
   PreviousImageCommand = new DelegateCommand(PreviousImage);
   PauseCommand = new DelegateCommand(PauseViewer);
   _eventAggregator.GetEvent<SetProgramStateEvent>().Subscribe(CheckProgramState);
   IsPaused = false;
   MessageQueue.Enqueue("ImageViewModel constructor finished");
 }
 public SettingWindowViewModel(IChildWindow childWindow,IEventAggregator eventAggregator, IGlobalParametersService globalParametersService, IUnityContainer container, ILogService logService) {
   _eventAggregator = eventAggregator;
   _globalParametersService = globalParametersService;
   _container = container;
   _logService = logService;
   _childWindow = childWindow;
   NewSettings = new Settings();
   OkCommand=new DelegateCommand(Ok);
   CancelCommand=new DelegateCommand(Cancel);
   FolderSelectCommand=new DelegateCommand(FolderSelect);
   ErrorVisibility = Visibility.Collapsed;
   ErrorMessage = string.Empty;
   OnLoadCommand = new DelegateCommand(OnLoad);
 }
예제 #5
0
 public ImageViewModel(IGlobalParametersService globalParametersService, IEventAggregator eventAggregator)
 {
     MessageQueue             = new Queue <string>();
     _globalParametersService = globalParametersService;
     _eventAggregator         = eventAggregator;
     BorderColor          = new LinearGradientBrush(Colors.RoyalBlue, Colors.Blue, new Point(0, 0), new Point(1, 1));
     OnLoadCommand        = new DelegateCommand(OnLoad);
     NextImageCommand     = new DelegateCommand(NextImage);
     PreviousImageCommand = new DelegateCommand(PreviousImage);
     PauseCommand         = new DelegateCommand(PauseViewer);
     _eventAggregator.GetEvent <SetProgramStateEvent>().Subscribe(CheckProgramState);
     IsPaused = false;
     MessageQueue.Enqueue("ImageViewModel constructor finished");
 }
예제 #6
0
 public SettingWindowViewModel(IChildWindow childWindow, IEventAggregator eventAggregator, IGlobalParametersService globalParametersService, IUnityContainer container, ILogService logService)
 {
     _eventAggregator         = eventAggregator;
     _globalParametersService = globalParametersService;
     _container          = container;
     _logService         = logService;
     _childWindow        = childWindow;
     NewSettings         = new Settings();
     OkCommand           = new DelegateCommand(Ok);
     CancelCommand       = new DelegateCommand(Cancel);
     FolderSelectCommand = new DelegateCommand(FolderSelect);
     ErrorVisibility     = Visibility.Collapsed;
     ErrorMessage        = string.Empty;
     OnLoadCommand       = new DelegateCommand(OnLoad);
 }
예제 #7
0
 public DataAccess(IGlobalParametersService globalParametersService)
 {
     _globalParametersService = globalParametersService;
     _pathFile = Path.Combine(_globalParametersService.PathListDirectoryName, _globalParametersService.PathListFileName);
 }