/// <summary> /// Sets the shape for modification to the given observer. /// </summary> /// <param name="shape">The shape.</param> /// <param name="silent">if set to <c>true</c> no audio feedback about the selection is given.</param> /// <param name="immediatly">if set to <c>true</c> the audio feedback is immediately given and all other audio feedback is aborted.</param> /// <returns> /// the currently selected Shape observer /// </returns> public bool SetShapeForModification(OoShapeObserver shape, bool silent = true, bool immediately = true) { if (shape != null) { if (shapeManipulatorFunctionProxy != null && !ImageData.Instance.Active) { if (!silent) { if (immediately) { OoElementSpeaker.PlayElementImmediately(shape, LL.GetTrans("tangram.lector.oo_observer.selected", String.Empty)); } else { OoElementSpeaker.PlayElement(shape, LL.GetTrans("tangram.lector.oo_observer.selected", String.Empty)); } } //audioRenderer.PlaySound("Form kann manipuliert werden"); shapeManipulatorFunctionProxy.LastSelectedShape = shape; return(shapeManipulatorFunctionProxy.LastSelectedShape == shape); } else // title+desc dialog handling { ImageData.Instance.NewSelectionHandling(shape); } } return(false); }
/// <summary> /// Brings the last selected shape to the audio output. /// <param name="immediately">determine if the text should palyed immediately or not.</param> /// </summary> public void SayLastSelectedShape(bool immediately = true) { if (LastSelectedShape != null) { if (immediately) { OoElementSpeaker.PlayElementImmediately(LastSelectedShape, LL.GetTrans("tangram.oomanipulation.selected")); } else { OoElementSpeaker.PlayElement(LastSelectedShape, LL.GetTrans("tangram.oomanipulation.selected")); } } else { play(LL.GetTrans("tangram.oomanipulation.no_element_selected"), immediately); } }