Example #1
0
        public OutputDirectorySelectionViewModel()
        {
            _eventAggregator = EventAggregatorProvider.GetInstance();

            SelectOutputDirectoryCommand = new SelectOutputDirectory(_eventAggregator);
            _eventAggregator.Subscribe <OutputDirectoryChanged>(OnOutputDirectoryChanged);
        }
        public BaseImageSelectionViewModel()
        {
            _eventAggregator = EventAggregatorProvider.GetInstance();
            SelectBaseImageCommand = new SelectBaseImage(_eventAggregator);

            _eventAggregator.Subscribe<BaseImageSelected>(OnBaseImageChanged);
        }
Example #3
0
        public UserNotificator()
        {
            _eventAggregator = EventAggregatorProvider.GetInstance();

            _eventAggregator.Subscribe <MosaicGeneratedSuccessfully>(OnMosaicGeneratedSuccessfully);
            _eventAggregator.Subscribe <NoImagesFound>(OnNoImagesFound);
            _eventAggregator.Subscribe <OutputImageIsToLarge>(OnOutputImageIsToLarge);
        }
Example #4
0
 public ResolutionSettingsViewModel()
 {
     _eventAggregator = EventAggregatorProvider.GetInstance();
     _eventAggregator.Subscribe <BaseImageSelected>(OnBaseImageSelected);
     _eventAggregator.Subscribe <ImageResolutionChanged>(x => GenerateOutputImageInfo());
     _eventAggregator.Subscribe <TileResolutionChanged>(x => GenerateOutputImageInfo());
     _eventAggregator.Subscribe <ImageResolutionChanged>(OnImageResolutionChanged);
     _eventAggregator.Subscribe <TileResolutionChanged>(OnTileResolutionChanged);
 }
Example #5
0
        public ProgressNotificationViewModel()
        {
            _eventAggregator = EventAggregatorProvider.GetInstance();
            ResetProgressValues();

            _eventAggregator.Subscribe <ProcessedImage>(OnProcessedImage);
            _eventAggregator.Subscribe <GeneratedTile>(OnGeneratedTile);
            _eventAggregator.Subscribe <MosaicGeneratedSuccessfully>(OnMosaicGeneratedSuccessfully);
            _eventAggregator.Subscribe <OutputImageIsToLarge>(OnMosaicGeneratedErroneously);
        }
Example #6
0
        /// <summary>
        /// Initializes required information to work with screen & data.
        /// </summary>
        /// <param name="usersData">Implementation of IUsersData</param>
        /// <param name="userTasksData">Implementation of IUsersTasksData</param>
        /// <param name="tasksData">Implementation of ITasksData</param>
        /// <param name="categoriesData">Implementation of ICategoriesData</param>
        public ShellViewModel(IUsersData usersData, IUserTasksData userTasksData, ITasksData tasksData, ICategoriesData categoriesData)
        {
            _eventTracker = EventAggregatorProvider.GetInstance();

            _usersData      = usersData;
            _userTasksData  = userTasksData;
            _tasksData      = tasksData;
            _categoriesData = categoriesData;
            AvailableUsers  = new BindableCollection <UserModel>(_usersData?.GetUsers() ?? new List <UserModel>());
        }
        /// <summary>
        /// Initializes required information to work with screen & user tasks.
        /// </summary>
        /// <param name="user">User for whom the tasks are displayed for</param>
        /// <param name="usersData">IUsersData implementation</param>
        /// <param name="userTasksData">IUserTasksData implementation</param>
        /// <param name="tasksData">ITasksData implementation</param>
        /// <param name="categoriesData">ICategoriesData implementation</param>
        public UserTasksViewModel(UserModel user, IUsersData usersData, IUserTasksData userTasksData, ITasksData tasksData, ICategoriesData categoriesData)
        {
            _user           = user;
            _usersData      = usersData;
            _userTasksData  = userTasksData;
            _tasksData      = tasksData;
            _categoriesData = categoriesData;

            _eventTracker = EventAggregatorProvider.GetInstance();
            LoadUserTasks();
        }
Example #8
0
        /// <summary>
        /// Initializes required information to work with screen & tasks.
        /// </summary>
        /// <param name="user">User for whom the task is being created for</param>
        /// <param name="tasksData">Implementation of ITasksData</param>
        /// <param name="categoriesData">Implementation of ICategoriesData</param>
        /// <param name="usersData">Implementation of IUsersData</param>
        public AddTaskViewModel(UserModel user, ITasksData tasksData, ICategoriesData categoriesData, IUsersData usersData)
        {
            _user           = user;
            _tasksData      = tasksData;
            _categoriesData = categoriesData;
            _usersData      = usersData;
            _eventTracker   = EventAggregatorProvider.GetInstance();

            AvailableTasks      = new BindableCollection <TaskModel>(_tasksData?.GetTasks() ?? new List <TaskModel>());
            AvailableCategories = new BindableCollection <CategoryModel>(_categoriesData?.GetCategories() ?? new List <CategoryModel>());
        }
Example #9
0
        public SourceDirectoriesSelectionViewModel()
        {
            _eventAggregator = EventAggregatorProvider.GetInstance();

            SourceDirectoryPaths = new ObservableCollection <string>();

            AddSourceDirectoryCommand    = new AddSourceDirectory(_eventAggregator);
            RemoveSourceDirectoryCommand = new RemoveSourceDirectory(_eventAggregator);

            _eventAggregator.Subscribe <SourceDirectoryAdded>(OnSourceDirectoryAdded);
            _eventAggregator.Subscribe <SourceDirectoryRemoved>(OnSourceDirectoryRemoved);
        }
 public MosaicGenerationViewModel()
 {
     _eventAggregator = EventAggregatorProvider.GetInstance();
     GenerateCommand  = new Generate(_eventAggregator);
 }
Example #11
0
 /// <summary>
 /// Initialize required information to work with screen.
 /// </summary>
 public AddUserViewModel()
 {
     _eventTracker = EventAggregatorProvider.GetInstance();
 }
 /// <summary>
 /// Initializes required information to work with screen & categories.
 /// </summary>
 /// <param name="categoriesData">CategoriesData implementation</param>
 public AddCategoryViewModel(ICategoriesData categoriesData)
 {
     _categoriesData = categoriesData;
     _eventTracker   = EventAggregatorProvider.GetInstance();
 }