private void SetSelectedAnimations() { var selected = ListAnim.SelectedItems; foreach (var item in selected) { string name = "" + item; if (!string.IsNullOrEmpty(name)) { Animation anim = animations[name]; brickConnector.setAnimation(anim, scaleScrollBar.Value / 100.0d, RepeatCheckBox.IsChecked.GetValueOrDefault()); } } }
private void SetAnimations(string[] animNames, double scale = 1.0d, bool doRepeat = false) { foreach (string name in animNames) { if (!string.IsNullOrEmpty(name)) { Animation anim = animations[name]; brickConnector.setAnimation(anim, scale, doRepeat); } } }