protected internal virtual long doPlayReference(ObjectType @ref) { BasePositionObject positionObject = @ref.PositionObject; if (positionObject == null) { return(0); } VSMXBaseObject @object = positionObject.Object; long delay = doPlayReference(@object); if (@object.hasPropertyValue(Resource.childrenName)) { VSMXBaseObject children = @object.getPropertyValue(Resource.childrenName); IList <string> names = children.PropertyNames; if (names != null) { foreach (string name in names) { VSMXBaseObject child = children.getPropertyValue(name); delay = System.Math.Max(delay, doPlayReference(child)); } } } return(delay); }
public virtual void clearInterval(VSMXBaseObject @object, VSMXBaseObject id) { //if (log.DebugEnabled) { Console.WriteLine(string.Format("Timer.clearInterval {0:D}", id.getPropertyValue(0).IntValue)); } }
public virtual void play(VSMXBaseObject thisObject, VSMXBaseObject @object) { //if (log.DebugEnabled) { Console.WriteLine(string.Format("BaseAnim.play {0}, {1}", thisObject, @object)); } if (thisObject.hasPropertyValue(Resource.childrenName)) { VSMXBaseObject children = thisObject.getPropertyValue(Resource.childrenName); IList <string> names = children.PropertyNames; BaseAnim[] baseAnims = new BaseAnim[names.Count + 1]; int numberBaseAnims = 0; baseAnims[numberBaseAnims++] = this; foreach (string name in names) { VSMXBaseObject child = children.getPropertyValue(name); if (child is VSMXNativeObject) { BaseNativeObject baseNativeObject = ((VSMXNativeObject)child).Object; if (baseNativeObject is BaseAnim) { baseAnims[numberBaseAnims++] = (BaseAnim)baseNativeObject; } } } if (numberBaseAnims > 0) { Scheduler.addAction(new PlayAnimAction(baseAnims, 0, numberBaseAnims, @object)); } } }
private BasePositionObject getFirstButton(VSMXBaseObject @object) { if (@object.hasPropertyValue(childrenName)) { VSMXBaseObject children = @object.getPropertyValue(childrenName); IList <string> childrenNames = children.PropertyNames; foreach (string childName in childrenNames) { VSMXBaseObject child = children.getPropertyValue(childName); if (child is VSMXNativeObject) { BaseNativeObject childObject = ((VSMXNativeObject)child).Object; if (childObject is UButtonObject) { return((BasePositionObject)childObject); } } BasePositionObject button = getFirstButton(child); if (button != null) { return(button); } } } return(null); }
public virtual void close(VSMXBaseObject @object) { //if (log.DebugEnabled) { Console.WriteLine(string.Format("PageObject.close")); } if (display != null) { hide(@object.getPropertyValue(rootName)); } }
public virtual VSMXBaseObject open(VSMXBaseObject @object) { //if (log.DebugEnabled) { Console.WriteLine(string.Format("PageObject.open {0}, children: {1}", this, @object.getPropertyValue(rootName).getPropertyValue(childrenName))); } trigger(onInit); if (display != null) { display(@object.getPropertyValue(rootName)); BasePositionObject button = getFirstButton(@object.getPropertyValue(rootName)); if (button != null) { button.setFocus(); } } return(@object); }
private void display(VSMXBaseObject @object) { if (@object.hasPropertyValue(childrenName)) { VSMXBaseObject children = @object.getPropertyValue(childrenName); IList <string> childrenNames = children.PropertyNames; foreach (string childName in childrenNames) { VSMXBaseObject child = children.getPropertyValue(childName); display.add(child); display(child); } } }