Пример #1
0
        public AppViewModel(IDialogService dialogService, ILocationWindowService locationWindow)
        {
            InitCommands();
            this.dialogService = dialogService;
            editLocationWindow = locationWindow;
            ImageDropHandler   = new ImageDropHandler(this);

            LocationChanged += OnLocationChanged;

            try
            {
                Locations = AppDataManager.LoadLocations(AppFiles.ImagesPath);
            }
            catch (Exception)
            {
                Locations = PhotoStorage.GetLocations();
            }

            if (Locations.Count > 0)
            {
                CurrentLocation = Locations[0];
            }
        }