private void ShowAssSsaStyles() { SubStationAlphaStyles form = null; try { var assa = new AdvancedSubStationAlpha(); if (comboBoxSubtitleFormats.Text == assa.Name) { form = new SubStationAlphaStyles(new Subtitle(), assa); form.MakeOnlyOneStyle(); if (form.ShowDialog(this) == DialogResult.OK) { _assStyle = form.Header; } } else { var ssa = new SubStationAlpha(); if (comboBoxSubtitleFormats.Text == ssa.Name) { form = new SubStationAlphaStyles(new Subtitle(), ssa); if (form.ShowDialog(this) == DialogResult.OK) { _ssaStyle = form.Header; } } } } finally { if (form != null) { form.Dispose(); } } }
/// <summary> /// The button styles click. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> private void ButtonStylesClick(object sender, EventArgs e) { SubStationAlphaStyles form = null; try { var assa = new AdvancedSubStationAlpha(); if (this.comboBoxSubtitleFormats.Text == assa.Name) { form = new SubStationAlphaStyles(new Subtitle(), assa); form.MakeOnlyOneStyle(); if (form.ShowDialog(this) == DialogResult.OK) { this._assStyle = form.Header; } } else { var ssa = new SubStationAlpha(); if (this.comboBoxSubtitleFormats.Text == ssa.Name) { form = new SubStationAlphaStyles(new Subtitle(), ssa); if (form.ShowDialog(this) == DialogResult.OK) { this._ssaStyle = form.Header; } } } } finally { if (form != null) { form.Dispose(); } } }