Ejemplo n.º 1
0
        private readonly SortSlideList sortSlideList;       //変更済み

        public PhotoFrameApplication(KeywordRepository keywordRepository, PhotoRepository photoRepository, PhotoFileService photoFileService)
        {
            this.createPhotoList = new CreatePhotoList(photoRepository, photoFileService); //済み
            this.addKeyword      = new AddKeyword(keywordRepository);                      //済み
            this.changeKeyword   = new ChangeKeyword(keywordRepository, photoRepository);  //済み
            this.changeFavorite  = new ChangeFavorite(photoRepository);                    //済み
            this.searchKeyword   = new SearchKeyword();                                    //済み
            this.searchFavorite  = new SearchFavorite();                                   //済み
            this.searchDate      = new SearchDate();                                       //済み
            this.sortDate        = new SortDate();                                         //済み
            this.sortSlideList   = new SortSlideList();                                    //済み
        }
Ejemplo n.º 2
0
 public Form1(KeywordRepository in_keywordRepository, PhotoRepository in_photoRepository, PhotoFileService in_photoFileService)
 {
     InitializeComponent();
     this.keywordRepository = in_keywordRepository;
     this.photoRepository   = in_photoRepository;
     this.photoFileService  = in_photoFileService;
     addKeyword             = new AddKeyword(keywordRepository);
     changeFavorite         = new ChangeFavorite(photoRepository);
     changeKeyword          = new ChangeKeyword(keywordRepository, photoRepository);
     createPhotoList        = new CreatePhotoList(photoRepository, photoFileService);
     searchDate             = new SearchDate();
     searchFavorite         = new SearchFavorite();
     searchKeyword          = new SearchKeyword();
     sortDate = new SortDate();
     End_DateTimePicker.MaxDate = DateTime.Today;
 }
Ejemplo n.º 3
0
        public PhotoFrameApplication()
        {
            this.ServiceFactory = new ServiceFactory();

            this.repositoryMaster = new RepositoryMaster();
            this.photoFileService = ServiceFactory.PhotoFileService;

            this.searchFolder       = new SearchFolder(repositoryMaster, photoFileService);
            this.filter             = new Filter(repositoryMaster);
            this.addKeyword         = new AddKeyword(repositoryMaster);
            this.deleteKeyword      = new DeleteKeyword(repositoryMaster);
            this.toggleIsFavorite   = new ToggleIsFavorite(repositoryMaster);
            this.addAlbum           = new AddAlbum(repositoryMaster);
            this.searchAlbum        = new SearchAlbum(repositoryMaster);
            this.sortDateAscending  = new SortDateAscending();
            this.sortDateDescending = new SortDateDescending();
            this.getAllAlbums       = new GetAllAlbums(repositoryMaster);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// This method will add keyword &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Roles&lt;/b&gt;&lt;br/&gt;Denied Anonymous Access&lt;br/&gt;seg.admin
        /// </summary>
        /// <exception cref="component.netcore.apiclient.seg.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="keyword"> (optional)</param>
        /// <returns>Task of ApiResponse (ResponseInfo)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <ResponseInfo> > SegsKeywordAddAsyncWithHttpInfo(AddKeyword keyword = null)
        {
            var    localVarPath         = "./api/v1/segs/keywords";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new List <KeyValuePair <String, String> >();
            var    localVarHeaderParams = new Dictionary <String, String>(this.Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json-patch+json",
                "application/json",
                "text/json",
                "application/_*+json"
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "text/plain",
                "application/json",
                "text/json"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (keyword != null && keyword.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(keyword); // http body (model) parameter
            }
            else
            {
                localVarPostBody = keyword; // byte array
            }

            // authentication (oauth2) required
            // oauth required
            if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
            {
                localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
            }

            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                            Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                            localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("SegsKeywordAdd", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <ResponseInfo>(localVarStatusCode,
                                                  localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
                                                  (ResponseInfo)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ResponseInfo))));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// This method will add keyword &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Roles&lt;/b&gt;&lt;br/&gt;Denied Anonymous Access&lt;br/&gt;seg.admin
        /// </summary>
        /// <exception cref="component.netcore.apiclient.seg.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="keyword"> (optional)</param>
        /// <returns>Task of ResponseInfo</returns>
        public async System.Threading.Tasks.Task <ResponseInfo> SegsKeywordAddAsync(AddKeyword keyword = null)
        {
            ApiResponse <ResponseInfo> localVarResponse = await SegsKeywordAddAsyncWithHttpInfo(keyword);

            return(localVarResponse.Data);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// This method will add keyword &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Roles&lt;/b&gt;&lt;br/&gt;Denied Anonymous Access&lt;br/&gt;seg.admin
        /// </summary>
        /// <exception cref="component.netcore.apiclient.seg.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="keyword"> (optional)</param>
        /// <returns>ResponseInfo</returns>
        public ResponseInfo SegsKeywordAdd(AddKeyword keyword = null)
        {
            ApiResponse <ResponseInfo> localVarResponse = SegsKeywordAddWithHttpInfo(keyword);

            return(localVarResponse.Data);
        }