public override void LoadData() { // set manualChanged flag manualChanged = true; // clear combo box cmbSound.Items.Clear(); // fill combo box FrmAnimationTimeline dlg = this.findAncestorControl(typeof(FrmAnimationTimeline)) as FrmAnimationTimeline; if (dlg != null && dlg.document != null) { TLibraryManager libraryManager = dlg.document.libraryManager; for (int i = 0; i < libraryManager.soundCount(); i++) { cmbSound.Items.Add(libraryManager.soundFileName(i)); } } // load action data TActionInstantStopVoice myAction = (TActionInstantStopVoice)this.action; cmbSound.Text = myAction.sound; // clear mnualChanged flag manualChanged = false; }
private void SaveData(object sender, EventArgs e) { if (manualChanged == false) { TActionInstantStopVoice myAction = (TActionInstantStopVoice)this.action; myAction.sound = cmbSound.Text; base.SaveData(); } }