This commit is contained in:
Nikolaj Olsson 2023-12-16 13:14:21 +01:00
parent 0e45b8aee7
commit d36e9a0679
3 changed files with 23 additions and 3 deletions

View File

@ -40,7 +40,7 @@ namespace Nikse.SubtitleEdit.Forms.Assa
private int _tempYScaled;
private int _xScaled = -1;
private int _yScaled = -1;
private double _currentPositionSeconds;
private readonly double _currentPositionSeconds;
public SetPosition(Subtitle subtitle, int[] selectedIndices, string videoFileName, VideoInfo videoInfo, double currentPositionSeconds)
{

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
 on using System.Collections.Generic;
using System.Linq;
using Nikse.SubtitleEdit.Core.Common;
using Nikse.SubtitleEdit.Logic;

View File

@ -35194,6 +35194,11 @@ namespace Nikse.SubtitleEdit.Forms
private void ApplyCustomStylesToolStripMenuItemClick(object sender, EventArgs e)
{
if (GetCurrentSubtitleFormat().GetType() != typeof(AdvancedSubStationAlpha))
{
return;
}
using (var form = new ApplyCustomStyles(_subtitle, SubtitleListview1.GetSelectedIndices()))
{
if (form.ShowDialog(this) != DialogResult.OK)
@ -35212,13 +35217,17 @@ namespace Nikse.SubtitleEdit.Forms
private void SetPositionToolStripMenuItemClick(object sender, EventArgs e)
{
if (GetCurrentSubtitleFormat().GetType() != typeof(AdvancedSubStationAlpha))
{
return;
}
if (string.IsNullOrEmpty(_videoFileName))
{
MessageBox.Show(LanguageSettings.Current.General.NoVideoLoaded);
return;
}
using (var form = new SetPosition(_subtitle, SubtitleListview1.GetSelectedIndices(), _videoFileName, _videoInfo, mediaPlayer.CurrentPosition))
{
var result = form.ShowDialog(this);
@ -35434,6 +35443,12 @@ namespace Nikse.SubtitleEdit.Forms
private void ProgressBarToolStripMenuItemClick(object sender, EventArgs e)
{
if (GetCurrentSubtitleFormat().GetType() != typeof(AdvancedSubStationAlpha))
{
return;
}
if (string.IsNullOrEmpty(_videoFileName) || _videoInfo == null || _videoInfo.Width == 0 || _videoInfo.Height == 0)
{
MessageBox.Show(LanguageSettings.Current.General.NoVideoLoaded);
@ -35463,6 +35478,11 @@ namespace Nikse.SubtitleEdit.Forms
private void ShowAssaResolutionChanger(bool showNeverButton)
{
if (GetCurrentSubtitleFormat().GetType() != typeof(AdvancedSubStationAlpha))
{
return;
}
using (var form = new ResolutionResampler(_subtitle, _videoFileName, _videoInfo, showNeverButton))
{
var result = form.ShowDialog(this);