void RefreshWaveCombo() { object selectedItem = comboBoxWave.SelectedItem; SkipFlaggedEventHandlers = true; Enabled = false; comboBoxWave.DataSource = null; CGActionWave.ScanWaveFilesInFolder(Program.ExeFolder); comboBoxWave.DataSource = CGActionWave.AvailableWaves; Enabled = true; if (selectedItem != null && comboBoxWave.Items.Contains(selectedItem)) { comboBoxWave.SelectedItem = selectedItem; } else if (TheWave.Wave != null && comboBoxWave.Items.Contains(TheWave.Wave)) { comboBoxWave.SelectedItem = TheWave.Wave; } else if (comboBoxWave.SelectedItem != null) { TheWave.Wave = comboBoxWave.SelectedItem.ToString(); } SkipFlaggedEventHandlers = false; CheckNoWaveState(); }
internal FormSound(CGActionWave waveAction, string infoText = "") { InitializeComponent(); waveEditor1.LoadWaveAction(waveAction); labelInfo.Text = infoText; buttonClose.Click += (s, e) => { Close(); }; BackColor = Config.CGBackColor; }
void AddWaveAction() { Trigger t = new Trigger(FormMain.Tracker); CGActionWave a = new CGActionWave(FormMain.WaveOutPool); TriggeredAction ta = new TriggeredAction(t, a, TheProfile); RefreshActionsListbox(); SkipFlaggedEventHandlers = true; listBoxActions.SelectedItem = ta; SkipFlaggedEventHandlers = false; WaveActionCtl.LoadWaveAction(ta); }
internal FormSound(CGActionWave waveAction, string infoText = "", bool invokesProfileChanged = false) { InitializeComponent(); InvokesProfileChanged = invokesProfileChanged; waveEditor1.ChangeMade += OnChangeMade; waveEditor1.LoadWaveAction(waveAction); labelInfo.Text = infoText; buttonClose.Click += (s, e) => { Close(); }; BackColor = Config.CGBackColor; AddDragEventHandlers(this); }
public void LoadFromXml(XElement xTriggeredAction) { if (TheAction != null) { throw new Exception("Instance has already been initialilzed."); } if (xTriggeredAction != null) { TheTrigger.LoadFromXml(xTriggeredAction.Element("Trigger")); XElement xWaveFile = xTriggeredAction.Element("CGActionWaveFile"); if (xWaveFile != null) { CGActionWave wav = new CGActionWave(FormMain.WaveOutPool); wav.LoadFromXml(xWaveFile); TheAction = wav; } } }
public void LoadFromXml(XElement xTriggeredAction, bool initializeAction = true) { if (TheAction != null) { throw new Exception("This instance of TriggeredAction has already been loaded."); } if (xTriggeredAction != null) { TheTrigger.LoadFromXml(xTriggeredAction.Element("Trigger")); XElement xWaveFile = xTriggeredAction.Element("CGActionWaveFile"); if (xWaveFile != null) { CGActionWave wav = new CGActionWave(FormMain.WaveOutPool); wav.LoadFromXml(xWaveFile, initializeAction); TheAction = wav; } } }
public void LoadWaveAction(CGActionWave theWave) { TheWave = theWave; LoadValuesToGui(); }