public void UpdateElement(NameValueCollection values) { var panel = ParentTLE.PanelHub.SelectedPanel; if (panel == null) { throw new Exception("SelectedPanel is null"); } var selectedCell = panel.SelectedPanelCell; if (selectedCell == null) { throw new Exception("SelectedCell is null"); } ITLEPanelCellElement panelElement = ParentTLE.PanelHub.SelectedPanel.SelectedPanelCell.ReferenceElement; if (panelElement is AnimationSingleElement) { AnimationSingleElement elem = panelElement as AnimationSingleElement; elem.UpdateManual(values); } else if (panelElement is AnimationGroupElement) { AnimationGroupElement elem = panelElement as AnimationGroupElement; elem.UpdateManual(values); } var lastIndex = ParentTLE.PanelHub.GetLastPanelAnimationElementIndex(); ParentTLE.PanelHub.InitializePanel(TLEPanelNames.ANIMATION_ELEMENT_PREFIX + lastIndex, ParentTLE.TimeLine.BeatGuider.GetTLECellElements()); }
public static AnimationSingleElement GetAnimationElement2() { var values = new System.Collections.Specialized.NameValueCollection(); values.Add("Prediction", "False"); values.Add("ShapeTypeName", "IdkYet32"); var aElem = new AnimationSingleElement(); aElem.UpdateManual(values); return(aElem); }
public void SetSerializedObjectTest() { var values = new System.Collections.Specialized.NameValueCollection(); values.Add("Prediction", "False"); values.Add("ShapeName", "IdkYet"); var aElem = new AnimationSingleElement(); aElem.UpdateManual(values); manager.SaveSerializedObject(aElem, "TestSerialization", "TestSerialization"); }