Ejemplo n.º 1
0
        private AnimationViewModel CreateAnimation(AnimationConfigurationBase animationConfig, List <AnimationViewModel> DllAnimations)
        {
            //OBTENGO DE LAS DLLS LA ANIMACION CUYO CONFIG TYPE SEA IGUAL AL CONFIG TYPE QUE LE PASO, Y USO ESA INSTANCIA

            var newAnimationFromDlls = DllAnimations.First(x => x.ConfigurationType == animationConfig.GetType().Name);
            var newAnimation         = Activator.CreateInstance(newAnimationFromDlls.GetType()) as AnimationViewModel;

            newAnimation.InitializeAnimation(animationConfig);

            return(newAnimation);
        }
Ejemplo n.º 2
0
        private void btnAccept_OnClick(object sender, RoutedEventArgs e)
        {
            ResultConfig = DllConfigurations.First(x => x.AnimationType == AnimationType);
            ResultConfig.BindProperties();
            ResultConfig.AnimationName = AnimationName;
            ResultConfig.CanExecute    = this.CanExecute;
            ResultConfig.Variables     = Variables;

            this.Result = UI.SharedWPF.DialogResult.Accept;
            this.Close();
        }
Ejemplo n.º 3
0
 public virtual void InitializeAnimation(AnimationConfigurationBase animationConfig)
 {
     this.AnimationConfig = animationConfig;
     this.AnimationName   = this.AnimationConfig.AnimationName;
 }