public void closing() { Open = false; if (ViewClosing != null) { ViewClosing.Invoke(this); } if (!String.IsNullOrEmpty(View.ClosingAction)) { context.queueRunAction(View.ClosingAction, this); } component.closing(); }
private void InitEvents() { Closing += delegate { ViewClosing?.Invoke(); }; numericInterval.ValueChanged += delegate { IntervalChanged?.Invoke((uint)numericInterval.Value); }; checkRepeat.CheckedChanged += delegate { RepeatChanged?.Invoke(checkRepeat.Checked); }; checkRandom.CheckedChanged += delegate { RandomChanged?.Invoke(checkRandom.Checked); }; trackSpeed.ValueChanged += delegate { SpeedChanged?.Invoke(trackSpeed.Value); UpdateLabelSpeed(); }; trackVolume.ValueChanged += delegate { VolumeChanged?.Invoke(trackVolume.Value); UpdateLabelVolume(); }; comboVoice.SelectedValueChanged += delegate { VoiceChanged?.Invoke(comboVoice.SelectedItem?.ToString()); }; trackTimbre.ValueChanged += delegate { TimbreChanged?.Invoke(trackTimbre.Value); UpdateLabelTimbre(); }; }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { ViewClosing?.Invoke(sender, e); }