Esempio n. 1
0
        private void UpdateTarget()
        {
            listKeyframes.BeginUpdate();
            listKeyframes.Items.Clear();
            if (_target != null)
            {
                if (_target.FrameCount > 0)
                {
                    AnimationFrame a     = new AnimationFrame();
                    bool           check = false;
                    for (int x = 0; x < _target.FrameCount; x++)
                    {
                        a       = _target.GetAnimFrame(x);
                        a.Index = x;
                        for (int i = 0x10; i < 0x19; i++)
                        {
                            if (_target.GetKeyframe((KeyFrameMode)i, x) != null)
                            {
                                check = true;
                                a.SetBools(i);
                            }
                        }
                        if (check == true)
                        {
                            a.forKeyframeSRT = true;
                            listKeyframes.Items.Add(a);
                            check = false;
                        }
                    }
                    //foreach (AnimationKeyframe f in _target.Keyframes.Keyframes)
                    //    listKeyframes.Items.Add(f);

                    _numFrames = _target.FrameCount;

                    _currentPage       = 0;
                    numFrame.Value     = 1;
                    numFrame.Maximum   = _numFrames;
                    lblFrameCount.Text = String.Format("/ {0}", _numFrames);
                }
                else
                {
                    numFrame.Value = 1;
                }
            }
            listKeyframes.EndUpdate();

            RefreshPage();
        }