예제 #1
0
        public static AnimatedKeyframeViewModel FromSave(NamedEventSave save)
        {
            AnimatedKeyframeViewModel toReturn = new AnimatedKeyframeViewModel();

            toReturn.EventName = save.Name;
            toReturn.Time      = save.Time;

            return(toReturn);
        }
예제 #2
0
        public NamedEventSave ToEventSave()
        {
            NamedEventSave toReturn = new NamedEventSave();

            if (string.IsNullOrEmpty(EventName))
            {
                throw new InvalidOperationException("Could not convert this to a NamedEventSave because it doesn't have a valid EventName");
            }

            toReturn.Name = this.EventName;
            toReturn.Time = this.Time;

            return(toReturn);
        }