public MainWindowViewModel()
        {
            CurrentPicture  = new PictureViewModel(1);
            PictureVMList   = new PictureListViewModel();
            AddPhotographer = new PhotographerViewModel();

            pictures = PictureVMList.PictureVMlist;

            PhotographerListViewModel = new PhotographerListViewModel();

            photographerViewModels = PhotographerListViewModel.PhotographerList;

            MsSQLDAL ms = new MsSQLDAL();

            ms.getPhotographer(1);
            //ms.makePictureReport(4);

            //ms.makeTagReport();
        }
Пример #2
0
        public PictureViewModel(IPictureModel model)
        {
            if (model is PictureModel)
            {
                IPTC         = new IPTCViewModel(model.IPTC);
                EXIF         = new EXIFViewModel(model.EXIF);
                Photographer = new PhotographerViewModel(((PictureModel)model).Photographer);
                Camera       = new CameraViewModel(model.Camera);
                EXIF.Camera  = Camera;
            }

            if (model != null)
            {
                ID          = model.ID;
                FileName    = model.FileName;
                FilePath    = GlobalInformation.Path + "\\" + FileName;
                DisplayName = FileName.Split('.')[0];
                string name = model.FileName;
                string by   = model.IPTC.ByLine;
                DisplayName = name + " (by " + Photographer.FirstName + " " + Photographer.LastName + ")";
            }
        }