mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Seek silence in waveform now remembers 'max volume' - thx vmb :)
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1855 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
c51413b79d
commit
5bf9303da6
@ -51,7 +51,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
SecondsDuration = (double)numericUpDownSeconds.Value;
|
||||
VolumeBelow = (int)numericUpDownVolume.Value;
|
||||
Configuration.Settings.VideoControls.WaveformSeeksSilenceDurationSeconds = SecondsDuration;
|
||||
numericUpDownVolume.Value = VolumeBelow;
|
||||
Configuration.Settings.VideoControls.WaveformSeeksSilenceMaxVolume = VolumeBelow;
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
|
@ -36,14 +36,14 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
"<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + Environment.NewLine +
|
||||
"<USFSubtitles version=\"1.0\">" + Environment.NewLine +
|
||||
@"<metadata>
|
||||
<title>The Universal Subtitle Format sample</title>
|
||||
<title>Universal Subtitle Format</title>
|
||||
<author>
|
||||
<name>SubtitleEdit</name>
|
||||
<email>nikse.dk@gmail.com</email>
|
||||
<url>http://www.nikse.dk/</url>
|
||||
</author>" +
|
||||
"<language code=\"eng\">English</language>" + Environment.NewLine +
|
||||
@"<date>2002-11-08</date>
|
||||
</author>" + Environment.NewLine +
|
||||
" <language code=\"eng\">English</language>" + Environment.NewLine +
|
||||
@" <date>[DATE]</date>
|
||||
<comment>This is a USF file</comment>
|
||||
</metadata>
|
||||
<styles>
|
||||
@ -58,9 +58,11 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
<subtitles>
|
||||
</subtitles>
|
||||
</USFSubtitles>";
|
||||
xmlStructure = xmlStructure.Replace("[DATE]", DateTime.Now.ToString("yyyy-MM-dd"));
|
||||
|
||||
var xml = new XmlDocument();
|
||||
xml.LoadXml(xmlStructure);
|
||||
xml.DocumentElement.SelectSingleNode("metadata/title").InnerText = title;
|
||||
var subtitlesNode = xml.DocumentElement.SelectSingleNode("subtitles");
|
||||
|
||||
foreach (Paragraph p in subtitle.Paragraphs)
|
||||
@ -69,7 +71,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
|
||||
XmlAttribute start = xml.CreateAttribute("start");
|
||||
start.InnerText = p.StartTime.ToString().Replace(",", ".");
|
||||
paragraph.Attributes.Append(start);
|
||||
paragraph.Attributes.Prepend(start);
|
||||
|
||||
XmlAttribute stop = xml.CreateAttribute("stop");
|
||||
stop.InnerText = p.EndTime.ToString().Replace(",", ".");
|
||||
@ -79,6 +81,10 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
text.InnerText = Utilities.RemoveHtmlTags(p.Text);
|
||||
paragraph.AppendChild(text);
|
||||
|
||||
XmlAttribute style = xml.CreateAttribute("style");
|
||||
style.InnerText = "Default";
|
||||
text.Attributes.Append(style);
|
||||
|
||||
subtitlesNode.AppendChild(paragraph);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user