mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Minor fixes + started on Transcript importer
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@374 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
6794c60843
commit
506dd10c62
@ -49,7 +49,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
|
|
||||||
private void buttonDonate_Click(object sender, EventArgs e)
|
private void buttonDonate_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Process.Start("http://www.nikse.dk/Donate.aspx");
|
Process.Start("http://www.nikse.dk/Donate");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
14
src/Forms/ImportText.Designer.cs
generated
14
src/Forms/ImportText.Designer.cs
generated
@ -124,7 +124,7 @@
|
|||||||
this.checkBoxMergeShortLines.CheckState = System.Windows.Forms.CheckState.Checked;
|
this.checkBoxMergeShortLines.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.checkBoxMergeShortLines.Location = new System.Drawing.Point(6, 98);
|
this.checkBoxMergeShortLines.Location = new System.Drawing.Point(6, 98);
|
||||||
this.checkBoxMergeShortLines.Name = "checkBoxMergeShortLines";
|
this.checkBoxMergeShortLines.Name = "checkBoxMergeShortLines";
|
||||||
this.checkBoxMergeShortLines.Size = new System.Drawing.Size(189, 17);
|
this.checkBoxMergeShortLines.Size = new System.Drawing.Size(193, 17);
|
||||||
this.checkBoxMergeShortLines.TabIndex = 40;
|
this.checkBoxMergeShortLines.TabIndex = 40;
|
||||||
this.checkBoxMergeShortLines.Text = "Merge short lines with continuation";
|
this.checkBoxMergeShortLines.Text = "Merge short lines with continuation";
|
||||||
this.checkBoxMergeShortLines.UseVisualStyleBackColor = true;
|
this.checkBoxMergeShortLines.UseVisualStyleBackColor = true;
|
||||||
@ -169,7 +169,7 @@
|
|||||||
this.radioButtonDurationFixed.AutoSize = true;
|
this.radioButtonDurationFixed.AutoSize = true;
|
||||||
this.radioButtonDurationFixed.Location = new System.Drawing.Point(19, 42);
|
this.radioButtonDurationFixed.Location = new System.Drawing.Point(19, 42);
|
||||||
this.radioButtonDurationFixed.Name = "radioButtonDurationFixed";
|
this.radioButtonDurationFixed.Name = "radioButtonDurationFixed";
|
||||||
this.radioButtonDurationFixed.Size = new System.Drawing.Size(50, 17);
|
this.radioButtonDurationFixed.Size = new System.Drawing.Size(51, 17);
|
||||||
this.radioButtonDurationFixed.TabIndex = 3;
|
this.radioButtonDurationFixed.TabIndex = 3;
|
||||||
this.radioButtonDurationFixed.Text = "Fixed";
|
this.radioButtonDurationFixed.Text = "Fixed";
|
||||||
this.radioButtonDurationFixed.UseVisualStyleBackColor = true;
|
this.radioButtonDurationFixed.UseVisualStyleBackColor = true;
|
||||||
@ -181,7 +181,7 @@
|
|||||||
this.radioButtonDurationAuto.Checked = true;
|
this.radioButtonDurationAuto.Checked = true;
|
||||||
this.radioButtonDurationAuto.Location = new System.Drawing.Point(19, 19);
|
this.radioButtonDurationAuto.Location = new System.Drawing.Point(19, 19);
|
||||||
this.radioButtonDurationAuto.Name = "radioButtonDurationAuto";
|
this.radioButtonDurationAuto.Name = "radioButtonDurationAuto";
|
||||||
this.radioButtonDurationAuto.Size = new System.Drawing.Size(47, 17);
|
this.radioButtonDurationAuto.Size = new System.Drawing.Size(48, 17);
|
||||||
this.radioButtonDurationAuto.TabIndex = 2;
|
this.radioButtonDurationAuto.TabIndex = 2;
|
||||||
this.radioButtonDurationAuto.TabStop = true;
|
this.radioButtonDurationAuto.TabStop = true;
|
||||||
this.radioButtonDurationAuto.Text = "Auto";
|
this.radioButtonDurationAuto.Text = "Auto";
|
||||||
@ -236,7 +236,7 @@
|
|||||||
this.checkBoxRemoveLinesWithoutLetters.CheckState = System.Windows.Forms.CheckState.Checked;
|
this.checkBoxRemoveLinesWithoutLetters.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.checkBoxRemoveLinesWithoutLetters.Location = new System.Drawing.Point(6, 144);
|
this.checkBoxRemoveLinesWithoutLetters.Location = new System.Drawing.Point(6, 144);
|
||||||
this.checkBoxRemoveLinesWithoutLetters.Name = "checkBoxRemoveLinesWithoutLetters";
|
this.checkBoxRemoveLinesWithoutLetters.Name = "checkBoxRemoveLinesWithoutLetters";
|
||||||
this.checkBoxRemoveLinesWithoutLetters.Size = new System.Drawing.Size(158, 17);
|
this.checkBoxRemoveLinesWithoutLetters.Size = new System.Drawing.Size(162, 17);
|
||||||
this.checkBoxRemoveLinesWithoutLetters.TabIndex = 5;
|
this.checkBoxRemoveLinesWithoutLetters.TabIndex = 5;
|
||||||
this.checkBoxRemoveLinesWithoutLetters.Text = "Remove lines without letters";
|
this.checkBoxRemoveLinesWithoutLetters.Text = "Remove lines without letters";
|
||||||
this.checkBoxRemoveLinesWithoutLetters.UseVisualStyleBackColor = true;
|
this.checkBoxRemoveLinesWithoutLetters.UseVisualStyleBackColor = true;
|
||||||
@ -259,7 +259,7 @@
|
|||||||
this.radioButtonAutoSplit.Checked = true;
|
this.radioButtonAutoSplit.Checked = true;
|
||||||
this.radioButtonAutoSplit.Location = new System.Drawing.Point(6, 19);
|
this.radioButtonAutoSplit.Location = new System.Drawing.Point(6, 19);
|
||||||
this.radioButtonAutoSplit.Name = "radioButtonAutoSplit";
|
this.radioButtonAutoSplit.Name = "radioButtonAutoSplit";
|
||||||
this.radioButtonAutoSplit.Size = new System.Drawing.Size(88, 17);
|
this.radioButtonAutoSplit.Size = new System.Drawing.Size(93, 17);
|
||||||
this.radioButtonAutoSplit.TabIndex = 2;
|
this.radioButtonAutoSplit.TabIndex = 2;
|
||||||
this.radioButtonAutoSplit.TabStop = true;
|
this.radioButtonAutoSplit.TabStop = true;
|
||||||
this.radioButtonAutoSplit.Text = "Auto split text";
|
this.radioButtonAutoSplit.Text = "Auto split text";
|
||||||
@ -271,7 +271,7 @@
|
|||||||
this.radioButtonLineMode.AutoSize = true;
|
this.radioButtonLineMode.AutoSize = true;
|
||||||
this.radioButtonLineMode.Location = new System.Drawing.Point(6, 42);
|
this.radioButtonLineMode.Location = new System.Drawing.Point(6, 42);
|
||||||
this.radioButtonLineMode.Name = "radioButtonLineMode";
|
this.radioButtonLineMode.Name = "radioButtonLineMode";
|
||||||
this.radioButtonLineMode.Size = new System.Drawing.Size(131, 17);
|
this.radioButtonLineMode.Size = new System.Drawing.Size(133, 17);
|
||||||
this.radioButtonLineMode.TabIndex = 0;
|
this.radioButtonLineMode.TabIndex = 0;
|
||||||
this.radioButtonLineMode.Text = "One line is one subtitle";
|
this.radioButtonLineMode.Text = "One line is one subtitle";
|
||||||
this.radioButtonLineMode.UseVisualStyleBackColor = true;
|
this.radioButtonLineMode.UseVisualStyleBackColor = true;
|
||||||
@ -284,7 +284,7 @@
|
|||||||
this.checkBoxRemoveEmptyLines.CheckState = System.Windows.Forms.CheckState.Checked;
|
this.checkBoxRemoveEmptyLines.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.checkBoxRemoveEmptyLines.Location = new System.Drawing.Point(6, 121);
|
this.checkBoxRemoveEmptyLines.Location = new System.Drawing.Point(6, 121);
|
||||||
this.checkBoxRemoveEmptyLines.Name = "checkBoxRemoveEmptyLines";
|
this.checkBoxRemoveEmptyLines.Name = "checkBoxRemoveEmptyLines";
|
||||||
this.checkBoxRemoveEmptyLines.Size = new System.Drawing.Size(121, 17);
|
this.checkBoxRemoveEmptyLines.Size = new System.Drawing.Size(122, 17);
|
||||||
this.checkBoxRemoveEmptyLines.TabIndex = 3;
|
this.checkBoxRemoveEmptyLines.TabIndex = 3;
|
||||||
this.checkBoxRemoveEmptyLines.Text = "Remove empty lines";
|
this.checkBoxRemoveEmptyLines.Text = "Remove empty lines";
|
||||||
this.checkBoxRemoveEmptyLines.UseVisualStyleBackColor = true;
|
this.checkBoxRemoveEmptyLines.UseVisualStyleBackColor = true;
|
||||||
|
@ -7,6 +7,7 @@ using System.Text;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Nikse.SubtitleEdit.Logic;
|
using Nikse.SubtitleEdit.Logic;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
namespace Nikse.SubtitleEdit.Forms
|
namespace Nikse.SubtitleEdit.Forms
|
||||||
{
|
{
|
||||||
@ -62,11 +63,17 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
private void buttonOpenText_Click(object sender, EventArgs e)
|
private void buttonOpenText_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
openFileDialog1.Title = buttonOpenText.Text;
|
openFileDialog1.Title = buttonOpenText.Text;
|
||||||
openFileDialog1.Filter = Configuration.Settings.Language.ImportText.TextFiles + "|*.txt|" + Configuration.Settings.Language.General.AllFiles + "|*.*";
|
openFileDialog1.Filter = Configuration.Settings.Language.ImportText.TextFiles + "|*.txt|Adobe Story|*.astx|" + Configuration.Settings.Language.General.AllFiles + "|*.*";
|
||||||
openFileDialog1.FileName = string.Empty;
|
openFileDialog1.FileName = string.Empty;
|
||||||
if (openFileDialog1.ShowDialog() == DialogResult.OK)
|
if (openFileDialog1.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
string ext = Path.GetExtension(openFileDialog1.FileName).ToLower();
|
||||||
|
if (ext == ".astx")
|
||||||
|
LoadAdobeStory(openFileDialog1.FileName);
|
||||||
|
else
|
||||||
LoadTextFile(openFileDialog1.FileName);
|
LoadTextFile(openFileDialog1.FileName);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void GeneratePreview()
|
private void GeneratePreview()
|
||||||
{
|
{
|
||||||
@ -313,6 +320,42 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
Encoding encoding = Utilities.GetEncodingFromFile(fileName);
|
Encoding encoding = Utilities.GetEncodingFromFile(fileName);
|
||||||
textBoxText.Text = File.ReadAllText(fileName, encoding);
|
textBoxText.Text = File.ReadAllText(fileName, encoding);
|
||||||
|
SetVideoFileName(fileName);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
GeneratePreview();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadAdobeStory(string fileName)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
XmlDocument doc = new XmlDocument();
|
||||||
|
doc.Load(fileName);
|
||||||
|
foreach (XmlNode node in doc.DocumentElement.SelectNodes("//paragraph[@element='Dialog']")) // <paragraph objID="1:28" element="Dialog">
|
||||||
|
{
|
||||||
|
XmlNode textRun = node.SelectSingleNode("textRun"); // <textRun objID="1:259">Yeah...I suppose</textRun>
|
||||||
|
if (textRun != null)
|
||||||
|
sb.AppendLine(textRun.InnerText);
|
||||||
|
}
|
||||||
|
textBoxText.Text = sb.ToString();
|
||||||
|
SetVideoFileName(fileName);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(ex.Message);
|
||||||
|
}
|
||||||
|
radioButtonLineMode.Checked = true;
|
||||||
|
checkBoxMergeShortLines.Checked = false;
|
||||||
|
GeneratePreview();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetVideoFileName(string fileName)
|
||||||
|
{
|
||||||
_videoFileName = fileName.Substring(0, fileName.Length - Path.GetExtension(fileName).Length);
|
_videoFileName = fileName.Substring(0, fileName.Length - Path.GetExtension(fileName).Length);
|
||||||
if (_videoFileName.EndsWith(".en"))
|
if (_videoFileName.EndsWith(".en"))
|
||||||
_videoFileName = _videoFileName.Remove(_videoFileName.Length - 3);
|
_videoFileName = _videoFileName.Remove(_videoFileName.Length - 3);
|
||||||
@ -334,13 +377,6 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
if (files.Length > 0)
|
if (files.Length > 0)
|
||||||
_videoFileName = files[0];
|
_videoFileName = files[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
MessageBox.Show(ex.Message);
|
|
||||||
}
|
|
||||||
GeneratePreview();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonRefresh_Click(object sender, EventArgs e)
|
private void buttonRefresh_Click(object sender, EventArgs e)
|
||||||
|
14
src/Forms/Main.Designer.cs
generated
14
src/Forms/Main.Designer.cs
generated
@ -177,6 +177,7 @@
|
|||||||
this.toolStripMenuItemInsertBefore = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItemInsertBefore = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripMenuItemInsertAfter = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItemInsertAfter = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripMenuItemInsertSubtitle = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItemInsertSubtitle = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.toolStripMenuItemCopySourceText = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.splitLineToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.splitLineToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripMenuItemMergeLines = new System.Windows.Forms.ToolStripMenuItem();
|
this.toolStripMenuItemMergeLines = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
@ -1604,6 +1605,7 @@
|
|||||||
this.toolStripMenuItemInsertBefore,
|
this.toolStripMenuItemInsertBefore,
|
||||||
this.toolStripMenuItemInsertAfter,
|
this.toolStripMenuItemInsertAfter,
|
||||||
this.toolStripMenuItemInsertSubtitle,
|
this.toolStripMenuItemInsertSubtitle,
|
||||||
|
this.toolStripMenuItemCopySourceText,
|
||||||
this.toolStripSeparator7,
|
this.toolStripSeparator7,
|
||||||
this.splitLineToolStripMenuItem,
|
this.splitLineToolStripMenuItem,
|
||||||
this.toolStripMenuItemMergeLines,
|
this.toolStripMenuItemMergeLines,
|
||||||
@ -1630,7 +1632,7 @@
|
|||||||
this.fixCommonErrorsInSelectedLinesToolStripMenuItem,
|
this.fixCommonErrorsInSelectedLinesToolStripMenuItem,
|
||||||
this.changeCasingForSelectedLinesToolStripMenuItem});
|
this.changeCasingForSelectedLinesToolStripMenuItem});
|
||||||
this.contextMenuStripListview.Name = "contextMenuStripListview";
|
this.contextMenuStripListview.Name = "contextMenuStripListview";
|
||||||
this.contextMenuStripListview.Size = new System.Drawing.Size(276, 562);
|
this.contextMenuStripListview.Size = new System.Drawing.Size(276, 584);
|
||||||
this.contextMenuStripListview.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripListviewOpening);
|
this.contextMenuStripListview.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripListviewOpening);
|
||||||
//
|
//
|
||||||
// toolStripMenuItemDelete
|
// toolStripMenuItemDelete
|
||||||
@ -1661,6 +1663,13 @@
|
|||||||
this.toolStripMenuItemInsertSubtitle.Text = "Insert subtitle file after this line...";
|
this.toolStripMenuItemInsertSubtitle.Text = "Insert subtitle file after this line...";
|
||||||
this.toolStripMenuItemInsertSubtitle.Click += new System.EventHandler(this.toolStripMenuItemInsertSubtitle_Click);
|
this.toolStripMenuItemInsertSubtitle.Click += new System.EventHandler(this.toolStripMenuItemInsertSubtitle_Click);
|
||||||
//
|
//
|
||||||
|
// toolStripMenuItemCopySourceText
|
||||||
|
//
|
||||||
|
this.toolStripMenuItemCopySourceText.Name = "toolStripMenuItemCopySourceText";
|
||||||
|
this.toolStripMenuItemCopySourceText.Size = new System.Drawing.Size(275, 22);
|
||||||
|
this.toolStripMenuItemCopySourceText.Text = "Copy as text to clipboard";
|
||||||
|
this.toolStripMenuItemCopySourceText.Click += new System.EventHandler(this.toolStripMenuItemCopySourceText_Click);
|
||||||
|
//
|
||||||
// toolStripSeparator7
|
// toolStripSeparator7
|
||||||
//
|
//
|
||||||
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
||||||
@ -2819,7 +2828,7 @@
|
|||||||
this.toolStripSeparator11,
|
this.toolStripSeparator11,
|
||||||
this.toolStripMenuItemWaveFormPlaySelection});
|
this.toolStripMenuItemWaveFormPlaySelection});
|
||||||
this.contextMenuStripWaveForm.Name = "contextMenuStripWaveForm";
|
this.contextMenuStripWaveForm.Name = "contextMenuStripWaveForm";
|
||||||
this.contextMenuStripWaveForm.Size = new System.Drawing.Size(183, 164);
|
this.contextMenuStripWaveForm.Size = new System.Drawing.Size(183, 142);
|
||||||
//
|
//
|
||||||
// addParagraphHereToolStripMenuItem
|
// addParagraphHereToolStripMenuItem
|
||||||
//
|
//
|
||||||
@ -3735,6 +3744,7 @@
|
|||||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemSetAudioTrack;
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemSetAudioTrack;
|
||||||
private System.Windows.Forms.Button buttonSplitLine;
|
private System.Windows.Forms.Button buttonSplitLine;
|
||||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemChangeFrameRate2;
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemChangeFrameRate2;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemCopySourceText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -641,6 +641,10 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
toolStripMenuItemInsertBefore.Text = _language.Menu.ContextMenu.InsertBefore;
|
toolStripMenuItemInsertBefore.Text = _language.Menu.ContextMenu.InsertBefore;
|
||||||
toolStripMenuItemInsertAfter.Text = _language.Menu.ContextMenu.InsertAfter;
|
toolStripMenuItemInsertAfter.Text = _language.Menu.ContextMenu.InsertAfter;
|
||||||
toolStripMenuItemInsertSubtitle.Text = _language.Menu.ContextMenu.InsertSubtitleAfter;
|
toolStripMenuItemInsertSubtitle.Text = _language.Menu.ContextMenu.InsertSubtitleAfter;
|
||||||
|
|
||||||
|
toolStripMenuItemCopySourceText.Visible = !string.IsNullOrEmpty(_language.Menu.ContextMenu.CopyToClipboard); //TODO: remove in 3.2
|
||||||
|
toolStripMenuItemCopySourceText.Text = _language.Menu.ContextMenu.CopyToClipboard;
|
||||||
|
|
||||||
splitLineToolStripMenuItem.Text = _language.Menu.ContextMenu.Split;
|
splitLineToolStripMenuItem.Text = _language.Menu.ContextMenu.Split;
|
||||||
toolStripMenuItemMergeLines.Text = _language.Menu.ContextMenu.MergeSelectedLines;
|
toolStripMenuItemMergeLines.Text = _language.Menu.ContextMenu.MergeSelectedLines;
|
||||||
mergeBeforeToolStripMenuItem.Text = _language.Menu.ContextMenu.MergeWithLineBefore;
|
mergeBeforeToolStripMenuItem.Text = _language.Menu.ContextMenu.MergeWithLineBefore;
|
||||||
@ -1474,9 +1478,10 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
_change = false;
|
_change = false;
|
||||||
return DialogResult.OK;
|
return DialogResult.OK;
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
MessageBox.Show(string.Format(_language.UnableToSaveSubtitleX, _fileName));
|
MessageBox.Show(string.Format(_language.UnableToSaveSubtitleX, _fileName));
|
||||||
|
System.Diagnostics.Debug.Write(exception.Message);
|
||||||
return DialogResult.Cancel;
|
return DialogResult.Cancel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2855,14 +2860,28 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static string GetTranslateStringFromNikseDk(string input)
|
private static string GetTranslateStringFromNikseDk(string input)
|
||||||
{
|
{
|
||||||
// string url = String.Format("http://localhost:2782/mt/Translate.aspx?text={0}&langpair={1}", HttpUtility.UrlEncode(input), "svda");
|
WebRequest.DefaultWebProxy = Utilities.GetProxy();
|
||||||
// string url = String.Format("http://www.nikse.dk/mt/Translate.aspx?text={0}&langpair={1}", HttpUtility.UrlEncode(input), "svda");
|
// WebRequest request = WebRequest.Create("http://localhost:54942/MultiTranslator/TranslateForSubtitleEdit");
|
||||||
string url = String.Format("http://www.nikse.dk/mt/Translate.aspx?text={0}&langpair={1}", Utilities.UrlEncode(input), "svda");
|
WebRequest request = WebRequest.Create("http://www.nikse.dk/MultiTranslator/TranslateForSubtitleEdit");
|
||||||
var webClient = new WebClient { Proxy = Utilities.GetProxy(), Encoding = System.Text.Encoding.UTF8 };
|
request.Method = "POST";
|
||||||
return webClient.DownloadString(url);
|
string postData = String.Format("languagePair={1}&text={0}", Utilities.UrlEncode(input), "svda");
|
||||||
|
byte[] byteArray = Encoding.UTF8.GetBytes(postData);
|
||||||
|
request.ContentType = "application/x-www-form-urlencoded";
|
||||||
|
request.ContentLength = byteArray.Length;
|
||||||
|
Stream dataStream = request.GetRequestStream();
|
||||||
|
dataStream.Write(byteArray, 0, byteArray.Length);
|
||||||
|
dataStream.Close();
|
||||||
|
WebResponse response = request.GetResponse();
|
||||||
|
dataStream = response.GetResponseStream();
|
||||||
|
StreamReader reader = new StreamReader(dataStream);
|
||||||
|
string responseFromServer = reader.ReadToEnd();
|
||||||
|
string result = responseFromServer;
|
||||||
|
reader.Close();
|
||||||
|
dataStream.Close();
|
||||||
|
response.Close();
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TranslateFromSwedishToDanishToolStripMenuItemClick(object sender, EventArgs e)
|
private void TranslateFromSwedishToDanishToolStripMenuItemClick(object sender, EventArgs e)
|
||||||
@ -2907,25 +2926,15 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
|
|
||||||
MakeHistoryForUndo(_language.BeforeSwedishToDanishTranslation);
|
MakeHistoryForUndo(_language.BeforeSwedishToDanishTranslation);
|
||||||
string result = output.ToString();
|
string result = output.ToString();
|
||||||
const string key = "<div id=\"translatedText\">";
|
if (result.Length > 0)
|
||||||
int startIndex = result.IndexOf(key);
|
|
||||||
if (startIndex > 0)
|
|
||||||
{
|
{
|
||||||
int index = 0;
|
int index = 0;
|
||||||
while (startIndex > 0)
|
foreach (string s in result.Split(new string[] { "<p>", "</p>" }, StringSplitOptions.RemoveEmptyEntries))
|
||||||
{
|
|
||||||
startIndex += key.Length;
|
|
||||||
int endIndex = result.IndexOf("</div>", startIndex);
|
|
||||||
string translatedText = result.Substring(startIndex, endIndex - startIndex);
|
|
||||||
|
|
||||||
foreach (string s in translatedText.Split(new string[] { "<p>", "</p>" }, StringSplitOptions.RemoveEmptyEntries))
|
|
||||||
{
|
{
|
||||||
if (index < _subtitle.Paragraphs.Count)
|
if (index < _subtitle.Paragraphs.Count)
|
||||||
_subtitle.Paragraphs[index].Text = s;
|
_subtitle.Paragraphs[index].Text = s;
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
startIndex = result.IndexOf(key, startIndex + key.Length);
|
|
||||||
}
|
|
||||||
ShowSource();
|
ShowSource();
|
||||||
SubtitleListview1.ShowAlternateTextColumn(Configuration.Settings.Language.General.OriginalText);
|
SubtitleListview1.ShowAlternateTextColumn(Configuration.Settings.Language.General.OriginalText);
|
||||||
SubtitleListview1.AutoSizeAllColumns(this);
|
SubtitleListview1.AutoSizeAllColumns(this);
|
||||||
@ -5323,8 +5332,16 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
videoTimer.Stop();
|
videoTimer.Stop();
|
||||||
timer1.Stop();
|
timer1.Stop();
|
||||||
|
|
||||||
|
//if (SubtitleListview1.SelectedIndices.Count > 1)
|
||||||
|
// SubtitleListview1.EnsureVisible(SubtitleListview1.SelectedIndices[0]);
|
||||||
|
|
||||||
_showEarlierOrLater = new ShowEarlierLater();
|
_showEarlierOrLater = new ShowEarlierLater();
|
||||||
_showEarlierOrLater.Initialize(ShowEarlierOrLater, true);
|
if (!_formPositionsAndSizes.SetPositionAndSize(_showEarlierOrLater))
|
||||||
|
{
|
||||||
|
_showEarlierOrLater.Top = this.Top + 100;
|
||||||
|
_showEarlierOrLater.Left = this.Left + (this.Width / 2) - (_showEarlierOrLater.Width / 3);
|
||||||
|
}
|
||||||
|
_showEarlierOrLater.Initialize(ShowEarlierOrLater, _formPositionsAndSizes, true);
|
||||||
MakeHistoryForUndo(_language.BeforeShowSelectedLinesEarlierLater);
|
MakeHistoryForUndo(_language.BeforeShowSelectedLinesEarlierLater);
|
||||||
_showEarlierOrLater.Show(this);
|
_showEarlierOrLater.Show(this);
|
||||||
|
|
||||||
@ -5587,7 +5604,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
if (mediaPlayer.VideoPlayer != null)
|
if (mediaPlayer.VideoPlayer != null)
|
||||||
{
|
{
|
||||||
GoBackSeconds(3, mediaPlayer);
|
GoBackSeconds(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (e.Modifiers == Keys.None && e.KeyCode == Keys.F8)
|
else if (e.Modifiers == Keys.None && e.KeyCode == Keys.F8)
|
||||||
@ -6266,22 +6283,34 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
ImportText importText = new ImportText();
|
ImportText importText = new ImportText();
|
||||||
if (importText.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
|
if (importText.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
|
||||||
{
|
{
|
||||||
SyncPointsSync syncPointSync = new SyncPointsSync();
|
FileNew();
|
||||||
syncPointSync.Initialize(importText.FixedSubtitle, _fileName, importText.VideoFileName, _videoAudioTrackNumber);
|
|
||||||
if (syncPointSync.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
|
|
||||||
{
|
|
||||||
ResetSubtitle();
|
|
||||||
|
|
||||||
_subtitleListViewIndex = -1;
|
if (!string.IsNullOrEmpty(importText.VideoFileName))
|
||||||
MakeHistoryForUndo(_language.BeforeImportText);
|
OpenVideo(importText.VideoFileName);
|
||||||
_subtitle = importText.FixedSubtitle;
|
|
||||||
_subtitle.CalculateFrameNumbersFromTimeCodesNoCheck(CurrentFrameRate);
|
var ti = new TranscriptImporter();
|
||||||
ShowStatus(_language.TextImported);
|
ti.Initialize(importText.FixedSubtitle, this);
|
||||||
ShowSource();
|
ti.Top = this.Top + 100;
|
||||||
SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
|
ti.Left = this.Left + (this.Width / 2) - (ti.Width / 3);
|
||||||
_change = true;
|
|
||||||
}
|
ti.Show(this);
|
||||||
_videoFileName = syncPointSync.VideoFileName;
|
|
||||||
|
//SyncPointsSync syncPointSync = new SyncPointsSync();
|
||||||
|
//syncPointSync.Initialize(importText.FixedSubtitle, _fileName, importText.VideoFileName, _videoAudioTrackNumber);
|
||||||
|
//if (syncPointSync.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
|
||||||
|
//{
|
||||||
|
// ResetSubtitle();
|
||||||
|
|
||||||
|
// _subtitleListViewIndex = -1;
|
||||||
|
// MakeHistoryForUndo(_language.BeforeImportText);
|
||||||
|
// _subtitle = importText.FixedSubtitle;
|
||||||
|
// _subtitle.CalculateFrameNumbersFromTimeCodesNoCheck(CurrentFrameRate);
|
||||||
|
// ShowStatus(_language.TextImported);
|
||||||
|
// ShowSource();
|
||||||
|
// SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
|
||||||
|
// _change = true;
|
||||||
|
//}
|
||||||
|
//_videoFileName = syncPointSync.VideoFileName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6583,7 +6612,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GoBackSeconds(double seconds, VideoPlayerContainer videoPlayerContainer)
|
internal void GoBackSeconds(double seconds)
|
||||||
{
|
{
|
||||||
if (mediaPlayer != null)
|
if (mediaPlayer != null)
|
||||||
{
|
{
|
||||||
@ -6591,38 +6620,38 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
mediaPlayer.CurrentPosition -= seconds;
|
mediaPlayer.CurrentPosition -= seconds;
|
||||||
else
|
else
|
||||||
mediaPlayer.CurrentPosition = 0;
|
mediaPlayer.CurrentPosition = 0;
|
||||||
Utilities.ShowSubtitle(_subtitle.Paragraphs, videoPlayerContainer);
|
Utilities.ShowSubtitle(_subtitle.Paragraphs, mediaPlayer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonStartHalfASecondBackClick(object sender, EventArgs e)
|
private void ButtonStartHalfASecondBackClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GoBackSeconds(0.5, mediaPlayer);
|
GoBackSeconds(0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonStartThreeSecondsBackClick(object sender, EventArgs e)
|
private void ButtonStartThreeSecondsBackClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GoBackSeconds(3.0, mediaPlayer);
|
GoBackSeconds(3.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonStartOneMinuteBackClick(object sender, EventArgs e)
|
private void ButtonStartOneMinuteBackClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GoBackSeconds(60, mediaPlayer);
|
GoBackSeconds(60);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonStartHalfASecondAheadClick(object sender, EventArgs e)
|
private void ButtonStartHalfASecondAheadClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GoBackSeconds(-0.5, mediaPlayer);
|
GoBackSeconds(-0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonStartThreeSecondsAheadClick(object sender, EventArgs e)
|
private void ButtonStartThreeSecondsAheadClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GoBackSeconds(-3, mediaPlayer);
|
GoBackSeconds(-3);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonStartOneMinuteAheadClick(object sender, EventArgs e)
|
private void ButtonStartOneMinuteAheadClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GoBackSeconds(-60, mediaPlayer);
|
GoBackSeconds(-60);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void videoTimer_Tick(object sender, EventArgs e)
|
private void videoTimer_Tick(object sender, EventArgs e)
|
||||||
@ -7216,8 +7245,13 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
|
|
||||||
_showEarlierOrLater = new ShowEarlierLater();
|
_showEarlierOrLater = new ShowEarlierLater();
|
||||||
|
if (!_formPositionsAndSizes.SetPositionAndSize(_showEarlierOrLater))
|
||||||
|
{
|
||||||
|
_showEarlierOrLater.Top = this.Top + 100;
|
||||||
|
_showEarlierOrLater.Left = this.Left + (this.Width /2) - (_showEarlierOrLater.Width / 3);
|
||||||
|
}
|
||||||
SaveSubtitleListviewIndexes();
|
SaveSubtitleListviewIndexes();
|
||||||
_showEarlierOrLater.Initialize(ShowEarlierOrLater, false);
|
_showEarlierOrLater.Initialize(ShowEarlierOrLater, _formPositionsAndSizes, false);
|
||||||
_showEarlierOrLater.Show(this);
|
_showEarlierOrLater.Show(this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -7491,12 +7525,12 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
|
|
||||||
private void buttonSecBack1_Click(object sender, EventArgs e)
|
private void buttonSecBack1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GoBackSeconds((double)numericUpDownSec1.Value , mediaPlayer);
|
GoBackSeconds((double)numericUpDownSec1.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonForward1_Click(object sender, EventArgs e)
|
private void buttonForward1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GoBackSeconds(-(double)numericUpDownSec1.Value, mediaPlayer);
|
GoBackSeconds(-(double)numericUpDownSec1.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonSetStartAndOffsetRestClick(object sender, EventArgs e)
|
private void ButtonSetStartAndOffsetRestClick(object sender, EventArgs e)
|
||||||
@ -7566,12 +7600,12 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
|
|
||||||
private void buttonAdjustSecBack_Click(object sender, EventArgs e)
|
private void buttonAdjustSecBack_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GoBackSeconds((double)numericUpDownSecAdjust1.Value, mediaPlayer);
|
GoBackSeconds((double)numericUpDownSecAdjust1.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonAdjustSecForward_Click(object sender, EventArgs e)
|
private void buttonAdjustSecForward_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GoBackSeconds(-(double)numericUpDownSecAdjust1.Value, mediaPlayer);
|
GoBackSeconds(-(double)numericUpDownSecAdjust1.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Main_Shown(object sender, EventArgs e)
|
private void Main_Shown(object sender, EventArgs e)
|
||||||
@ -7816,22 +7850,22 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
|
|
||||||
private void buttonSecBack2_Click(object sender, EventArgs e)
|
private void buttonSecBack2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GoBackSeconds((double)numericUpDownSec2.Value , mediaPlayer);
|
GoBackSeconds((double)numericUpDownSec2.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonForward2_Click(object sender, EventArgs e)
|
private void buttonForward2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GoBackSeconds(-(double)numericUpDownSec2.Value, mediaPlayer);
|
GoBackSeconds(-(double)numericUpDownSec2.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonAdjustSecBack2_Click(object sender, EventArgs e)
|
private void buttonAdjustSecBack2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GoBackSeconds((double)numericUpDownSecAdjust2.Value, mediaPlayer);
|
GoBackSeconds((double)numericUpDownSecAdjust2.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buttonAdjustSecForward2_Click(object sender, EventArgs e)
|
private void buttonAdjustSecForward2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GoBackSeconds(-(double)numericUpDownSecAdjust2.Value, mediaPlayer);
|
GoBackSeconds(-(double)numericUpDownSecAdjust2.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void translatepoweredByMicrosoftToolStripMenuItem_Click(object sender, EventArgs e)
|
private void translatepoweredByMicrosoftToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
@ -9417,5 +9451,82 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
SplitSelectedParagraph(null);
|
SplitSelectedParagraph(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///////////// 3.2 /////////////
|
||||||
|
|
||||||
|
private void toolStripMenuItemCopySourceText_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Subtitle selectedLines = new Subtitle(_subtitle);
|
||||||
|
selectedLines.Paragraphs.Clear();
|
||||||
|
foreach (int index in SubtitleListview1.SelectedIndices)
|
||||||
|
selectedLines.Paragraphs.Add(_subtitle.Paragraphs[index]);
|
||||||
|
Clipboard.SetText(selectedLines.ToText(GetCurrentSubtitleFormat()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PlayPause()
|
||||||
|
{
|
||||||
|
mediaPlayer.TogglePlayPause();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InsertViaEndPosition(string text, double durationMilliseconds, bool autoDuration)
|
||||||
|
{
|
||||||
|
if (mediaPlayer.VideoPlayer == null || string.IsNullOrEmpty(_videoFileName))
|
||||||
|
{
|
||||||
|
MessageBox.Show(Configuration.Settings.Language.General.NoVideoLoaded);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (autoDuration)
|
||||||
|
{
|
||||||
|
//TODO: auto duration
|
||||||
|
}
|
||||||
|
|
||||||
|
// current movie pos
|
||||||
|
double totalMilliseconds = (mediaPlayer.CurrentPosition * 1000.0) - durationMilliseconds;
|
||||||
|
|
||||||
|
//TODO: search for start via wave file (must only be minor adjustment)
|
||||||
|
|
||||||
|
|
||||||
|
int startNumber = 1;
|
||||||
|
if (_subtitle.Paragraphs.Count > 0)
|
||||||
|
startNumber = _subtitle.Paragraphs[0].Number;
|
||||||
|
|
||||||
|
TimeCode tc = new TimeCode(TimeSpan.FromMilliseconds(totalMilliseconds));
|
||||||
|
MakeHistoryForUndo(_language.BeforeInsertSubtitleAtVideoPosition + " " + tc.ToString());
|
||||||
|
|
||||||
|
// find index where to insert
|
||||||
|
int index = 0;
|
||||||
|
foreach (Paragraph p in _subtitle.Paragraphs)
|
||||||
|
{
|
||||||
|
if (p.StartTime.TotalMilliseconds > totalMilliseconds)
|
||||||
|
break;
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// create and insert
|
||||||
|
if (_subtitle.Paragraphs.Count > 0 && index > 0 && totalMilliseconds < _subtitle.Paragraphs[index - 1].EndTime.TotalMilliseconds)
|
||||||
|
{
|
||||||
|
double diff = _subtitle.Paragraphs[index - 1].EndTime.TotalMilliseconds - totalMilliseconds;
|
||||||
|
totalMilliseconds += diff + 250;
|
||||||
|
durationMilliseconds -= diff + 250;
|
||||||
|
}
|
||||||
|
var newParagraph = new Paragraph(text, totalMilliseconds, totalMilliseconds + durationMilliseconds);
|
||||||
|
|
||||||
|
|
||||||
|
if (GetCurrentSubtitleFormat().IsFrameBased)
|
||||||
|
{
|
||||||
|
newParagraph.CalculateFrameNumbersFromTimeCodes(CurrentFrameRate);
|
||||||
|
newParagraph.CalculateTimeCodesFromFrameNumbers(CurrentFrameRate);
|
||||||
|
}
|
||||||
|
_subtitle.Paragraphs.Insert(index, newParagraph);
|
||||||
|
|
||||||
|
_subtitleListViewIndex = -1;
|
||||||
|
_subtitle.Renumber(startNumber);
|
||||||
|
SubtitleListview1.Fill(_subtitle.Paragraphs);
|
||||||
|
SubtitleListview1.SelectIndexAndEnsureVisible(index);
|
||||||
|
|
||||||
|
ShowStatus(string.Format(_language.VideoControls.NewTextInsertAtX, newParagraph.StartTime.ToShortString()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -684,7 +684,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
|
||||||
CAAAAk1TRnQBSQFMAgEBAgEAAagBAwGoAQMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
CAAAAk1TRnQBSQFMAgEBAgEAAQgBBAEIAQQBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
|
38
src/Forms/MergeShortLines.Designer.cs
generated
38
src/Forms/MergeShortLines.Designer.cs
generated
@ -41,6 +41,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
|
this.checkBoxOnlyContinuationLines = new System.Windows.Forms.CheckBox();
|
||||||
this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
|
this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxCharacters)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxCharacters)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxMillisecondsBetweenLines)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxMillisecondsBetweenLines)).BeginInit();
|
||||||
@ -51,7 +52,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
//
|
//
|
||||||
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
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.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||||
this.buttonOK.Location = new System.Drawing.Point(608, 552);
|
this.buttonOK.Location = new System.Drawing.Point(608, 562);
|
||||||
this.buttonOK.Name = "buttonOK";
|
this.buttonOK.Name = "buttonOK";
|
||||||
this.buttonOK.Size = new System.Drawing.Size(75, 21);
|
this.buttonOK.Size = new System.Drawing.Size(75, 21);
|
||||||
this.buttonOK.TabIndex = 6;
|
this.buttonOK.TabIndex = 6;
|
||||||
@ -64,7 +65,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
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.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||||
this.buttonCancel.Location = new System.Drawing.Point(689, 552);
|
this.buttonCancel.Location = new System.Drawing.Point(689, 562);
|
||||||
this.buttonCancel.Name = "buttonCancel";
|
this.buttonCancel.Name = "buttonCancel";
|
||||||
this.buttonCancel.Size = new System.Drawing.Size(75, 21);
|
this.buttonCancel.Size = new System.Drawing.Size(75, 21);
|
||||||
this.buttonCancel.TabIndex = 8;
|
this.buttonCancel.TabIndex = 8;
|
||||||
@ -86,7 +87,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.numericUpDownMaxCharacters.Name = "numericUpDownMaxCharacters";
|
this.numericUpDownMaxCharacters.Name = "numericUpDownMaxCharacters";
|
||||||
this.numericUpDownMaxCharacters.Size = new System.Drawing.Size(64, 27);
|
this.numericUpDownMaxCharacters.Size = new System.Drawing.Size(64, 21);
|
||||||
this.numericUpDownMaxCharacters.TabIndex = 0;
|
this.numericUpDownMaxCharacters.TabIndex = 0;
|
||||||
this.numericUpDownMaxCharacters.Value = new decimal(new int[] {
|
this.numericUpDownMaxCharacters.Value = new decimal(new int[] {
|
||||||
65,
|
65,
|
||||||
@ -100,7 +101,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.labelMaxCharacters.AutoSize = true;
|
this.labelMaxCharacters.AutoSize = true;
|
||||||
this.labelMaxCharacters.Location = new System.Drawing.Point(187, 9);
|
this.labelMaxCharacters.Location = new System.Drawing.Point(187, 9);
|
||||||
this.labelMaxCharacters.Name = "labelMaxCharacters";
|
this.labelMaxCharacters.Name = "labelMaxCharacters";
|
||||||
this.labelMaxCharacters.Size = new System.Drawing.Size(294, 21);
|
this.labelMaxCharacters.Size = new System.Drawing.Size(190, 13);
|
||||||
this.labelMaxCharacters.TabIndex = 32;
|
this.labelMaxCharacters.TabIndex = 32;
|
||||||
this.labelMaxCharacters.Text = "Maximum characters in one paragraph";
|
this.labelMaxCharacters.Text = "Maximum characters in one paragraph";
|
||||||
//
|
//
|
||||||
@ -109,7 +110,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.labelMaxMillisecondsBetweenLines.AutoSize = true;
|
this.labelMaxMillisecondsBetweenLines.AutoSize = true;
|
||||||
this.labelMaxMillisecondsBetweenLines.Location = new System.Drawing.Point(483, 9);
|
this.labelMaxMillisecondsBetweenLines.Location = new System.Drawing.Point(483, 9);
|
||||||
this.labelMaxMillisecondsBetweenLines.Name = "labelMaxMillisecondsBetweenLines";
|
this.labelMaxMillisecondsBetweenLines.Name = "labelMaxMillisecondsBetweenLines";
|
||||||
this.labelMaxMillisecondsBetweenLines.Size = new System.Drawing.Size(284, 21);
|
this.labelMaxMillisecondsBetweenLines.Size = new System.Drawing.Size(178, 13);
|
||||||
this.labelMaxMillisecondsBetweenLines.TabIndex = 33;
|
this.labelMaxMillisecondsBetweenLines.TabIndex = 33;
|
||||||
this.labelMaxMillisecondsBetweenLines.Text = "Maximum milliseconds between lines";
|
this.labelMaxMillisecondsBetweenLines.Text = "Maximum milliseconds between lines";
|
||||||
//
|
//
|
||||||
@ -127,7 +128,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
0,
|
0,
|
||||||
0});
|
0});
|
||||||
this.numericUpDownMaxMillisecondsBetweenLines.Name = "numericUpDownMaxMillisecondsBetweenLines";
|
this.numericUpDownMaxMillisecondsBetweenLines.Name = "numericUpDownMaxMillisecondsBetweenLines";
|
||||||
this.numericUpDownMaxMillisecondsBetweenLines.Size = new System.Drawing.Size(64, 27);
|
this.numericUpDownMaxMillisecondsBetweenLines.Size = new System.Drawing.Size(64, 21);
|
||||||
this.numericUpDownMaxMillisecondsBetweenLines.TabIndex = 2;
|
this.numericUpDownMaxMillisecondsBetweenLines.TabIndex = 2;
|
||||||
this.numericUpDownMaxMillisecondsBetweenLines.Value = new decimal(new int[] {
|
this.numericUpDownMaxMillisecondsBetweenLines.Value = new decimal(new int[] {
|
||||||
250,
|
250,
|
||||||
@ -141,7 +142,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.groupBoxLinesFound.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.groupBoxLinesFound.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.groupBoxLinesFound.Controls.Add(this.listViewFixes);
|
this.groupBoxLinesFound.Controls.Add(this.listViewFixes);
|
||||||
this.groupBoxLinesFound.Location = new System.Drawing.Point(12, 51);
|
this.groupBoxLinesFound.Location = new System.Drawing.Point(13, 68);
|
||||||
this.groupBoxLinesFound.Name = "groupBoxLinesFound";
|
this.groupBoxLinesFound.Name = "groupBoxLinesFound";
|
||||||
this.groupBoxLinesFound.Size = new System.Drawing.Size(752, 200);
|
this.groupBoxLinesFound.Size = new System.Drawing.Size(752, 200);
|
||||||
this.groupBoxLinesFound.TabIndex = 36;
|
this.groupBoxLinesFound.TabIndex = 36;
|
||||||
@ -181,6 +182,19 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.columnHeader7.Text = "New text";
|
this.columnHeader7.Text = "New text";
|
||||||
this.columnHeader7.Width = 500;
|
this.columnHeader7.Width = 500;
|
||||||
//
|
//
|
||||||
|
// checkBoxOnlyContinuationLines
|
||||||
|
//
|
||||||
|
this.checkBoxOnlyContinuationLines.AutoSize = true;
|
||||||
|
this.checkBoxOnlyContinuationLines.Checked = true;
|
||||||
|
this.checkBoxOnlyContinuationLines.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
|
this.checkBoxOnlyContinuationLines.Location = new System.Drawing.Point(190, 54);
|
||||||
|
this.checkBoxOnlyContinuationLines.Name = "checkBoxOnlyContinuationLines";
|
||||||
|
this.checkBoxOnlyContinuationLines.Size = new System.Drawing.Size(167, 17);
|
||||||
|
this.checkBoxOnlyContinuationLines.TabIndex = 37;
|
||||||
|
this.checkBoxOnlyContinuationLines.Text = "Only merge continuation lines";
|
||||||
|
this.checkBoxOnlyContinuationLines.UseVisualStyleBackColor = true;
|
||||||
|
this.checkBoxOnlyContinuationLines.CheckedChanged += new System.EventHandler(this.checkBoxOnlyContinuationLines_CheckedChanged);
|
||||||
|
//
|
||||||
// SubtitleListview1
|
// SubtitleListview1
|
||||||
//
|
//
|
||||||
this.SubtitleListview1.AllowDrop = true;
|
this.SubtitleListview1.AllowDrop = true;
|
||||||
@ -192,18 +206,19 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.SubtitleListview1.FullRowSelect = true;
|
this.SubtitleListview1.FullRowSelect = true;
|
||||||
this.SubtitleListview1.GridLines = true;
|
this.SubtitleListview1.GridLines = true;
|
||||||
this.SubtitleListview1.HideSelection = false;
|
this.SubtitleListview1.HideSelection = false;
|
||||||
this.SubtitleListview1.Location = new System.Drawing.Point(10, 257);
|
this.SubtitleListview1.Location = new System.Drawing.Point(10, 274);
|
||||||
this.SubtitleListview1.Name = "SubtitleListview1";
|
this.SubtitleListview1.Name = "SubtitleListview1";
|
||||||
this.SubtitleListview1.Size = new System.Drawing.Size(757, 289);
|
this.SubtitleListview1.Size = new System.Drawing.Size(757, 282);
|
||||||
this.SubtitleListview1.TabIndex = 4;
|
this.SubtitleListview1.TabIndex = 4;
|
||||||
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
|
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
|
||||||
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
|
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
|
||||||
//
|
//
|
||||||
// MergeShortLines
|
// MergeShortLines
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 21F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(776, 585);
|
this.ClientSize = new System.Drawing.Size(776, 595);
|
||||||
|
this.Controls.Add(this.checkBoxOnlyContinuationLines);
|
||||||
this.Controls.Add(this.numericUpDownMaxCharacters);
|
this.Controls.Add(this.numericUpDownMaxCharacters);
|
||||||
this.Controls.Add(this.groupBoxLinesFound);
|
this.Controls.Add(this.groupBoxLinesFound);
|
||||||
this.Controls.Add(this.numericUpDownMaxMillisecondsBetweenLines);
|
this.Controls.Add(this.numericUpDownMaxMillisecondsBetweenLines);
|
||||||
@ -242,5 +257,6 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
private System.Windows.Forms.ColumnHeader columnHeader4;
|
private System.Windows.Forms.ColumnHeader columnHeader4;
|
||||||
private System.Windows.Forms.ColumnHeader columnHeader5;
|
private System.Windows.Forms.ColumnHeader columnHeader5;
|
||||||
private System.Windows.Forms.ColumnHeader columnHeader7;
|
private System.Windows.Forms.ColumnHeader columnHeader7;
|
||||||
|
private System.Windows.Forms.CheckBox checkBoxOnlyContinuationLines;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -51,6 +51,9 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
labelMaxCharacters.Text = Configuration.Settings.Language.MergedShortLines.MaximumCharacters;
|
labelMaxCharacters.Text = Configuration.Settings.Language.MergedShortLines.MaximumCharacters;
|
||||||
labelMaxMillisecondsBetweenLines.Text = Configuration.Settings.Language.MergedShortLines.MaximumMillisecondsBetween;
|
labelMaxMillisecondsBetweenLines.Text = Configuration.Settings.Language.MergedShortLines.MaximumMillisecondsBetween;
|
||||||
|
|
||||||
|
checkBoxOnlyContinuationLines.Visible = !string.IsNullOrEmpty(Configuration.Settings.Language.MergedShortLines.OnlyMergeContinuationLines); //TODO: Remove in se 3.2
|
||||||
|
checkBoxOnlyContinuationLines.Text = Configuration.Settings.Language.MergedShortLines.OnlyMergeContinuationLines;
|
||||||
|
|
||||||
listViewFixes.Columns[0].Text = Configuration.Settings.Language.General.Apply;
|
listViewFixes.Columns[0].Text = Configuration.Settings.Language.General.Apply;
|
||||||
listViewFixes.Columns[1].Text = Configuration.Settings.Language.MergedShortLines.LineNumber;
|
listViewFixes.Columns[1].Text = Configuration.Settings.Language.MergedShortLines.LineNumber;
|
||||||
listViewFixes.Columns[2].Text = Configuration.Settings.Language.MergedShortLines.MergedText;
|
listViewFixes.Columns[2].Text = Configuration.Settings.Language.MergedShortLines.MergedText;
|
||||||
@ -224,7 +227,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
return startTag;
|
return startTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool QualifiesForMerge(Paragraph p, Paragraph next, double maximumMillisecondsBetweenLines, int maximumTotalLength)
|
private bool QualifiesForMerge(Paragraph p, Paragraph next, double maximumMillisecondsBetweenLines, int maximumTotalLength)
|
||||||
{
|
{
|
||||||
if (p != null && p.Text != null && next != null && next.Text != null)
|
if (p != null && p.Text != null && next != null && next.Text != null)
|
||||||
{
|
{
|
||||||
@ -236,6 +239,10 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
if (string.IsNullOrEmpty(s))
|
if (string.IsNullOrEmpty(s))
|
||||||
return true;
|
return true;
|
||||||
bool isLineContinuation = s.EndsWith(",") || s.EndsWith("-") || s.EndsWith("...") || Utilities.GetLetters(true, true, true).Contains(s.Substring(s.Length - 1));
|
bool isLineContinuation = s.EndsWith(",") || s.EndsWith("-") || s.EndsWith("...") || Utilities.GetLetters(true, true, true).Contains(s.Substring(s.Length - 1));
|
||||||
|
|
||||||
|
if (!checkBoxOnlyContinuationLines.Checked)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (isLineContinuation)
|
if (isLineContinuation)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -318,6 +325,13 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
if (listViewFixes.Items.Count > 0)
|
if (listViewFixes.Items.Count > 0)
|
||||||
listViewFixes.Items[0].Selected = true;
|
listViewFixes.Items[0].Selected = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void checkBoxOnlyContinuationLines_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Cursor = Cursors.WaitCursor;
|
||||||
|
GeneratePreview();
|
||||||
|
Cursor = Cursors.Default;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
2
src/Forms/ShowEarlierLater.Designer.cs
generated
2
src/Forms/ShowEarlierLater.Designer.cs
generated
@ -135,7 +135,9 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.MinimizeBox = false;
|
this.MinimizeBox = false;
|
||||||
this.Name = "ShowEarlierLater";
|
this.Name = "ShowEarlierLater";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
this.Text = "Show selected lines earlier/later";
|
this.Text = "Show selected lines earlier/later";
|
||||||
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ShowEarlierLater_FormClosing);
|
||||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ShowEarlierLater_KeyDown);
|
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ShowEarlierLater_KeyDown);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
@ -11,6 +11,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
|
|
||||||
TimeSpan _totalAdjustment = TimeSpan.FromMilliseconds(0);
|
TimeSpan _totalAdjustment = TimeSpan.FromMilliseconds(0);
|
||||||
AdjustEventHandler _adjustCallback;
|
AdjustEventHandler _adjustCallback;
|
||||||
|
PositionsAndSizes _formPositionsAndSizes;
|
||||||
|
|
||||||
public ShowEarlierLater()
|
public ShowEarlierLater()
|
||||||
{
|
{
|
||||||
@ -51,8 +52,9 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Initialize(AdjustEventHandler adjustCallback, bool onlySelected)
|
internal void Initialize(AdjustEventHandler adjustCallback, PositionsAndSizes formPositionsAndSizes, bool onlySelected)
|
||||||
{
|
{
|
||||||
|
_formPositionsAndSizes = formPositionsAndSizes;
|
||||||
if (onlySelected)
|
if (onlySelected)
|
||||||
radioButtonSelectedLinesOnly.Checked = true;
|
radioButtonSelectedLinesOnly.Checked = true;
|
||||||
else
|
else
|
||||||
@ -100,5 +102,10 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
Text = Configuration.Settings.Language.ShowEarlierLater.TitleAll;
|
Text = Configuration.Settings.Language.ShowEarlierLater.TitleAll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ShowEarlierLater_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
|
{
|
||||||
|
_formPositionsAndSizes.SavePositionAndSize(this);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
169
src/Forms/TranscriptImporter.Designer.cs
generated
Normal file
169
src/Forms/TranscriptImporter.Designer.cs
generated
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
namespace Nikse.SubtitleEdit.Forms
|
||||||
|
{
|
||||||
|
partial class TranscriptImporter
|
||||||
|
{
|
||||||
|
/// <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.textBoxListViewText = new System.Windows.Forms.TextBox();
|
||||||
|
this.labelText = new System.Windows.Forms.Label();
|
||||||
|
this.buttonInsert = new System.Windows.Forms.Button();
|
||||||
|
this.labelTranslateTip = new System.Windows.Forms.Label();
|
||||||
|
this.buttonStartThreeSecondsBack = new System.Windows.Forms.Button();
|
||||||
|
this.buttonStartHalfASecondBack = new System.Windows.Forms.Button();
|
||||||
|
this.buttonPlayPause = new System.Windows.Forms.Button();
|
||||||
|
this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// textBoxListViewText
|
||||||
|
//
|
||||||
|
this.textBoxListViewText.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.textBoxListViewText.Enabled = false;
|
||||||
|
this.textBoxListViewText.HideSelection = false;
|
||||||
|
this.textBoxListViewText.Location = new System.Drawing.Point(12, 294);
|
||||||
|
this.textBoxListViewText.Multiline = true;
|
||||||
|
this.textBoxListViewText.Name = "textBoxListViewText";
|
||||||
|
this.textBoxListViewText.Size = new System.Drawing.Size(373, 56);
|
||||||
|
this.textBoxListViewText.TabIndex = 7;
|
||||||
|
//
|
||||||
|
// labelText
|
||||||
|
//
|
||||||
|
this.labelText.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.labelText.AutoSize = true;
|
||||||
|
this.labelText.Location = new System.Drawing.Point(12, 278);
|
||||||
|
this.labelText.Name = "labelText";
|
||||||
|
this.labelText.Size = new System.Drawing.Size(28, 13);
|
||||||
|
this.labelText.TabIndex = 8;
|
||||||
|
this.labelText.Text = "Text";
|
||||||
|
//
|
||||||
|
// buttonInsert
|
||||||
|
//
|
||||||
|
this.buttonInsert.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.buttonInsert.Location = new System.Drawing.Point(257, 362);
|
||||||
|
this.buttonInsert.Name = "buttonInsert";
|
||||||
|
this.buttonInsert.Size = new System.Drawing.Size(189, 21);
|
||||||
|
this.buttonInsert.TabIndex = 9;
|
||||||
|
this.buttonInsert.Text = "Insert text (end time=video pos)";
|
||||||
|
this.buttonInsert.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonInsert.Click += new System.EventHandler(this.buttonInsert_Click);
|
||||||
|
//
|
||||||
|
// labelTranslateTip
|
||||||
|
//
|
||||||
|
this.labelTranslateTip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.labelTranslateTip.AutoSize = true;
|
||||||
|
this.labelTranslateTip.ForeColor = System.Drawing.Color.Gray;
|
||||||
|
this.labelTranslateTip.Location = new System.Drawing.Point(452, 370);
|
||||||
|
this.labelTranslateTip.Name = "labelTranslateTip";
|
||||||
|
this.labelTranslateTip.Size = new System.Drawing.Size(161, 13);
|
||||||
|
this.labelTranslateTip.TabIndex = 10;
|
||||||
|
this.labelTranslateTip.Text = "Tip: Shortcut for insert is [Space]";
|
||||||
|
//
|
||||||
|
// buttonStartThreeSecondsBack
|
||||||
|
//
|
||||||
|
this.buttonStartThreeSecondsBack.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.buttonStartThreeSecondsBack.Location = new System.Drawing.Point(15, 362);
|
||||||
|
this.buttonStartThreeSecondsBack.Name = "buttonStartThreeSecondsBack";
|
||||||
|
this.buttonStartThreeSecondsBack.Size = new System.Drawing.Size(60, 21);
|
||||||
|
this.buttonStartThreeSecondsBack.TabIndex = 11;
|
||||||
|
this.buttonStartThreeSecondsBack.Text = "< 3 secs";
|
||||||
|
this.buttonStartThreeSecondsBack.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonStartThreeSecondsBack.Click += new System.EventHandler(this.buttonStartThreeSecondsBack_Click);
|
||||||
|
//
|
||||||
|
// buttonStartHalfASecondBack
|
||||||
|
//
|
||||||
|
this.buttonStartHalfASecondBack.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.buttonStartHalfASecondBack.Location = new System.Drawing.Point(81, 362);
|
||||||
|
this.buttonStartHalfASecondBack.Name = "buttonStartHalfASecondBack";
|
||||||
|
this.buttonStartHalfASecondBack.Size = new System.Drawing.Size(60, 21);
|
||||||
|
this.buttonStartHalfASecondBack.TabIndex = 12;
|
||||||
|
this.buttonStartHalfASecondBack.Text = "< ½ sec";
|
||||||
|
this.buttonStartHalfASecondBack.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonStartHalfASecondBack.Click += new System.EventHandler(this.buttonStartHalfASecondBack_Click);
|
||||||
|
//
|
||||||
|
// buttonPlayPause
|
||||||
|
//
|
||||||
|
this.buttonPlayPause.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.buttonPlayPause.Location = new System.Drawing.Point(147, 362);
|
||||||
|
this.buttonPlayPause.Name = "buttonPlayPause";
|
||||||
|
this.buttonPlayPause.Size = new System.Drawing.Size(104, 21);
|
||||||
|
this.buttonPlayPause.TabIndex = 13;
|
||||||
|
this.buttonPlayPause.Text = "Play/pause";
|
||||||
|
this.buttonPlayPause.UseVisualStyleBackColor = true;
|
||||||
|
this.buttonPlayPause.Click += new System.EventHandler(this.buttonPlayPause_Click);
|
||||||
|
//
|
||||||
|
// SubtitleListview1
|
||||||
|
//
|
||||||
|
this.SubtitleListview1.AllowDrop = true;
|
||||||
|
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.SubtitleListview1.FirstVisibleIndex = -1;
|
||||||
|
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.SubtitleListview1.FullRowSelect = true;
|
||||||
|
this.SubtitleListview1.GridLines = true;
|
||||||
|
this.SubtitleListview1.HideSelection = false;
|
||||||
|
this.SubtitleListview1.Location = new System.Drawing.Point(12, 12);
|
||||||
|
this.SubtitleListview1.Name = "SubtitleListview1";
|
||||||
|
this.SubtitleListview1.Size = new System.Drawing.Size(637, 258);
|
||||||
|
this.SubtitleListview1.TabIndex = 6;
|
||||||
|
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
|
||||||
|
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
|
||||||
|
//
|
||||||
|
// TranscriptImporter
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(661, 392);
|
||||||
|
this.Controls.Add(this.buttonPlayPause);
|
||||||
|
this.Controls.Add(this.buttonStartThreeSecondsBack);
|
||||||
|
this.Controls.Add(this.buttonStartHalfASecondBack);
|
||||||
|
this.Controls.Add(this.labelTranslateTip);
|
||||||
|
this.Controls.Add(this.buttonInsert);
|
||||||
|
this.Controls.Add(this.labelText);
|
||||||
|
this.Controls.Add(this.textBoxListViewText);
|
||||||
|
this.Controls.Add(this.SubtitleListview1);
|
||||||
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
|
||||||
|
this.KeyPreview = true;
|
||||||
|
this.MinimumSize = new System.Drawing.Size(533, 376);
|
||||||
|
this.Name = "TranscriptImporter";
|
||||||
|
this.Text = "Transcript importer";
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TextBox textBoxListViewText;
|
||||||
|
private Controls.SubtitleListView SubtitleListview1;
|
||||||
|
private System.Windows.Forms.Label labelText;
|
||||||
|
private System.Windows.Forms.Button buttonInsert;
|
||||||
|
private System.Windows.Forms.Label labelTranslateTip;
|
||||||
|
private System.Windows.Forms.Button buttonStartThreeSecondsBack;
|
||||||
|
private System.Windows.Forms.Button buttonStartHalfASecondBack;
|
||||||
|
private System.Windows.Forms.Button buttonPlayPause;
|
||||||
|
}
|
||||||
|
}
|
80
src/Forms/TranscriptImporter.cs
Normal file
80
src/Forms/TranscriptImporter.cs
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Nikse.SubtitleEdit.Logic;
|
||||||
|
|
||||||
|
namespace Nikse.SubtitleEdit.Forms
|
||||||
|
{
|
||||||
|
public partial class TranscriptImporter : Form
|
||||||
|
{
|
||||||
|
Main _main;
|
||||||
|
Subtitle _subtitle;
|
||||||
|
|
||||||
|
public TranscriptImporter()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
FixLargeFonts();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FixLargeFonts()
|
||||||
|
{
|
||||||
|
Graphics graphics = this.CreateGraphics();
|
||||||
|
SizeF textSize = graphics.MeasureString("OK", this.Font);
|
||||||
|
if (textSize.Height > buttonInsert.Height - 4)
|
||||||
|
{
|
||||||
|
int newButtonHeight = (int)(textSize.Height + 7 + 0.5);
|
||||||
|
Utilities.SetButtonHeight(this, newButtonHeight, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Initialize(Subtitle subtitle, Main main)
|
||||||
|
{
|
||||||
|
_subtitle = subtitle;
|
||||||
|
_main = main;
|
||||||
|
if (subtitle.Paragraphs.Count > 0)
|
||||||
|
subtitle.Renumber(subtitle.Paragraphs[0].Number);
|
||||||
|
|
||||||
|
// Text = Configuration.Settings.Language.SplitLongLines.Title;
|
||||||
|
|
||||||
|
//buttonOK.Text = Configuration.Settings.Language.General.OK;
|
||||||
|
//buttonCancel.Text = Configuration.Settings.Language.General.Cancel;
|
||||||
|
SubtitleListview1.InitializeLanguage(Configuration.Settings.Language.General, Configuration.Settings);
|
||||||
|
Utilities.InitializeSubtitleFont(SubtitleListview1);
|
||||||
|
SubtitleListview1.AutoSizeAllColumns(this);
|
||||||
|
SubtitleListview1.Fill(subtitle);
|
||||||
|
SubtitleListview1.SelectIndexAndEnsureVisible(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonInsert_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (SubtitleListview1.SelectedIndices.Count == 1)
|
||||||
|
{
|
||||||
|
int index = SubtitleListview1.SelectedIndices[0];
|
||||||
|
var p = _subtitle.Paragraphs[index];
|
||||||
|
_main.InsertViaEndPosition(p.Text, p.Duration.TotalMilliseconds, false);
|
||||||
|
SubtitleListview1.Items[index].Selected = false;
|
||||||
|
SubtitleListview1.SelectIndexAndEnsureVisible(index + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonPlayPause_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
_main.PlayPause();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonStartHalfASecondBack_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
_main.GoBackSeconds(0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buttonStartThreeSecondsBack_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
_main.GoBackSeconds(3.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
120
src/Forms/TranscriptImporter.resx
Normal file
120
src/Forms/TranscriptImporter.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>
|
@ -73,12 +73,8 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
if (Instance._dataDir == null)
|
if (Instance._dataDir == null)
|
||||||
{
|
{
|
||||||
string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + Path.DirectorySeparatorChar + "Subtitle Edit";
|
string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + Path.DirectorySeparatorChar + "Subtitle Edit";
|
||||||
bool useApplicationData = BaseDirectory.StartsWith(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), StringComparison.OrdinalIgnoreCase);
|
if (BaseDirectory.StartsWith(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), StringComparison.OrdinalIgnoreCase)
|
||||||
|
&& Directory.Exists(Path.Combine(path, "Dictionaries")))
|
||||||
if (!useApplicationData)
|
|
||||||
useApplicationData = !Directory.Exists(BaseDirectory + "Dictionaries") && Directory.Exists(Path.Combine(path, "Directonries"));
|
|
||||||
|
|
||||||
if (useApplicationData)
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -832,6 +832,7 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
InsertBefore = "Insert before",
|
InsertBefore = "Insert before",
|
||||||
InsertAfter = "Insert after",
|
InsertAfter = "Insert after",
|
||||||
InsertSubtitleAfter = "Insert subtitle after this line...",
|
InsertSubtitleAfter = "Insert subtitle after this line...",
|
||||||
|
CopyToClipboard = "Copy as text to clipboard",
|
||||||
Split = "Split",
|
Split = "Split",
|
||||||
MergeSelectedLines = "Merge selected lines",
|
MergeSelectedLines = "Merge selected lines",
|
||||||
MergeWithLineBefore = "Merge with line before",
|
MergeWithLineBefore = "Merge with line before",
|
||||||
@ -938,6 +939,7 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
NumberOfMergesX = "Number of merges: {0}",
|
NumberOfMergesX = "Number of merges: {0}",
|
||||||
LineNumber = "Line#",
|
LineNumber = "Line#",
|
||||||
MergedText = "Merged text",
|
MergedText = "Merged text",
|
||||||
|
OnlyMergeContinuationLines = "Only merge continuation lines",
|
||||||
};
|
};
|
||||||
|
|
||||||
MultipleReplace = new LanguageStructure.MultipleReplace
|
MultipleReplace = new LanguageStructure.MultipleReplace
|
||||||
|
@ -752,6 +752,7 @@
|
|||||||
public string InsertBefore { get; set; }
|
public string InsertBefore { get; set; }
|
||||||
public string InsertAfter { get; set; }
|
public string InsertAfter { get; set; }
|
||||||
public string InsertSubtitleAfter { get; set; }
|
public string InsertSubtitleAfter { get; set; }
|
||||||
|
public string CopyToClipboard { get; set; }
|
||||||
public string Split { get; set; }
|
public string Split { get; set; }
|
||||||
public string MergeSelectedLines { get; set; }
|
public string MergeSelectedLines { get; set; }
|
||||||
public string MergeWithLineBefore { get; set; }
|
public string MergeWithLineBefore { get; set; }
|
||||||
@ -874,6 +875,7 @@
|
|||||||
public string NumberOfMergesX { get; set; }
|
public string NumberOfMergesX { get; set; }
|
||||||
public string LineNumber { get; set; }
|
public string LineNumber { get; set; }
|
||||||
public string MergedText { get; set; }
|
public string MergedText { get; set; }
|
||||||
|
public string OnlyMergeContinuationLines { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MultipleReplace
|
public class MultipleReplace
|
||||||
|
@ -7,10 +7,10 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
{
|
{
|
||||||
List<PositionAndSize> _positionsAndSizes = new List<PositionAndSize>();
|
List<PositionAndSize> _positionsAndSizes = new List<PositionAndSize>();
|
||||||
|
|
||||||
public void SetPositionAndSize(Form form)
|
public bool SetPositionAndSize(Form form)
|
||||||
{
|
{
|
||||||
if (form == null)
|
if (form == null)
|
||||||
return;
|
return false;
|
||||||
|
|
||||||
foreach (PositionAndSize ps in _positionsAndSizes)
|
foreach (PositionAndSize ps in _positionsAndSizes)
|
||||||
{
|
{
|
||||||
@ -20,9 +20,10 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
form.Left = ps.Left;
|
form.Left = ps.Left;
|
||||||
form.Top = ps.Top;
|
form.Top = ps.Top;
|
||||||
form.Size = ps.Size;
|
form.Size = ps.Size;
|
||||||
break;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SavePositionAndSize(Form form)
|
public void SavePositionAndSize(Form form)
|
||||||
|
@ -1035,7 +1035,7 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
{
|
{
|
||||||
string helpFile = Configuration.Settings.Language.General.HelpFile;
|
string helpFile = Configuration.Settings.Language.General.HelpFile;
|
||||||
if (string.IsNullOrEmpty(helpFile))
|
if (string.IsNullOrEmpty(helpFile))
|
||||||
helpFile = "http://www.nikse.dk/se/Help.aspx";
|
helpFile = "http://www.nikse.dk/SubtitleEdit/Help";
|
||||||
System.Diagnostics.Process.Start(helpFile + parameter);
|
System.Diagnostics.Process.Start(helpFile + parameter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -369,6 +369,12 @@
|
|||||||
<Compile Include="Forms\StartNumberingFrom.Designer.cs">
|
<Compile Include="Forms\StartNumberingFrom.Designer.cs">
|
||||||
<DependentUpon>StartNumberingFrom.cs</DependentUpon>
|
<DependentUpon>StartNumberingFrom.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Forms\TranscriptImporter.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\TranscriptImporter.Designer.cs">
|
||||||
|
<DependentUpon>TranscriptImporter.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Forms\UnknownSubtitle.cs">
|
<Compile Include="Forms\UnknownSubtitle.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@ -511,6 +517,8 @@
|
|||||||
<Compile Include="Logic\StripableText.cs" />
|
<Compile Include="Logic\StripableText.cs" />
|
||||||
<Compile Include="Logic\SubtitleFormats\AdobeEncore.cs" />
|
<Compile Include="Logic\SubtitleFormats\AdobeEncore.cs" />
|
||||||
<Compile Include="Logic\SubtitleFormats\AdobeEncoreTabs.cs" />
|
<Compile Include="Logic\SubtitleFormats\AdobeEncoreTabs.cs" />
|
||||||
|
<Compile Include="Logic\SubtitleFormats\DCSubtitle.cs" />
|
||||||
|
<Compile Include="Logic\SubtitleFormats\FinalCutProTextXml.cs" />
|
||||||
<Compile Include="Logic\SubtitleFormats\FinalCutProXml.cs" />
|
<Compile Include="Logic\SubtitleFormats\FinalCutProXml.cs" />
|
||||||
<Compile Include="Logic\SubtitleFormats\Pac.cs" />
|
<Compile Include="Logic\SubtitleFormats\Pac.cs" />
|
||||||
<Compile Include="Logic\SubtitleFormats\PinnacleImpression.cs" />
|
<Compile Include="Logic\SubtitleFormats\PinnacleImpression.cs" />
|
||||||
@ -526,6 +534,7 @@
|
|||||||
<Compile Include="Logic\SubtitleFormats\UnknownSubtitle5.cs" />
|
<Compile Include="Logic\SubtitleFormats\UnknownSubtitle5.cs" />
|
||||||
<Compile Include="Logic\SubtitleFormats\OpenDvt.cs" />
|
<Compile Include="Logic\SubtitleFormats\OpenDvt.cs" />
|
||||||
<Compile Include="Logic\SubtitleFormats\AbcIViewer.cs" />
|
<Compile Include="Logic\SubtitleFormats\AbcIViewer.cs" />
|
||||||
|
<Compile Include="Logic\SubtitleFormats\UnknownSubtitle6.cs" />
|
||||||
<Compile Include="Logic\SubtitleFormats\YouTubeSbv.cs" />
|
<Compile Include="Logic\SubtitleFormats\YouTubeSbv.cs" />
|
||||||
<Compile Include="Logic\SubtitleFormats\SubViewer10.cs" />
|
<Compile Include="Logic\SubtitleFormats\SubViewer10.cs" />
|
||||||
<Compile Include="Logic\SubtitleFormats\TimedText.cs" />
|
<Compile Include="Logic\SubtitleFormats\TimedText.cs" />
|
||||||
@ -739,6 +748,9 @@
|
|||||||
<DependentUpon>StartNumberingFrom.cs</DependentUpon>
|
<DependentUpon>StartNumberingFrom.cs</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Forms\TranscriptImporter.resx">
|
||||||
|
<DependentUpon>TranscriptImporter.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Forms\UnknownSubtitle.resx">
|
<EmbeddedResource Include="Forms\UnknownSubtitle.resx">
|
||||||
<DependentUpon>UnknownSubtitle.cs</DependentUpon>
|
<DependentUpon>UnknownSubtitle.cs</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
Loading…
Reference in New Issue
Block a user