Ejemplo n.º 1
0
        private void Animation3D_Clicked(object sender, EventArgs e)
        {
            if (_DataSource != null)
            {
                if (_AppManager.AppMode == AppMode.VHF)
                {
                    var gridAnimation = new SurfaceAnimation();
                    //gridAnimation.DataSource = _DataSource;
                    //gridAnimation.VariableIndex = 0;
                    //gridAnimation.AnimatedDimension1 = 1;
                    //gridAnimation.AnimatedDimension2 = 0;
                    gridAnimation.Initialize();
                }
                else if (_AppManager.AppMode == AppMode.HE)
                {
                    //if (Package is IAnimatablePackage)
                    //{
                    //    var ani = (Package as IAnimatablePackage).Animator;
                    //    if (ani == null)
                    //    {
                    //        ani = new GridAnimation(GHMItem.ModelRender);
                    //    }

                    //    _ShellService.AnimationPlayer.Animator = ani;
                    //    _ShellService.AnimationPlayer.Animator.DataSource = _DataSource;
                    //    _ShellService.AnimationPlayer.Animator.VariableIndex = 0;
                    //    _ShellService.AnimationPlayer.Animator.Initialize();

                    //}
                }
            }
        }
Ejemplo n.º 2
0
        private void AnimationPlayer_Load(object sender, EventArgs e)
        {
            if (_ShellService == null)
            {
                _ShellService = MyAppManager.Instance.CompositionContainer.GetExportedValue <IShellService>();
            }

            MapAnimation map = new MapAnimation();

            map.CurrentChanged += map_CurrentChanged;
            _Animators.Add(map);
            SurfaceAnimation surf = new SurfaceAnimation()
            {
                SurfacePlot = _ShellService.SurfacePlot
            };

            surf.CurrentChanged += map_CurrentChanged;
            _Animators.Add(surf);
            cmbAnimators.ComboBox.DisplayMember = "Name";
            cmbAnimators.ComboBox.DataSource    = _Animators.ToArray();
            cmbAnimators.ComboBox.SelectedIndex = 0;
        }