public MNReferencedCore FindContentObject(SMContentType type, string contentId) { MNReferencedCore value = null; if (CurrentLanguage != null) { value = CurrentLanguage.FindObject(contentId); } if (value == null && DefaultLanguage != null) { value = DefaultLanguage.FindObject(contentId); } if (value == null && type == SMContentType.Text) { MNReferencedText rt = FindText(contentId); if (rt != null) { MNReferencedText str = new MNReferencedText(); str.Text = rt.Text; value = str; } } return(value); }
public override void OnTapEnd(PVDragContext dc) { base.OnTapEnd(dc); MNReferencedImage img = Img.Image; if (img == null) { return; } MNReferencedSpot spot = img.FindSpot(showRect, sourceRect, dc.lastPoint); if (spot != null) { if (spot.ContentType != SMContentType.TaggedArea) { MNReferencedCore obj = Document.FindContentObject(spot.ContentType, spot.ContentId); if (obj != null && (obj is MNReferencedSound) && Document.HasViewer) { Document.Viewer.OnEvent("OnPlaySound", obj as MNReferencedSound); } } } }
public static string InstanceToTag(MNReferencedCore obj) { if (obj is MNReferencedText) { return("String"); } if (obj is MNReferencedImage) { return("Image"); } if (obj is MNReferencedAudioText) { return("AudioText"); } if (obj is MNReferencedSound) { return("Sound"); } if (obj is MNReferencedStyle) { return("Style"); } return("Core"); }