Esempio n. 1
0
        public void FromXml(System.Xml.XmlNode node)
        {
            TargetID   = node.Attributes["TargetID"].Value;
            TargetType = (AnimationTargetTypes)Enum.Parse(typeof(AnimationTargetTypes), node.Attributes["TargetType"].Value, true);
            if (node.Attributes["Expanded"] != null)
            {
                Expanded = bool.Parse(node.Attributes["Expanded"].Value);
            }

            foreach (System.Xml.XmlNode child in node.ChildNodes)
            {
                KeyGroup kf = new KeyGroup();
                kf.FromXml(child);
                ParameterNames.Add(kf.ParameterName);
                KeyFrames.Add(kf);
            }
        }
Esempio n. 2
0
        public void PasteFromXML(System.Xml.XmlNode node, bool atTime, double time)
        {
            foreach (System.Xml.XmlNode child in node.ChildNodes)
            {
                KeyGroup kf = new KeyGroup();
                kf.FromXml(child);

                for (int i = 0; i < ParameterNames.Count; i++)
                {
                    if (ParameterNames[i] == kf.ParameterName)
                    {
                        foreach (Key key in kf.Keys.Values)
                        {
                            if (atTime)
                            {
                                key.Time = time;
                            }

                            this.KeyFrames[i].AddKey(key);
                        }
                    }
                }
            }
        }
        public void PasteFromXML(System.Xml.XmlNode node, bool atTime, double time)
        {
            foreach (System.Xml.XmlNode child in node.ChildNodes)
            {
                KeyGroup kf = new KeyGroup();
                kf.FromXml(child);

                for (int i = 0; i < ParameterNames.Count; i++ )
                {
                    if (ParameterNames[i] == kf.ParameterName)
                    {
                        foreach (Key key in kf.Keys.Values)
                        {
                            if (atTime)
                            {
                                key.Time = time;
                            }

                            this.KeyFrames[i].AddKey(key);
                        }
                    }
                }
            }
        }
        public void FromXml(System.Xml.XmlNode node)
        {
            TargetID = node.Attributes["TargetID"].Value;
            TargetType = (AnimationTargetTypes)Enum.Parse(typeof(AnimationTargetTypes), node.Attributes["TargetType"].Value, true);
            if (node.Attributes["Expanded"] != null)
            {
                Expanded = bool.Parse(node.Attributes["Expanded"].Value);
            }

            foreach (System.Xml.XmlNode child in node.ChildNodes)
            {
                KeyGroup kf = new KeyGroup();
                kf.FromXml(child);
                ParameterNames.Add(kf.ParameterName);
                KeyFrames.Add(kf);
            }
        }