public override void LoadData() { // set manualChanged flag manualChanged = true; // load action data TActionIntervalAnimate myAction = (TActionIntervalAnimate)this.action; nudDuration.Value = (decimal)myAction.duration; nudDuration.Enabled = false; // clear combo boxes lvwFrames.Items.Clear(); // fill combo box FrmAnimationTimeline dlg = this.findAncestorControl(typeof(FrmAnimationTimeline)) as FrmAnimationTimeline; if (dlg != null && dlg.document != null) { TLibraryManager libraryManager = dlg.document.libraryManager; lvwFrames.LargeImageList = libraryManager.largeImageListThumbnails(); for (int i = 0; i < myAction.frames.Count; i++) { ListViewItem item = lvwFrames.Items.Add("", libraryManager.imageIndex(myAction.frames[i].image)); item.Tag = myAction.frames[i]; } } // clear mnualChanged flag manualChanged = false; }
private void SaveData(object sender, EventArgs e) { if (manualChanged == false) { TActionIntervalAnimate myAction = (TActionIntervalAnimate)this.action; myAction.frames.Clear(); for (int i = 0; i < lvwFrames.Items.Count; i++) { myAction.frames.Add((TAnimateFrame)lvwFrames.Items[i].Tag); } base.SaveData(); } }