mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 06:52:35 +01:00
Added "Change speed in percent" in syncronize menu
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1411 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
52f2c1f1f9
commit
fb0e08fe94
140
src/Forms/ChangeSpeedInPercent.Designer.cs
generated
Normal file
140
src/Forms/ChangeSpeedInPercent.Designer.cs
generated
Normal file
@ -0,0 +1,140 @@
|
||||
namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
partial class ChangeSpeedInPercent
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.labelInfo = new System.Windows.Forms.Label();
|
||||
this.numericUpDownPercent = new System.Windows.Forms.NumericUpDown();
|
||||
this.labelPercent = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownPercent)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(186, 91);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 21);
|
||||
this.buttonCancel.TabIndex = 7;
|
||||
this.buttonCancel.Text = "C&ancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||
//
|
||||
// buttonOK
|
||||
//
|
||||
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.buttonOK.Location = new System.Drawing.Point(105, 91);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(75, 21);
|
||||
this.buttonOK.TabIndex = 6;
|
||||
this.buttonOK.Text = "&OK";
|
||||
this.buttonOK.UseVisualStyleBackColor = true;
|
||||
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||
//
|
||||
// labelInfo
|
||||
//
|
||||
this.labelInfo.AutoSize = true;
|
||||
this.labelInfo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.labelInfo.Location = new System.Drawing.Point(12, 9);
|
||||
this.labelInfo.Name = "labelInfo";
|
||||
this.labelInfo.Size = new System.Drawing.Size(174, 13);
|
||||
this.labelInfo.TabIndex = 8;
|
||||
this.labelInfo.Text = "Change speed of subtitle in percent";
|
||||
//
|
||||
// numericUpDownPercent
|
||||
//
|
||||
this.numericUpDownPercent.DecimalPlaces = 3;
|
||||
this.numericUpDownPercent.Location = new System.Drawing.Point(15, 48);
|
||||
this.numericUpDownPercent.Maximum = new decimal(new int[] {
|
||||
200,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericUpDownPercent.Minimum = new decimal(new int[] {
|
||||
50,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numericUpDownPercent.Name = "numericUpDownPercent";
|
||||
this.numericUpDownPercent.Size = new System.Drawing.Size(75, 20);
|
||||
this.numericUpDownPercent.TabIndex = 9;
|
||||
this.numericUpDownPercent.Value = new decimal(new int[] {
|
||||
100,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// labelPercent
|
||||
//
|
||||
this.labelPercent.AutoSize = true;
|
||||
this.labelPercent.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.labelPercent.Location = new System.Drawing.Point(92, 50);
|
||||
this.labelPercent.Name = "labelPercent";
|
||||
this.labelPercent.Size = new System.Drawing.Size(15, 13);
|
||||
this.labelPercent.TabIndex = 10;
|
||||
this.labelPercent.Text = "%";
|
||||
//
|
||||
// ChangeSpeedInPercent
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(273, 124);
|
||||
this.Controls.Add(this.numericUpDownPercent);
|
||||
this.Controls.Add(this.labelInfo);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.Controls.Add(this.labelPercent);
|
||||
this.KeyPreview = true;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "ChangeSpeedInPercent";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "ChangeSpeedInPercent";
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ChangeSpeedInPercent_KeyDown);
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownPercent)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.Button buttonOK;
|
||||
private System.Windows.Forms.Label labelInfo;
|
||||
private System.Windows.Forms.NumericUpDown numericUpDownPercent;
|
||||
private System.Windows.Forms.Label labelPercent;
|
||||
}
|
||||
}
|
75
src/Forms/ChangeSpeedInPercent.cs
Normal file
75
src/Forms/ChangeSpeedInPercent.cs
Normal file
@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using Nikse.SubtitleEdit.Logic;
|
||||
|
||||
namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
public sealed partial class ChangeSpeedInPercent : Form
|
||||
{
|
||||
|
||||
private double _adjustFactor = 0;
|
||||
|
||||
public ChangeSpeedInPercent()
|
||||
{
|
||||
InitializeComponent();
|
||||
Text = Configuration.Settings.Language.ChangeSpeedInPercent.Title;
|
||||
labelInfo.Text = Configuration.Settings.Language.ChangeSpeedInPercent.Info;
|
||||
buttonOK.Text = Configuration.Settings.Language.General.OK;
|
||||
buttonCancel.Text = Configuration.Settings.Language.General.Cancel;
|
||||
FixLargeFonts();
|
||||
}
|
||||
|
||||
private void FixLargeFonts()
|
||||
{
|
||||
Graphics graphics = this.CreateGraphics();
|
||||
SizeF textSize = graphics.MeasureString(buttonOK.Text, this.Font);
|
||||
if (textSize.Height > buttonOK.Height - 4)
|
||||
{
|
||||
int newButtonHeight = (int)(textSize.Height + 7 + 0.5);
|
||||
Utilities.SetButtonHeight(this, newButtonHeight, 1);
|
||||
}
|
||||
}
|
||||
|
||||
private void ChangeSpeedInPercent_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
public Subtitle AdjustSubtitle(Subtitle subtitle)
|
||||
{
|
||||
foreach (Paragraph p in subtitle.Paragraphs)
|
||||
{
|
||||
p.StartTime.TotalMilliseconds = p.StartTime.TotalMilliseconds * _adjustFactor;
|
||||
p.EndTime.TotalMilliseconds = p.EndTime.TotalMilliseconds * _adjustFactor;
|
||||
}
|
||||
|
||||
for (int i = 0; i < subtitle.Paragraphs.Count; i++)
|
||||
{
|
||||
Paragraph p = subtitle.Paragraphs[i];
|
||||
Paragraph next = subtitle.GetParagraphOrDefault(i + 1);
|
||||
if (next != null)
|
||||
{
|
||||
if (p.EndTime.TotalMilliseconds >= next.StartTime.TotalMilliseconds)
|
||||
p.EndTime.TotalMilliseconds = next.StartTime.TotalMilliseconds - 1;
|
||||
}
|
||||
}
|
||||
|
||||
return subtitle;
|
||||
}
|
||||
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
_adjustFactor = Convert.ToDouble(numericUpDownPercent.Value) / 100.0;
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
120
src/Forms/ChangeSpeedInPercent.resx
Normal file
120
src/Forms/ChangeSpeedInPercent.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
24
src/Forms/Main.Designer.cs
generated
24
src/Forms/Main.Designer.cs
generated
@ -65,6 +65,7 @@
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItemOpenKeepVideo = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.reopenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@ -402,7 +403,7 @@
|
||||
this.imageListPlayRate = new System.Windows.Forms.ImageList(this.components);
|
||||
this.timerTextUndo = new System.Windows.Forms.Timer(this.components);
|
||||
this.timerAlternateTextUndo = new System.Windows.Forms.Timer(this.components);
|
||||
this.toolStripMenuItemOpenKeepVideo = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.changeSpeedInPercentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
@ -848,6 +849,13 @@
|
||||
this.openToolStripMenuItem.Text = "Open";
|
||||
this.openToolStripMenuItem.Click += new System.EventHandler(this.OpenToolStripMenuItemClick);
|
||||
//
|
||||
// toolStripMenuItemOpenKeepVideo
|
||||
//
|
||||
this.toolStripMenuItemOpenKeepVideo.Name = "toolStripMenuItemOpenKeepVideo";
|
||||
this.toolStripMenuItemOpenKeepVideo.Size = new System.Drawing.Size(334, 22);
|
||||
this.toolStripMenuItemOpenKeepVideo.Text = "Open (keep video)";
|
||||
this.toolStripMenuItemOpenKeepVideo.Click += new System.EventHandler(this.toolStripMenuItemOpenKeepVideo_Click);
|
||||
//
|
||||
// reopenToolStripMenuItem
|
||||
//
|
||||
this.reopenToolStripMenuItem.Name = "reopenToolStripMenuItem";
|
||||
@ -1673,7 +1681,8 @@
|
||||
this.visualSyncToolStripMenuItem,
|
||||
this.toolStripMenuItemPointSync,
|
||||
this.pointSyncViaOtherSubtitleToolStripMenuItem,
|
||||
this.toolStripMenuItemChangeFrameRate2});
|
||||
this.toolStripMenuItemChangeFrameRate2,
|
||||
this.changeSpeedInPercentToolStripMenuItem});
|
||||
this.toolStripMenuItemSyncronization.Name = "toolStripMenuItemSyncronization";
|
||||
this.toolStripMenuItemSyncronization.Size = new System.Drawing.Size(97, 20);
|
||||
this.toolStripMenuItemSyncronization.Text = "Syncronization";
|
||||
@ -3977,12 +3986,12 @@
|
||||
this.timerAlternateTextUndo.Interval = 700;
|
||||
this.timerAlternateTextUndo.Tick += new System.EventHandler(this.TimerAlternateTextUndoTick);
|
||||
//
|
||||
// toolStripMenuItemOpenKeepVideo
|
||||
// changeSpeedInPercentToolStripMenuItem
|
||||
//
|
||||
this.toolStripMenuItemOpenKeepVideo.Name = "toolStripMenuItemOpenKeepVideo";
|
||||
this.toolStripMenuItemOpenKeepVideo.Size = new System.Drawing.Size(334, 22);
|
||||
this.toolStripMenuItemOpenKeepVideo.Text = "Open (keep video)";
|
||||
this.toolStripMenuItemOpenKeepVideo.Click += new System.EventHandler(this.toolStripMenuItemOpenKeepVideo_Click);
|
||||
this.changeSpeedInPercentToolStripMenuItem.Name = "changeSpeedInPercentToolStripMenuItem";
|
||||
this.changeSpeedInPercentToolStripMenuItem.Size = new System.Drawing.Size(336, 22);
|
||||
this.changeSpeedInPercentToolStripMenuItem.Text = "Change speed in percent...";
|
||||
this.changeSpeedInPercentToolStripMenuItem.Click += new System.EventHandler(this.changeSpeedInPercentToolStripMenuItem_Click);
|
||||
//
|
||||
// Main
|
||||
//
|
||||
@ -4437,6 +4446,7 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemColumnImportText;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemInsertTextFromSub;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemOpenKeepVideo;
|
||||
private System.Windows.Forms.ToolStripMenuItem changeSpeedInPercentToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1372,6 +1372,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
removeTextForHearImparedToolStripMenuItem.Text = _language.Menu.Tools.RemoveTextForHearingImpaired;
|
||||
ChangeCasingToolStripMenuItem.Text = _language.Menu.Tools.ChangeCasing;
|
||||
toolStripMenuItemChangeFrameRate2.Text = _language.Menu.Tools.ChangeFrameRate;
|
||||
changeSpeedInPercentToolStripMenuItem.Text = _language.Menu.Tools.ChangeSpeedInPercent;
|
||||
toolStripMenuItemAutoMergeShortLines.Text = _language.Menu.Tools.MergeShortLines;
|
||||
toolStripMenuItemAutoSplitLongLines.Text = _language.Menu.Tools.SplitLongLines;
|
||||
setMinimumDisplayTimeBetweenParagraphsToolStripMenuItem.Text = _language.Menu.Tools.MinimumDisplayTimeBetweenParagraphs;
|
||||
@ -15710,5 +15711,35 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
openToolStripMenuItem.Enabled = true;
|
||||
}
|
||||
|
||||
private void changeSpeedInPercentToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (IsSubtitleLoaded)
|
||||
{
|
||||
int lastSelectedIndex = 0;
|
||||
if (SubtitleListview1.SelectedItems.Count > 0)
|
||||
lastSelectedIndex = SubtitleListview1.SelectedItems[0].Index;
|
||||
|
||||
ReloadFromSourceView();
|
||||
var form = new ChangeSpeedInPercent();
|
||||
_formPositionsAndSizes.SetPositionAndSize(form);
|
||||
if (form.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
MakeHistoryForUndo(_language.BeforeAdjustSpeedInPercent);
|
||||
_subtitle = form.AdjustSubtitle(_subtitle);
|
||||
if (_subtitleAlternate != null && Configuration.Settings.General.AllowEditOfOriginalSubtitle && SubtitleListview1.IsAlternateTextColumnVisible)
|
||||
_subtitleAlternate = form.AdjustSubtitle(_subtitleAlternate);
|
||||
ShowSource();
|
||||
SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
|
||||
_subtitleListViewIndex = -1;
|
||||
SubtitleListview1.SelectIndexAndEnsureVisible(lastSelectedIndex);
|
||||
}
|
||||
_formPositionsAndSizes.SavePositionAndSize(form);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(_language.NoSubtitleLoaded, Title, MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -684,7 +684,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAASABGgEgARoBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAATABGgEwARoBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
@ -20,6 +20,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
public LanguageStructure.ChangeCasing ChangeCasing;
|
||||
public LanguageStructure.ChangeCasingNames ChangeCasingNames;
|
||||
public LanguageStructure.ChangeFrameRate ChangeFrameRate;
|
||||
public LanguageStructure.ChangeSpeedInPercent ChangeSpeedInPercent;
|
||||
public LanguageStructure.ChooseEncoding ChooseEncoding;
|
||||
public LanguageStructure.ChooseLanguage ChooseLanguage;
|
||||
public LanguageStructure.CompareSubtitles CompareSubtitles;
|
||||
@ -246,6 +247,12 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
FrameRateNotChanged = "Frame rate is the same - nothing to convert",
|
||||
};
|
||||
|
||||
ChangeSpeedInPercent = new LanguageStructure.ChangeSpeedInPercent
|
||||
{
|
||||
Title = "Adjust speed in percent",
|
||||
Info = "Change speed of subtitle in percent",
|
||||
};
|
||||
|
||||
ChooseEncoding = new LanguageStructure.ChooseEncoding
|
||||
{
|
||||
Title = "Choose encoding",
|
||||
@ -797,6 +804,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
CasingCompleteMessageNoNames = "Number of lines with casing changed: {0}/{1}",
|
||||
CasingCompleteMessageOnlyNames = "Number of lines with names casing changed: {0}/{1}",
|
||||
BeforeChangeFrameRate = "Before change frame rate",
|
||||
BeforeAdjustSpeedInPercent = "Before adjust speed in percent",
|
||||
FrameRateChangedFromXToY = "Frame rate changed from {0} to {1}",
|
||||
IdxFileNotFoundWarning = "{0} not found! Import VobSub file anyway?",
|
||||
InvalidVobSubHeader = "Header not valid VobSub file: {0}",
|
||||
@ -943,6 +951,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
RemoveTextForHearingImpaired = "Remove text for hearing impaired...",
|
||||
ChangeCasing = "Change casing...",
|
||||
ChangeFrameRate = "Change frame rate...",
|
||||
ChangeSpeedInPercent = "Changed speed (percent)...",
|
||||
MergeShortLines = "Merge short lines...",
|
||||
SplitLongLines = "Split long lines...",
|
||||
MinimumDisplayTimeBetweenParagraphs = "Minimum display time between paragraphs...",
|
||||
|
@ -158,6 +158,12 @@
|
||||
public string FrameRateNotChanged { get; set; }
|
||||
}
|
||||
|
||||
public class ChangeSpeedInPercent
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public string Info { get; set; }
|
||||
}
|
||||
|
||||
public class ChooseEncoding
|
||||
{
|
||||
public string Title { get; set; }
|
||||
@ -705,6 +711,7 @@
|
||||
public string CasingCompleteMessageOnlyNames { get; set; }
|
||||
public string CasingCompleteMessage { get; set; }
|
||||
public string BeforeChangeFrameRate { get; set; }
|
||||
public string BeforeAdjustSpeedInPercent { get; set; }
|
||||
public string FrameRateChangedFromXToY { get; set; }
|
||||
public string IdxFileNotFoundWarning { get; set; }
|
||||
public string InvalidVobSubHeader { get; set; }
|
||||
@ -849,6 +856,7 @@
|
||||
public string RemoveTextForHearingImpaired { get; set; }
|
||||
public string ChangeCasing { get; set; }
|
||||
public string ChangeFrameRate { get; set; }
|
||||
public string ChangeSpeedInPercent { get; set; }
|
||||
public string MergeShortLines { get; set; }
|
||||
public string SplitLongLines { get; set; }
|
||||
public string MinimumDisplayTimeBetweenParagraphs { get; set; }
|
||||
|
@ -176,6 +176,12 @@
|
||||
<Compile Include="Forms\ChangeFrameRate.Designer.cs">
|
||||
<DependentUpon>ChangeFrameRate.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\ChangeSpeedInPercent.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\ChangeSpeedInPercent.Designer.cs">
|
||||
<DependentUpon>ChangeSpeedInPercent.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\ChooseLanguage.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@ -946,6 +952,9 @@
|
||||
<DependentUpon>ChangeFrameRate.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\ChangeSpeedInPercent.resx">
|
||||
<DependentUpon>ChangeSpeedInPercent.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\ChooseEncoding.resx">
|
||||
<DependentUpon>ChooseEncoding.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
|
Loading…
Reference in New Issue
Block a user