public bool IsActionNameLegal(string name) { if (string.IsNullOrEmpty(name)) { return(false); } if (CurrentSelectedClip == null) { return(false); } if (CurrentSelectedClip.GetAllAction() == null || CurrentSelectedClip.GetAllAction().Count == 0) { return(true); } for (int i = 0; i < CurrentSelectedClip.Actions.Count; i++) { ClipAction action = CurrentSelectedClip.Actions[i]; if (action == null) { continue; } if (action.IdentifyName == name) { return(false); } } return(true); }
public void Clone(Clip obj) { if (obj == null) { return; } BeginTime = obj.BeginTime; EndTime = obj.EndTime; AnimateObj = obj.AnimateObj; ActiveObjOperation = obj.ActiveObjOperation; obj.GetAllAction(); if (obj.Actions != null && obj.Actions.Count > 0) { for (int i = 0; i < obj.Actions.Count; i++) { ClipAction action = obj.Actions[i]; if (action == null) { continue; } ClipAction newAction = AddAction(action.GetType()); if (newAction != null) { newAction.Clone(action); } } } }