void CopyFromInstance(ComplexAnimation animationInstance) { Reset(); SetAnimationType(animationInstance.GetAnimationType()); SetFrametime(animationInstance.GetFrametime()); foreach (FrameData d in animationInstance.data) { this.data.Add(d); } animationInstance.data.Clear(); }
/// <summary> /// Update frame data output /// </summary> /// <param name="frame"></param> void UpdateFrameDataOutput(int frame) { simple_textBoxFrametime.Text = complexAnimationData.GetFrametime().ToString(); if (frame >= 0) { textBoxFrametime.Text = complexAnimationData.GetFrametime(frame).ToString(); textBoxImageID.Text = complexAnimationData.GetImageID(frame).ToString(); labelSelectedFrameNumber.Text = frame.ToString(); string _previewImagePath = complexAnimationData.GetPreviewImagePath(frame); if (!string.IsNullOrEmpty(_previewImagePath)) { //Draw preview image pictureBoxFrame.Load(_previewImagePath); //Show preview image filename int _cutIndex = _previewImagePath.LastIndexOf('\\'); if (_cutIndex > 0) { labelImageFilename.Text = _previewImagePath.Remove(0, _cutIndex + 1); } else { labelImageFilename.Text = _previewImagePath; } } else { labelImageFilename.Text = ""; pictureBoxFrame.Image = null; } } else { textBoxFrametime.Text = "n/a"; textBoxImageID.Text = "n/a"; labelSelectedFrameNumber.Text = "n/a"; labelImageFilename.Text = ""; pictureBoxFrame.Image = null; } }