public void StopPhoto( ) { var hr = PhotoControl.Stop( ); checkHR(hr, "Failed stopping graph"); PhotoRunning = false; CleanupStop( ); }
public void ShowPhotos(List <byte[]> photos) { if (photos != null && photos.Any()) { ObservableCollection <BitmapSource> photoCollection = ImageService.Assemble(photos); var photoModel = new PhotoModel(photoCollection); var photoViewModel = new PhotoViewModel(Messenger, ImageService, photoModel); var photoView = new PhotoControl(); var args = new ChildWindowEventArg(photoView, photoViewModel); Messenger.Send(CommandName.ShowImages, args); } }
public void StartPhoto( ) { if (PhotoRunning) { return; } PhotoRunning = true; if (VideoRunning) { StopVideo( ); } var hr = PhotoControl.Run( ); checkHR(hr, "Failed running graph"); WakeProcessing.Set( ); }
private IEnumerator PhotoView() { // 画像の一覧を取得 string[] list = null; yield return(PhotoControl.ViewPhotos((l) => list = l)); for (var i = 0; i < list.Length; i++) { Debug.Log(list[i]); } // 画像を取得 var tex = new Texture2D(1, 1); yield return(PhotoControl.LoadPhoto(list[0], (t) => tex = t)); panelRenderer.material.mainTexture = tex; // Textureを保存 yield return(PhotoControl.SavePhoto("test", tex, null)); }