public override void Terminate() { Debug.Assert(null != m_trigger.Owner); GrgStoryboard storyboard = m_trigger.Owner.FindStoryboard(m_storyboardName); if (null != storyboard) { storyboard.Stop(); } }
private void LoadStoryboards(XmlNode argNode, Screen argScreen) { Debug.Assert(null != argNode && null != argScreen); // Log.UIService.LogDebug("Prepare for loading storyboards of a screen"); GrgStoryboard storyboard = null; XmlNodeList listNodes = argNode.SelectNodes(UIServiceCfgDefines.s_storyboardNode); foreach (XmlNode node in listNodes) { storyboard = new GrgStoryboard(argScreen); if (storyboard.Open(node)) { argScreen.Storyboards.Add(storyboard); } storyboard = null; } }
public SlideshowTimelineFrame(GrgStoryboard argBoard) : base(argBoard) { }
public virtual bool Open(XmlNode argNode) { Debug.Assert(null != argNode); try { //load begin attribute XmlAttribute beginAttri = argNode.Attributes[UIServiceCfgDefines.s_beginAttri]; if (null != beginAttri && !string.IsNullOrEmpty(beginAttri.Value)) { if (!int.TryParse(beginAttri.Value, out m_beginCfgTime)) { m_beginCfgTime = 0; } } XmlAttribute isConfigAttri = argNode.Attributes[UIServiceCfgDefines.s_isConfig]; if (null != isConfigAttri && !string.IsNullOrEmpty(isConfigAttri.Value)) { try { m_isConfig = Convert.ToBoolean(isConfigAttri.Value); } catch (Exception ex) { m_isConfig = false; Log.UIService.LogError("Failed to open a time line", ex); } } //load duration attribute XmlAttribute durationAttri = argNode.Attributes[UIServiceCfgDefines.s_durationAttri]; if (null != durationAttri && !string.IsNullOrEmpty(durationAttri.Value)) { if (!int.TryParse(durationAttri.Value, out m_duration)) { m_duration = 0; } } //load target attribute XmlAttribute targetAttri = argNode.Attributes[UIServiceCfgDefines.s_targetAttri]; if (null != targetAttri && !string.IsNullOrEmpty(targetAttri.Value)) { m_targetName = targetAttri.Value; } //load targetText attribute XmlAttribute targetTextAttri = argNode.Attributes[UIServiceCfgDefines.s_targetTextAttri]; if (null != targetTextAttri && !string.IsNullOrEmpty(targetTextAttri.Value)) { m_targetTextName = targetTextAttri.Value; } XmlAttribute keyAttri = argNode.Attributes[UIServiceCfgDefines.s_key]; if (null != keyAttri && !string.IsNullOrEmpty(keyAttri.Value)) { m_key = keyAttri.Value; } //load repeat behavie attribute XmlAttribute reperatAttri = argNode.Attributes[UIServiceCfgDefines.s_reperatBehaveAttri]; if (null != reperatAttri && !string.IsNullOrEmpty(reperatAttri.Value)) { m_reperatBehavior = GrgStoryboard.ConvertReperatValue(reperatAttri.Value); } //load baseuri attribute XmlAttribute baseUriAttri = argNode.Attributes[UIServiceCfgDefines.s_baseUriAttri]; if (null != baseUriAttri && !string.IsNullOrEmpty(baseUriAttri.Value)) { m_baseUri = baseUriAttri.Value; m_configBaseUri = m_baseUri; } //load start time attribute XmlAttribute startTimeAttri = argNode.Attributes[UIServiceCfgDefines.s_startTimeAttri]; if (null != startTimeAttri && !string.IsNullOrEmpty(startTimeAttri.Value)) { DateTime temp; if (DateTime.TryParse(startTimeAttri.Value, out temp)) { m_startTime = temp; } } //load end time attribute XmlAttribute endTimeAttri = argNode.Attributes[UIServiceCfgDefines.s_endAttri]; if (null != endTimeAttri && !string.IsNullOrEmpty(endTimeAttri.Value)) { DateTime temp; if (DateTime.TryParse(endTimeAttri.Value, out temp)) { m_endTime = temp; } } if (m_startTime.HasValue && m_endTime.HasValue) { if (m_endTime <= m_startTime) { throw new Exception("The start time or end time isn't valid of a timeline"); } } //notify change XmlAttribute notifyChangeAttri = argNode.Attributes[UIServiceCfgDefines.s_notifyChangeAttri]; if (null != notifyChangeAttri && !string.IsNullOrEmpty(notifyChangeAttri.Value)) { int temp = 0; if (int.TryParse(notifyChangeAttri.Value, out temp)) { m_notifyChange = temp == 0 ? false : true; } } } catch (System.Exception ex) { Log.UIService.LogError("Failed to open a time line", ex); return(false); } m_state = playState.Stop; return(true); }
public TimelineBase(GrgStoryboard argStoryboard) { Debug.Assert(null != argStoryboard); m_storyBoard = argStoryboard; NeedRemove = false; }
public MediaTimeline(GrgStoryboard argBoard) : base(argBoard) { }