/// <summary> /// 選択中の画像のプレビューペインを表示する /// </summary> public async void ShowSelectedImagePreview() { LOG.Info("ShowSelectedImagePreview"); if (this.SelectedItem == null) { LOG.Info("選択している画像がありません。"); return; } var message = new DoImagePreviewPaneMessage(); message.IsWithActive = true; using (var proxy = new MogamiApiServiceClient()) { var request = new REQUEST_LOADARTIFACT(); request.TargetArtifactId = SelectedItem.ArtifactId; var rsp = await proxy.LoadArtifactAsync(request); message.LoadImageInfo = new LoadImageInfo { BitmapFilePath = rsp.FilePath }; await Messenger.RaiseAsync(message); } }
public RESPONSE_LOADARTIFACT LoadArtifact(REQUEST_LOADARTIFACT reqparam) { var rsp = new RESPONSE_LOADARTIFACT(); using (var dbc = new AppDbContext()) { var repo = new ArtifactRepository(dbc); var artifact = repo.Load(reqparam.TargetArtifactId); var mapped = Mapper.Map <DataArtifact>(artifact); rsp.Artifact = mapped; var filePath = Path.Combine(artifact.FileMappingInfo.Workspace.PhysicalPath, artifact.FileMappingInfo.MappingFilePath); rsp.FilePath = filePath; } return(rsp); }