Example #1
0
        public SlideShow(IEnumerable <PhotoFrame.Domain.Model.Photo> photolist, PhotoFrameApplication application)
        {
            InitializeComponent();

            this.photo_listview = photolist;
            this.slideshow_list = photolist;

            this.application = application;
            this.albumlist   = application.GetAllAlbums();
            this.slideindex  = 0;
            pictureBox_SlideShow.ImageLocation = this.slideshow_list.ElementAt(slideindex).File.FilePath;

            timer_SlideShow.Interval = 3000;

            //アルバムリストの一時的な初期値の設定
            Album album1 = new Album("abc", "test1", "test説明");
            Album album2 = new Album("def", "test2", "test1説明");
            Album album3 = new Album("ghi", "test3", "test2説明");

            List <Album> list = new List <Album>();

            list.Add(album1);
            list.Add(album2);
            list.Add(album3);

            this.albumlist = list;

            foreach (var albums in this.albumlist)
            {
                comboBox_AlbumName.Items.Add(albums.Name);
            }
        }
Example #2
0
 public SlideShow(List <Photo> photolist, KeywordRepository keywordRepository, PhotoRepository photoRepository, PhotoFileService photoFileService)
 {
     this.originalphotos      = photolist; //メイン画面から配列の受け取り
     this.sskeywordRepository = new KeywordRepository();
     this.ssphotoRepository   = new PhotoRepository();
     this.ssphotoFileService  = new PhotoFileService();
     this.application         = new PhotoFrameApplication(keywordRepository, photoRepository, photoFileService);
 }
Example #3
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public Form1()
        {
            InitializeComponent();

            // 各テストごとにデータベースファイルを削除
            // (35-42をコメントアウトしても動きます)
            if (System.IO.File.Exists("_Photo.csv"))
            {
                System.IO.File.Delete("_Photo.csv");
            }
            if (System.IO.File.Exists("_Album.csv"))
            {
                System.IO.File.Delete("_Album.csv");
            }

            // メンバ変数初期化
            RepositoryFactory repositoryFactory = new RepositoryFactory(PhotoFrame.Persistence.Type.Csv);
            ServiceFactory    serviceFactory    = new ServiceFactory();

            photoRepository  = repositoryFactory.PhotoRepository;
            albumRepository  = repositoryFactory.AlbumRepository;
            photoFileService = serviceFactory.PhotoFileService;
            application      = new PhotoFrameApplication(albumRepository, photoRepository, photoFileService);
            searchedPhotos   = new List <Photo>().AsEnumerable();

            flagAsync = false;

            // 全アルバム名を取得し、アルバム変更リストをセット
            IEnumerable <Album> allAlbums = albumRepository.Find((IQueryable <Album> albums) => albums);

            if (allAlbums != null)
            {
                foreach (Album album in allAlbums)
                {
                    comboBox_ChangeAlbum.Items.Add(album.Name);
                }
            }
        }
Example #4
0
 public void SetUp()
 {
     this.application = new PhotoFrameApplication();
     this.photos      = application.SearchFolder("Album1");
 }
Example #5
0
 public Controller(IKeywordRepository keywordRepository, IPhotoRepository photoRepository, IPhotoFileService photoFileService)
 {
     this.application = new PhotoFrameApplication(keywordRepository, photoRepository, photoFileService);
 }