2016-02-08 21:11:03 +01:00
using System ;
using System.Collections.Generic ;
using System.Drawing ;
using System.Globalization ;
using System.IO ;
using System.Text ;
using System.Xml ;
using System.Xml.Serialization ;
namespace Nikse.SubtitleEdit.Core
{
// The settings classes are built for easy xml-serialization (makes save/load code simple)
// ...but the built-in serialization is too slow - so a custom (de-)serialization has been used!
public class RecentFileEntry
{
public string FileName { get ; set ; }
public string OriginalFileName { get ; set ; }
public string VideoFileName { get ; set ; }
public int FirstVisibleIndex { get ; set ; }
public int FirstSelectedIndex { get ; set ; }
2016-04-13 08:41:06 +02:00
public long VideoOffsetInMs { get ; set ; }
2016-02-08 21:11:03 +01:00
}
public class RecentFilesSettings
{
private const int MaxRecentFiles = 25 ;
[XmlArrayItem("FileName")]
public List < RecentFileEntry > Files { get ; set ; }
public RecentFilesSettings ( )
{
Files = new List < RecentFileEntry > ( ) ;
}
2016-04-13 08:41:06 +02:00
public void Add ( string fileName , int firstVisibleIndex , int firstSelectedIndex , string videoFileName , string originalFileName , long videoOffset )
2016-02-08 21:11:03 +01:00
{
2016-08-07 10:38:43 +02:00
var newList = new List < RecentFileEntry > { new RecentFileEntry { FileName = fileName , FirstVisibleIndex = firstVisibleIndex , FirstSelectedIndex = firstSelectedIndex , VideoFileName = videoFileName , OriginalFileName = originalFileName , VideoOffsetInMs = videoOffset } } ;
2016-02-08 21:11:03 +01:00
int index = 0 ;
foreach ( var oldRecentFile in Files )
{
if ( ! fileName . Equals ( oldRecentFile . FileName , StringComparison . OrdinalIgnoreCase ) & & index < MaxRecentFiles )
2016-04-13 08:41:06 +02:00
newList . Add ( new RecentFileEntry { FileName = oldRecentFile . FileName , FirstVisibleIndex = oldRecentFile . FirstVisibleIndex , FirstSelectedIndex = oldRecentFile . FirstSelectedIndex , VideoFileName = oldRecentFile . VideoFileName , OriginalFileName = oldRecentFile . OriginalFileName , VideoOffsetInMs = oldRecentFile . VideoOffsetInMs } ) ;
2016-02-08 21:11:03 +01:00
index + + ;
}
Files = newList ;
}
public void Add ( string fileName , string videoFileName , string originalFileName )
{
var newList = new List < RecentFileEntry > ( ) ;
foreach ( var oldRecentFile in Files )
{
if ( fileName . Equals ( oldRecentFile . FileName , StringComparison . OrdinalIgnoreCase ) )
2016-04-13 08:41:06 +02:00
newList . Add ( new RecentFileEntry { FileName = oldRecentFile . FileName , FirstVisibleIndex = oldRecentFile . FirstVisibleIndex , FirstSelectedIndex = oldRecentFile . FirstSelectedIndex , VideoFileName = oldRecentFile . VideoFileName , OriginalFileName = oldRecentFile . OriginalFileName , VideoOffsetInMs = oldRecentFile . VideoOffsetInMs } ) ;
2016-02-08 21:11:03 +01:00
}
if ( newList . Count = = 0 )
newList . Add ( new RecentFileEntry { FileName = fileName , FirstVisibleIndex = - 1 , FirstSelectedIndex = - 1 , VideoFileName = videoFileName , OriginalFileName = originalFileName } ) ;
int index = 0 ;
foreach ( var oldRecentFile in Files )
{
if ( ! fileName . Equals ( oldRecentFile . FileName , StringComparison . OrdinalIgnoreCase ) & & index < MaxRecentFiles )
2016-04-13 08:41:06 +02:00
newList . Add ( new RecentFileEntry { FileName = oldRecentFile . FileName , FirstVisibleIndex = oldRecentFile . FirstVisibleIndex , FirstSelectedIndex = oldRecentFile . FirstSelectedIndex , VideoFileName = oldRecentFile . VideoFileName , OriginalFileName = oldRecentFile . OriginalFileName , VideoOffsetInMs = oldRecentFile . VideoOffsetInMs } ) ;
2016-02-08 21:11:03 +01:00
index + + ;
}
Files = newList ;
}
}
public class ToolsSettings
{
public int StartSceneIndex { get ; set ; }
public int EndSceneIndex { get ; set ; }
public int VerifyPlaySeconds { get ; set ; }
public int MergeLinesShorterThan { get ; set ; }
public bool FixShortDisplayTimesAllowMoveStartTime { get ; set ; }
public string MusicSymbol { get ; set ; }
2018-01-02 15:07:52 +01:00
public string MusicSymbolReplace { get ; set ; }
2016-02-08 21:11:03 +01:00
public string UnicodeSymbolsToInsert { get ; set ; }
public bool SpellCheckAutoChangeNames { get ; set ; }
public bool SpellCheckOneLetterWords { get ; set ; }
public bool SpellCheckEnglishAllowInQuoteAsIng { get ; set ; }
public bool SpellCheckShowCompletedMessage { get ; set ; }
public bool OcrFixUseHardcodedRules { get ; set ; }
public string Interjections { get ; set ; }
public string MicrosoftBingApiId { get ; set ; }
2017-09-23 08:57:27 +02:00
public string MicrosoftTranslatorApiKey { get ; set ; }
2017-06-12 20:08:20 +02:00
public string GoogleTranslateUrl { get ; set ; }
2016-02-08 21:11:03 +01:00
public string GoogleApiKey { get ; set ; }
public bool UseGooleApiPaidService { get ; set ; }
public string GoogleTranslateLastTargetLanguage { get ; set ; }
2016-05-16 20:36:10 +02:00
public bool TranslateAutoSplit { get ; set ; }
2016-02-08 21:11:03 +01:00
public bool ListViewSyntaxColorDurationSmall { get ; set ; }
public bool ListViewSyntaxColorDurationBig { get ; set ; }
public bool ListViewSyntaxColorOverlap { get ; set ; }
public bool ListViewSyntaxColorLongLines { get ; set ; }
public bool ListViewSyntaxMoreThanXLines { get ; set ; }
public int ListViewSyntaxMoreThanXLinesX { get ; set ; }
public Color ListViewSyntaxErrorColor { get ; set ; }
public Color ListViewUnfocusedSelectedColor { get ; set ; }
2017-02-23 08:52:49 +01:00
public bool ListViewShowColumnEndTime { get ; set ; }
public bool ListViewShowColumnDuration { get ; set ; }
2017-01-15 09:46:26 +01:00
public bool ListViewShowColumnCharsPerSec { get ; set ; }
public bool ListViewShowColumnWordsPerMin { get ; set ; }
2017-11-06 18:22:49 +01:00
public bool ListViewShowColumnGap { get ; set ; }
2017-04-16 10:03:10 +02:00
public bool ListViewShowColumnActor { get ; set ; }
2017-04-26 18:51:34 +02:00
public bool ListViewShowColumnRegion { get ; set ; }
2016-02-08 21:11:03 +01:00
public bool SplitAdvanced { get ; set ; }
public string SplitOutputFolder { get ; set ; }
public int SplitNumberOfParts { get ; set ; }
public string SplitVia { get ; set ; }
public string LastShowEarlierOrLaterSelection { get ; set ; }
public string NewEmptyTranslationText { get ; set ; }
public string BatchConvertOutputFolder { get ; set ; }
public bool BatchConvertOverwriteExisting { get ; set ; }
public bool BatchConvertOverwriteOriginal { get ; set ; }
public bool BatchConvertRemoveFormatting { get ; set ; }
2017-09-03 15:29:43 +02:00
public bool BatchConvertBridgeGaps { get ; set ; }
2016-02-08 21:11:03 +01:00
public bool BatchConvertFixCasing { get ; set ; }
public bool BatchConvertRemoveTextForHI { get ; set ; }
public bool BatchConvertFixCommonErrors { get ; set ; }
public bool BatchConvertMultipleReplace { get ; set ; }
public bool BatchConvertSplitLongLines { get ; set ; }
public bool BatchConvertAutoBalance { get ; set ; }
public bool BatchConvertSetMinDisplayTimeBetweenSubtitles { get ; set ; }
public string BatchConvertLanguage { get ; set ; }
public string BatchConvertFormat { get ; set ; }
public string BatchConvertAssStyles { get ; set ; }
public string BatchConvertSsaStyles { get ; set ; }
2017-10-04 16:00:15 +02:00
public bool BatchConvertUseStyleFromSource { get ; set ; }
2017-01-15 09:46:26 +01:00
public string BatchConvertExportCustomTextTemplate { get ; set ; }
2016-02-08 21:11:03 +01:00
public string ModifySelectionText { get ; set ; }
public string ModifySelectionRule { get ; set ; }
public bool ModifySelectionCaseSensitive { get ; set ; }
public string ExportVobSubFontName { get ; set ; }
public int ExportVobSubFontSize { get ; set ; }
public string ExportVobSubVideoResolution { get ; set ; }
public string ExportVobSubLanguage { get ; set ; }
public bool ExportVobSubSimpleRendering { get ; set ; }
public bool ExportVobAntiAliasingWithTransparency { get ; set ; }
public string ExportBluRayFontName { get ; set ; }
public int ExportBluRayFontSize { get ; set ; }
public string ExportFcpFontName { get ; set ; }
public string ExportFontNameOther { get ; set ; }
public int ExportFcpFontSize { get ; set ; }
public string ExportFcpImageType { get ; set ; }
2016-08-07 18:08:39 +02:00
public string ExportFcpPalNtsc { get ; set ; }
2016-02-08 21:11:03 +01:00
public string ExportBdnXmlImageType { get ; set ; }
public int ExportLastFontSize { get ; set ; }
public int ExportLastLineHeight { get ; set ; }
public int ExportLastBorderWidth { get ; set ; }
public bool ExportLastFontBold { get ; set ; }
public string ExportBluRayVideoResolution { get ; set ; }
2016-05-30 16:09:39 +02:00
public string ExportFcpVideoResolution { get ; set ; }
2016-02-08 21:11:03 +01:00
public Color ExportFontColor { get ; set ; }
public Color ExportBorderColor { get ; set ; }
2017-10-04 16:00:15 +02:00
public Color ExportShadowColor { get ; set ; }
2017-09-29 21:26:00 +02:00
public int ExportBoxBorderSize { get ; set ; }
2017-06-15 13:37:13 +02:00
public string ExportBottomMarginUnit { get ; set ; }
2017-04-14 11:54:42 +02:00
public int ExportBottomMarginPercent { get ; set ; }
2017-06-15 13:37:13 +02:00
public int ExportBottomMarginPixels { get ; set ; }
public string ExportLeftRightMarginUnit { get ; set ; }
2017-04-14 11:54:42 +02:00
public int ExportLeftRightMarginPercent { get ; set ; }
2017-06-15 13:37:13 +02:00
public int ExportLeftRightMarginPixels { get ; set ; }
2016-02-08 21:11:03 +01:00
public int ExportHorizontalAlignment { get ; set ; }
2017-04-14 11:54:42 +02:00
public int ExportBluRayBottomMarginPercent { get ; set ; }
2017-06-15 13:37:13 +02:00
public int ExportBluRayBottomMarginPixels { get ; set ; }
2016-02-08 21:11:03 +01:00
public int ExportBluRayShadow { get ; set ; }
public int Export3DType { get ; set ; }
public int Export3DDepth { get ; set ; }
public int ExportLastShadowTransparency { get ; set ; }
public double ExportLastFrameRate { get ; set ; }
2016-08-07 20:25:54 +02:00
public bool ExportFullFrame { get ; set ; }
2017-10-28 10:51:59 +02:00
public bool ExportFcpFullPathUrl { get ; set ; }
2016-02-08 21:11:03 +01:00
public string ExportPenLineJoin { get ; set ; }
public bool FixCommonErrorsFixOverlapAllowEqualEndStart { get ; set ; }
public bool FixCommonErrorsSkipStepOne { get ; set ; }
public string ImportTextSplitting { get ; set ; }
public string ImportTextLineBreak { get ; set ; }
2017-04-27 10:10:49 +02:00
public bool ImportTextMergeShortLines { get ; set ; }
public bool ImportTextRemoveEmptyLines { get ; set ; }
public bool ImportTextRemoveLinesNoLetters { get ; set ; }
public bool ImportTextGenerateTimeCodes { get ; set ; }
public bool ImportTextAutoBreak { get ; set ; }
public decimal ImportTextGap { get ; set ; }
public bool ImportTextDurationAuto { get ; set ; }
public decimal ImportTextFixedDuration { get ; set ; }
2016-02-08 21:11:03 +01:00
public string GenerateTimeCodePatterns { get ; set ; }
public string MusicSymbolStyle { get ; set ; }
public int BridgeGapMilliseconds { get ; set ; }
public string ExportCustomTemplates { get ; set ; }
public string ChangeCasingChoice { get ; set ; }
public bool UseNoLineBreakAfter { get ; set ; }
public string NoLineBreakAfterEnglish { get ; set ; }
public List < string > FindHistory { get ; set ; }
2016-08-08 18:19:36 +02:00
public string ExportTextFormatText { get ; set ; }
public bool ExportTextRemoveStyling { get ; set ; }
public bool ExportTextShowLineNumbers { get ; set ; }
public bool ExportTextShowLineNumbersNewLine { get ; set ; }
public bool ExportTextShowTimeCodes { get ; set ; }
public bool ExportTextShowTimeCodesNewLine { get ; set ; }
public bool ExportTextNewLineAfterText { get ; set ; }
public bool ExportTextNewLineBetweenSubtitles { get ; set ; }
2018-02-04 19:40:33 +01:00
public string ExportTextTimeCodeFormat { get ; set ; }
2018-02-06 17:10:38 +01:00
public string ExportTextTimeCodeSeparator { get ; set ; }
2016-08-10 22:00:05 +02:00
public bool VideoOffsetKeepTimeCodes { get ; set ; }
2017-11-06 18:22:49 +01:00
public int MoveStartEndMs { get ; set ; }
2017-12-23 09:17:51 +01:00
public decimal AdjustDurationSeconds { get ; set ; }
public int AdjustDurationPercent { get ; set ; }
public string AdjustDurationLast { get ; set ; }
2016-02-08 21:11:03 +01:00
public ToolsSettings ( )
{
StartSceneIndex = 1 ;
EndSceneIndex = 1 ;
VerifyPlaySeconds = 2 ;
MergeLinesShorterThan = 33 ;
FixShortDisplayTimesAllowMoveStartTime = false ;
MusicSymbol = "♪" ;
2018-01-02 15:07:52 +01:00
MusicSymbolReplace = "♪,â™," + // ♪ + ♫ in UTF-8 opened as ANSI
"<s M/>,<s m/>," + // music symbols by subtitle creator
2018-01-02 15:10:33 +01:00
"#,*,¶" ; // common music symbols
2016-02-08 21:11:03 +01:00
UnicodeSymbolsToInsert = "♪;♫;☺;☹;♥;©;☮;☯;Σ;∞;≡;⇒;π" ;
SpellCheckAutoChangeNames = true ;
OcrFixUseHardcodedRules = true ;
Interjections = "Ah;Ahh;Ahhh;Ahhhh;Eh;Ehh;Ehhh;Hm;Hmm;Hmmm;Huh;Mm;Mmm;Mmmm;Phew;Gah;Oh;Ohh;Ohhh;Ow;Oww;Owww;Ugh;Ughh;Uh;Uhh;Uhhh;Whew" ;
MicrosoftBingApiId = "C2C2E9A508E6748F0494D68DFD92FAA1FF9B0BA4" ;
2017-06-12 20:08:20 +02:00
GoogleTranslateUrl = "translate.google.com" ;
2016-02-08 21:11:03 +01:00
GoogleApiKey = "ABQIAAAA4j5cWwa3lDH0RkZceh7PjBTDmNAghl5kWSyuukQ0wtoJG8nFBxRPlalq-gAvbeCXMCkmrysqjXV1Gw" ;
UseGooleApiPaidService = false ;
GoogleTranslateLastTargetLanguage = "en" ;
2016-05-16 20:36:10 +02:00
TranslateAutoSplit = true ;
2016-02-08 21:11:03 +01:00
SpellCheckOneLetterWords = true ;
SpellCheckEnglishAllowInQuoteAsIng = false ;
SpellCheckShowCompletedMessage = true ;
ListViewSyntaxColorDurationSmall = true ;
ListViewSyntaxColorDurationBig = true ;
ListViewSyntaxColorOverlap = true ;
ListViewSyntaxColorLongLines = true ;
ListViewSyntaxMoreThanXLines = true ;
ListViewSyntaxMoreThanXLinesX = 2 ;
ListViewSyntaxErrorColor = Color . FromArgb ( 255 , 180 , 150 ) ;
ListViewUnfocusedSelectedColor = Color . LightBlue ;
2017-02-23 08:52:49 +01:00
ListViewShowColumnEndTime = true ;
ListViewShowColumnDuration = true ;
2016-02-08 21:11:03 +01:00
SplitAdvanced = false ;
SplitNumberOfParts = 3 ;
SplitVia = "Lines" ;
NewEmptyTranslationText = string . Empty ;
BatchConvertLanguage = "en" ;
ModifySelectionRule = "Contains" ;
ModifySelectionText = string . Empty ;
GenerateTimeCodePatterns = "HH:mm:ss;yyyy-MM-dd;dddd dd MMMM yyyy <br>HH:mm:ss;dddd dd MMMM yyyy <br>hh:mm:ss tt;s" ;
MusicSymbolStyle = "Double" ; // 'Double' or 'Single'
ExportFontColor = Color . White ;
2016-09-27 18:23:13 +02:00
ExportBorderColor = Color . FromArgb ( 255 , 0 , 0 , 0 ) ;
ExportShadowColor = Color . FromArgb ( 255 , 0 , 0 , 0 ) ;
2017-09-30 09:42:57 +02:00
ExportBoxBorderSize = 8 ;
2017-06-15 13:37:13 +02:00
ExportBottomMarginUnit = "%" ;
2017-04-14 11:54:42 +02:00
ExportBottomMarginPercent = 5 ;
2017-06-15 13:37:13 +02:00
ExportBottomMarginPixels = 15 ;
ExportLeftRightMarginUnit = "%" ;
2017-04-14 11:54:42 +02:00
ExportLeftRightMarginPercent = 5 ;
2017-06-15 13:37:13 +02:00
ExportLeftRightMarginPixels = 15 ;
2016-02-08 21:11:03 +01:00
ExportHorizontalAlignment = 1 ; // 1=center (0=left, 2=right)
ExportVobSubSimpleRendering = true ;
ExportVobAntiAliasingWithTransparency = true ;
2017-04-14 11:54:42 +02:00
ExportBluRayBottomMarginPercent = 5 ;
2017-06-15 13:37:13 +02:00
ExportBluRayBottomMarginPixels = 20 ;
2016-02-08 21:11:03 +01:00
ExportBluRayShadow = 1 ;
Export3DType = 0 ;
Export3DDepth = 0 ;
ExportLastShadowTransparency = 200 ;
ExportLastFrameRate = 24.0d ;
2016-08-07 18:08:39 +02:00
ExportFullFrame = false ;
2016-02-08 21:11:03 +01:00
ExportPenLineJoin = "Round" ;
ExportFcpImageType = "Bmp" ;
2016-08-07 18:08:39 +02:00
ExportFcpPalNtsc = "PAL" ;
2016-02-08 21:11:03 +01:00
ExportLastBorderWidth = 2 ;
BridgeGapMilliseconds = 100 ;
ExportCustomTemplates = "SubRipÆÆ{number}\r\n{start} --> {end}\r\n{text}\r\n\r\nÆhh:mm:ss,zzzÆ[Do not modify]ÆæMicroDVDÆÆ{{start}}{{end}}{text}\r\nÆffÆ||Æ" ;
UseNoLineBreakAfter = false ;
NoLineBreakAfterEnglish = " Mrs.; Ms.; Mr.; Dr.; a; an; the; my; my own; your; his; our; their; it's; is; are;'s; 're; would;'ll;'ve;'d; will; that; which; who; whom; whose; whichever; whoever; wherever; each; either; every; all; both; few; many; sevaral; all; any; most; been; been doing; none; some; my own; your own; his own; her own; our own; their own; I; she; he; as per; as regards; into; onto; than; where as; abaft; aboard; about; above; across; afore; after; against; along; alongside; amid; amidst; among; amongst; anenst; apropos; apud; around; as; aside; astride; at; athwart; atop; barring; before; behind; below; beneath; beside; besides; between; betwixt; beyond; but; by; circa; ca; concerning; despite; down; during; except; excluding; following; for; forenenst; from; given; in; including; inside; into; lest; like; minus; modulo; near; next; of; off; on; onto; opposite; out; outside; over; pace; past; per; plus; pro; qua; regarding; round; sans; save; since; than; through; thru; throughout; thruout; till; to; toward; towards; under; underneath; unlike; until; unto; up; upon; versus; vs; via; vice; with; within; without; considering; respecting; one; two; another; three; our; five; six; seven; eight; nine; ten; eleven; twelve; thirteen; fourteen; fifteen; sixteen; seventeen; eighteen; nineteen; twenty; thirty; forty; fifty; sixty; seventy; eighty; ninety; hundred; thousand; million; billion; trillion; while; however; what; zero; little; enough; after; although; and; as; if; though; although; because; before; both; but; even; how; than; nor; or; only; unless; until; yet; was; were" ;
FindHistory = new List < string > ( ) ;
2016-08-08 18:19:36 +02:00
ExportTextFormatText = "None" ;
ExportTextRemoveStyling = true ;
ExportTextShowLineNumbersNewLine = true ;
ExportTextShowTimeCodesNewLine = true ;
ExportTextNewLineAfterText = true ;
ExportTextNewLineBetweenSubtitles = true ;
2016-02-08 21:11:03 +01:00
ImportTextLineBreak = "|" ;
2017-11-06 18:22:49 +01:00
MoveStartEndMs = 100 ;
2017-12-23 09:17:51 +01:00
AdjustDurationSeconds = 0.1 m ;
AdjustDurationPercent = 120 ;
2016-02-08 21:11:03 +01:00
}
}
2017-10-30 18:07:41 +01:00
public class FcpExportSettings
{
public string FontName { get ; set ; }
public int FontSize { get ; set ; }
public string Alignment { get ; set ; }
public int Baseline { get ; set ; }
public Color Color { get ; set ; }
public FcpExportSettings ( )
{
FontName = "Lucida Sans" ;
FontSize = 36 ;
Alignment = "center" ;
Baseline = 29 ;
Color = Color . WhiteSmoke ;
}
}
2016-02-08 21:11:03 +01:00
public class WordListSettings
{
public string LastLanguage { get ; set ; }
2017-04-10 19:23:24 +02:00
public string NamesUrl { get ; set ; }
public bool UseOnlineNames { get ; set ; }
2016-02-08 21:11:03 +01:00
public WordListSettings ( )
{
LastLanguage = "en-US" ;
2017-04-10 19:23:24 +02:00
NamesUrl = "https://raw.githubusercontent.com/SubtitleEdit/subtitleedit/master/Dictionaries/names.xml" ;
2016-02-08 21:11:03 +01:00
}
}
public class SubtitleSettings
{
public string SsaFontName { get ; set ; }
public double SsaFontSize { get ; set ; }
public int SsaFontColorArgb { get ; set ; }
public bool SsaFontBold { get ; set ; }
2017-06-30 21:55:10 +02:00
public decimal SsaOutline { get ; set ; }
public decimal SsaShadow { get ; set ; }
2016-02-08 21:11:03 +01:00
public bool SsaOpaqueBox { get ; set ; }
public int SsaMarginLeft { get ; set ; }
public int SsaMarginRight { get ; set ; }
public int SsaMarginTopBottom { get ; set ; }
public string DCinemaFontFile { get ; set ; }
public string DCinemaLoadFontResource { get ; set ; }
public int DCinemaFontSize { get ; set ; }
public int DCinemaBottomMargin { get ; set ; }
public double DCinemaZPosition { get ; set ; }
public int DCinemaFadeUpTime { get ; set ; }
public int DCinemaFadeDownTime { get ; set ; }
public string CurrentDCinemaSubtitleId { get ; set ; }
public string CurrentDCinemaMovieTitle { get ; set ; }
public string CurrentDCinemaReelNumber { get ; set ; }
public string CurrentDCinemaIssueDate { get ; set ; }
public string CurrentDCinemaLanguage { get ; set ; }
public string CurrentDCinemaEditRate { get ; set ; }
public string CurrentDCinemaTimeCodeRate { get ; set ; }
public string CurrentDCinemaStartTime { get ; set ; }
public string CurrentDCinemaFontId { get ; set ; }
public string CurrentDCinemaFontUri { get ; set ; }
public Color CurrentDCinemaFontColor { get ; set ; }
public string CurrentDCinemaFontEffect { get ; set ; }
public Color CurrentDCinemaFontEffectColor { get ; set ; }
public int CurrentDCinemaFontSize { get ; set ; }
public int CurrentCavena890LanguageIdLine1 { get ; set ; }
public int CurrentCavena890LanguageIdLine2 { get ; set ; }
2016-04-09 21:20:30 +02:00
public string CurrentCavena89Title { get ; set ; }
public string CurrentCavena890riginalTitle { get ; set ; }
public string CurrentCavena890Translator { get ; set ; }
public string CurrentCavena89Comment { get ; set ; }
public int CurrentCavena89LanguageId { get ; set ; }
public string Cavena890StartOfMessage { get ; set ; }
2016-02-08 21:11:03 +01:00
public bool EbuStlTeletextUseBox { get ; set ; }
public bool EbuStlTeletextUseDoubleHeight { get ; set ; }
2017-02-04 17:41:13 +01:00
public int EbuStlMarginTop { get ; set ; }
public int EbuStlMarginBottom { get ; set ; }
public int EbuStlNewLineRows { get ; set ; }
2016-02-08 21:11:03 +01:00
public bool CheetahCaptionAlwayWriteEndTime { get ; set ; }
public bool SamiDisplayTwoClassesAsTwoSubtitles { get ; set ; }
public int SamiHtmlEncodeMode { get ; set ; }
public string TimedText10TimeCodeFormat { get ; set ; }
public string TimedText10TimeCodeFormatSource { get ; set ; }
public bool TimedText10ShowStyleAndLanguage { get ; set ; }
public int FcpFontSize { get ; set ; }
public string FcpFontName { get ; set ; }
public string NuendoCharacterListFile { get ; set ; }
public SubtitleSettings ( )
{
SsaFontName = "Arial" ;
SsaFontSize = 20 ;
SsaFontColorArgb = Color . FromArgb ( 255 , 255 , 255 ) . ToArgb ( ) ;
SsaOutline = 2 ;
SsaShadow = 1 ;
SsaOpaqueBox = false ;
SsaMarginLeft = 10 ;
SsaMarginRight = 10 ;
SsaMarginTopBottom = 10 ;
DCinemaFontFile = "Arial.ttf" ;
DCinemaLoadFontResource = "urn:uuid:3dec6dc0-39d0-498d-97d0-928d2eb78391" ;
DCinemaFontSize = 42 ;
DCinemaBottomMargin = 8 ;
DCinemaZPosition = 0 ;
DCinemaFadeUpTime = 5 ;
DCinemaFadeDownTime = 5 ;
EbuStlTeletextUseBox = true ;
EbuStlTeletextUseDoubleHeight = true ;
2017-02-04 17:41:13 +01:00
EbuStlMarginTop = 0 ;
EbuStlMarginBottom = 2 ;
EbuStlNewLineRows = 2 ;
2016-02-08 21:11:03 +01:00
SamiDisplayTwoClassesAsTwoSubtitles = true ;
SamiHtmlEncodeMode = 0 ;
TimedText10TimeCodeFormat = "Source" ;
TimedText10ShowStyleAndLanguage = true ;
FcpFontSize = 18 ;
FcpFontName = "Lucida Grande" ;
2016-04-09 21:20:30 +02:00
Cavena890StartOfMessage = "10:00:00:00" ;
2016-02-08 21:11:03 +01:00
}
public void InitializeDCinameSettings ( bool smpte )
{
if ( smpte )
{
CurrentDCinemaSubtitleId = "urn:uuid:" + Guid . NewGuid ( ) ;
CurrentDCinemaLanguage = "en" ;
CurrentDCinemaFontUri = DCinemaLoadFontResource ;
CurrentDCinemaFontId = "theFontId" ;
}
else
{
2017-12-10 22:18:13 +01:00
string hex = Guid . NewGuid ( ) . ToString ( ) . RemoveChar ( '-' ) . ToLower ( ) ;
2016-02-08 21:11:03 +01:00
hex = hex . Insert ( 8 , "-" ) . Insert ( 13 , "-" ) . Insert ( 18 , "-" ) . Insert ( 23 , "-" ) ;
CurrentDCinemaSubtitleId = hex ;
CurrentDCinemaLanguage = "English" ;
CurrentDCinemaFontUri = DCinemaFontFile ;
CurrentDCinemaFontId = "Arial" ;
}
CurrentDCinemaIssueDate = DateTime . Now . ToString ( "s" ) + ".000-00:00" ;
CurrentDCinemaMovieTitle = "title" ;
CurrentDCinemaReelNumber = "1" ;
CurrentDCinemaFontColor = Color . White ;
CurrentDCinemaFontEffect = "border" ;
CurrentDCinemaFontEffectColor = Color . Black ;
CurrentDCinemaFontSize = DCinemaFontSize ;
CurrentCavena890LanguageIdLine1 = - 1 ;
CurrentCavena890LanguageIdLine2 = - 1 ;
}
}
public class ProxySettings
{
public string ProxyAddress { get ; set ; }
public string UserName { get ; set ; }
public string Password { get ; set ; }
public string Domain { get ; set ; }
public string DecodePassword ( )
{
return Encoding . UTF8 . GetString ( Convert . FromBase64String ( Password ) ) ;
}
public void EncodePassword ( string unencryptedPassword )
{
Password = Convert . ToBase64String ( Encoding . UTF8 . GetBytes ( unencryptedPassword ) ) ;
}
}
public class FixCommonErrorsSettings
{
public string StartPosition { get ; set ; }
public string StartSize { get ; set ; }
public bool EmptyLinesTicked { get ; set ; }
public bool OverlappingDisplayTimeTicked { get ; set ; }
public bool TooShortDisplayTimeTicked { get ; set ; }
public bool TooLongDisplayTimeTicked { get ; set ; }
public bool InvalidItalicTagsTicked { get ; set ; }
public bool BreakLongLinesTicked { get ; set ; }
public bool MergeShortLinesTicked { get ; set ; }
public bool MergeShortLinesAllTicked { get ; set ; }
public bool UnneededSpacesTicked { get ; set ; }
public bool UnneededPeriodsTicked { get ; set ; }
public bool MissingSpacesTicked { get ; set ; }
public bool AddMissingQuotesTicked { get ; set ; }
public bool Fix3PlusLinesTicked { get ; set ; }
public bool FixHyphensTicked { get ; set ; }
public bool FixHyphensAddTicked { get ; set ; }
public bool UppercaseIInsideLowercaseWordTicked { get ; set ; }
public bool DoubleApostropheToQuoteTicked { get ; set ; }
public bool AddPeriodAfterParagraphTicked { get ; set ; }
public bool StartWithUppercaseLetterAfterParagraphTicked { get ; set ; }
public bool StartWithUppercaseLetterAfterPeriodInsideParagraphTicked { get ; set ; }
public bool StartWithUppercaseLetterAfterColonTicked { get ; set ; }
public bool AloneLowercaseIToUppercaseIEnglishTicked { get ; set ; }
public bool FixOcrErrorsViaReplaceListTicked { get ; set ; }
public bool RemoveSpaceBetweenNumberTicked { get ; set ; }
public bool FixDialogsOnOneLineTicked { get ; set ; }
public bool TurkishAnsiTicked { get ; set ; }
public bool DanishLetterITicked { get ; set ; }
public bool SpanishInvertedQuestionAndExclamationMarksTicked { get ; set ; }
public bool FixDoubleDashTicked { get ; set ; }
public bool FixDoubleGreaterThanTicked { get ; set ; }
public bool FixEllipsesStartTicked { get ; set ; }
public bool FixMissingOpenBracketTicked { get ; set ; }
public bool FixMusicNotationTicked { get ; set ; }
public FixCommonErrorsSettings ( )
2017-05-29 14:48:58 +02:00
{
2017-05-31 18:29:33 +02:00
SetDefaultFixes ( ) ;
2017-05-29 14:48:58 +02:00
}
2017-05-31 18:29:33 +02:00
public void SetDefaultFixes ( )
2016-02-08 21:11:03 +01:00
{
EmptyLinesTicked = true ;
OverlappingDisplayTimeTicked = true ;
TooShortDisplayTimeTicked = true ;
TooLongDisplayTimeTicked = true ;
InvalidItalicTagsTicked = true ;
BreakLongLinesTicked = true ;
MergeShortLinesTicked = true ;
UnneededPeriodsTicked = true ;
UnneededSpacesTicked = true ;
MissingSpacesTicked = true ;
UppercaseIInsideLowercaseWordTicked = true ;
DoubleApostropheToQuoteTicked = true ;
AddPeriodAfterParagraphTicked = false ;
StartWithUppercaseLetterAfterParagraphTicked = true ;
StartWithUppercaseLetterAfterPeriodInsideParagraphTicked = false ;
StartWithUppercaseLetterAfterColonTicked = false ;
AloneLowercaseIToUppercaseIEnglishTicked = false ;
TurkishAnsiTicked = false ;
DanishLetterITicked = false ;
FixDoubleDashTicked = true ;
FixDoubleGreaterThanTicked = true ;
FixEllipsesStartTicked = true ;
FixMissingOpenBracketTicked = true ;
FixMusicNotationTicked = true ;
}
2017-05-29 14:48:58 +02:00
2016-02-08 21:11:03 +01:00
}
public class GeneralSettings
{
public bool ShowToolbarNew { get ; set ; }
public bool ShowToolbarOpen { get ; set ; }
public bool ShowToolbarSave { get ; set ; }
public bool ShowToolbarSaveAs { get ; set ; }
public bool ShowToolbarFind { get ; set ; }
public bool ShowToolbarReplace { get ; set ; }
public bool ShowToolbarFixCommonErrors { get ; set ; }
2016-07-24 08:46:58 +02:00
public bool ShowToolbarRemoveTextForHi { get ; set ; }
2016-02-08 21:11:03 +01:00
public bool ShowToolbarVisualSync { get ; set ; }
public bool ShowToolbarSpellCheck { get ; set ; }
2016-12-21 10:10:20 +01:00
public bool ShowToolbarNetflixGlyphCheck { get ; set ; }
2016-02-08 21:11:03 +01:00
public bool ShowToolbarSettings { get ; set ; }
public bool ShowToolbarHelp { get ; set ; }
public bool ShowVideoPlayer { get ; set ; }
public bool ShowAudioVisualizer { get ; set ; }
public bool ShowWaveform { get ; set ; }
public bool ShowSpectrogram { get ; set ; }
public bool ShowFrameRate { get ; set ; }
public double DefaultFrameRate { get ; set ; }
public double CurrentFrameRate { get ; set ; }
public string DefaultSubtitleFormat { get ; set ; }
public string DefaultEncoding { get ; set ; }
public bool AutoConvertToUtf8 { get ; set ; }
2017-01-29 13:42:45 +01:00
public bool WriteUtf8Bom { get ; set ; }
2016-02-08 21:11:03 +01:00
public bool AutoGuessAnsiEncoding { get ; set ; }
2017-10-01 09:26:06 +02:00
public string SystemSubtitleFontNameOverride { get ; set ; }
public int SystemSubtitleFontSizeOverride { get ; set ; }
2016-02-08 21:11:03 +01:00
public string SubtitleFontName { get ; set ; }
public int SubtitleFontSize { get ; set ; }
public bool SubtitleFontBold { get ; set ; }
public Color SubtitleFontColor { get ; set ; }
public Color SubtitleBackgroundColor { get ; set ; }
public bool CenterSubtitleInTextBox { get ; set ; }
public bool ShowRecentFiles { get ; set ; }
public bool RememberSelectedLine { get ; set ; }
public bool StartLoadLastFile { get ; set ; }
public bool StartRememberPositionAndSize { get ; set ; }
public string StartPosition { get ; set ; }
public string StartSize { get ; set ; }
public int SplitContainerMainSplitterDistance { get ; set ; }
public int SplitContainer1SplitterDistance { get ; set ; }
public int SplitContainerListViewAndTextSplitterDistance { get ; set ; }
public bool StartInSourceView { get ; set ; }
public bool RemoveBlankLinesWhenOpening { get ; set ; }
2018-02-06 17:10:38 +01:00
public bool RemoveBadCharsWhenOpening { get ; set ; }
2016-02-08 21:11:03 +01:00
public int SubtitleLineMaximumLength { get ; set ; }
public int SubtitleMinimumDisplayMilliseconds { get ; set ; }
public int SubtitleMaximumDisplayMilliseconds { get ; set ; }
public int MinimumMillisecondsBetweenLines { get ; set ; }
public int SetStartEndHumanDelay { get ; set ; }
public bool AutoWrapLineWhileTyping { get ; set ; }
public double SubtitleMaximumCharactersPerSeconds { get ; set ; }
public double SubtitleOptimalCharactersPerSeconds { get ; set ; }
2017-03-03 15:40:48 +01:00
public bool CharactersPerSecondsIgnoreWhiteSpace { get ; set ; }
2017-01-15 09:46:26 +01:00
public double SubtitleMaximumWordsPerMinute { get ; set ; }
2016-02-08 21:11:03 +01:00
public string SpellCheckLanguage { get ; set ; }
public string VideoPlayer { get ; set ; }
public int VideoPlayerDefaultVolume { get ; set ; }
public int VideoPlayerPreviewFontSize { get ; set ; }
public bool VideoPlayerPreviewFontBold { get ; set ; }
public bool VideoPlayerShowStopButton { get ; set ; }
public bool VideoPlayerShowFullscreenButton { get ; set ; }
public bool VideoPlayerShowMuteButton { get ; set ; }
public string Language { get ; set ; }
public string ListViewLineSeparatorString { get ; set ; }
public int ListViewDoubleClickAction { get ; set ; }
public string UppercaseLetters { get ; set ; }
public int DefaultAdjustMilliseconds { get ; set ; }
public bool AutoRepeatOn { get ; set ; }
public int AutoRepeatCount { get ; set ; }
public bool AutoContinueOn { get ; set ; }
2017-10-10 18:08:33 +02:00
public int AutoContinueDelay { get ; set ; }
2016-02-08 21:11:03 +01:00
public bool SyncListViewWithVideoWhilePlaying { get ; set ; }
public int AutoBackupSeconds { get ; set ; }
2016-07-09 12:00:30 +02:00
public int AutoBackupDeleteAfterMonths { get ; set ; }
2016-02-08 21:11:03 +01:00
public string SpellChecker { get ; set ; }
public bool AllowEditOfOriginalSubtitle { get ; set ; }
public bool PromptDeleteLines { get ; set ; }
public bool Undocked { get ; set ; }
public string UndockedVideoPosition { get ; set ; }
public string UndockedWaveformPosition { get ; set ; }
public string UndockedVideoControlsPosition { get ; set ; }
public bool WaveformCenter { get ; set ; }
2016-06-13 19:27:24 +02:00
public int WaveformUpdateIntervalMs { get ; set ; }
2016-02-08 21:11:03 +01:00
public int SmallDelayMilliseconds { get ; set ; }
public int LargeDelayMilliseconds { get ; set ; }
public bool ShowOriginalAsPreviewIfAvailable { get ; set ; }
public int LastPacCodePage { get ; set ; }
public string OpenSubtitleExtraExtensions { get ; set ; }
public bool ListViewColumnsRememberSize { get ; set ; }
public int ListViewNumberWidth { get ; set ; }
public int ListViewStartWidth { get ; set ; }
public int ListViewEndWidth { get ; set ; }
public int ListViewDurationWidth { get ; set ; }
2017-01-15 09:46:26 +01:00
public int ListViewCpsWidth { get ; set ; }
public int ListViewWpmWidth { get ; set ; }
2017-11-06 18:22:49 +01:00
public int ListViewGapWidth { get ; set ; }
2017-04-16 10:03:10 +02:00
public int ListViewActorWidth { get ; set ; }
2017-04-26 18:51:34 +02:00
public int ListViewRegionWidth { get ; set ; }
2016-02-08 21:11:03 +01:00
public int ListViewTextWidth { get ; set ; }
public string VlcWaveTranscodeSettings { get ; set ; }
public string VlcLocation { get ; set ; }
public string VlcLocationRelative { get ; set ; }
2016-02-28 10:58:19 +01:00
public string MpvVideoOutput { get ; set ; }
2017-02-09 21:14:48 +01:00
public bool MpvHandlesPreviewText { get ; set ; }
2016-02-08 21:11:03 +01:00
public string MpcHcLocation { get ; set ; }
public bool UseFFmpegForWaveExtraction { get ; set ; }
public string FFmpegLocation { get ; set ; }
public bool UseTimeFormatHHMMSSFF { get ; set ; }
public int ClearStatusBarAfterSeconds { get ; set ; }
public string Company { get ; set ; }
public bool MoveVideo100Or500MsPlaySmallSample { get ; set ; }
public bool DisableVideoAutoLoading { get ; set ; }
public int NewEmptyDefaultMs { get ; set ; }
public bool RightToLeftMode { get ; set ; }
public string LastSaveAsFormat { get ; set ; }
public bool CheckForUpdates { get ; set ; }
public DateTime LastCheckForUpdates { get ; set ; }
public bool ShowProgress { get ; set ; }
public long CurrentVideoOffsetInMs { get ; set ; }
2017-11-13 16:17:22 +01:00
public bool UseDarkTheme { get ; set ; }
public bool ShowBetaStuff { get ; set ; }
2016-02-08 21:11:03 +01:00
public GeneralSettings ( )
{
ShowToolbarNew = true ;
ShowToolbarOpen = true ;
ShowToolbarSave = true ;
ShowToolbarSaveAs = false ;
ShowToolbarFind = true ;
ShowToolbarReplace = true ;
ShowToolbarFixCommonErrors = false ;
ShowToolbarVisualSync = true ;
ShowToolbarSpellCheck = true ;
2016-12-21 10:10:20 +01:00
ShowToolbarNetflixGlyphCheck = true ;
2016-02-08 21:11:03 +01:00
ShowToolbarSettings = false ;
ShowToolbarHelp = true ;
2016-10-06 22:34:56 +02:00
ShowVideoPlayer = true ;
ShowAudioVisualizer = true ;
2016-02-08 21:11:03 +01:00
ShowWaveform = true ;
ShowSpectrogram = true ;
ShowFrameRate = false ;
DefaultFrameRate = 23.976 ;
CurrentFrameRate = DefaultFrameRate ;
SubtitleFontName = "Tahoma" ;
if ( Environment . OSVersion . Version . Major < 6 ) // 6 == Vista/Win2008Server/Win7
SubtitleFontName = "Times New Roman" ;
SubtitleFontSize = 8 ;
SubtitleFontBold = false ;
SubtitleFontColor = Color . Black ;
SubtitleBackgroundColor = Color . White ;
CenterSubtitleInTextBox = false ;
DefaultSubtitleFormat = "SubRip" ;
2016-05-20 00:46:02 +02:00
DefaultEncoding = Encoding . UTF8 . WebName ;
2016-02-08 21:11:03 +01:00
AutoConvertToUtf8 = false ;
2017-01-29 13:42:45 +01:00
WriteUtf8Bom = true ;
2016-02-08 21:11:03 +01:00
AutoGuessAnsiEncoding = false ;
ShowRecentFiles = true ;
RememberSelectedLine = true ;
StartLoadLastFile = true ;
StartRememberPositionAndSize = true ;
SubtitleLineMaximumLength = 43 ;
SubtitleMinimumDisplayMilliseconds = 1000 ;
SubtitleMaximumDisplayMilliseconds = 8 * 1000 ;
2018-02-06 17:10:38 +01:00
RemoveBadCharsWhenOpening = true ;
2016-02-08 21:11:03 +01:00
MinimumMillisecondsBetweenLines = 24 ;
SetStartEndHumanDelay = 100 ;
AutoWrapLineWhileTyping = false ;
SubtitleMaximumCharactersPerSeconds = 25.0 ;
SubtitleOptimalCharactersPerSeconds = 15.0 ;
2017-01-15 09:46:26 +01:00
SubtitleMaximumWordsPerMinute = 300 ;
2016-02-08 21:11:03 +01:00
SpellCheckLanguage = null ;
VideoPlayer = string . Empty ;
VideoPlayerDefaultVolume = 75 ;
2017-02-27 18:47:58 +01:00
VideoPlayerPreviewFontSize = 12 ;
2016-02-08 21:11:03 +01:00
VideoPlayerPreviewFontBold = true ;
VideoPlayerShowStopButton = true ;
VideoPlayerShowMuteButton = true ;
VideoPlayerShowFullscreenButton = true ;
ListViewLineSeparatorString = "<br />" ;
ListViewDoubleClickAction = 1 ;
UppercaseLetters = "ABCDEFGHIJKLMNOPQRSTUVWZYXÆØÃÅÄÖÉÈÁÂÀÇÊÍÓÔÕÚŁА БВ ГДЕ ЁЖЗ ИЙК ЛМ Н О ПР С Т У ФХ ЦЧШЩЪЫЬ ЭЮЯĞİŞÜÙÁÌÑÎ" ;
DefaultAdjustMilliseconds = 1000 ;
AutoRepeatOn = true ;
AutoRepeatCount = 2 ;
AutoContinueOn = false ;
2017-10-10 18:08:33 +02:00
AutoContinueDelay = 2 ;
2016-02-08 21:11:03 +01:00
SyncListViewWithVideoWhilePlaying = false ;
AutoBackupSeconds = 60 * 15 ;
2016-07-09 12:00:30 +02:00
AutoBackupDeleteAfterMonths = 6 ;
2016-02-08 21:11:03 +01:00
SpellChecker = "hunspell" ;
AllowEditOfOriginalSubtitle = true ;
PromptDeleteLines = true ;
Undocked = false ;
UndockedVideoPosition = "-32000;-32000" ;
UndockedWaveformPosition = "-32000;-32000" ;
UndockedVideoControlsPosition = "-32000;-32000" ;
2016-10-26 11:56:38 +02:00
WaveformUpdateIntervalMs = 40 ;
2016-02-08 21:11:03 +01:00
SmallDelayMilliseconds = 500 ;
LargeDelayMilliseconds = 5000 ;
OpenSubtitleExtraExtensions = "*.mp4;*.m4v;*.mkv;*.ts" ; // matroska/mp4/m4v files (can contain subtitles)
ListViewColumnsRememberSize = true ;
VlcWaveTranscodeSettings = "acodec=s16l" ; // "acodec=s16l,channels=1,ab=64,samplerate=8000";
2017-02-11 12:37:57 +01:00
MpvVideoOutput = Configuration . IsRunningOnLinux ( ) ? "vaapi" : "direct3d" ;
2017-02-09 21:14:48 +01:00
MpvHandlesPreviewText = true ;
2016-02-08 21:11:03 +01:00
UseTimeFormatHHMMSSFF = false ;
ClearStatusBarAfterSeconds = 10 ;
MoveVideo100Or500MsPlaySmallSample = false ;
DisableVideoAutoLoading = false ;
RightToLeftMode = false ;
LastSaveAsFormat = string . Empty ;
CheckForUpdates = true ;
LastCheckForUpdates = DateTime . Now ;
ShowProgress = false ;
2017-11-13 16:17:22 +01:00
UseDarkTheme = false ;
2016-02-08 21:11:03 +01:00
ShowBetaStuff = false ;
NewEmptyDefaultMs = 2000 ;
}
}
public class VideoControlsSettings
{
public string CustomSearchText1 { get ; set ; }
public string CustomSearchText2 { get ; set ; }
public string CustomSearchText3 { get ; set ; }
public string CustomSearchText4 { get ; set ; }
public string CustomSearchText5 { get ; set ; }
public string CustomSearchText6 { get ; set ; }
public string CustomSearchUrl1 { get ; set ; }
public string CustomSearchUrl2 { get ; set ; }
public string CustomSearchUrl3 { get ; set ; }
public string CustomSearchUrl4 { get ; set ; }
public string CustomSearchUrl5 { get ; set ; }
public string CustomSearchUrl6 { get ; set ; }
public string LastActiveTab { get ; set ; }
public bool WaveformDrawGrid { get ; set ; }
2017-01-16 18:57:29 +01:00
public bool WaveformDrawCps { get ; set ; }
public bool WaveformDrawWpm { get ; set ; }
2016-02-08 21:11:03 +01:00
public bool WaveformAllowOverlap { get ; set ; }
public bool WaveformFocusOnMouseEnter { get ; set ; }
public bool WaveformListViewFocusOnMouseEnter { get ; set ; }
2017-01-12 21:27:19 +01:00
public bool WaveformSetVideoPositionOnMoveStartEnd { get ; set ; }
2016-02-08 21:11:03 +01:00
public int WaveformBorderHitMs { get ; set ; }
public Color WaveformGridColor { get ; set ; }
public Color WaveformColor { get ; set ; }
public Color WaveformSelectedColor { get ; set ; }
public Color WaveformBackgroundColor { get ; set ; }
public Color WaveformTextColor { get ; set ; }
public int WaveformTextSize { get ; set ; }
public bool WaveformTextBold { get ; set ; }
public string WaveformDoubleClickOnNonParagraphAction { get ; set ; }
public string WaveformRightClickOnNonParagraphAction { get ; set ; }
public bool WaveformMouseWheelScrollUpIsForward { get ; set ; }
public bool GenerateSpectrogram { get ; set ; }
public string SpectrogramAppearance { get ; set ; }
public int WaveformMinimumSampleRate { get ; set ; }
public double WaveformSeeksSilenceDurationSeconds { get ; set ; }
public double WaveformSeeksSilenceMaxVolume { get ; set ; }
public VideoControlsSettings ( )
{
CustomSearchText1 = "The Free Dictionary" ;
CustomSearchUrl1 = "http://www.thefreedictionary.com/{0}" ;
CustomSearchText2 = "Wikipedia" ;
CustomSearchUrl2 = "http://en.m.wikipedia.org/wiki?search={0}" ;
LastActiveTab = "Translate" ;
WaveformDrawGrid = true ;
WaveformAllowOverlap = false ;
WaveformBorderHitMs = 15 ;
WaveformGridColor = Color . FromArgb ( 255 , 20 , 20 , 18 ) ;
WaveformColor = Color . FromArgb ( 255 , 160 , 240 , 30 ) ;
WaveformSelectedColor = Color . FromArgb ( 255 , 230 , 0 , 0 ) ;
WaveformBackgroundColor = Color . Black ;
WaveformTextColor = Color . Gray ;
WaveformTextSize = 9 ;
WaveformTextBold = true ;
WaveformDoubleClickOnNonParagraphAction = "PlayPause" ;
WaveformDoubleClickOnNonParagraphAction = string . Empty ;
WaveformMouseWheelScrollUpIsForward = true ;
SpectrogramAppearance = "OneColorGradient" ;
WaveformMinimumSampleRate = 126 ;
WaveformSeeksSilenceDurationSeconds = 0.3 ;
WaveformSeeksSilenceMaxVolume = 0.1 ;
}
}
public class VobSubOcrSettings
{
public int XOrMorePixelsMakesSpace { get ; set ; }
public double AllowDifferenceInPercent { get ; set ; }
public double BlurayAllowDifferenceInPercent { get ; set ; }
public string LastImageCompareFolder { get ; set ; }
public int LastModiLanguageId { get ; set ; }
public string LastOcrMethod { get ; set ; }
public string TesseractLastLanguage { get ; set ; }
public bool UseModiInTesseractForUnknownWords { get ; set ; }
public bool UseItalicsInTesseract { get ; set ; }
public bool UseMusicSymbolsInTesseract { get ; set ; }
public bool RightToLeft { get ; set ; }
public bool TopToBottom { get ; set ; }
public int DefaultMillisecondsForUnknownDurations { get ; set ; }
public bool PromptForUnknownWords { get ; set ; }
public bool GuessUnknownWords { get ; set ; }
public bool AutoBreakSubtitleIfMoreThanTwoLines { get ; set ; }
public double ItalicFactor { get ; set ; }
public bool LineOcrDraw { get ; set ; }
public bool LineOcrAdvancedItalic { get ; set ; }
public string LineOcrLastLanguages { get ; set ; }
public string LineOcrLastSpellCheck { get ; set ; }
public int LineOcrXOrMorePixelsMakesSpace { get ; set ; }
public int LineOcrMinLineHeight { get ; set ; }
public int LineOcrMaxLineHeight { get ; set ; }
public string LastBinaryImageCompareDb { get ; set ; }
public string LastBinaryImageSpellCheck { get ; set ; }
public VobSubOcrSettings ( )
{
XOrMorePixelsMakesSpace = 8 ;
AllowDifferenceInPercent = 1.0 ;
BlurayAllowDifferenceInPercent = 7.5 ;
LastImageCompareFolder = "English" ;
LastModiLanguageId = 9 ;
LastOcrMethod = "Tesseract" ;
UseItalicsInTesseract = true ;
UseMusicSymbolsInTesseract = true ;
RightToLeft = false ;
TopToBottom = true ;
DefaultMillisecondsForUnknownDurations = 5000 ;
PromptForUnknownWords = true ;
GuessUnknownWords = true ;
AutoBreakSubtitleIfMoreThanTwoLines = true ;
ItalicFactor = 0.2 ;
}
}
public class MultipleSearchAndReplaceSetting
{
public bool Enabled { get ; set ; }
public string FindWhat { get ; set ; }
public string ReplaceWith { get ; set ; }
public string SearchType { get ; set ; }
2017-12-11 21:11:32 +01:00
public string Description { get ; set ; }
2016-02-08 21:11:03 +01:00
}
2016-06-26 16:23:40 +02:00
public class MultipleSearchAndReplaceGroup
{
public string Name { get ; set ; }
public bool Enabled { get ; set ; }
public List < MultipleSearchAndReplaceSetting > Rules { get ; set ; }
}
2016-02-08 21:11:03 +01:00
public class NetworkSettings
{
public string UserName { get ; set ; }
public string WebServiceUrl { get ; set ; }
public string SessionKey { get ; set ; }
public int PollIntervalSeconds { get ; set ; }
public string NewMessageSound { get ; set ; }
public NetworkSettings ( )
{
UserName = string . Empty ;
SessionKey = "DemoSession" ; // TODO: Leave blank or use guid
WebServiceUrl = "http://www.nikse.dk/se/SeService.asmx" ;
PollIntervalSeconds = 5 ;
}
}
public class Shortcuts
{
public string GeneralGoToFirstSelectedLine { get ; set ; }
public string GeneralGoToNextEmptyLine { get ; set ; }
public string GeneralMergeSelectedLines { get ; set ; }
public string GeneralMergeSelectedLinesOnlyFirstText { get ; set ; }
2016-10-18 11:50:28 +02:00
public string GeneralMergeWithNext { get ; set ; }
public string GeneralMergeWithPrevious { get ; set ; }
2016-02-08 21:11:03 +01:00
public string GeneralToggleTranslationMode { get ; set ; }
public string GeneralSwitchOriginalAndTranslation { get ; set ; }
public string GeneralMergeOriginalAndTranslation { get ; set ; }
public string GeneralGoToNextSubtitle { get ; set ; }
public string GeneralGoToPrevSubtitle { get ; set ; }
public string GeneralGoToStartOfCurrentSubtitle { get ; set ; }
public string GeneralGoToEndOfCurrentSubtitle { get ; set ; }
2017-01-11 21:24:34 +01:00
public string GeneralGoToPreviousSubtitleAndFocusVideo { get ; set ; }
2016-08-03 14:47:45 +02:00
public string GeneralGoToNextSubtitleAndFocusVideo { get ; set ; }
public string GeneralExtendCurrentSubtitle { get ; set ; }
2016-10-18 11:50:28 +02:00
public string GeneralAutoCalcCurrentDuration { get ; set ; }
2016-02-08 21:11:03 +01:00
public string GeneralPlayFirstSelected { get ; set ; }
2016-10-02 19:28:58 +02:00
public string GeneralHelp { get ; set ; }
2018-02-03 10:41:51 +01:00
public string GeneralUnbrekNoSpace { get ; set ; }
2016-02-08 21:11:03 +01:00
public string MainFileNew { get ; set ; }
public string MainFileOpen { get ; set ; }
public string MainFileOpenKeepVideo { get ; set ; }
public string MainFileSave { get ; set ; }
public string MainFileSaveOriginal { get ; set ; }
public string MainFileSaveOriginalAs { get ; set ; }
public string MainFileSaveAs { get ; set ; }
public string MainFileSaveAll { get ; set ; }
2017-10-04 16:00:15 +02:00
public string MainFileCloseOriginal { get ; set ; }
public string MainFileImportPlainText { get ; set ; }
public string MainFileImportTimeCodes { get ; set ; }
2016-02-08 21:11:03 +01:00
public string MainFileExportEbu { get ; set ; }
2017-10-10 20:50:18 +02:00
public string MainFileExportPlainText { get ; set ; }
2016-02-08 21:11:03 +01:00
public string MainEditUndo { get ; set ; }
public string MainEditRedo { get ; set ; }
public string MainEditFind { get ; set ; }
public string MainEditFindNext { get ; set ; }
public string MainEditReplace { get ; set ; }
public string MainEditMultipleReplace { get ; set ; }
public string MainEditGoToLineNumber { get ; set ; }
public string MainEditRightToLeft { get ; set ; }
public string MainEditReverseStartAndEndingForRTL { get ; set ; }
public string MainEditToggleTranslationOriginalInPreviews { get ; set ; }
public string MainEditInverseSelection { get ; set ; }
public string MainEditModifySelection { get ; set ; }
public string MainToolsFixCommonErrors { get ; set ; }
public string MainToolsFixCommonErrorsPreview { get ; set ; }
public string MainToolsMergeShortLines { get ; set ; }
2017-10-04 16:00:15 +02:00
public string MainToolsMakeEmptyFromCurrent { get ; set ; }
2016-02-08 21:11:03 +01:00
public string MainToolsSplitLongLines { get ; set ; }
public string MainToolsRenumber { get ; set ; }
public string MainToolsRemoveTextForHI { get ; set ; }
public string MainToolsChangeCasing { get ; set ; }
public string MainToolsAutoDuration { get ; set ; }
public string MainToolsBatchConvert { get ; set ; }
public string MainToolsBeamer { get ; set ; }
2017-10-04 16:00:15 +02:00
public string MainVideoOpen { get ; set ; }
public string MainVideoClose { get ; set ; }
2016-02-08 21:11:03 +01:00
public string MainVideoPause { get ; set ; }
public string MainVideoPlayPauseToggle { get ; set ; }
public string MainVideoShowHideVideo { get ; set ; }
public string MainVideoToggleVideoControls { get ; set ; }
public string MainVideo1FrameLeft { get ; set ; }
public string MainVideo1FrameRight { get ; set ; }
2017-06-29 19:21:23 +02:00
public string MainVideo1FrameLeftWithPlay { get ; set ; }
public string MainVideo1FrameRightWithPlay { get ; set ; }
2016-02-08 21:11:03 +01:00
public string MainVideo100MsLeft { get ; set ; }
public string MainVideo100MsRight { get ; set ; }
public string MainVideo500MsLeft { get ; set ; }
public string MainVideo500MsRight { get ; set ; }
public string MainVideo1000MsLeft { get ; set ; }
public string MainVideo1000MsRight { get ; set ; }
2016-07-09 12:29:18 +02:00
public string MainVideo5000MsLeft { get ; set ; }
public string MainVideo5000MsRight { get ; set ; }
2016-02-08 21:11:03 +01:00
public string MainVideoFullscreen { get ; set ; }
public string MainSpellCheck { get ; set ; }
public string MainSpellCheckFindDoubleWords { get ; set ; }
public string MainSpellCheckAddWordToNames { get ; set ; }
public string MainSynchronizationAdjustTimes { get ; set ; }
public string MainSynchronizationVisualSync { get ; set ; }
public string MainSynchronizationPointSync { get ; set ; }
2017-10-04 16:00:15 +02:00
public string MainSynchronizationPointSyncViaFile { get ; set ; }
2016-02-08 21:11:03 +01:00
public string MainSynchronizationChangeFrameRate { get ; set ; }
public string MainListViewItalic { get ; set ; }
public string MainListViewToggleDashes { get ; set ; }
public string MainListViewAlignment { get ; set ; }
public string MainListViewCopyText { get ; set ; }
public string MainListViewCopyTextFromOriginalToCurrent { get ; set ; }
public string MainListViewAutoDuration { get ; set ; }
public string MainListViewColumnDeleteText { get ; set ; }
public string MainListViewColumnInsertText { get ; set ; }
public string MainListViewColumnPaste { get ; set ; }
2018-01-31 16:03:43 +01:00
public string MainListViewColumnTextUp { get ; set ; }
2018-02-06 17:10:38 +01:00
public string MainListViewColumnTextDown { get ; set ; }
2016-02-08 21:11:03 +01:00
public string MainListViewFocusWaveform { get ; set ; }
public string MainListViewGoToNextError { get ; set ; }
public string MainTextBoxItalic { get ; set ; }
public string MainTextBoxSplitAtCursor { get ; set ; }
public string MainTextBoxMoveLastWordDown { get ; set ; }
public string MainTextBoxMoveFirstWordFromNextUp { get ; set ; }
2018-01-15 19:46:16 +01:00
public string MainTextBoxMoveLastWordDownCurrent { get ; set ; }
public string MainTextBoxMoveFirstWordUpCurrent { get ; set ; }
2016-02-08 21:11:03 +01:00
public string MainTextBoxSelectionToLower { get ; set ; }
public string MainTextBoxSelectionToUpper { get ; set ; }
public string MainTextBoxToggleAutoDuration { get ; set ; }
public string MainCreateInsertSubAtVideoPos { get ; set ; }
public string MainCreatePlayFromJustBefore { get ; set ; }
public string MainCreateSetStart { get ; set ; }
public string MainCreateSetEnd { get ; set ; }
public string MainCreateSetEndAddNewAndGoToNew { get ; set ; }
public string MainCreateStartDownEndUp { get ; set ; }
public string MainAdjustSetStartAndOffsetTheRest { get ; set ; }
public string MainAdjustSetEndAndOffsetTheRest { get ; set ; }
public string MainAdjustSetEndAndOffsetTheRestAndGoToNext { get ; set ; }
public string MainAdjustSetEndAndGotoNext { get ; set ; }
public string MainAdjustViaEndAutoStartAndGoToNext { get ; set ; }
public string MainAdjustSetStartAutoDurationAndGoToNext { get ; set ; }
public string MainAdjustSetEndNextStartAndGoToNext { get ; set ; }
public string MainAdjustStartDownEndUpAndGoToNext { get ; set ; }
public string MainAdjustSetStart { get ; set ; }
public string MainAdjustSetStartKeepDuration { get ; set ; }
public string MainAdjustSetEnd { get ; set ; }
public string MainAdjustSelected100MsForward { get ; set ; }
public string MainAdjustSelected100MsBack { get ; set ; }
2017-11-06 18:22:49 +01:00
public string MainAdjustStartXMsBack { get ; set ; }
public string MainAdjustStartXMsForward { get ; set ; }
public string MainAdjustEndXMsBack { get ; set ; }
public string MainAdjustEndXMsForward { get ; set ; }
2016-02-08 21:11:03 +01:00
public string MainInsertAfter { get ; set ; }
public string MainTextBoxInsertAfter { get ; set ; }
public string MainTextBoxAutoBreak { get ; set ; }
public string MainTextBoxUnbreak { get ; set ; }
public string MainWaveformInsertAtCurrentPosition { get ; set ; }
public string MainInsertBefore { get ; set ; }
public string MainMergeDialog { get ; set ; }
public string MainToggleFocus { get ; set ; }
public string WaveformVerticalZoom { get ; set ; }
public string WaveformVerticalZoomOut { get ; set ; }
public string WaveformZoomIn { get ; set ; }
public string WaveformZoomOut { get ; set ; }
public string WaveformPlaySelection { get ; set ; }
public string WaveformPlaySelectionEnd { get ; set ; }
public string WaveformSearchSilenceForward { get ; set ; }
public string WaveformSearchSilenceBack { get ; set ; }
public string WaveformAddTextHere { get ; set ; }
public string WaveformAddTextHereFromClipboard { get ; set ; }
public string WaveformFocusListView { get ; set ; }
2017-05-02 04:37:06 +02:00
public string WaveformGoToNextSubtitle { get ; set ; }
2017-11-03 20:24:16 +01:00
public string WaveformGoToPreviousSceneChange { get ; set ; }
2016-08-06 14:13:51 +02:00
public string WaveformGoToNextSceneChange { get ; set ; }
2016-08-07 10:38:43 +02:00
public string WaveformToggleSceneChange { get ; set ; }
2016-02-08 21:11:03 +01:00
public string MainTranslateCustomSearch1 { get ; set ; }
public string MainTranslateCustomSearch2 { get ; set ; }
public string MainTranslateCustomSearch3 { get ; set ; }
public string MainTranslateCustomSearch4 { get ; set ; }
public string MainTranslateCustomSearch5 { get ; set ; }
public string MainTranslateCustomSearch6 { get ; set ; }
public Shortcuts ( )
{
GeneralGoToFirstSelectedLine = "Control+L" ;
GeneralMergeSelectedLines = "Control+Shift+M" ;
GeneralToggleTranslationMode = "Control+Shift+O" ;
GeneralSwitchOriginalAndTranslation = "Control+Alt+O" ;
GeneralMergeOriginalAndTranslation = "Control+Alt+Shift+M" ;
GeneralGoToNextSubtitle = "Shift+Return" ;
GeneralGoToPrevSubtitle = string . Empty ;
GeneralGoToStartOfCurrentSubtitle = string . Empty ;
GeneralGoToEndOfCurrentSubtitle = string . Empty ;
MainFileNew = "Control+N" ;
MainFileOpen = "Control+O" ;
MainFileSave = "Control+S" ;
MainFileSaveOriginal = string . Empty ;
MainFileSaveOriginalAs = string . Empty ;
MainFileSaveAs = string . Empty ;
MainFileSaveAll = string . Empty ;
MainFileExportEbu = string . Empty ;
MainEditUndo = "Control+Z" ;
MainEditRedo = "Control+Y" ;
MainEditFind = "Control+F" ;
MainEditFindNext = "F3" ;
MainEditReplace = "Control+H" ;
MainEditMultipleReplace = "Control+Alt+M" ;
MainEditGoToLineNumber = "Control+G" ;
MainEditRightToLeft = "Control+Shift+Alt+R" ;
MainEditInverseSelection = "Control+Shift+I" ;
MainToolsFixCommonErrors = "Control+Shift+F" ;
MainToolsFixCommonErrorsPreview = "Control+P" ;
MainToolsMergeShortLines = string . Empty ;
MainToolsSplitLongLines = string . Empty ;
MainToolsRenumber = "Control+Shift+N" ;
MainToolsRemoveTextForHI = "Control+Shift+H" ;
MainToolsChangeCasing = "Control+Shift+C" ;
MainVideoPlayPauseToggle = "Control+P" ;
MainVideoPause = "Control+Alt+P" ;
MainVideoShowHideVideo = "Control+Q" ;
MainVideo1FrameLeft = string . Empty ;
MainVideo1FrameRight = string . Empty ;
MainVideo100MsLeft = string . Empty ;
MainVideo100MsRight = string . Empty ;
MainVideo500MsLeft = "Alt+Left" ;
MainVideo500MsRight = "Alt+Right" ;
MainVideo1000MsLeft = string . Empty ;
MainVideo1000MsRight = string . Empty ;
2016-07-09 12:29:18 +02:00
MainVideo5000MsLeft = string . Empty ;
MainVideo5000MsRight = string . Empty ;
2016-02-08 21:11:03 +01:00
MainVideoFullscreen = "Alt+Return" ;
MainSpellCheck = "Control+Shift+S" ;
MainSpellCheckFindDoubleWords = "Control+Shift+D" ;
MainSpellCheckAddWordToNames = "Control+Shift+L" ;
MainSynchronizationAdjustTimes = "Control+Shift+A" ;
MainSynchronizationVisualSync = "Control+Shift+V" ;
MainSynchronizationPointSync = "Control+Shift+P" ;
MainSynchronizationChangeFrameRate = string . Empty ;
MainListViewItalic = "Control+I" ;
MainEditReverseStartAndEndingForRTL = string . Empty ;
MainTextBoxItalic = "Control+I" ;
MainTextBoxSplitAtCursor = "Control+Alt+V" ;
MainToolsAutoDuration = string . Empty ;
MainTextBoxSelectionToLower = "Control+U" ;
MainTextBoxSelectionToUpper = "Control+Shift+U" ;
MainTextBoxToggleAutoDuration = string . Empty ;
MainToolsBeamer = "Control+Shift+Alt+B" ;
MainCreateInsertSubAtVideoPos = string . Empty ;
MainCreatePlayFromJustBefore = string . Empty ;
MainCreateSetStart = string . Empty ;
MainCreateSetEnd = string . Empty ;
MainCreateSetEndAddNewAndGoToNew = string . Empty ;
MainCreateStartDownEndUp = string . Empty ;
MainAdjustSetStartAndOffsetTheRest = "Control+Space" ;
MainAdjustSetEndAndOffsetTheRest = string . Empty ;
MainAdjustSetEndAndOffsetTheRestAndGoToNext = string . Empty ;
MainAdjustSetEndAndGotoNext = string . Empty ;
MainAdjustViaEndAutoStartAndGoToNext = string . Empty ;
MainAdjustSetStartAutoDurationAndGoToNext = string . Empty ;
MainAdjustSetEndNextStartAndGoToNext = string . Empty ;
MainAdjustStartDownEndUpAndGoToNext = string . Empty ;
MainAdjustSetStart = string . Empty ;
MainAdjustSetStartKeepDuration = string . Empty ;
MainAdjustSetEnd = string . Empty ;
MainAdjustSelected100MsForward = string . Empty ;
MainAdjustSelected100MsBack = string . Empty ;
MainInsertAfter = "Alt+Insert" ;
MainWaveformInsertAtCurrentPosition = "Insert" ;
MainInsertBefore = "Control+Shift+Insert" ;
MainTextBoxInsertAfter = "Alt+Insert" ;
MainTextBoxAutoBreak = "Control+R" ;
MainTextBoxUnbreak = string . Empty ;
MainMergeDialog = string . Empty ;
WaveformVerticalZoom = "Shift+Add" ;
WaveformVerticalZoomOut = "Shift+Subtract" ;
WaveformPlaySelection = string . Empty ;
WaveformPlaySelectionEnd = string . Empty ;
2016-08-03 14:47:45 +02:00
GeneralGoToNextSubtitleAndFocusVideo = string . Empty ;
2017-01-11 21:24:34 +01:00
GeneralGoToPreviousSubtitleAndFocusVideo = string . Empty ;
2016-08-03 14:47:45 +02:00
GeneralExtendCurrentSubtitle = string . Empty ;
2016-10-18 11:50:28 +02:00
GeneralAutoCalcCurrentDuration = string . Empty ;
2016-02-08 21:11:03 +01:00
GeneralPlayFirstSelected = string . Empty ;
2016-10-02 19:28:58 +02:00
GeneralHelp = "F1" ;
2016-02-08 21:11:03 +01:00
WaveformSearchSilenceForward = string . Empty ;
WaveformSearchSilenceBack = string . Empty ;
WaveformAddTextHere = string . Empty ;
}
}
public class RemoveTextForHearingImpairedSettings
{
public bool RemoveTextBetweenBrackets { get ; set ; }
public bool RemoveTextBetweenParentheses { get ; set ; }
public bool RemoveTextBetweenCurlyBrackets { get ; set ; }
public bool RemoveTextBetweenQuestionMarks { get ; set ; }
public bool RemoveTextBetweenCustom { get ; set ; }
public string RemoveTextBetweenCustomBefore { get ; set ; }
public string RemoveTextBetweenCustomAfter { get ; set ; }
public bool RemoveTextBetweenOnlySeperateLines { get ; set ; }
public bool RemoveTextBeforeColon { get ; set ; }
public bool RemoveTextBeforeColonOnlyIfUppercase { get ; set ; }
public bool RemoveTextBeforeColonOnlyOnSeparateLine { get ; set ; }
public bool RemoveInterjections { get ; set ; }
2018-02-03 22:35:44 +01:00
public bool RemoveInterjectionsOnlyOnSeparateLine { get ; set ; }
2016-02-08 21:11:03 +01:00
public bool RemoveIfContains { get ; set ; }
public bool RemoveIfAllUppercase { get ; set ; }
public string RemoveIfContainsText { get ; set ; }
public RemoveTextForHearingImpairedSettings ( )
{
RemoveTextBetweenBrackets = true ;
RemoveTextBetweenParentheses = true ;
RemoveTextBetweenCurlyBrackets = true ;
RemoveTextBetweenQuestionMarks = true ;
RemoveTextBetweenCustom = false ;
RemoveTextBetweenCustomBefore = "¶" ;
RemoveTextBetweenCustomAfter = "¶" ;
RemoveTextBeforeColon = true ;
RemoveTextBeforeColonOnlyIfUppercase = true ;
RemoveIfContainsText = "¶" ;
}
}
public class SubtitleBeaming
{
public string FontName { get ; set ; }
public int FontSize { get ; set ; }
public Color FontColor { get ; set ; }
public Color BorderColor { get ; set ; }
public int BorderWidth { get ; set ; }
public SubtitleBeaming ( )
{
FontName = "Verdana" ;
FontSize = 30 ;
FontColor = Color . White ;
BorderColor = Color . DarkGray ;
BorderWidth = 2 ;
}
}
2016-10-10 17:00:08 +02:00
public class CompareSettings
{
public bool ShowOnlyDifferences { get ; set ; }
public bool OnlyLookForDifferenceInText { get ; set ; }
public bool IgnoreLineBreaks { get ; set ; }
public CompareSettings ( )
{
ShowOnlyDifferences = false ;
OnlyLookForDifferenceInText = true ;
IgnoreLineBreaks = false ;
}
}
2016-02-08 21:11:03 +01:00
public class Settings
{
2016-10-10 17:00:08 +02:00
public CompareSettings Compare { get ; set ; }
2016-02-08 21:11:03 +01:00
public RecentFilesSettings RecentFiles { get ; set ; }
public GeneralSettings General { get ; set ; }
public ToolsSettings Tools { get ; set ; }
2017-10-30 18:07:41 +01:00
public FcpExportSettings FcpExportSettings { get ; set ; }
2016-02-08 21:11:03 +01:00
public SubtitleSettings SubtitleSettings { get ; set ; }
public ProxySettings Proxy { get ; set ; }
public WordListSettings WordLists { get ; set ; }
public FixCommonErrorsSettings CommonErrors { get ; set ; }
public VobSubOcrSettings VobSubOcr { get ; set ; }
public VideoControlsSettings VideoControls { get ; set ; }
public NetworkSettings NetworkSettings { get ; set ; }
public Shortcuts Shortcuts { get ; set ; }
public RemoveTextForHearingImpairedSettings RemoveTextForHearingImpaired { get ; set ; }
2016-06-30 15:28:04 +02:00
public SubtitleBeaming SubtitleBeaming { get ; set ; }
2016-06-26 16:23:40 +02:00
public List < MultipleSearchAndReplaceGroup > MultipleSearchAndReplaceGroups { get ; set ; }
2016-02-08 21:11:03 +01:00
[XmlIgnore]
public Language Language { get ; set ; }
private Settings ( )
{
RecentFiles = new RecentFilesSettings ( ) ;
General = new GeneralSettings ( ) ;
Tools = new ToolsSettings ( ) ;
2017-10-30 18:07:41 +01:00
FcpExportSettings = new FcpExportSettings ( ) ;
2016-02-08 21:11:03 +01:00
WordLists = new WordListSettings ( ) ;
SubtitleSettings = new SubtitleSettings ( ) ;
Proxy = new ProxySettings ( ) ;
CommonErrors = new FixCommonErrorsSettings ( ) ;
VobSubOcr = new VobSubOcrSettings ( ) ;
VideoControls = new VideoControlsSettings ( ) ;
NetworkSettings = new NetworkSettings ( ) ;
2016-06-26 16:23:40 +02:00
MultipleSearchAndReplaceGroups = new List < MultipleSearchAndReplaceGroup > ( ) ;
2016-02-08 21:11:03 +01:00
Language = new Language ( ) ;
Shortcuts = new Shortcuts ( ) ;
RemoveTextForHearingImpaired = new RemoveTextForHearingImpairedSettings ( ) ;
SubtitleBeaming = new SubtitleBeaming ( ) ;
2016-10-10 17:00:08 +02:00
Compare = new CompareSettings ( ) ;
2016-02-08 21:11:03 +01:00
}
public void Save ( )
{
//this is too slow: Serialize(Configuration.SettingsFileName, this);
2016-11-03 19:29:49 +01:00
CustomSerialize ( Configuration . SettingsFileName , this ) ;
2016-02-08 21:11:03 +01:00
}
//private static void Serialize(string fileName, Settings settings)
//{
// var s = new XmlSerializer(typeof(Settings));
// TextWriter w = new StreamWriter(fileName);
// s.Serialize(w, settings);
// w.Close();
//}
public static Settings GetSettings ( )
{
var settings = new Settings ( ) ;
2016-11-03 19:29:49 +01:00
var settingsFileName = Configuration . SettingsFileName ;
2016-02-08 21:11:03 +01:00
if ( File . Exists ( settingsFileName ) )
{
try
{
//too slow... :( - settings = Deserialize(settingsFileName); // 688 msecs
settings = CustomDeserialize ( settingsFileName ) ; // 15 msecs
if ( settings . General . AutoConvertToUtf8 )
2016-05-20 00:46:02 +02:00
settings . General . DefaultEncoding = Encoding . UTF8 . WebName ;
2016-02-08 21:11:03 +01:00
}
2016-08-07 20:25:54 +02:00
catch
2016-02-08 21:11:03 +01:00
{
settings = new Settings ( ) ;
}
if ( ! string . IsNullOrEmpty ( settings . General . ListViewLineSeparatorString ) )
settings . General . ListViewLineSeparatorString = settings . General . ListViewLineSeparatorString . Replace ( "\n" , string . Empty ) . Replace ( "\r" , string . Empty ) ;
if ( string . IsNullOrWhiteSpace ( settings . General . ListViewLineSeparatorString ) )
settings . General . ListViewLineSeparatorString = "<br />" ;
if ( settings . Shortcuts . GeneralToggleTranslationMode = = "Control+U" & & settings . Shortcuts . MainTextBoxSelectionToLower = = "Control+U" )
{
settings . Shortcuts . GeneralToggleTranslationMode = "Control+Shift+O" ;
settings . Shortcuts . GeneralSwitchOriginalAndTranslation = "Control+Alt+O" ;
}
}
return settings ;
}
//private static Settings Deserialize(string fileName)
//{
// var r = new StreamReader(fileName);
// var s = new XmlSerializer(typeof(Settings));
// var settings = (Settings)s.Deserialize(r);
// r.Close();
// if (settings.RecentFiles == null)
// settings.RecentFiles = new RecentFilesSettings();
// if (settings.General == null)
// settings.General = new GeneralSettings();
// if (settings.SsaStyle == null)
// settings.SsaStyle = new SsaStyleSettings();
// if (settings.CommonErrors == null)
// settings.CommonErrors = new FixCommonErrorsSettings();
// if (settings.VideoControls == null)
// settings.VideoControls = new VideoControlsSettings();
// if (settings.VobSubOcr == null)
// settings.VobSubOcr = new VobSubOcrSettings();
// if (settings.MultipleSearchAndReplaceList == null)
// settings.MultipleSearchAndReplaceList = new List<MultipleSearchAndReplaceSetting>();
// if (settings.NetworkSettings == null)
// settings.NetworkSettings = new NetworkSettings();
// if (settings.Shortcuts == null)
// settings.Shortcuts = new Shortcuts();
// return settings;
//}
/// <summary>
/// A faster serializer than xml serializer... which is insanely slow (first time)!!!!
/// This method is auto-generated with XmlSerializerGenerator
/// </summary>
/// <param name="fileName">File name of xml settings file to load</param>
/// <returns>Newly loaded settings</returns>
private static Settings CustomDeserialize ( string fileName )
{
var doc = new XmlDocument { PreserveWhitespace = true } ;
2016-10-13 21:17:21 +02:00
using ( var stream = new FileStream ( fileName , FileMode . Open , FileAccess . Read , FileShare . ReadWrite ) )
{
doc . Load ( stream ) ;
}
2016-02-08 21:11:03 +01:00
var settings = new Settings ( ) ;
2016-10-11 17:47:04 +02:00
// Compare
2016-10-10 17:00:08 +02:00
XmlNode nodeCompare = doc . DocumentElement . SelectSingleNode ( "Compare" ) ;
if ( nodeCompare ! = null )
{
XmlNode xnode = nodeCompare . SelectSingleNode ( "ShowOnlyDifferences" ) ;
if ( xnode ! = null )
settings . Compare . ShowOnlyDifferences = Convert . ToBoolean ( xnode . InnerText ) ;
2016-10-13 06:08:16 +02:00
xnode = nodeCompare . SelectSingleNode ( "OnlyLookForDifferenceInText" ) ;
2016-10-10 17:00:08 +02:00
if ( xnode ! = null )
settings . Compare . OnlyLookForDifferenceInText = Convert . ToBoolean ( xnode . InnerText ) ;
2016-10-13 06:08:16 +02:00
xnode = nodeCompare . SelectSingleNode ( "IgnoreLineBreaks" ) ;
2016-10-10 17:00:08 +02:00
if ( xnode ! = null )
settings . Compare . IgnoreLineBreaks = Convert . ToBoolean ( xnode . InnerText ) ;
}
2016-10-11 17:47:04 +02:00
// Recent files
2016-02-08 21:11:03 +01:00
XmlNode node = doc . DocumentElement . SelectSingleNode ( "RecentFiles" ) ;
foreach ( XmlNode listNode in node . SelectNodes ( "FileNames/FileName" ) )
{
string firstVisibleIndex = "-1" ;
if ( listNode . Attributes [ "FirstVisibleIndex" ] ! = null )
firstVisibleIndex = listNode . Attributes [ "FirstVisibleIndex" ] . Value ;
string firstSelectedIndex = "-1" ;
if ( listNode . Attributes [ "FirstSelectedIndex" ] ! = null )
firstSelectedIndex = listNode . Attributes [ "FirstSelectedIndex" ] . Value ;
string videoFileName = null ;
if ( listNode . Attributes [ "VideoFileName" ] ! = null )
videoFileName = listNode . Attributes [ "VideoFileName" ] . Value ;
string originalFileName = null ;
if ( listNode . Attributes [ "OriginalFileName" ] ! = null )
originalFileName = listNode . Attributes [ "OriginalFileName" ] . Value ;
2016-04-13 08:41:06 +02:00
long videoOffset = 0 ;
if ( listNode . Attributes [ "VideoOffset" ] ! = null )
2016-04-16 17:25:34 +02:00
long . TryParse ( listNode . Attributes [ "VideoOffset" ] . Value , out videoOffset ) ;
2016-04-13 08:41:06 +02:00
settings . RecentFiles . Files . Add ( new RecentFileEntry { FileName = listNode . InnerText , FirstVisibleIndex = int . Parse ( firstVisibleIndex ) , FirstSelectedIndex = int . Parse ( firstSelectedIndex ) , VideoFileName = videoFileName , OriginalFileName = originalFileName , VideoOffsetInMs = videoOffset } ) ;
2016-02-08 21:11:03 +01:00
}
2016-10-11 17:47:04 +02:00
// General
2016-02-08 21:11:03 +01:00
node = doc . DocumentElement . SelectSingleNode ( "General" ) ;
XmlNode subNode = node . SelectSingleNode ( "ShowToolbarNew" ) ;
if ( subNode ! = null )
settings . General . ShowToolbarNew = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ShowToolbarOpen" ) ;
if ( subNode ! = null )
settings . General . ShowToolbarOpen = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ShowToolbarSave" ) ;
if ( subNode ! = null )
settings . General . ShowToolbarSave = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ShowToolbarSaveAs" ) ;
if ( subNode ! = null )
settings . General . ShowToolbarSaveAs = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ShowToolbarFind" ) ;
if ( subNode ! = null )
settings . General . ShowToolbarFind = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ShowToolbarReplace" ) ;
if ( subNode ! = null )
settings . General . ShowToolbarReplace = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ShowToolbarFixCommonErrors" ) ;
if ( subNode ! = null )
settings . General . ShowToolbarFixCommonErrors = Convert . ToBoolean ( subNode . InnerText ) ;
2016-07-24 08:46:58 +02:00
subNode = node . SelectSingleNode ( "ShowToolbarRemoveTextForHi" ) ;
if ( subNode ! = null )
settings . General . ShowToolbarRemoveTextForHi = Convert . ToBoolean ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "ShowToolbarVisualSync" ) ;
if ( subNode ! = null )
settings . General . ShowToolbarVisualSync = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ShowToolbarSpellCheck" ) ;
if ( subNode ! = null )
settings . General . ShowToolbarSpellCheck = Convert . ToBoolean ( subNode . InnerText ) ;
2016-12-21 10:10:20 +01:00
subNode = node . SelectSingleNode ( "ShowToolbarNetflixGlyphCheck" ) ;
if ( subNode ! = null )
settings . General . ShowToolbarNetflixGlyphCheck = Convert . ToBoolean ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "ShowToolbarSettings" ) ;
if ( subNode ! = null )
settings . General . ShowToolbarSettings = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ShowToolbarHelp" ) ;
if ( subNode ! = null )
settings . General . ShowToolbarHelp = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ShowFrameRate" ) ;
if ( subNode ! = null )
settings . General . ShowFrameRate = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ShowVideoPlayer" ) ;
if ( subNode ! = null )
settings . General . ShowVideoPlayer = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ShowAudioVisualizer" ) ;
if ( subNode ! = null )
settings . General . ShowAudioVisualizer = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ShowWaveform" ) ;
if ( subNode ! = null )
settings . General . ShowWaveform = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ShowSpectrogram" ) ;
if ( subNode ! = null )
settings . General . ShowSpectrogram = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "DefaultFrameRate" ) ;
if ( subNode ! = null )
{
settings . General . DefaultFrameRate = Convert . ToDouble ( subNode . InnerText , CultureInfo . InvariantCulture ) ;
if ( settings . General . DefaultFrameRate > 23975 )
settings . General . DefaultFrameRate = 23.976 ;
settings . General . CurrentFrameRate = settings . General . DefaultFrameRate ;
}
subNode = node . SelectSingleNode ( "DefaultSubtitleFormat" ) ;
if ( subNode ! = null )
settings . General . DefaultSubtitleFormat = subNode . InnerText ;
subNode = node . SelectSingleNode ( "DefaultEncoding" ) ;
if ( subNode ! = null )
settings . General . DefaultEncoding = subNode . InnerText ;
subNode = node . SelectSingleNode ( "AutoConvertToUtf8" ) ;
if ( subNode ! = null )
settings . General . AutoConvertToUtf8 = Convert . ToBoolean ( subNode . InnerText ) ;
2017-01-29 13:42:45 +01:00
subNode = node . SelectSingleNode ( "WriteUtf8Bom" ) ;
if ( subNode ! = null )
settings . General . WriteUtf8Bom = Convert . ToBoolean ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "AutoGuessAnsiEncoding" ) ;
if ( subNode ! = null )
settings . General . AutoGuessAnsiEncoding = Convert . ToBoolean ( subNode . InnerText ) ;
2017-10-01 09:26:06 +02:00
subNode = node . SelectSingleNode ( "SystemSubtitleFontNameOverride" ) ;
if ( subNode ! = null )
settings . General . SystemSubtitleFontNameOverride = subNode . InnerText ;
subNode = node . SelectSingleNode ( "SystemSubtitleFontSizeOverride" ) ;
if ( subNode ! = null & & ! string . IsNullOrEmpty ( subNode . InnerText ) )
settings . General . SystemSubtitleFontSizeOverride = Convert . ToInt32 ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "_subtitleFontName" ) ;
if ( subNode ! = null )
settings . General . SubtitleFontName = subNode . InnerText ;
subNode = node . SelectSingleNode ( "SubtitleFontSize" ) ;
if ( subNode ! = null )
settings . General . SubtitleFontSize = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SubtitleFontBold" ) ;
if ( subNode ! = null )
settings . General . SubtitleFontBold = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SubtitleFontColor" ) ;
if ( subNode ! = null )
settings . General . SubtitleFontColor = Color . FromArgb ( Convert . ToInt32 ( subNode . InnerText ) ) ;
subNode = node . SelectSingleNode ( "SubtitleBackgroundColor" ) ;
if ( subNode ! = null )
settings . General . SubtitleBackgroundColor = Color . FromArgb ( Convert . ToInt32 ( subNode . InnerText ) ) ;
subNode = node . SelectSingleNode ( "CenterSubtitleInTextBox" ) ;
if ( subNode ! = null )
settings . General . CenterSubtitleInTextBox = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ShowRecentFiles" ) ;
if ( subNode ! = null )
settings . General . ShowRecentFiles = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "RememberSelectedLine" ) ;
if ( subNode ! = null )
settings . General . RememberSelectedLine = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "StartLoadLastFile" ) ;
if ( subNode ! = null )
settings . General . StartLoadLastFile = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "StartRememberPositionAndSize" ) ;
if ( subNode ! = null )
settings . General . StartRememberPositionAndSize = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "StartPosition" ) ;
if ( subNode ! = null )
settings . General . StartPosition = subNode . InnerText ;
subNode = node . SelectSingleNode ( "StartSize" ) ;
if ( subNode ! = null )
settings . General . StartSize = subNode . InnerText ;
subNode = node . SelectSingleNode ( "SplitContainerMainSplitterDistance" ) ;
if ( subNode ! = null )
settings . General . SplitContainerMainSplitterDistance = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SplitContainer1SplitterDistance" ) ;
if ( subNode ! = null )
settings . General . SplitContainer1SplitterDistance = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SplitContainerListViewAndTextSplitterDistance" ) ;
if ( subNode ! = null )
settings . General . SplitContainerListViewAndTextSplitterDistance = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "StartInSourceView" ) ;
if ( subNode ! = null )
settings . General . StartInSourceView = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "RemoveBlankLinesWhenOpening" ) ;
if ( subNode ! = null )
settings . General . RemoveBlankLinesWhenOpening = Convert . ToBoolean ( subNode . InnerText ) ;
2018-02-06 17:10:38 +01:00
subNode = node . SelectSingleNode ( "RemoveBadCharsWhenOpening" ) ;
if ( subNode ! = null )
settings . General . RemoveBadCharsWhenOpening = Convert . ToBoolean ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "SubtitleLineMaximumLength" ) ;
if ( subNode ! = null )
settings . General . SubtitleLineMaximumLength = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SubtitleMinimumDisplayMilliseconds" ) ;
if ( subNode ! = null )
settings . General . SubtitleMinimumDisplayMilliseconds = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SubtitleMaximumDisplayMilliseconds" ) ;
if ( subNode ! = null )
settings . General . SubtitleMaximumDisplayMilliseconds = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "MinimumMillisecondsBetweenLines" ) ;
if ( subNode = = null ) // TODO: Remove in 3.5
subNode = node . SelectSingleNode ( "MininumMillisecondsBetweenLines" ) ;
if ( subNode ! = null )
settings . General . MinimumMillisecondsBetweenLines = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SetStartEndHumanDelay" ) ;
if ( subNode ! = null )
settings . General . SetStartEndHumanDelay = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "AutoWrapLineWhileTyping" ) ;
if ( subNode ! = null )
settings . General . AutoWrapLineWhileTyping = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SubtitleMaximumCharactersPerSeconds" ) ;
if ( subNode ! = null )
settings . General . SubtitleMaximumCharactersPerSeconds = Convert . ToDouble ( subNode . InnerText , CultureInfo . InvariantCulture ) ;
subNode = node . SelectSingleNode ( "SubtitleOptimalCharactersPerSeconds" ) ;
if ( subNode ! = null )
settings . General . SubtitleOptimalCharactersPerSeconds = Convert . ToDouble ( subNode . InnerText , CultureInfo . InvariantCulture ) ;
2017-03-03 15:40:48 +01:00
subNode = node . SelectSingleNode ( "CharactersPerSecondsIgnoreWhiteSpace" ) ;
if ( subNode ! = null )
settings . General . CharactersPerSecondsIgnoreWhiteSpace = Convert . ToBoolean ( subNode . InnerText ) ;
2017-01-15 09:46:26 +01:00
subNode = node . SelectSingleNode ( "SubtitleMaximumWordsPerMinute" ) ;
if ( subNode ! = null )
settings . General . SubtitleMaximumWordsPerMinute = Convert . ToDouble ( subNode . InnerText , CultureInfo . InvariantCulture ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "SpellCheckLanguage" ) ;
if ( subNode ! = null )
settings . General . SpellCheckLanguage = subNode . InnerText ;
subNode = node . SelectSingleNode ( "VideoPlayer" ) ;
if ( subNode ! = null )
settings . General . VideoPlayer = subNode . InnerText ;
subNode = node . SelectSingleNode ( "VideoPlayerDefaultVolume" ) ;
if ( subNode ! = null )
settings . General . VideoPlayerDefaultVolume = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "VideoPlayerPreviewFontSize" ) ;
if ( subNode ! = null )
settings . General . VideoPlayerPreviewFontSize = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "VideoPlayerPreviewFontBold" ) ;
if ( subNode ! = null )
settings . General . VideoPlayerPreviewFontBold = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "VideoPlayerShowStopButton" ) ;
if ( subNode ! = null )
settings . General . VideoPlayerShowStopButton = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "VideoPlayerShowMuteButton" ) ;
if ( subNode ! = null )
settings . General . VideoPlayerShowMuteButton = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "VideoPlayerShowFullscreenButton" ) ;
if ( subNode ! = null )
settings . General . VideoPlayerShowFullscreenButton = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "Language" ) ;
if ( subNode ! = null )
settings . General . Language = subNode . InnerText ;
subNode = node . SelectSingleNode ( "ListViewLineSeparatorString" ) ;
if ( subNode ! = null )
settings . General . ListViewLineSeparatorString = subNode . InnerText ;
subNode = node . SelectSingleNode ( "ListViewDoubleClickAction" ) ;
if ( subNode ! = null )
settings . General . ListViewDoubleClickAction = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "UppercaseLetters" ) ;
if ( subNode ! = null )
settings . General . UppercaseLetters = subNode . InnerText ;
subNode = node . SelectSingleNode ( "DefaultAdjustMilliseconds" ) ;
if ( subNode ! = null )
settings . General . DefaultAdjustMilliseconds = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "AutoRepeatOn" ) ;
if ( subNode ! = null )
settings . General . AutoRepeatOn = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "AutoRepeatCount" ) ;
if ( subNode ! = null )
settings . General . AutoRepeatCount = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SyncListViewWithVideoWhilePlaying" ) ;
if ( subNode ! = null )
settings . General . SyncListViewWithVideoWhilePlaying = Convert . ToBoolean ( subNode . InnerText ) ;
2017-10-10 18:08:33 +02:00
subNode = node . SelectSingleNode ( "AutoContinueDelay" ) ;
if ( subNode ! = null )
settings . General . AutoContinueDelay = Convert . ToInt32 ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "AutoContinueOn" ) ;
if ( subNode ! = null )
settings . General . AutoContinueOn = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "AutoBackupSeconds" ) ;
if ( subNode ! = null )
settings . General . AutoBackupSeconds = Convert . ToInt32 ( subNode . InnerText ) ;
2016-07-09 12:00:30 +02:00
subNode = node . SelectSingleNode ( "AutoBackupDeleteAfterMonths" ) ;
if ( subNode ! = null )
settings . General . AutoBackupDeleteAfterMonths = Convert . ToInt32 ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "SpellChecker" ) ;
if ( subNode ! = null )
settings . General . SpellChecker = subNode . InnerText ;
subNode = node . SelectSingleNode ( "AllowEditOfOriginalSubtitle" ) ;
if ( subNode ! = null )
settings . General . AllowEditOfOriginalSubtitle = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "PromptDeleteLines" ) ;
if ( subNode ! = null )
settings . General . PromptDeleteLines = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "Undocked" ) ;
if ( subNode ! = null )
settings . General . Undocked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "UndockedVideoPosition" ) ;
if ( subNode ! = null )
settings . General . UndockedVideoPosition = subNode . InnerText ;
subNode = node . SelectSingleNode ( "UndockedWaveformPosition" ) ;
if ( subNode ! = null )
settings . General . UndockedWaveformPosition = subNode . InnerText ;
subNode = node . SelectSingleNode ( "UndockedVideoControlsPosition" ) ;
if ( subNode ! = null )
settings . General . UndockedVideoControlsPosition = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformCenter" ) ;
if ( subNode ! = null )
settings . General . WaveformCenter = Convert . ToBoolean ( subNode . InnerText ) ;
2016-06-13 19:27:24 +02:00
subNode = node . SelectSingleNode ( "WaveformUpdateIntervalMs" ) ;
if ( subNode ! = null )
settings . General . WaveformUpdateIntervalMs = Convert . ToInt32 ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "SmallDelayMilliseconds" ) ;
if ( subNode ! = null )
settings . General . SmallDelayMilliseconds = Convert . ToInt32 ( ( subNode . InnerText ) ) ;
subNode = node . SelectSingleNode ( "LargeDelayMilliseconds" ) ;
if ( subNode ! = null )
settings . General . LargeDelayMilliseconds = Convert . ToInt32 ( ( subNode . InnerText ) ) ;
subNode = node . SelectSingleNode ( "ShowOriginalAsPreviewIfAvailable" ) ;
if ( subNode ! = null )
settings . General . ShowOriginalAsPreviewIfAvailable = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "LastPacCodePage" ) ;
if ( subNode ! = null )
settings . General . LastPacCodePage = Convert . ToInt32 ( ( subNode . InnerText ) ) ;
subNode = node . SelectSingleNode ( "OpenSubtitleExtraExtensions" ) ;
if ( subNode ! = null )
settings . General . OpenSubtitleExtraExtensions = subNode . InnerText . Trim ( ) ;
subNode = node . SelectSingleNode ( "ListViewColumnsRememberSize" ) ;
if ( subNode ! = null )
settings . General . ListViewColumnsRememberSize = Convert . ToBoolean ( subNode . InnerText . Trim ( ) ) ;
subNode = node . SelectSingleNode ( "ListViewNumberWidth" ) ;
if ( subNode ! = null )
settings . General . ListViewNumberWidth = Convert . ToInt32 ( subNode . InnerText . Trim ( ) ) ;
subNode = node . SelectSingleNode ( "ListViewStartWidth" ) ;
if ( subNode ! = null )
settings . General . ListViewStartWidth = Convert . ToInt32 ( subNode . InnerText . Trim ( ) ) ;
subNode = node . SelectSingleNode ( "ListViewEndWidth" ) ;
if ( subNode ! = null )
settings . General . ListViewEndWidth = Convert . ToInt32 ( subNode . InnerText . Trim ( ) ) ;
subNode = node . SelectSingleNode ( "ListViewDurationWidth" ) ;
if ( subNode ! = null )
settings . General . ListViewDurationWidth = Convert . ToInt32 ( subNode . InnerText . Trim ( ) ) ;
2017-01-15 09:46:26 +01:00
subNode = node . SelectSingleNode ( "ListViewCpsWidth" ) ;
if ( subNode ! = null )
settings . General . ListViewCpsWidth = Convert . ToInt32 ( subNode . InnerText . Trim ( ) ) ;
subNode = node . SelectSingleNode ( "ListViewWpmWidth" ) ;
if ( subNode ! = null )
settings . General . ListViewWpmWidth = Convert . ToInt32 ( subNode . InnerText . Trim ( ) ) ;
2017-11-06 18:22:49 +01:00
subNode = node . SelectSingleNode ( "ListViewGapWidth" ) ;
if ( subNode ! = null )
settings . General . ListViewGapWidth = Convert . ToInt32 ( subNode . InnerText . Trim ( ) ) ;
2017-04-16 10:03:10 +02:00
subNode = node . SelectSingleNode ( "ListViewActorWidth" ) ;
if ( subNode ! = null )
settings . General . ListViewActorWidth = Convert . ToInt32 ( subNode . InnerText . Trim ( ) ) ;
2017-04-26 18:51:34 +02:00
subNode = node . SelectSingleNode ( "ListViewRegionWidth" ) ;
if ( subNode ! = null )
settings . General . ListViewRegionWidth = Convert . ToInt32 ( subNode . InnerText . Trim ( ) ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "ListViewTextWidth" ) ;
if ( subNode ! = null )
settings . General . ListViewTextWidth = Convert . ToInt32 ( subNode . InnerText . Trim ( ) ) ;
subNode = node . SelectSingleNode ( "VlcWaveTranscodeSettings" ) ;
if ( subNode ! = null )
settings . General . VlcWaveTranscodeSettings = subNode . InnerText . Trim ( ) ;
subNode = node . SelectSingleNode ( "VlcLocation" ) ;
if ( subNode ! = null )
settings . General . VlcLocation = subNode . InnerText . Trim ( ) ;
subNode = node . SelectSingleNode ( "VlcLocationRelative" ) ;
if ( subNode ! = null )
settings . General . VlcLocationRelative = subNode . InnerText . Trim ( ) ;
2016-02-28 10:58:19 +01:00
subNode = node . SelectSingleNode ( "MpvVideoOutput" ) ;
if ( subNode ! = null )
settings . General . MpvVideoOutput = subNode . InnerText . Trim ( ) ;
2017-02-09 21:14:48 +01:00
subNode = node . SelectSingleNode ( "MpvHandlesPreviewText" ) ;
if ( subNode ! = null )
settings . General . MpvHandlesPreviewText = Convert . ToBoolean ( subNode . InnerText . Trim ( ) ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "MpcHcLocation" ) ;
if ( subNode ! = null )
settings . General . MpcHcLocation = subNode . InnerText . Trim ( ) ;
subNode = node . SelectSingleNode ( "UseFFmpegForWaveExtraction" ) ;
if ( subNode ! = null )
settings . General . UseFFmpegForWaveExtraction = Convert . ToBoolean ( subNode . InnerText . Trim ( ) ) ;
subNode = node . SelectSingleNode ( "FFmpegLocation" ) ;
if ( subNode ! = null )
settings . General . FFmpegLocation = subNode . InnerText . Trim ( ) ;
subNode = node . SelectSingleNode ( "UseTimeFormatHHMMSSFF" ) ;
if ( subNode ! = null )
settings . General . UseTimeFormatHHMMSSFF = Convert . ToBoolean ( subNode . InnerText . Trim ( ) ) ;
subNode = node . SelectSingleNode ( "ClearStatusBarAfterSeconds" ) ;
if ( subNode ! = null )
settings . General . ClearStatusBarAfterSeconds = Convert . ToInt32 ( subNode . InnerText . Trim ( ) ) ;
subNode = node . SelectSingleNode ( "Company" ) ;
if ( subNode ! = null )
settings . General . Company = subNode . InnerText ;
subNode = node . SelectSingleNode ( "DisableVideoAutoLoading" ) ;
if ( subNode ! = null )
settings . General . DisableVideoAutoLoading = Convert . ToBoolean ( subNode . InnerText . Trim ( ) ) ;
subNode = node . SelectSingleNode ( "RightToLeftMode" ) ;
if ( subNode ! = null )
settings . General . RightToLeftMode = Convert . ToBoolean ( subNode . InnerText . Trim ( ) ) ;
subNode = node . SelectSingleNode ( "LastSaveAsFormat" ) ;
if ( subNode ! = null )
settings . General . LastSaveAsFormat = subNode . InnerText . Trim ( ) ;
subNode = node . SelectSingleNode ( "CheckForUpdates" ) ;
if ( subNode ! = null )
settings . General . CheckForUpdates = Convert . ToBoolean ( subNode . InnerText . Trim ( ) ) ;
subNode = node . SelectSingleNode ( "LastCheckForUpdates" ) ;
if ( subNode ! = null )
settings . General . LastCheckForUpdates = Convert . ToDateTime ( subNode . InnerText . Trim ( ) ) ;
subNode = node . SelectSingleNode ( "ShowProgress" ) ;
if ( subNode ! = null )
settings . General . ShowProgress = Convert . ToBoolean ( subNode . InnerText . Trim ( ) ) ;
2017-11-13 16:17:22 +01:00
subNode = node . SelectSingleNode ( "UseDarkTheme" ) ;
if ( subNode ! = null )
settings . General . UseDarkTheme = Convert . ToBoolean ( subNode . InnerText . Trim ( ) ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "ShowBetaStuff" ) ;
if ( subNode ! = null )
settings . General . ShowBetaStuff = Convert . ToBoolean ( subNode . InnerText . Trim ( ) ) ;
subNode = node . SelectSingleNode ( "NewEmptyDefaultMs" ) ;
if ( subNode ! = null )
settings . General . NewEmptyDefaultMs = Convert . ToInt32 ( subNode . InnerText . Trim ( ) ) ;
subNode = node . SelectSingleNode ( "MoveVideo100Or500MsPlaySmallSample" ) ;
if ( subNode ! = null )
settings . General . MoveVideo100Or500MsPlaySmallSample = Convert . ToBoolean ( subNode . InnerText . Trim ( ) ) ;
2016-10-11 17:47:04 +02:00
// Tools
2016-02-08 21:11:03 +01:00
node = doc . DocumentElement . SelectSingleNode ( "Tools" ) ;
subNode = node . SelectSingleNode ( "StartSceneIndex" ) ;
if ( subNode ! = null )
settings . Tools . StartSceneIndex = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "EndSceneIndex" ) ;
if ( subNode ! = null )
settings . Tools . EndSceneIndex = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "VerifyPlaySeconds" ) ;
if ( subNode ! = null )
settings . Tools . VerifyPlaySeconds = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "MergeLinesShorterThan" ) ;
if ( subNode ! = null )
settings . Tools . MergeLinesShorterThan = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "FixShortDisplayTimesAllowMoveStartTime" ) ;
if ( subNode ! = null )
settings . Tools . FixShortDisplayTimesAllowMoveStartTime = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "MusicSymbol" ) ;
if ( subNode ! = null )
settings . Tools . MusicSymbol = subNode . InnerText ;
2018-01-02 15:07:52 +01:00
subNode = node . SelectSingleNode ( "MusicSymbolReplace" ) ;
2016-02-08 21:11:03 +01:00
if ( subNode ! = null )
2018-01-02 15:07:52 +01:00
settings . Tools . MusicSymbolReplace = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "UnicodeSymbolsToInsert" ) ;
if ( subNode ! = null )
settings . Tools . UnicodeSymbolsToInsert = subNode . InnerText ;
subNode = node . SelectSingleNode ( "SpellCheckAutoChangeNames" ) ;
if ( subNode ! = null )
settings . Tools . SpellCheckAutoChangeNames = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SpellCheckOneLetterWords" ) ;
if ( subNode ! = null )
settings . Tools . SpellCheckOneLetterWords = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SpellCheckEnglishAllowInQuoteAsIng" ) ;
if ( subNode ! = null )
settings . Tools . SpellCheckEnglishAllowInQuoteAsIng = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SpellCheckShowCompletedMessage" ) ;
if ( subNode ! = null )
settings . Tools . SpellCheckShowCompletedMessage = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "OcrFixUseHardcodedRules" ) ;
if ( subNode ! = null )
settings . Tools . OcrFixUseHardcodedRules = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "Interjections" ) ;
if ( subNode ! = null )
settings . Tools . Interjections = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MicrosoftBingApiId" ) ;
if ( subNode ! = null )
settings . Tools . MicrosoftBingApiId = subNode . InnerText ;
2017-09-23 08:57:27 +02:00
subNode = node . SelectSingleNode ( "MicrosoftTranslatorApiKey" ) ;
2016-03-07 19:07:01 +01:00
if ( subNode ! = null )
2017-09-23 08:57:27 +02:00
settings . Tools . MicrosoftTranslatorApiKey = subNode . InnerText ;
2017-06-12 20:08:20 +02:00
subNode = node . SelectSingleNode ( "GoogleTranslateUrl" ) ;
if ( subNode ! = null )
settings . Tools . GoogleTranslateUrl = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "GoogleApiKey" ) ;
if ( subNode ! = null )
settings . Tools . GoogleApiKey = subNode . InnerText ;
subNode = node . SelectSingleNode ( "UseGooleApiPaidService" ) ;
if ( subNode ! = null )
settings . Tools . UseGooleApiPaidService = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "GoogleTranslateLastTargetLanguage" ) ;
if ( subNode ! = null )
settings . Tools . GoogleTranslateLastTargetLanguage = subNode . InnerText ;
2016-05-16 20:36:10 +02:00
subNode = node . SelectSingleNode ( "TranslateAutoSplit" ) ;
if ( subNode ! = null )
settings . Tools . TranslateAutoSplit = Convert . ToBoolean ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "ListViewSyntaxColorDurationSmall" ) ;
if ( subNode ! = null )
settings . Tools . ListViewSyntaxColorDurationSmall = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ListViewSyntaxColorDurationBig" ) ;
if ( subNode ! = null )
settings . Tools . ListViewSyntaxColorDurationBig = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ListViewSyntaxColorLongLines" ) ;
if ( subNode ! = null )
settings . Tools . ListViewSyntaxColorLongLines = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ListViewSyntaxMoreThanXLines" ) ;
if ( subNode ! = null )
settings . Tools . ListViewSyntaxMoreThanXLines = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ListViewSyntaxMoreThanXLinesX" ) ;
if ( subNode ! = null )
settings . Tools . ListViewSyntaxMoreThanXLinesX = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ListViewSyntaxColorOverlap" ) ;
if ( subNode ! = null )
settings . Tools . ListViewSyntaxColorOverlap = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ListViewSyntaxErrorColor" ) ;
if ( subNode ! = null )
settings . Tools . ListViewSyntaxErrorColor = Color . FromArgb ( int . Parse ( subNode . InnerText ) ) ;
subNode = node . SelectSingleNode ( "ListViewUnfocusedSelectedColor" ) ;
if ( subNode ! = null )
settings . Tools . ListViewUnfocusedSelectedColor = Color . FromArgb ( int . Parse ( subNode . InnerText ) ) ;
2017-02-23 08:52:49 +01:00
subNode = node . SelectSingleNode ( "ListViewShowColumnEndTime" ) ;
if ( subNode ! = null )
settings . Tools . ListViewShowColumnEndTime = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ListViewShowColumnDuration" ) ;
if ( subNode ! = null )
settings . Tools . ListViewShowColumnDuration = Convert . ToBoolean ( subNode . InnerText ) ;
2017-01-15 09:46:26 +01:00
subNode = node . SelectSingleNode ( "ListViewShowColumnCharsPerSec" ) ;
if ( subNode ! = null )
settings . Tools . ListViewShowColumnCharsPerSec = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ListViewShowColumnWordsPerMin" ) ;
if ( subNode ! = null )
settings . Tools . ListViewShowColumnWordsPerMin = Convert . ToBoolean ( subNode . InnerText ) ;
2017-11-06 18:22:49 +01:00
subNode = node . SelectSingleNode ( "ListViewShowColumnGap" ) ;
if ( subNode ! = null )
settings . Tools . ListViewShowColumnGap = Convert . ToBoolean ( subNode . InnerText ) ;
2017-04-16 10:03:10 +02:00
subNode = node . SelectSingleNode ( "ListViewShowColumnActor" ) ;
if ( subNode ! = null )
settings . Tools . ListViewShowColumnActor = Convert . ToBoolean ( subNode . InnerText ) ;
2017-04-26 18:51:34 +02:00
subNode = node . SelectSingleNode ( "ListViewShowColumnRegion" ) ;
if ( subNode ! = null )
settings . Tools . ListViewShowColumnRegion = Convert . ToBoolean ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "SplitAdvanced" ) ;
if ( subNode ! = null )
settings . Tools . SplitAdvanced = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SplitOutputFolder" ) ;
if ( subNode ! = null )
settings . Tools . SplitOutputFolder = subNode . InnerText ;
subNode = node . SelectSingleNode ( "SplitNumberOfParts" ) ;
if ( subNode ! = null )
settings . Tools . SplitNumberOfParts = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SplitVia" ) ;
if ( subNode ! = null )
settings . Tools . SplitVia = subNode . InnerText ;
subNode = node . SelectSingleNode ( "NewEmptyTranslationText" ) ;
if ( subNode ! = null )
settings . Tools . NewEmptyTranslationText = subNode . InnerText ;
subNode = node . SelectSingleNode ( "BatchConvertOutputFolder" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertOutputFolder = subNode . InnerText ;
subNode = node . SelectSingleNode ( "BatchConvertOverwriteExisting" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertOverwriteExisting = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "BatchConvertOverwriteOriginal" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertOverwriteOriginal = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "BatchConvertRemoveFormatting" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertRemoveFormatting = Convert . ToBoolean ( subNode . InnerText ) ;
2017-09-03 15:29:43 +02:00
subNode = node . SelectSingleNode ( "BatchConvertBridgeGaps" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertBridgeGaps = Convert . ToBoolean ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "BatchConvertFixCasing" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertFixCasing = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "BatchConvertRemoveTextForHI" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertRemoveTextForHI = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "BatchConvertFixCommonErrors" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertFixCommonErrors = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "BatchConvertMultipleReplace" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertMultipleReplace = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "BatchConvertAutoBalance" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertAutoBalance = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "BatchConvertSplitLongLines" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertSplitLongLines = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "BatchConvertSetMinDisplayTimeBetweenSubtitles" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertSetMinDisplayTimeBetweenSubtitles = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "BatchConvertLanguage" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertLanguage = subNode . InnerText ;
subNode = node . SelectSingleNode ( "BatchConvertFormat" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertFormat = subNode . InnerText ;
subNode = node . SelectSingleNode ( "BatchConvertAssStyles" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertAssStyles = subNode . InnerText ;
subNode = node . SelectSingleNode ( "BatchConvertSsaStyles" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertSsaStyles = subNode . InnerText ;
2017-07-27 13:31:54 +02:00
subNode = node . SelectSingleNode ( "BatchConvertUseStyleFromSource" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertUseStyleFromSource = Convert . ToBoolean ( subNode . InnerText ) ;
2016-11-29 17:35:00 +01:00
subNode = node . SelectSingleNode ( "BatchConvertExportCustomTextTemplate" ) ;
if ( subNode ! = null )
settings . Tools . BatchConvertExportCustomTextTemplate = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "ModifySelectionRule" ) ;
if ( subNode ! = null )
settings . Tools . ModifySelectionRule = subNode . InnerText ;
subNode = node . SelectSingleNode ( "ModifySelectionText" ) ;
if ( subNode ! = null )
settings . Tools . ModifySelectionText = subNode . InnerText ;
subNode = node . SelectSingleNode ( "ModifySelectionCaseSensitive" ) ;
if ( subNode ! = null )
settings . Tools . ModifySelectionCaseSensitive = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportVobSubFontName" ) ;
if ( subNode ! = null )
settings . Tools . ExportVobSubFontName = subNode . InnerText ;
subNode = node . SelectSingleNode ( "ExportVobSubFontSize" ) ;
if ( subNode ! = null )
settings . Tools . ExportVobSubFontSize = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportVobSubVideoResolution" ) ;
if ( subNode ! = null )
settings . Tools . ExportVobSubVideoResolution = subNode . InnerText ;
subNode = node . SelectSingleNode ( "ExportVobSubSimpleRendering" ) ;
if ( subNode ! = null )
settings . Tools . ExportVobSubSimpleRendering = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportVobAntiAliasingWithTransparency" ) ;
if ( subNode ! = null )
settings . Tools . ExportVobAntiAliasingWithTransparency = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportVobSubLanguage" ) ;
if ( subNode ! = null )
settings . Tools . ExportVobSubLanguage = subNode . InnerText ;
subNode = node . SelectSingleNode ( "ExportBluRayFontName" ) ;
if ( subNode ! = null )
settings . Tools . ExportBluRayFontName = subNode . InnerText ;
subNode = node . SelectSingleNode ( "ExportBluRayFontSize" ) ;
if ( subNode ! = null )
settings . Tools . ExportBluRayFontSize = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportFcpFontName" ) ;
if ( subNode ! = null )
settings . Tools . ExportFcpFontName = subNode . InnerText ;
subNode = node . SelectSingleNode ( "ExportFontNameOther" ) ;
if ( subNode ! = null )
settings . Tools . ExportFontNameOther = subNode . InnerText ;
subNode = node . SelectSingleNode ( "ExportFcpFontSize" ) ;
if ( subNode ! = null )
settings . Tools . ExportFcpFontSize = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportFcpImageType" ) ;
if ( subNode ! = null )
settings . Tools . ExportFcpImageType = subNode . InnerText ;
2016-08-07 18:08:39 +02:00
subNode = node . SelectSingleNode ( "ExportFcpPalNtsc" ) ;
if ( subNode ! = null )
settings . Tools . ExportFcpPalNtsc = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "ExportBdnXmlImageType" ) ;
if ( subNode ! = null )
settings . Tools . ExportBdnXmlImageType = subNode . InnerText ;
subNode = node . SelectSingleNode ( "ExportLastFontSize" ) ;
if ( subNode ! = null )
settings . Tools . ExportLastFontSize = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportLastLineHeight" ) ;
if ( subNode ! = null )
settings . Tools . ExportLastLineHeight = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportLastBorderWidth" ) ;
if ( subNode ! = null )
settings . Tools . ExportLastBorderWidth = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportLastFontBold" ) ;
if ( subNode ! = null )
settings . Tools . ExportLastFontBold = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportBluRayVideoResolution" ) ;
if ( subNode ! = null )
settings . Tools . ExportBluRayVideoResolution = subNode . InnerText ;
2016-05-30 16:09:39 +02:00
subNode = node . SelectSingleNode ( "ExportFcpVideoResolution" ) ;
if ( subNode ! = null )
settings . Tools . ExportFcpVideoResolution = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "ExportFontColor" ) ;
if ( subNode ! = null )
settings . Tools . ExportFontColor = Color . FromArgb ( int . Parse ( subNode . InnerText ) ) ;
subNode = node . SelectSingleNode ( "ExportBorderColor" ) ;
if ( subNode ! = null )
settings . Tools . ExportBorderColor = Color . FromArgb ( int . Parse ( subNode . InnerText ) ) ;
subNode = node . SelectSingleNode ( "ExportShadowColor" ) ;
if ( subNode ! = null )
settings . Tools . ExportShadowColor = Color . FromArgb ( int . Parse ( subNode . InnerText ) ) ;
2017-09-29 21:26:00 +02:00
subNode = node . SelectSingleNode ( "ExportBoxBorderSize" ) ;
if ( subNode ! = null )
settings . Tools . ExportBoxBorderSize = int . Parse ( subNode . InnerText ) ;
2017-06-15 13:37:13 +02:00
subNode = node . SelectSingleNode ( "ExportBottomMarginUnit" ) ;
if ( subNode ! = null )
settings . Tools . ExportBottomMarginUnit = subNode . InnerText ;
2017-04-14 11:54:42 +02:00
subNode = node . SelectSingleNode ( "ExportBottomMarginPercent" ) ;
2016-02-08 21:11:03 +01:00
if ( subNode ! = null )
2017-04-14 11:54:42 +02:00
settings . Tools . ExportBottomMarginPercent = int . Parse ( subNode . InnerText ) ;
2017-06-15 13:37:13 +02:00
subNode = node . SelectSingleNode ( "ExportBottomMarginPixels" ) ;
if ( subNode ! = null )
settings . Tools . ExportBottomMarginPercent = int . Parse ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportLeftRightMarginUnit" ) ;
if ( subNode ! = null )
settings . Tools . ExportLeftRightMarginUnit = subNode . InnerText ;
2017-04-14 11:54:42 +02:00
subNode = node . SelectSingleNode ( "ExportLeftRightMarginPercent" ) ;
2016-10-06 22:49:56 +02:00
if ( subNode ! = null )
2017-04-14 11:54:42 +02:00
settings . Tools . ExportLeftRightMarginPercent = int . Parse ( subNode . InnerText ) ;
2017-06-15 13:37:13 +02:00
subNode = node . SelectSingleNode ( "ExportLeftRightMarginPixels" ) ;
if ( subNode ! = null )
settings . Tools . ExportLeftRightMarginPixels = int . Parse ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "ExportHorizontalAlignment" ) ;
if ( subNode ! = null )
settings . Tools . ExportHorizontalAlignment = int . Parse ( subNode . InnerText ) ;
2017-04-14 11:54:42 +02:00
subNode = node . SelectSingleNode ( "ExportBluRayBottomMarginPercent" ) ;
2016-02-08 21:11:03 +01:00
if ( subNode ! = null )
2017-04-14 11:54:42 +02:00
settings . Tools . ExportBluRayBottomMarginPercent = int . Parse ( subNode . InnerText ) ;
2017-06-15 13:37:13 +02:00
subNode = node . SelectSingleNode ( "ExportBluRayBottomMarginPixels" ) ;
if ( subNode ! = null )
settings . Tools . ExportBluRayBottomMarginPixels = int . Parse ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "ExportBluRayShadow" ) ;
if ( subNode ! = null )
settings . Tools . ExportBluRayShadow = int . Parse ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "Export3DType" ) ;
if ( subNode ! = null )
settings . Tools . Export3DType = int . Parse ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "Export3DDepth" ) ;
if ( subNode ! = null )
settings . Tools . Export3DDepth = int . Parse ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportLastShadowTransparency" ) ;
if ( subNode ! = null )
settings . Tools . ExportLastShadowTransparency = int . Parse ( subNode . InnerText , CultureInfo . InvariantCulture ) ;
subNode = node . SelectSingleNode ( "ExportLastFrameRate" ) ;
if ( subNode ! = null )
settings . Tools . ExportLastFrameRate = double . Parse ( subNode . InnerText , CultureInfo . InvariantCulture ) ;
2016-08-07 18:08:39 +02:00
subNode = node . SelectSingleNode ( "ExportFullFrame" ) ;
if ( subNode ! = null )
settings . Tools . ExportFullFrame = Convert . ToBoolean ( subNode . InnerText ) ;
2017-10-28 10:51:59 +02:00
subNode = node . SelectSingleNode ( "ExportFcpFullPathUrl" ) ;
if ( subNode ! = null )
2017-10-30 18:07:41 +01:00
settings . Tools . ExportFcpFullPathUrl = Convert . ToBoolean ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "ExportPenLineJoin" ) ;
if ( subNode ! = null )
settings . Tools . ExportPenLineJoin = subNode . InnerText ;
subNode = node . SelectSingleNode ( "FixCommonErrorsFixOverlapAllowEqualEndStart" ) ;
if ( subNode ! = null )
settings . Tools . FixCommonErrorsFixOverlapAllowEqualEndStart = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "FixCommonErrorsSkipStepOne" ) ;
if ( subNode ! = null )
settings . Tools . FixCommonErrorsSkipStepOne = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ImportTextSplitting" ) ;
if ( subNode ! = null )
settings . Tools . ImportTextSplitting = subNode . InnerText ;
subNode = node . SelectSingleNode ( "ImportTextMergeShortLines" ) ;
if ( subNode ! = null )
settings . Tools . ImportTextMergeShortLines = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ImportTextLineBreak" ) ;
if ( subNode ! = null )
settings . Tools . ImportTextLineBreak = subNode . InnerText ;
2017-04-27 10:10:49 +02:00
subNode = node . SelectSingleNode ( "ImportTextMergeShortLines" ) ;
if ( subNode ! = null )
settings . Tools . ImportTextMergeShortLines = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ImportTextRemoveEmptyLines" ) ;
if ( subNode ! = null )
settings . Tools . ImportTextRemoveEmptyLines = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ImportTextRemoveLinesNoLetters" ) ;
if ( subNode ! = null )
settings . Tools . ImportTextRemoveLinesNoLetters = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ImportTextGenerateTimeCodes" ) ;
if ( subNode ! = null )
settings . Tools . ImportTextGenerateTimeCodes = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ImportTextAutoBreak" ) ;
if ( subNode ! = null )
settings . Tools . ImportTextAutoBreak = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ImportTextGap" ) ;
if ( subNode ! = null )
settings . Tools . ImportTextGap = Convert . ToDecimal ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ImportTextDurationAuto" ) ;
if ( subNode ! = null )
settings . Tools . ImportTextDurationAuto = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ImportTextFixedDuration" ) ;
if ( subNode ! = null )
settings . Tools . ImportTextFixedDuration = Convert . ToDecimal ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "GenerateTimeCodePatterns" ) ;
if ( subNode ! = null )
settings . Tools . GenerateTimeCodePatterns = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "GenerateTimeCodePatterns" ) ;
if ( subNode ! = null )
settings . Tools . GenerateTimeCodePatterns = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MusicSymbolStyle" ) ;
if ( subNode ! = null )
settings . Tools . MusicSymbolStyle = subNode . InnerText ;
subNode = node . SelectSingleNode ( "BridgeGapMilliseconds" ) ;
if ( subNode ! = null )
settings . Tools . BridgeGapMilliseconds = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportCustomTemplates" ) ;
if ( subNode ! = null )
settings . Tools . ExportCustomTemplates = subNode . InnerText ;
subNode = node . SelectSingleNode ( "ChangeCasingChoice" ) ;
if ( subNode ! = null )
settings . Tools . ChangeCasingChoice = subNode . InnerText ;
subNode = node . SelectSingleNode ( "UseNoLineBreakAfter" ) ;
if ( subNode ! = null )
settings . Tools . UseNoLineBreakAfter = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "NoLineBreakAfterEnglish" ) ;
if ( subNode ! = null )
settings . Tools . NoLineBreakAfterEnglish = subNode . InnerText . Replace ( " " , " " ) ;
2016-08-08 18:19:36 +02:00
subNode = node . SelectSingleNode ( "ExportTextFormatText" ) ;
if ( subNode ! = null )
settings . Tools . ExportTextFormatText = subNode . InnerText ;
subNode = node . SelectSingleNode ( "ExportTextRemoveStyling" ) ;
if ( subNode ! = null )
settings . Tools . ExportTextRemoveStyling = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportTextShowLineNumbers" ) ;
if ( subNode ! = null )
settings . Tools . ExportTextShowLineNumbers = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportTextShowLineNumbersNewLine" ) ;
if ( subNode ! = null )
settings . Tools . ExportTextShowLineNumbersNewLine = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportTextShowTimeCodes" ) ;
if ( subNode ! = null )
settings . Tools . ExportTextShowTimeCodes = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportTextShowTimeCodesNewLine" ) ;
if ( subNode ! = null )
settings . Tools . ExportTextShowTimeCodesNewLine = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportTextNewLineAfterText" ) ;
if ( subNode ! = null )
settings . Tools . ExportTextNewLineAfterText = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ExportTextNewLineBetweenSubtitles" ) ;
if ( subNode ! = null )
2016-08-11 12:36:19 +02:00
settings . Tools . ExportTextNewLineBetweenSubtitles = Convert . ToBoolean ( subNode . InnerText ) ;
2018-02-04 19:40:33 +01:00
subNode = node . SelectSingleNode ( "ExportTextTimeCodeFormat" ) ;
if ( subNode ! = null )
settings . Tools . ExportTextTimeCodeFormat = subNode . InnerText ;
subNode = node . SelectSingleNode ( "ExportTextTimeCodeSeparator" ) ;
if ( subNode ! = null )
settings . Tools . ExportTextTimeCodeSeparator = subNode . InnerText ;
2016-08-10 22:00:05 +02:00
subNode = node . SelectSingleNode ( "VideoOffsetKeepTimeCodes" ) ;
if ( subNode ! = null )
settings . Tools . VideoOffsetKeepTimeCodes = Convert . ToBoolean ( subNode . InnerText ) ;
2017-11-06 18:22:49 +01:00
subNode = node . SelectSingleNode ( "MoveStartEndMs" ) ;
if ( subNode ! = null )
settings . Tools . MoveStartEndMs = Convert . ToInt32 ( subNode . InnerText ) ;
2017-12-23 09:17:51 +01:00
subNode = node . SelectSingleNode ( "AdjustDurationSeconds" ) ;
if ( subNode ! = null )
2017-12-23 15:18:13 +01:00
settings . Tools . AdjustDurationSeconds = Convert . ToDecimal ( subNode . InnerText , CultureInfo . InvariantCulture ) ;
2017-12-23 09:17:51 +01:00
subNode = node . SelectSingleNode ( "AdjustDurationPercent" ) ;
if ( subNode ! = null )
settings . Tools . AdjustDurationPercent = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "AdjustDurationLast" ) ;
if ( subNode ! = null )
settings . Tools . AdjustDurationLast = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "FindHistory" ) ;
if ( subNode ! = null )
{
foreach ( XmlNode findItem in subNode . ChildNodes )
{
if ( findItem . Name = = "Text" )
{
settings . Tools . FindHistory . Add ( findItem . InnerText ) ;
}
}
}
2016-10-11 17:47:04 +02:00
// Subtitle
2016-02-08 21:11:03 +01:00
node = doc . DocumentElement . SelectSingleNode ( "SubtitleSettings" ) ;
if ( node ! = null )
{
subNode = node . SelectSingleNode ( "SsaFontName" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . SsaFontName = subNode . InnerText ;
subNode = node . SelectSingleNode ( "SsaFontSize" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . SsaFontSize = Convert . ToDouble ( subNode . InnerText , CultureInfo . InvariantCulture ) ;
subNode = node . SelectSingleNode ( "SsaFontColorArgb" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . SsaFontColorArgb = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SsaFontBold" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . SsaFontBold = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SsaOutline" ) ;
if ( subNode ! = null )
2017-06-30 21:55:10 +02:00
settings . SubtitleSettings . SsaOutline = Convert . ToDecimal ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "SsaShadow" ) ;
if ( subNode ! = null )
2017-06-30 21:55:10 +02:00
settings . SubtitleSettings . SsaShadow = Convert . ToDecimal ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "SsaOpaqueBox" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . SsaOpaqueBox = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SsaMarginLeft" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . SsaMarginLeft = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SsaMarginRight" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . SsaMarginRight = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SsaMarginTopBottom" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . SsaMarginTopBottom = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "DCinemaFontFile" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . DCinemaFontFile = subNode . InnerText ;
subNode = node . SelectSingleNode ( "DCinemaFontSize" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . DCinemaFontSize = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "DCinemaBottomMargin" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . DCinemaBottomMargin = Convert . ToInt32 ( subNode . InnerText , CultureInfo . InvariantCulture ) ;
subNode = node . SelectSingleNode ( "DCinemaZPosition" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . DCinemaZPosition = Convert . ToDouble ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "DCinemaFadeUpTime" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . DCinemaFadeUpTime = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "DCinemaFadeDownTime" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . DCinemaFadeDownTime = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SamiDisplayTwoClassesAsTwoSubtitles" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . SamiDisplayTwoClassesAsTwoSubtitles = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SamiHtmlEncodeMode" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . SamiHtmlEncodeMode = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "TimedText10TimeCodeFormat" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . TimedText10TimeCodeFormat = subNode . InnerText ;
subNode = node . SelectSingleNode ( "TimedText10ShowStyleAndLanguage" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . TimedText10ShowStyleAndLanguage = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "FcpFontSize" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . FcpFontSize = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "FcpFontName" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . FcpFontName = subNode . InnerText ;
subNode = node . SelectSingleNode ( "EbuStlTeletextUseBox" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . EbuStlTeletextUseBox = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "EbuStlTeletextUseDoubleHeight" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . EbuStlTeletextUseDoubleHeight = Convert . ToBoolean ( subNode . InnerText ) ;
2017-02-04 17:41:13 +01:00
subNode = node . SelectSingleNode ( "EbuStlMarginTop" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . EbuStlMarginTop = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "EbuStlMarginBottom" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . EbuStlMarginBottom = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "EbuStlNewLineRows" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . EbuStlNewLineRows = Convert . ToInt32 ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "CheetahCaptionAlwayWriteEndTime" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . CheetahCaptionAlwayWriteEndTime = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "NuendoCharacterListFile" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . NuendoCharacterListFile = subNode . InnerText ;
2016-04-09 21:20:30 +02:00
subNode = node . SelectSingleNode ( "Cavena890StartOfMessage" ) ;
if ( subNode ! = null )
settings . SubtitleSettings . Cavena890StartOfMessage = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
}
2016-10-11 17:47:04 +02:00
// Proxy
2016-02-08 21:11:03 +01:00
node = doc . DocumentElement . SelectSingleNode ( "Proxy" ) ;
subNode = node . SelectSingleNode ( "ProxyAddress" ) ;
if ( subNode ! = null )
settings . Proxy . ProxyAddress = subNode . InnerText ;
subNode = node . SelectSingleNode ( "UserName" ) ;
if ( subNode ! = null )
settings . Proxy . UserName = subNode . InnerText ;
subNode = node . SelectSingleNode ( "Password" ) ;
if ( subNode ! = null )
settings . Proxy . Password = subNode . InnerText ;
subNode = node . SelectSingleNode ( "Domain" ) ;
if ( subNode ! = null )
settings . Proxy . Domain = subNode . InnerText ;
2017-10-30 18:07:41 +01:00
// Fxp xml export settings
node = doc . DocumentElement . SelectSingleNode ( "FcpExportSettings" ) ;
if ( node ! = null )
{
subNode = node . SelectSingleNode ( "FontName" ) ;
if ( subNode ! = null )
settings . FcpExportSettings . FontName = subNode . InnerText ;
subNode = node . SelectSingleNode ( "FontSize" ) ;
if ( subNode ! = null )
settings . FcpExportSettings . FontSize = int . Parse ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "Alignment" ) ;
if ( subNode ! = null )
settings . FcpExportSettings . Alignment = subNode . InnerText ;
subNode = node . SelectSingleNode ( "Baseline" ) ;
if ( subNode ! = null )
settings . FcpExportSettings . Baseline = int . Parse ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "Color" ) ;
if ( subNode ! = null )
settings . FcpExportSettings . Color = Color . FromArgb ( int . Parse ( subNode . InnerText ) ) ;
}
2016-10-11 17:47:04 +02:00
// Word List
2016-02-08 21:11:03 +01:00
node = doc . DocumentElement . SelectSingleNode ( "WordLists" ) ;
subNode = node . SelectSingleNode ( "LastLanguage" ) ;
if ( subNode ! = null )
settings . WordLists . LastLanguage = subNode . InnerText ;
2017-04-10 19:23:24 +02:00
subNode = node . SelectSingleNode ( "Names" ) ;
2016-02-08 21:11:03 +01:00
if ( subNode ! = null )
2017-04-10 19:23:24 +02:00
settings . WordLists . NamesUrl = subNode . InnerText ;
subNode = node . SelectSingleNode ( "UseOnlineNames" ) ;
2016-02-08 21:11:03 +01:00
if ( subNode ! = null )
2017-04-10 19:23:24 +02:00
settings . WordLists . UseOnlineNames = Convert . ToBoolean ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
2016-10-11 17:47:04 +02:00
// Fix Common Errors
2016-02-08 21:11:03 +01:00
node = doc . DocumentElement . SelectSingleNode ( "CommonErrors" ) ;
subNode = node . SelectSingleNode ( "StartPosition" ) ;
if ( subNode ! = null )
settings . CommonErrors . StartPosition = subNode . InnerText ;
subNode = node . SelectSingleNode ( "StartSize" ) ;
if ( subNode ! = null )
settings . CommonErrors . StartSize = subNode . InnerText ;
subNode = node . SelectSingleNode ( "EmptyLinesTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . EmptyLinesTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "OverlappingDisplayTimeTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . OverlappingDisplayTimeTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "TooShortDisplayTimeTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . TooShortDisplayTimeTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "TooLongDisplayTimeTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . TooLongDisplayTimeTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "InvalidItalicTagsTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . InvalidItalicTagsTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "BreakLongLinesTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . BreakLongLinesTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "MergeShortLinesTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . MergeShortLinesTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "MergeShortLinesAllTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . MergeShortLinesAllTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "UnneededSpacesTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . UnneededSpacesTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "UnneededPeriodsTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . UnneededPeriodsTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "MissingSpacesTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . MissingSpacesTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "AddMissingQuotesTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . AddMissingQuotesTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "Fix3PlusLinesTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . Fix3PlusLinesTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "FixHyphensTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . FixHyphensTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "FixHyphensAddTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . FixHyphensAddTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "UppercaseIInsideLowercaseWordTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . UppercaseIInsideLowercaseWordTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "DoubleApostropheToQuoteTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . DoubleApostropheToQuoteTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "AddPeriodAfterParagraphTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . AddPeriodAfterParagraphTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "StartWithUppercaseLetterAfterParagraphTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . StartWithUppercaseLetterAfterParagraphTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "StartWithUppercaseLetterAfterPeriodInsideParagraphTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . StartWithUppercaseLetterAfterPeriodInsideParagraphTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "StartWithUppercaseLetterAfterColonTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . StartWithUppercaseLetterAfterColonTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "AloneLowercaseIToUppercaseIEnglishTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . AloneLowercaseIToUppercaseIEnglishTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "FixOcrErrorsViaReplaceListTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . FixOcrErrorsViaReplaceListTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "RemoveSpaceBetweenNumberTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . RemoveSpaceBetweenNumberTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "FixDialogsOnOneLineTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . FixDialogsOnOneLineTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "TurkishAnsiTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . TurkishAnsiTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "DanishLetterITicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . DanishLetterITicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SpanishInvertedQuestionAndExclamationMarksTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . SpanishInvertedQuestionAndExclamationMarksTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "FixDoubleDashTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . FixDoubleDashTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "FixDoubleGreaterThanTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . FixDoubleGreaterThanTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "FixEllipsesStartTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . FixEllipsesStartTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "FixMissingOpenBracketTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . FixMissingOpenBracketTicked = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "FixMusicNotationTicked" ) ;
if ( subNode ! = null )
settings . CommonErrors . FixMusicNotationTicked = Convert . ToBoolean ( subNode . InnerText ) ;
2016-10-11 17:47:04 +02:00
// Video Controls
2016-02-08 21:11:03 +01:00
node = doc . DocumentElement . SelectSingleNode ( "VideoControls" ) ;
subNode = node . SelectSingleNode ( "CustomSearchText1" ) ;
if ( subNode ! = null )
settings . VideoControls . CustomSearchText1 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "CustomSearchText2" ) ;
if ( subNode ! = null )
settings . VideoControls . CustomSearchText2 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "CustomSearchText3" ) ;
if ( subNode ! = null )
settings . VideoControls . CustomSearchText3 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "CustomSearchText4" ) ;
if ( subNode ! = null )
settings . VideoControls . CustomSearchText4 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "CustomSearchText5" ) ;
if ( subNode ! = null )
settings . VideoControls . CustomSearchText5 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "CustomSearchText6" ) ;
if ( subNode ! = null )
settings . VideoControls . CustomSearchText6 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "CustomSearchUrl1" ) ;
if ( subNode ! = null )
settings . VideoControls . CustomSearchUrl1 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "CustomSearchUrl1" ) ;
if ( subNode ! = null )
settings . VideoControls . CustomSearchUrl1 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "CustomSearchUrl2" ) ;
if ( subNode ! = null )
settings . VideoControls . CustomSearchUrl2 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "CustomSearchUrl3" ) ;
if ( subNode ! = null )
settings . VideoControls . CustomSearchUrl3 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "CustomSearchUrl4" ) ;
if ( subNode ! = null )
settings . VideoControls . CustomSearchUrl4 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "CustomSearchUrl5" ) ;
if ( subNode ! = null )
settings . VideoControls . CustomSearchUrl5 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "CustomSearchUrl6" ) ;
if ( subNode ! = null )
settings . VideoControls . CustomSearchUrl6 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "LastActiveTab" ) ;
if ( subNode ! = null )
settings . VideoControls . LastActiveTab = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformDrawGrid" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformDrawGrid = Convert . ToBoolean ( subNode . InnerText ) ;
2017-01-16 18:57:29 +01:00
subNode = node . SelectSingleNode ( "WaveformDrawCps" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformDrawCps = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "WaveformDrawWpm" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformDrawWpm = Convert . ToBoolean ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "WaveformAllowOverlap" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformAllowOverlap = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "WaveformFocusOnMouseEnter" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformFocusOnMouseEnter = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "WaveformListViewFocusOnMouseEnter" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformListViewFocusOnMouseEnter = Convert . ToBoolean ( subNode . InnerText ) ;
2017-01-12 21:27:19 +01:00
subNode = node . SelectSingleNode ( "WaveformSetVideoPositionOnMoveStartEnd" ) ;
if ( subNode ! = null )
2017-01-15 09:46:26 +01:00
settings . VideoControls . WaveformSetVideoPositionOnMoveStartEnd = Convert . ToBoolean ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "WaveformBorderHitMs" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformBorderHitMs = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "WaveformGridColor" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformGridColor = Color . FromArgb ( int . Parse ( subNode . InnerText ) ) ;
subNode = node . SelectSingleNode ( "WaveformColor" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformColor = Color . FromArgb ( int . Parse ( subNode . InnerText ) ) ;
subNode = node . SelectSingleNode ( "WaveformSelectedColor" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformSelectedColor = Color . FromArgb ( int . Parse ( subNode . InnerText ) ) ;
subNode = node . SelectSingleNode ( "WaveformBackgroundColor" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformBackgroundColor = Color . FromArgb ( int . Parse ( subNode . InnerText ) ) ;
subNode = node . SelectSingleNode ( "WaveformTextColor" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformTextColor = Color . FromArgb ( int . Parse ( subNode . InnerText ) ) ;
subNode = node . SelectSingleNode ( "WaveformTextSize" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformTextSize = Convert . ToInt32 ( subNode . InnerText , CultureInfo . InvariantCulture ) ;
subNode = node . SelectSingleNode ( "WaveformTextBold" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformTextBold = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "WaveformDoubleClickOnNonParagraphAction" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformDoubleClickOnNonParagraphAction = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformRightClickOnNonParagraphAction" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformRightClickOnNonParagraphAction = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformMouseWheelScrollUpIsForward" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformMouseWheelScrollUpIsForward = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "GenerateSpectrogram" ) ;
if ( subNode ! = null )
settings . VideoControls . GenerateSpectrogram = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "SpectrogramAppearance" ) ;
if ( subNode ! = null )
settings . VideoControls . SpectrogramAppearance = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformMinimumSampleRate" ) ;
if ( subNode = = null ) // TODO: Remove in 3.5
subNode = node . SelectSingleNode ( "WaveformMininumSampleRate" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformMinimumSampleRate = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "WaveformSeeksSilenceDurationSeconds" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformSeeksSilenceDurationSeconds = Convert . ToDouble ( subNode . InnerText , CultureInfo . InvariantCulture ) ;
subNode = node . SelectSingleNode ( "WaveformSeeksSilenceMaxVolume" ) ;
if ( subNode ! = null )
settings . VideoControls . WaveformSeeksSilenceMaxVolume = Convert . ToDouble ( subNode . InnerText , CultureInfo . InvariantCulture ) ;
2016-10-11 17:47:04 +02:00
// Network
2016-02-08 21:11:03 +01:00
node = doc . DocumentElement . SelectSingleNode ( "NetworkSettings" ) ;
if ( node ! = null )
{
subNode = node . SelectSingleNode ( "SessionKey" ) ;
if ( subNode ! = null )
settings . NetworkSettings . SessionKey = subNode . InnerText ;
subNode = node . SelectSingleNode ( "UserName" ) ;
if ( subNode ! = null )
settings . NetworkSettings . UserName = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WebServiceUrl" ) ;
if ( subNode ! = null )
settings . NetworkSettings . WebServiceUrl = subNode . InnerText ;
subNode = node . SelectSingleNode ( "PollIntervalSeconds" ) ;
if ( subNode ! = null )
settings . NetworkSettings . PollIntervalSeconds = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "NewMessageSound" ) ;
if ( subNode ! = null )
settings . NetworkSettings . NewMessageSound = subNode . InnerText ;
}
2016-10-11 17:47:04 +02:00
// VobSub Ocr
2016-02-08 21:11:03 +01:00
node = doc . DocumentElement . SelectSingleNode ( "VobSubOcr" ) ;
subNode = node . SelectSingleNode ( "XOrMorePixelsMakesSpace" ) ;
if ( subNode ! = null )
settings . VobSubOcr . XOrMorePixelsMakesSpace = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "AllowDifferenceInPercent" ) ;
if ( subNode ! = null )
settings . VobSubOcr . AllowDifferenceInPercent = Convert . ToDouble ( subNode . InnerText , CultureInfo . InvariantCulture ) ;
subNode = node . SelectSingleNode ( "BlurayAllowDifferenceInPercent" ) ;
if ( subNode ! = null )
settings . VobSubOcr . BlurayAllowDifferenceInPercent = Convert . ToDouble ( subNode . InnerText , CultureInfo . InvariantCulture ) ;
subNode = node . SelectSingleNode ( "LastImageCompareFolder" ) ;
if ( subNode ! = null )
settings . VobSubOcr . LastImageCompareFolder = subNode . InnerText ;
subNode = node . SelectSingleNode ( "LastModiLanguageId" ) ;
if ( subNode ! = null )
settings . VobSubOcr . LastModiLanguageId = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "LastOcrMethod" ) ;
if ( subNode ! = null )
settings . VobSubOcr . LastOcrMethod = subNode . InnerText ;
subNode = node . SelectSingleNode ( "TesseractLastLanguage" ) ;
if ( subNode ! = null )
settings . VobSubOcr . TesseractLastLanguage = subNode . InnerText ;
subNode = node . SelectSingleNode ( "UseModiInTesseractForUnknownWords" ) ;
if ( subNode ! = null )
settings . VobSubOcr . UseModiInTesseractForUnknownWords = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "UseItalicsInTesseract" ) ;
if ( subNode ! = null )
settings . VobSubOcr . UseItalicsInTesseract = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "UseMusicSymbolsInTesseract" ) ;
if ( subNode ! = null )
settings . VobSubOcr . UseMusicSymbolsInTesseract = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "RightToLeft" ) ;
if ( subNode ! = null )
settings . VobSubOcr . RightToLeft = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "TopToBottom" ) ;
if ( subNode ! = null )
settings . VobSubOcr . TopToBottom = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "DefaultMillisecondsForUnknownDurations" ) ;
if ( subNode ! = null )
settings . VobSubOcr . DefaultMillisecondsForUnknownDurations = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "PromptForUnknownWords" ) ;
if ( subNode ! = null )
settings . VobSubOcr . PromptForUnknownWords = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "GuessUnknownWords" ) ;
if ( subNode ! = null )
settings . VobSubOcr . GuessUnknownWords = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "AutoBreakSubtitleIfMoreThanTwoLines" ) ;
if ( subNode ! = null )
settings . VobSubOcr . AutoBreakSubtitleIfMoreThanTwoLines = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "ItalicFactor" ) ;
if ( subNode ! = null )
settings . VobSubOcr . ItalicFactor = Convert . ToDouble ( subNode . InnerText , CultureInfo . InvariantCulture ) ;
subNode = node . SelectSingleNode ( "LineOcrDraw" ) ;
if ( subNode ! = null )
settings . VobSubOcr . LineOcrDraw = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "LineOcrAdvancedItalic" ) ;
if ( subNode ! = null )
settings . VobSubOcr . LineOcrAdvancedItalic = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "LineOcrLastLanguages" ) ;
if ( subNode ! = null )
settings . VobSubOcr . LineOcrLastLanguages = subNode . InnerText ;
subNode = node . SelectSingleNode ( "LineOcrLastSpellCheck" ) ;
if ( subNode ! = null )
settings . VobSubOcr . LineOcrLastSpellCheck = subNode . InnerText ;
subNode = node . SelectSingleNode ( "LineOcrXOrMorePixelsMakesSpace" ) ;
if ( subNode ! = null )
settings . VobSubOcr . LineOcrXOrMorePixelsMakesSpace = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "LineOcrMinLineHeight" ) ;
if ( subNode ! = null )
settings . VobSubOcr . LineOcrMinLineHeight = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "LineOcrMaxLineHeight" ) ;
if ( subNode ! = null )
settings . VobSubOcr . LineOcrMaxLineHeight = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "LastBinaryImageCompareDb" ) ;
if ( subNode ! = null )
settings . VobSubOcr . LastBinaryImageCompareDb = subNode . InnerText ;
subNode = node . SelectSingleNode ( "LastBinaryImageSpellCheck" ) ;
if ( subNode ! = null )
settings . VobSubOcr . LastBinaryImageSpellCheck = subNode . InnerText ;
2016-06-26 16:23:40 +02:00
// TODO: Remove future version (like SE 3.4.15)
//BEGIN OLD
var oldReplaceItems = doc . DocumentElement . SelectNodes ( "MultipleSearchAndReplaceList/MultipleSearchAndReplaceItem" ) ;
if ( oldReplaceItems . Count > 0 )
2016-02-08 21:11:03 +01:00
{
2016-06-26 16:23:40 +02:00
var group = new MultipleSearchAndReplaceGroup ( ) ;
group . Rules = new List < MultipleSearchAndReplaceSetting > ( ) ;
group . Name = "Default" ;
group . Enabled = true ;
settings . MultipleSearchAndReplaceGroups . Add ( group ) ;
foreach ( XmlNode listNode in oldReplaceItems )
{
var item = new MultipleSearchAndReplaceSetting ( ) ;
subNode = listNode . SelectSingleNode ( "Enabled" ) ;
if ( subNode ! = null )
item . Enabled = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = listNode . SelectSingleNode ( "FindWhat" ) ;
if ( subNode ! = null )
item . FindWhat = subNode . InnerText ;
subNode = listNode . SelectSingleNode ( "ReplaceWith" ) ;
if ( subNode ! = null )
item . ReplaceWith = subNode . InnerText ;
subNode = listNode . SelectSingleNode ( "SearchType" ) ;
if ( subNode ! = null )
item . SearchType = subNode . InnerText ;
2017-12-11 21:11:32 +01:00
subNode = listNode . SelectSingleNode ( "Description" ) ;
2017-12-09 21:04:11 +01:00
if ( subNode ! = null )
2017-12-11 21:11:32 +01:00
item . Description = subNode . InnerText ;
2016-06-26 16:23:40 +02:00
group . Rules . Add ( item ) ;
}
}
//END OLD
foreach ( XmlNode groupNode in doc . DocumentElement . SelectNodes ( "MultipleSearchAndReplaceGroups/Group" ) )
{
var group = new MultipleSearchAndReplaceGroup ( ) ;
group . Rules = new List < MultipleSearchAndReplaceSetting > ( ) ;
subNode = groupNode . SelectSingleNode ( "Name" ) ;
2016-02-08 21:11:03 +01:00
if ( subNode ! = null )
2016-06-26 16:23:40 +02:00
group . Name = subNode . InnerText ;
subNode = groupNode . SelectSingleNode ( "Enabled" ) ;
2016-02-08 21:11:03 +01:00
if ( subNode ! = null )
2016-06-26 16:23:40 +02:00
group . Enabled = Convert . ToBoolean ( subNode . InnerText ) ;
settings . MultipleSearchAndReplaceGroups . Add ( group ) ;
foreach ( XmlNode listNode in groupNode . SelectNodes ( "Rule" ) )
{
var item = new MultipleSearchAndReplaceSetting ( ) ;
subNode = listNode . SelectSingleNode ( "Enabled" ) ;
if ( subNode ! = null )
item . Enabled = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = listNode . SelectSingleNode ( "FindWhat" ) ;
if ( subNode ! = null )
item . FindWhat = subNode . InnerText ;
subNode = listNode . SelectSingleNode ( "ReplaceWith" ) ;
if ( subNode ! = null )
item . ReplaceWith = subNode . InnerText ;
subNode = listNode . SelectSingleNode ( "SearchType" ) ;
if ( subNode ! = null )
item . SearchType = subNode . InnerText ;
2017-12-11 21:11:32 +01:00
subNode = listNode . SelectSingleNode ( "Description" ) ;
2017-12-09 21:04:11 +01:00
if ( subNode ! = null )
2017-12-11 21:11:32 +01:00
item . Description = subNode . InnerText ;
2016-06-30 15:28:04 +02:00
group . Rules . Add ( item ) ;
2016-06-26 16:23:40 +02:00
}
2016-02-08 21:11:03 +01:00
}
2016-10-11 17:47:04 +02:00
// Shortcuts
2016-02-08 21:11:03 +01:00
node = doc . DocumentElement . SelectSingleNode ( "Shortcuts" ) ;
if ( node ! = null )
{
subNode = node . SelectSingleNode ( "GeneralGoToFirstSelectedLine" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralGoToFirstSelectedLine = subNode . InnerText ;
subNode = node . SelectSingleNode ( "GeneralGoToNextEmptyLine" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralGoToNextEmptyLine = subNode . InnerText ;
subNode = node . SelectSingleNode ( "GeneralMergeSelectedLines" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralMergeSelectedLines = subNode . InnerText ;
subNode = node . SelectSingleNode ( "GeneralMergeSelectedLinesOnlyFirstText" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralMergeSelectedLinesOnlyFirstText = subNode . InnerText ;
2016-10-18 11:50:28 +02:00
subNode = node . SelectSingleNode ( "GeneralMergeWithNext" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralMergeWithNext = subNode . InnerText ;
subNode = node . SelectSingleNode ( "GeneralMergeWithPrevious" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralMergeWithPrevious = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "GeneralToggleTranslationMode" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralToggleTranslationMode = subNode . InnerText ;
subNode = node . SelectSingleNode ( "GeneralSwitchOriginalAndTranslation" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralSwitchOriginalAndTranslation = subNode . InnerText ;
subNode = node . SelectSingleNode ( "GeneralMergeOriginalAndTranslation" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralMergeOriginalAndTranslation = subNode . InnerText ;
subNode = node . SelectSingleNode ( "GeneralGoToNextSubtitle" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralGoToNextSubtitle = subNode . InnerText ;
subNode = node . SelectSingleNode ( "GeneralGoToPrevSubtitle" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralGoToPrevSubtitle = subNode . InnerText ;
subNode = node . SelectSingleNode ( "GeneralGoToEndOfCurrentSubtitle" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralGoToEndOfCurrentSubtitle = subNode . InnerText ;
subNode = node . SelectSingleNode ( "GeneralGoToStartOfCurrentSubtitle" ) ;
if ( subNode ! = null )
2017-01-11 21:24:34 +01:00
settings . Shortcuts . GeneralGoToStartOfCurrentSubtitle = subNode . InnerText ;
2016-08-03 14:47:45 +02:00
subNode = node . SelectSingleNode ( "GeneralGoToNextSubtitleAndFocusVideo" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralGoToNextSubtitleAndFocusVideo = subNode . InnerText ;
2017-01-11 21:24:34 +01:00
subNode = node . SelectSingleNode ( "GeneralGoToPreviousSubtitleAndFocusVideo" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralGoToPreviousSubtitleAndFocusVideo = subNode . InnerText ;
2016-08-03 14:47:45 +02:00
subNode = node . SelectSingleNode ( "GeneralExtendCurrentSubtitle" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralExtendCurrentSubtitle = subNode . InnerText ;
2016-10-18 11:50:28 +02:00
subNode = node . SelectSingleNode ( "GeneralAutoCalcCurrentDuration" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralAutoCalcCurrentDuration = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "GeneralPlayFirstSelected" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralPlayFirstSelected = subNode . InnerText ;
2016-10-02 19:28:58 +02:00
subNode = node . SelectSingleNode ( "GeneralHelp" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralHelp = subNode . InnerText ;
2018-02-03 10:41:51 +01:00
subNode = node . SelectSingleNode ( "GeneralUnbrekNoSpace" ) ;
if ( subNode ! = null )
settings . Shortcuts . GeneralUnbrekNoSpace = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "MainFileNew" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainFileNew = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainFileOpen" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainFileOpen = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainFileOpenKeepVideo" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainFileOpenKeepVideo = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainFileSave" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainFileSave = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainFileSaveOriginal" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainFileSaveOriginal = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainFileSaveOriginalAs" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainFileSaveOriginalAs = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainFileSaveAs" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainFileSaveAs = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainFileSaveAll" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainFileSaveAll = subNode . InnerText ;
2017-10-04 16:00:15 +02:00
subNode = node . SelectSingleNode ( "MainFileCloseOriginal" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainFileCloseOriginal = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainFileImportPlainText" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainFileImportPlainText = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainFileImportTimeCodes" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainFileImportTimeCodes = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "MainFileExportEbu" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainFileExportEbu = subNode . InnerText ;
2017-10-10 20:50:18 +02:00
subNode = node . SelectSingleNode ( "MainFileExportPlainText" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainFileExportPlainText = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "MainEditUndo" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainEditUndo = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainEditRedo" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainEditRedo = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainEditFind" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainEditFind = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainEditFindNext" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainEditFindNext = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainEditReplace" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainEditReplace = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainEditMultipleReplace" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainEditMultipleReplace = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainEditGoToLineNumber" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainEditGoToLineNumber = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainEditRightToLeft" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainEditRightToLeft = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainToolsFixCommonErrors" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainToolsFixCommonErrors = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainToolsFixCommonErrorsPreview" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainToolsFixCommonErrorsPreview = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainToolsMergeShortLines" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainToolsMergeShortLines = subNode . InnerText ;
2017-10-04 16:00:15 +02:00
subNode = node . SelectSingleNode ( "MainToolsMakeEmptyFromCurrent" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainToolsMakeEmptyFromCurrent = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "MainToolsSplitLongLines" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainToolsSplitLongLines = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainToolsRenumber" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainToolsRenumber = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainToolsRemoveTextForHI" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainToolsRemoveTextForHI = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainToolsChangeCasing" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainToolsChangeCasing = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainToolsAutoDuration" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainToolsAutoDuration = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainToolsBatchConvert" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainToolsBatchConvert = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainToolsBeamer" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainToolsBeamer = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainToolsToggleTranslationOriginalInPreviews" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainEditToggleTranslationOriginalInPreviews = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainEditInverseSelection" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainEditInverseSelection = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainEditModifySelection" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainEditModifySelection = subNode . InnerText ;
2017-10-04 16:00:15 +02:00
subNode = node . SelectSingleNode ( "MainVideoOpen" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideoOpen = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainVideoClose" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideoClose = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "MainVideoPause" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideoPause = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainVideoPlayPauseToggle" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideoPlayPauseToggle = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainVideoShowHideVideo" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideoShowHideVideo = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainVideoToggleVideoControls" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideoToggleVideoControls = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainVideo1FrameLeft" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideo1FrameLeft = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainVideo1FrameRight" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideo1FrameRight = subNode . InnerText ;
2017-06-29 19:21:23 +02:00
subNode = node . SelectSingleNode ( "MainVideo1FrameLeftWithPlay" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideo1FrameLeftWithPlay = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainVideo1FrameRightWithPlay" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideo1FrameRightWithPlay = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "MainVideo100MsLeft" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideo100MsLeft = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainVideo100MsRight" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideo100MsRight = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainVideo500MsLeft" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideo500MsLeft = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainVideo500MsRight" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideo500MsRight = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainVideo1000MsLeft" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideo1000MsLeft = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainVideo1000MsRight" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideo1000MsRight = subNode . InnerText ;
2016-09-15 17:43:49 +02:00
subNode = node . SelectSingleNode ( "MainVideo5000MsLeft" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideo5000MsLeft = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainVideo5000MsRight" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideo5000MsRight = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "MainVideoFullscreen" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainVideoFullscreen = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainSpellCheck" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainSpellCheck = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainSpellCheckFindDoubleWords" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainSpellCheckFindDoubleWords = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainSpellCheckAddWordToNames" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainSpellCheckAddWordToNames = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainSynchronizationAdjustTimes" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainSynchronizationAdjustTimes = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainSynchronizationVisualSync" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainSynchronizationVisualSync = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainSynchronizationPointSync" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainSynchronizationPointSync = subNode . InnerText ;
2017-10-04 16:00:15 +02:00
subNode = node . SelectSingleNode ( "MainSynchronizationPointSyncViaFile" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainSynchronizationPointSyncViaFile = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "MainSynchronizationChangeFrameRate" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainSynchronizationChangeFrameRate = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainListViewItalic" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainListViewItalic = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainListViewToggleDashes" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainListViewToggleDashes = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainListViewAlignment" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainListViewAlignment = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainListViewCopyText" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainListViewCopyText = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainListViewCopyTextFromOriginalToCurrent" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainListViewCopyTextFromOriginalToCurrent = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainListViewAutoDuration" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainListViewAutoDuration = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainListViewColumnDeleteText" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainListViewColumnDeleteText = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainListViewColumnInsertText" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainListViewColumnInsertText = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainListViewColumnPaste" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainListViewColumnPaste = subNode . InnerText ;
2018-01-31 16:03:43 +01:00
subNode = node . SelectSingleNode ( "MainListViewColumnTextUp" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainListViewColumnTextUp = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainListViewColumnTextDown" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainListViewColumnTextDown = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "MainListViewFocusWaveform" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainListViewFocusWaveform = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainListViewGoToNextError" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainListViewGoToNextError = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainEditReverseStartAndEndingForRTL" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainEditReverseStartAndEndingForRTL = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainTextBoxItalic" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTextBoxItalic = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainTextBoxSplitAtCursor" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTextBoxSplitAtCursor = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainTextBoxMoveLastWordDown" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTextBoxMoveLastWordDown = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainTextBoxMoveFirstWordFromNextUp" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTextBoxMoveFirstWordFromNextUp = subNode . InnerText ;
2018-01-15 19:46:16 +01:00
subNode = node . SelectSingleNode ( "MainTextBoxMoveLastWordDownCurrent" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTextBoxMoveLastWordDownCurrent = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainTextBoxMoveFirstWordUpCurrent" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTextBoxMoveFirstWordUpCurrent = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "MainTextBoxSelectionToLower" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTextBoxSelectionToLower = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainTextBoxSelectionToUpper" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTextBoxSelectionToUpper = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainTextBoxToggleAutoDuration" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTextBoxToggleAutoDuration = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainCreateInsertSubAtVideoPos" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainCreateInsertSubAtVideoPos = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainCreatePlayFromJustBefore" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainCreatePlayFromJustBefore = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainCreateSetStart" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainCreateSetStart = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainCreateSetEnd" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainCreateSetEnd = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainCreateSetEndAddNewAndGoToNew" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainCreateSetEndAddNewAndGoToNew = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainCreateStartDownEndUp" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainCreateStartDownEndUp = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainAdjustSetStartAndOffsetTheRest" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustSetStartAndOffsetTheRest = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainAdjustSetEndAndOffsetTheRest" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustSetEndAndOffsetTheRest = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainAdjustSetEndAndOffsetTheRestAndGoToNext" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustSetEndAndOffsetTheRestAndGoToNext = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainAdjustSetEndAndGotoNext" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustSetEndAndGotoNext = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainAdjustViaEndAutoStartAndGoToNext" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustViaEndAutoStartAndGoToNext = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainAdjustSetStartAutoDurationAndGoToNext" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustSetStartAutoDurationAndGoToNext = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainAdjustSetEndNextStartAndGoToNext" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustSetEndNextStartAndGoToNext = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainAdjustStartDownEndUpAndGoToNext" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustStartDownEndUpAndGoToNext = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainAdjustSetStart" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustSetStart = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainAdjustSetStartKeepDuration" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustSetStartKeepDuration = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainAdjustSetEnd" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustSetEnd = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainAdjustSelected100MsForward" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustSelected100MsForward = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainAdjustSelected100MsBack" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustSelected100MsBack = subNode . InnerText ;
2017-11-06 18:22:49 +01:00
subNode = node . SelectSingleNode ( "MainAdjustStartXMsBack" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustStartXMsBack = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainAdjustStartXMsForward" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustStartXMsForward = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainAdjustEndXMsBack" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustEndXMsBack = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainAdjustEndXMsForward" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainAdjustEndXMsForward = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "MainInsertAfter" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainInsertAfter = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainTextBoxInsertAfter" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTextBoxInsertAfter = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainTextBoxAutoBreak" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTextBoxAutoBreak = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainTextBoxUnbreak" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTextBoxUnbreak = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainWaveformInsertAtCurrentPosition" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainWaveformInsertAtCurrentPosition = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainInsertBefore" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainInsertBefore = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainMergeDialog" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainMergeDialog = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainToggleFocus" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainToggleFocus = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformVerticalZoom" ) ;
if ( subNode ! = null )
settings . Shortcuts . WaveformVerticalZoom = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformVerticalZoomOut" ) ;
if ( subNode ! = null )
settings . Shortcuts . WaveformVerticalZoomOut = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformZoomIn" ) ;
if ( subNode ! = null )
settings . Shortcuts . WaveformZoomIn = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformZoomOut" ) ;
if ( subNode ! = null )
settings . Shortcuts . WaveformZoomOut = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformPlaySelection" ) ;
if ( subNode ! = null )
settings . Shortcuts . WaveformPlaySelection = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformPlaySelectionEnd" ) ;
if ( subNode ! = null )
settings . Shortcuts . WaveformPlaySelectionEnd = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformSearchSilenceForward" ) ;
if ( subNode ! = null )
settings . Shortcuts . WaveformSearchSilenceForward = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformSearchSilenceBack" ) ;
if ( subNode ! = null )
settings . Shortcuts . WaveformSearchSilenceBack = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformAddTextHere" ) ;
if ( subNode ! = null )
settings . Shortcuts . WaveformAddTextHere = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformAddTextHereFromClipboard" ) ;
if ( subNode ! = null )
settings . Shortcuts . WaveformAddTextHereFromClipboard = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformFocusListView" ) ;
if ( subNode ! = null )
settings . Shortcuts . WaveformFocusListView = subNode . InnerText ;
2017-05-02 04:37:06 +02:00
subNode = node . SelectSingleNode ( "WaveformGoToNextSubtitle" ) ;
if ( subNode ! = null )
settings . Shortcuts . WaveformGoToNextSubtitle = subNode . InnerText ;
2017-11-03 20:24:16 +01:00
subNode = node . SelectSingleNode ( "WaveformGoToPreviousSceneChange" ) ;
if ( subNode ! = null )
settings . Shortcuts . WaveformGoToPreviousSceneChange = subNode . InnerText ;
2016-08-06 14:13:51 +02:00
subNode = node . SelectSingleNode ( "WaveformGoToNextSceneChange" ) ;
if ( subNode ! = null )
2016-08-07 10:38:43 +02:00
settings . Shortcuts . WaveformGoToNextSceneChange = subNode . InnerText ;
subNode = node . SelectSingleNode ( "WaveformToggleSceneChange" ) ;
if ( subNode ! = null )
settings . Shortcuts . WaveformToggleSceneChange = subNode . InnerText ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "MainTranslateCustomSearch1" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTranslateCustomSearch1 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainTranslateCustomSearch2" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTranslateCustomSearch2 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainTranslateCustomSearch3" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTranslateCustomSearch3 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainTranslateCustomSearch4" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTranslateCustomSearch4 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainTranslateCustomSearch5" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTranslateCustomSearch5 = subNode . InnerText ;
subNode = node . SelectSingleNode ( "MainTranslateCustomSearch6" ) ;
if ( subNode ! = null )
settings . Shortcuts . MainTranslateCustomSearch6 = subNode . InnerText ;
}
2016-10-11 17:47:04 +02:00
// Remove text for Hearing Impaired
2016-02-08 21:11:03 +01:00
node = doc . DocumentElement . SelectSingleNode ( "RemoveTextForHearingImpaired" ) ;
if ( node ! = null )
{
subNode = node . SelectSingleNode ( "RemoveTextBetweenBrackets" ) ;
if ( subNode ! = null )
settings . RemoveTextForHearingImpaired . RemoveTextBetweenBrackets = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "RemoveTextBetweenParentheses" ) ;
if ( subNode ! = null )
settings . RemoveTextForHearingImpaired . RemoveTextBetweenParentheses = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "RemoveTextBetweenCurlyBrackets" ) ;
if ( subNode ! = null )
settings . RemoveTextForHearingImpaired . RemoveTextBetweenCurlyBrackets = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "RemoveTextBetweenQuestionMarks" ) ;
if ( subNode ! = null )
settings . RemoveTextForHearingImpaired . RemoveTextBetweenQuestionMarks = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "RemoveTextBetweenCustom" ) ;
if ( subNode ! = null )
settings . RemoveTextForHearingImpaired . RemoveTextBetweenCustom = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "RemoveTextBetweenCustomBefore" ) ;
if ( subNode ! = null )
settings . RemoveTextForHearingImpaired . RemoveTextBetweenCustomBefore = subNode . InnerText ;
subNode = node . SelectSingleNode ( "RemoveTextBetweenCustomAfter" ) ;
if ( subNode ! = null )
settings . RemoveTextForHearingImpaired . RemoveTextBetweenCustomAfter = subNode . InnerText ;
subNode = node . SelectSingleNode ( "RemoveTextBetweenOnlySeperateLines" ) ;
if ( subNode ! = null )
settings . RemoveTextForHearingImpaired . RemoveTextBetweenOnlySeperateLines = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "RemoveTextBeforeColon" ) ;
if ( subNode ! = null )
settings . RemoveTextForHearingImpaired . RemoveTextBeforeColon = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "RemoveTextBeforeColonOnlyIfUppercase" ) ;
if ( subNode ! = null )
settings . RemoveTextForHearingImpaired . RemoveTextBeforeColonOnlyIfUppercase = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "RemoveTextBeforeColonOnlyOnSeparateLine" ) ;
if ( subNode ! = null )
settings . RemoveTextForHearingImpaired . RemoveTextBeforeColonOnlyOnSeparateLine = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "RemoveIfAllUppercase" ) ;
if ( subNode ! = null )
settings . RemoveTextForHearingImpaired . RemoveIfAllUppercase = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "RemoveInterjections" ) ;
if ( subNode ! = null )
settings . RemoveTextForHearingImpaired . RemoveInterjections = Convert . ToBoolean ( subNode . InnerText ) ;
2018-02-03 22:35:44 +01:00
subNode = node . SelectSingleNode ( "RemoveInterjectionsOnlyOnSeparateLine" ) ;
if ( subNode ! = null )
settings . RemoveTextForHearingImpaired . RemoveInterjectionsOnlyOnSeparateLine = Convert . ToBoolean ( subNode . InnerText ) ;
2016-02-08 21:11:03 +01:00
subNode = node . SelectSingleNode ( "RemoveIfContains" ) ;
if ( subNode ! = null )
settings . RemoveTextForHearingImpaired . RemoveIfContains = Convert . ToBoolean ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "RemoveIfContainsText" ) ;
if ( subNode ! = null )
settings . RemoveTextForHearingImpaired . RemoveIfContainsText = subNode . InnerText ;
}
2016-10-11 17:47:04 +02:00
// Subtitle Beaming
2016-02-08 21:11:03 +01:00
node = doc . DocumentElement . SelectSingleNode ( "SubtitleBeaming" ) ;
if ( node ! = null )
{
subNode = node . SelectSingleNode ( "FontName" ) ;
if ( subNode ! = null )
settings . SubtitleBeaming . FontName = subNode . InnerText ;
subNode = node . SelectSingleNode ( "FontColor" ) ;
if ( subNode ! = null )
settings . SubtitleBeaming . FontColor = Color . FromArgb ( Convert . ToInt32 ( subNode . InnerText ) ) ;
subNode = node . SelectSingleNode ( "FontSize" ) ;
if ( subNode ! = null )
settings . SubtitleBeaming . FontSize = Convert . ToInt32 ( subNode . InnerText ) ;
subNode = node . SelectSingleNode ( "BorderColor" ) ;
if ( subNode ! = null )
settings . SubtitleBeaming . BorderColor = Color . FromArgb ( Convert . ToInt32 ( subNode . InnerText ) ) ;
subNode = node . SelectSingleNode ( "BorderWidth" ) ;
if ( subNode ! = null )
settings . SubtitleBeaming . BorderWidth = Convert . ToInt32 ( subNode . InnerText ) ;
}
return settings ;
}
private static void CustomSerialize ( string fileName , Settings settings )
{
var xws = new XmlWriterSettings { Indent = true } ;
var sb = new StringBuilder ( ) ;
using ( var textWriter = XmlWriter . Create ( sb , xws ) )
{
textWriter . WriteStartDocument ( ) ;
textWriter . WriteStartElement ( "Settings" , string . Empty ) ;
2016-10-10 17:00:08 +02:00
textWriter . WriteStartElement ( "Compare" , string . Empty ) ;
textWriter . WriteElementString ( "ShowOnlyDifferences" , settings . Compare . ShowOnlyDifferences . ToString ( ) ) ;
textWriter . WriteElementString ( "OnlyLookForDifferenceInText" , settings . Compare . OnlyLookForDifferenceInText . ToString ( ) ) ;
textWriter . WriteElementString ( "IgnoreLineBreaks" , settings . Compare . IgnoreLineBreaks . ToString ( ) ) ;
textWriter . WriteEndElement ( ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteStartElement ( "RecentFiles" , string . Empty ) ;
textWriter . WriteStartElement ( "FileNames" , string . Empty ) ;
foreach ( var item in settings . RecentFiles . Files )
{
textWriter . WriteStartElement ( "FileName" ) ;
if ( item . OriginalFileName ! = null )
textWriter . WriteAttributeString ( "OriginalFileName" , item . OriginalFileName ) ;
if ( item . VideoFileName ! = null )
textWriter . WriteAttributeString ( "VideoFileName" , item . VideoFileName ) ;
textWriter . WriteAttributeString ( "FirstVisibleIndex" , item . FirstVisibleIndex . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteAttributeString ( "FirstSelectedIndex" , item . FirstSelectedIndex . ToString ( CultureInfo . InvariantCulture ) ) ;
2016-04-13 08:41:06 +02:00
if ( item . VideoOffsetInMs > 0 )
textWriter . WriteAttributeString ( "VideoOffset" , item . VideoOffsetInMs . ToString ( CultureInfo . InvariantCulture ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteString ( item . FileName ) ;
textWriter . WriteEndElement ( ) ;
}
textWriter . WriteEndElement ( ) ;
textWriter . WriteEndElement ( ) ;
textWriter . WriteStartElement ( "General" , string . Empty ) ;
textWriter . WriteElementString ( "ShowToolbarNew" , settings . General . ShowToolbarNew . ToString ( ) ) ;
textWriter . WriteElementString ( "ShowToolbarOpen" , settings . General . ShowToolbarOpen . ToString ( ) ) ;
textWriter . WriteElementString ( "ShowToolbarSave" , settings . General . ShowToolbarSave . ToString ( ) ) ;
textWriter . WriteElementString ( "ShowToolbarSaveAs" , settings . General . ShowToolbarSaveAs . ToString ( ) ) ;
textWriter . WriteElementString ( "ShowToolbarFind" , settings . General . ShowToolbarFind . ToString ( ) ) ;
textWriter . WriteElementString ( "ShowToolbarReplace" , settings . General . ShowToolbarReplace . ToString ( ) ) ;
textWriter . WriteElementString ( "ShowToolbarFixCommonErrors" , settings . General . ShowToolbarFixCommonErrors . ToString ( ) ) ;
2016-07-24 08:46:58 +02:00
textWriter . WriteElementString ( "ShowToolbarRemoveTextForHi" , settings . General . ShowToolbarRemoveTextForHi . ToString ( ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "ShowToolbarVisualSync" , settings . General . ShowToolbarVisualSync . ToString ( ) ) ;
textWriter . WriteElementString ( "ShowToolbarSpellCheck" , settings . General . ShowToolbarSpellCheck . ToString ( ) ) ;
2017-04-27 10:10:49 +02:00
textWriter . WriteElementString ( "ShowToolbarNetflixGlyphCheck" , settings . General . ShowToolbarNetflixGlyphCheck . ToString ( ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "ShowToolbarSettings" , settings . General . ShowToolbarSettings . ToString ( ) ) ;
textWriter . WriteElementString ( "ShowToolbarHelp" , settings . General . ShowToolbarHelp . ToString ( ) ) ;
textWriter . WriteElementString ( "ShowFrameRate" , settings . General . ShowFrameRate . ToString ( ) ) ;
textWriter . WriteElementString ( "ShowVideoPlayer" , settings . General . ShowVideoPlayer . ToString ( ) ) ;
textWriter . WriteElementString ( "ShowAudioVisualizer" , settings . General . ShowAudioVisualizer . ToString ( ) ) ;
textWriter . WriteElementString ( "ShowWaveform" , settings . General . ShowWaveform . ToString ( ) ) ;
textWriter . WriteElementString ( "ShowSpectrogram" , settings . General . ShowSpectrogram . ToString ( ) ) ;
textWriter . WriteElementString ( "DefaultFrameRate" , settings . General . DefaultFrameRate . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "DefaultSubtitleFormat" , settings . General . DefaultSubtitleFormat ) ;
textWriter . WriteElementString ( "DefaultEncoding" , settings . General . DefaultEncoding ) ;
textWriter . WriteElementString ( "AutoConvertToUtf8" , settings . General . AutoConvertToUtf8 . ToString ( ) ) ;
2017-04-27 10:10:49 +02:00
textWriter . WriteElementString ( "WriteUtf8Bom" , settings . General . WriteUtf8Bom . ToString ( ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "AutoGuessAnsiEncoding" , settings . General . AutoGuessAnsiEncoding . ToString ( ) ) ;
2017-10-01 09:26:06 +02:00
textWriter . WriteElementString ( "SystemSubtitleFontNameOverride" , settings . General . SystemSubtitleFontNameOverride ) ;
textWriter . WriteElementString ( "SystemSubtitleFontSizeOverride" , settings . General . SystemSubtitleFontSizeOverride . ToString ( CultureInfo . InvariantCulture ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "_subtitleFontName" , settings . General . SubtitleFontName ) ;
textWriter . WriteElementString ( "SubtitleFontSize" , settings . General . SubtitleFontSize . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "SubtitleFontBold" , settings . General . SubtitleFontBold . ToString ( ) ) ;
textWriter . WriteElementString ( "SubtitleFontColor" , settings . General . SubtitleFontColor . ToArgb ( ) . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "SubtitleBackgroundColor" , settings . General . SubtitleBackgroundColor . ToArgb ( ) . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "CenterSubtitleInTextBox" , settings . General . CenterSubtitleInTextBox . ToString ( ) ) ;
textWriter . WriteElementString ( "ShowRecentFiles" , settings . General . ShowRecentFiles . ToString ( ) ) ;
textWriter . WriteElementString ( "RememberSelectedLine" , settings . General . RememberSelectedLine . ToString ( ) ) ;
textWriter . WriteElementString ( "StartLoadLastFile" , settings . General . StartLoadLastFile . ToString ( ) ) ;
textWriter . WriteElementString ( "StartRememberPositionAndSize" , settings . General . StartRememberPositionAndSize . ToString ( ) ) ;
textWriter . WriteElementString ( "StartPosition" , settings . General . StartPosition ) ;
textWriter . WriteElementString ( "StartSize" , settings . General . StartSize ) ;
textWriter . WriteElementString ( "SplitContainerMainSplitterDistance" , settings . General . SplitContainerMainSplitterDistance . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "SplitContainer1SplitterDistance" , settings . General . SplitContainer1SplitterDistance . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "SplitContainerListViewAndTextSplitterDistance" , settings . General . SplitContainerListViewAndTextSplitterDistance . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "StartInSourceView" , settings . General . StartInSourceView . ToString ( ) ) ;
textWriter . WriteElementString ( "RemoveBlankLinesWhenOpening" , settings . General . RemoveBlankLinesWhenOpening . ToString ( ) ) ;
2018-02-06 17:10:38 +01:00
textWriter . WriteElementString ( "RemoveBadCharsWhenOpening" , settings . General . RemoveBadCharsWhenOpening . ToString ( ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "SubtitleLineMaximumLength" , settings . General . SubtitleLineMaximumLength . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "SubtitleMinimumDisplayMilliseconds" , settings . General . SubtitleMinimumDisplayMilliseconds . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "SubtitleMaximumDisplayMilliseconds" , settings . General . SubtitleMaximumDisplayMilliseconds . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "MinimumMillisecondsBetweenLines" , settings . General . MinimumMillisecondsBetweenLines . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "SetStartEndHumanDelay" , settings . General . SetStartEndHumanDelay . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "AutoWrapLineWhileTyping" , settings . General . AutoWrapLineWhileTyping . ToString ( ) ) ;
textWriter . WriteElementString ( "SubtitleMaximumCharactersPerSeconds" , settings . General . SubtitleMaximumCharactersPerSeconds . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-04-27 10:10:49 +02:00
textWriter . WriteElementString ( "SubtitleOptimalCharactersPerSeconds" , settings . General . SubtitleOptimalCharactersPerSeconds . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-03-03 15:40:48 +01:00
textWriter . WriteElementString ( "CharactersPerSecondsIgnoreWhiteSpace" , settings . General . CharactersPerSecondsIgnoreWhiteSpace . ToString ( ) ) ;
2017-04-27 10:10:49 +02:00
textWriter . WriteElementString ( "SubtitleMaximumWordsPerMinute" , settings . General . SubtitleMaximumWordsPerMinute . ToString ( CultureInfo . InvariantCulture ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "SpellCheckLanguage" , settings . General . SpellCheckLanguage ) ;
textWriter . WriteElementString ( "VideoPlayer" , settings . General . VideoPlayer ) ;
textWriter . WriteElementString ( "VideoPlayerDefaultVolume" , settings . General . VideoPlayerDefaultVolume . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "VideoPlayerPreviewFontSize" , settings . General . VideoPlayerPreviewFontSize . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "VideoPlayerPreviewFontBold" , settings . General . VideoPlayerPreviewFontBold . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "VideoPlayerShowStopButton" , settings . General . VideoPlayerShowStopButton . ToString ( ) ) ;
textWriter . WriteElementString ( "VideoPlayerShowStopMute" , settings . General . VideoPlayerShowMuteButton . ToString ( ) ) ;
textWriter . WriteElementString ( "VideoPlayerShowStopFullscreen" , settings . General . VideoPlayerShowFullscreenButton . ToString ( ) ) ;
textWriter . WriteElementString ( "Language" , settings . General . Language ) ;
textWriter . WriteElementString ( "ListViewLineSeparatorString" , settings . General . ListViewLineSeparatorString ) ;
textWriter . WriteElementString ( "ListViewDoubleClickAction" , settings . General . ListViewDoubleClickAction . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "UppercaseLetters" , settings . General . UppercaseLetters ) ;
textWriter . WriteElementString ( "DefaultAdjustMilliseconds" , settings . General . DefaultAdjustMilliseconds . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "AutoRepeatOn" , settings . General . AutoRepeatOn . ToString ( ) ) ;
textWriter . WriteElementString ( "AutoRepeatCount" , settings . General . AutoRepeatCount . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "AutoContinueOn" , settings . General . AutoContinueOn . ToString ( ) ) ;
2017-10-10 18:08:33 +02:00
textWriter . WriteElementString ( "AutoContinueDelay" , settings . General . AutoContinueDelay . ToString ( CultureInfo . InvariantCulture ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "SyncListViewWithVideoWhilePlaying" , settings . General . SyncListViewWithVideoWhilePlaying . ToString ( ) ) ;
textWriter . WriteElementString ( "AutoBackupSeconds" , settings . General . AutoBackupSeconds . ToString ( CultureInfo . InvariantCulture ) ) ;
2016-07-09 12:00:30 +02:00
textWriter . WriteElementString ( "AutoBackupDeleteAfterMonths" , settings . General . AutoBackupDeleteAfterMonths . ToString ( CultureInfo . InvariantCulture ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "SpellChecker" , settings . General . SpellChecker ) ;
textWriter . WriteElementString ( "AllowEditOfOriginalSubtitle" , settings . General . AllowEditOfOriginalSubtitle . ToString ( ) ) ;
textWriter . WriteElementString ( "PromptDeleteLines" , settings . General . PromptDeleteLines . ToString ( ) ) ;
textWriter . WriteElementString ( "Undocked" , settings . General . Undocked . ToString ( ) ) ;
textWriter . WriteElementString ( "UndockedVideoPosition" , settings . General . UndockedVideoPosition ) ;
textWriter . WriteElementString ( "UndockedWaveformPosition" , settings . General . UndockedWaveformPosition ) ;
textWriter . WriteElementString ( "UndockedVideoControlsPosition" , settings . General . UndockedVideoControlsPosition ) ;
textWriter . WriteElementString ( "WaveformCenter" , settings . General . WaveformCenter . ToString ( ) ) ;
2016-06-13 19:27:24 +02:00
textWriter . WriteElementString ( "WaveformUpdateIntervalMs" , settings . General . WaveformUpdateIntervalMs . ToString ( ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "SmallDelayMilliseconds" , settings . General . SmallDelayMilliseconds . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "LargeDelayMilliseconds" , settings . General . LargeDelayMilliseconds . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ShowOriginalAsPreviewIfAvailable" , settings . General . ShowOriginalAsPreviewIfAvailable . ToString ( ) ) ;
textWriter . WriteElementString ( "LastPacCodePage" , settings . General . LastPacCodePage . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "OpenSubtitleExtraExtensions" , settings . General . OpenSubtitleExtraExtensions ) ;
textWriter . WriteElementString ( "ListViewColumnsRememberSize" , settings . General . ListViewColumnsRememberSize . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ListViewNumberWidth" , settings . General . ListViewNumberWidth . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ListViewStartWidth" , settings . General . ListViewStartWidth . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ListViewEndWidth" , settings . General . ListViewEndWidth . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ListViewDurationWidth" , settings . General . ListViewDurationWidth . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-01-15 09:46:26 +01:00
textWriter . WriteElementString ( "ListViewCpsWidth" , settings . General . ListViewCpsWidth . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ListViewWpmWidth" , settings . General . ListViewWpmWidth . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-11-06 18:22:49 +01:00
textWriter . WriteElementString ( "ListViewGapWidth" , settings . General . ListViewGapWidth . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-04-16 10:03:10 +02:00
textWriter . WriteElementString ( "ListViewActorWidth" , settings . General . ListViewActorWidth . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-04-26 18:51:34 +02:00
textWriter . WriteElementString ( "ListViewRegionWidth" , settings . General . ListViewRegionWidth . ToString ( CultureInfo . InvariantCulture ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "VlcWaveTranscodeSettings" , settings . General . VlcWaveTranscodeSettings ) ;
textWriter . WriteElementString ( "VlcLocation" , settings . General . VlcLocation ) ;
textWriter . WriteElementString ( "VlcLocationRelative" , settings . General . VlcLocationRelative ) ;
2016-02-28 10:58:19 +01:00
textWriter . WriteElementString ( "MpvVideoOutput" , settings . General . MpvVideoOutput ) ;
2017-02-09 21:14:48 +01:00
textWriter . WriteElementString ( "MpvHandlesPreviewText" , settings . General . MpvHandlesPreviewText . ToString ( ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "MpcHcLocation" , settings . General . MpcHcLocation ) ;
textWriter . WriteElementString ( "UseFFmpegForWaveExtraction" , settings . General . UseFFmpegForWaveExtraction . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "FFmpegLocation" , settings . General . FFmpegLocation ) ;
textWriter . WriteElementString ( "UseTimeFormatHHMMSSFF" , settings . General . UseTimeFormatHHMMSSFF . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ClearStatusBarAfterSeconds" , settings . General . ClearStatusBarAfterSeconds . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "Company" , settings . General . Company ) ;
textWriter . WriteElementString ( "MoveVideo100Or500MsPlaySmallSample" , settings . General . MoveVideo100Or500MsPlaySmallSample . ToString ( ) ) ;
textWriter . WriteElementString ( "DisableVideoAutoLoading" , settings . General . DisableVideoAutoLoading . ToString ( ) ) ;
textWriter . WriteElementString ( "RightToLeftMode" , settings . General . RightToLeftMode . ToString ( ) ) ;
textWriter . WriteElementString ( "LastSaveAsFormat" , settings . General . LastSaveAsFormat ) ;
textWriter . WriteElementString ( "CheckForUpdates" , settings . General . CheckForUpdates . ToString ( ) ) ;
textWriter . WriteElementString ( "LastCheckForUpdates" , settings . General . LastCheckForUpdates . ToString ( "yyyy-MM-dd" ) ) ;
textWriter . WriteElementString ( "ShowProgress" , settings . General . ShowProgress . ToString ( ) ) ;
2017-11-13 16:17:22 +01:00
textWriter . WriteElementString ( "UseDarkTheme" , settings . General . UseDarkTheme . ToString ( ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "ShowBetaStuff" , settings . General . ShowBetaStuff . ToString ( ) ) ;
textWriter . WriteElementString ( "NewEmptyDefaultMs" , settings . General . NewEmptyDefaultMs . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteEndElement ( ) ;
textWriter . WriteStartElement ( "Tools" , string . Empty ) ;
textWriter . WriteElementString ( "StartSceneIndex" , settings . Tools . StartSceneIndex . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "EndSceneIndex" , settings . Tools . EndSceneIndex . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "VerifyPlaySeconds" , settings . Tools . VerifyPlaySeconds . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "MergeLinesShorterThan" , settings . Tools . MergeLinesShorterThan . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "FixShortDisplayTimesAllowMoveStartTime" , settings . Tools . FixShortDisplayTimesAllowMoveStartTime . ToString ( ) ) ;
textWriter . WriteElementString ( "MusicSymbol" , settings . Tools . MusicSymbol ) ;
2018-01-02 15:07:52 +01:00
textWriter . WriteElementString ( "MusicSymbolReplace" , settings . Tools . MusicSymbolReplace ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "UnicodeSymbolsToInsert" , settings . Tools . UnicodeSymbolsToInsert ) ;
textWriter . WriteElementString ( "SpellCheckAutoChangeNames" , settings . Tools . SpellCheckAutoChangeNames . ToString ( ) ) ;
textWriter . WriteElementString ( "SpellCheckOneLetterWords" , settings . Tools . SpellCheckOneLetterWords . ToString ( ) ) ;
textWriter . WriteElementString ( "SpellCheckEnglishAllowInQuoteAsIng" , settings . Tools . SpellCheckEnglishAllowInQuoteAsIng . ToString ( ) ) ;
textWriter . WriteElementString ( "SpellCheckShowCompletedMessage" , settings . Tools . SpellCheckShowCompletedMessage . ToString ( ) ) ;
textWriter . WriteElementString ( "OcrFixUseHardcodedRules" , settings . Tools . OcrFixUseHardcodedRules . ToString ( ) ) ;
textWriter . WriteElementString ( "Interjections" , settings . Tools . Interjections ) ;
textWriter . WriteElementString ( "MicrosoftBingApiId" , settings . Tools . MicrosoftBingApiId ) ;
2017-09-23 08:57:27 +02:00
textWriter . WriteElementString ( "MicrosoftTranslatorApiKey" , settings . Tools . MicrosoftTranslatorApiKey ) ;
2017-06-12 20:08:20 +02:00
textWriter . WriteElementString ( "GoogleTranslateUrl" , settings . Tools . GoogleTranslateUrl ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "GoogleApiKey" , settings . Tools . GoogleApiKey ) ;
textWriter . WriteElementString ( "UseGooleApiPaidService" , settings . Tools . UseGooleApiPaidService . ToString ( ) ) ;
textWriter . WriteElementString ( "GoogleTranslateLastTargetLanguage" , settings . Tools . GoogleTranslateLastTargetLanguage ) ;
2016-05-16 20:36:10 +02:00
textWriter . WriteElementString ( "TranslateAutoSplit" , settings . Tools . TranslateAutoSplit . ToString ( ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "ListViewSyntaxColorDurationSmall" , settings . Tools . ListViewSyntaxColorDurationSmall . ToString ( ) ) ;
textWriter . WriteElementString ( "ListViewSyntaxColorDurationBig" , settings . Tools . ListViewSyntaxColorDurationBig . ToString ( ) ) ;
textWriter . WriteElementString ( "ListViewSyntaxColorLongLines" , settings . Tools . ListViewSyntaxColorLongLines . ToString ( ) ) ;
textWriter . WriteElementString ( "ListViewSyntaxMoreThanXLines" , settings . Tools . ListViewSyntaxMoreThanXLines . ToString ( ) ) ;
textWriter . WriteElementString ( "ListViewSyntaxMoreThanXLinesX" , settings . Tools . ListViewSyntaxMoreThanXLinesX . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ListViewSyntaxColorOverlap" , settings . Tools . ListViewSyntaxColorOverlap . ToString ( ) ) ;
textWriter . WriteElementString ( "ListViewSyntaxErrorColor" , settings . Tools . ListViewSyntaxErrorColor . ToArgb ( ) . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ListViewUnfocusedSelectedColor" , settings . Tools . ListViewUnfocusedSelectedColor . ToArgb ( ) . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-02-23 08:52:49 +01:00
textWriter . WriteElementString ( "ListViewShowColumnEndTime" , settings . Tools . ListViewShowColumnEndTime . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ListViewShowColumnDuration" , settings . Tools . ListViewShowColumnDuration . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-01-15 09:46:26 +01:00
textWriter . WriteElementString ( "ListViewShowColumnCharsPerSec" , settings . Tools . ListViewShowColumnCharsPerSec . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ListViewShowColumnWordsPerMin" , settings . Tools . ListViewShowColumnWordsPerMin . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-11-06 18:22:49 +01:00
textWriter . WriteElementString ( "ListViewShowColumnGap" , settings . Tools . ListViewShowColumnGap . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-04-16 10:03:10 +02:00
textWriter . WriteElementString ( "ListViewShowColumnActor" , settings . Tools . ListViewShowColumnActor . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-04-26 18:51:34 +02:00
textWriter . WriteElementString ( "ListViewShowColumnRegion" , settings . Tools . ListViewShowColumnRegion . ToString ( CultureInfo . InvariantCulture ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "SplitAdvanced" , settings . Tools . SplitAdvanced . ToString ( ) ) ;
textWriter . WriteElementString ( "SplitOutputFolder" , settings . Tools . SplitOutputFolder ) ;
textWriter . WriteElementString ( "SplitNumberOfParts" , settings . Tools . SplitNumberOfParts . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "SplitVia" , settings . Tools . SplitVia ) ;
textWriter . WriteElementString ( "NewEmptyTranslationText" , settings . Tools . NewEmptyTranslationText ) ;
textWriter . WriteElementString ( "BatchConvertOutputFolder" , settings . Tools . BatchConvertOutputFolder ) ;
textWriter . WriteElementString ( "BatchConvertOverwriteExisting" , settings . Tools . BatchConvertOverwriteExisting . ToString ( ) ) ;
textWriter . WriteElementString ( "BatchConvertOverwriteOriginal" , settings . Tools . BatchConvertOverwriteOriginal . ToString ( ) ) ;
textWriter . WriteElementString ( "BatchConvertRemoveFormatting" , settings . Tools . BatchConvertRemoveFormatting . ToString ( ) ) ;
2017-09-03 15:29:43 +02:00
textWriter . WriteElementString ( "BatchConvertBridgeGaps" , settings . Tools . BatchConvertBridgeGaps . ToString ( ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "BatchConvertFixCasing" , settings . Tools . BatchConvertFixCasing . ToString ( ) ) ;
textWriter . WriteElementString ( "BatchConvertRemoveTextForHI" , settings . Tools . BatchConvertRemoveTextForHI . ToString ( ) ) ;
textWriter . WriteElementString ( "BatchConvertSplitLongLines" , settings . Tools . BatchConvertSplitLongLines . ToString ( ) ) ;
textWriter . WriteElementString ( "BatchConvertFixCommonErrors" , settings . Tools . BatchConvertFixCommonErrors . ToString ( ) ) ;
textWriter . WriteElementString ( "BatchConvertMultipleReplace" , settings . Tools . BatchConvertMultipleReplace . ToString ( ) ) ;
textWriter . WriteElementString ( "BatchConvertAutoBalance" , settings . Tools . BatchConvertAutoBalance . ToString ( ) ) ;
textWriter . WriteElementString ( "BatchConvertSetMinDisplayTimeBetweenSubtitles" , settings . Tools . BatchConvertSetMinDisplayTimeBetweenSubtitles . ToString ( ) ) ;
textWriter . WriteElementString ( "BatchConvertLanguage" , settings . Tools . BatchConvertLanguage ) ;
textWriter . WriteElementString ( "BatchConvertFormat" , settings . Tools . BatchConvertFormat ) ;
textWriter . WriteElementString ( "BatchConvertAssStyles" , settings . Tools . BatchConvertAssStyles ) ;
textWriter . WriteElementString ( "BatchConvertSsaStyles" , settings . Tools . BatchConvertSsaStyles ) ;
2017-10-04 16:00:15 +02:00
textWriter . WriteElementString ( "BatchConvertUseStyleFromSource" , settings . Tools . BatchConvertUseStyleFromSource . ToString ( ) ) ;
2017-01-15 09:46:26 +01:00
textWriter . WriteElementString ( "BatchConvertExportCustomTextTemplate" , settings . Tools . BatchConvertExportCustomTextTemplate ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "ModifySelectionRule" , settings . Tools . ModifySelectionRule ) ;
textWriter . WriteElementString ( "ModifySelectionText" , settings . Tools . ModifySelectionText ) ;
textWriter . WriteElementString ( "ModifySelectionCaseSensitive" , settings . Tools . ModifySelectionCaseSensitive . ToString ( ) ) ;
textWriter . WriteElementString ( "ExportVobSubFontName" , settings . Tools . ExportVobSubFontName ) ;
textWriter . WriteElementString ( "ExportVobSubFontSize" , settings . Tools . ExportVobSubFontSize . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ExportVobSubVideoResolution" , settings . Tools . ExportVobSubVideoResolution ) ;
textWriter . WriteElementString ( "ExportVobSubLanguage" , settings . Tools . ExportVobSubLanguage ) ;
textWriter . WriteElementString ( "ExportVobSubSimpleRendering" , settings . Tools . ExportVobSubSimpleRendering . ToString ( ) ) ;
textWriter . WriteElementString ( "ExportVobAntiAliasingWithTransparency" , settings . Tools . ExportVobAntiAliasingWithTransparency . ToString ( ) ) ;
textWriter . WriteElementString ( "ExportBluRayFontName" , settings . Tools . ExportBluRayFontName ) ;
textWriter . WriteElementString ( "ExportBluRayFontSize" , settings . Tools . ExportBluRayFontSize . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ExportFcpFontName" , settings . Tools . ExportFcpFontName ) ;
textWriter . WriteElementString ( "ExportFontNameOther" , settings . Tools . ExportFontNameOther ) ;
textWriter . WriteElementString ( "ExportFcpFontSize" , settings . Tools . ExportFcpFontSize . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ExportFcpImageType" , settings . Tools . ExportFcpImageType ) ;
2016-08-07 18:08:39 +02:00
textWriter . WriteElementString ( "ExportFcpPalNtsc" , settings . Tools . ExportFcpPalNtsc ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "ExportBdnXmlImageType" , settings . Tools . ExportBdnXmlImageType ) ;
textWriter . WriteElementString ( "ExportLastFontSize" , settings . Tools . ExportLastFontSize . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ExportLastLineHeight" , settings . Tools . ExportLastLineHeight . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ExportLastBorderWidth" , settings . Tools . ExportLastBorderWidth . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ExportLastFontBold" , settings . Tools . ExportLastFontBold . ToString ( ) ) ;
textWriter . WriteElementString ( "ExportBluRayVideoResolution" , settings . Tools . ExportBluRayVideoResolution ) ;
2016-05-30 16:09:39 +02:00
textWriter . WriteElementString ( "ExportFcpVideoResolution" , settings . Tools . ExportFcpVideoResolution ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "ExportFontColor" , settings . Tools . ExportFontColor . ToArgb ( ) . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ExportBorderColor" , settings . Tools . ExportBorderColor . ToArgb ( ) . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ExportShadowColor" , settings . Tools . ExportShadowColor . ToArgb ( ) . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-10-04 16:00:15 +02:00
textWriter . WriteElementString ( "ExportBoxBorderSize" , settings . Tools . ExportBoxBorderSize . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-06-15 13:37:13 +02:00
textWriter . WriteElementString ( "ExportBottomMarginUnit" , settings . Tools . ExportBottomMarginUnit ) ;
2017-04-14 11:54:42 +02:00
textWriter . WriteElementString ( "ExportBottomMarginPercent" , settings . Tools . ExportBottomMarginPercent . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-06-15 13:37:13 +02:00
textWriter . WriteElementString ( "ExportBottomMarginPixels" , settings . Tools . ExportBottomMarginPixels . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ExportLeftRightMarginUnit" , settings . Tools . ExportLeftRightMarginUnit ) ;
2017-04-14 11:54:42 +02:00
textWriter . WriteElementString ( "ExportLeftRightMarginPercent" , settings . Tools . ExportLeftRightMarginPercent . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-06-15 13:37:13 +02:00
textWriter . WriteElementString ( "ExportLeftRightMarginPixels" , settings . Tools . ExportLeftRightMarginPixels . ToString ( CultureInfo . InvariantCulture ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "ExportHorizontalAlignment" , settings . Tools . ExportHorizontalAlignment . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-04-14 11:54:42 +02:00
textWriter . WriteElementString ( "ExportBluRayBottomMarginPercent" , settings . Tools . ExportBluRayBottomMarginPercent . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-06-15 13:37:13 +02:00
textWriter . WriteElementString ( "ExportBluRayBottomMarginPixels" , settings . Tools . ExportBluRayBottomMarginPixels . ToString ( CultureInfo . InvariantCulture ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "ExportBluRayShadow" , settings . Tools . ExportBluRayShadow . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "Export3DType" , settings . Tools . Export3DType . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "Export3DDepth" , settings . Tools . Export3DDepth . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ExportLastShadowTransparency" , settings . Tools . ExportLastShadowTransparency . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ExportLastFrameRate" , settings . Tools . ExportLastFrameRate . ToString ( CultureInfo . InvariantCulture ) ) ;
2016-08-07 18:08:39 +02:00
textWriter . WriteElementString ( "ExportFullFrame" , settings . Tools . ExportFullFrame . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-10-30 18:07:41 +01:00
textWriter . WriteElementString ( "ExportFcpFullPathUrl" , settings . Tools . ExportFcpFullPathUrl . ToString ( CultureInfo . InvariantCulture ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "ExportPenLineJoin" , settings . Tools . ExportPenLineJoin ) ;
textWriter . WriteElementString ( "FixCommonErrorsFixOverlapAllowEqualEndStart" , settings . Tools . FixCommonErrorsFixOverlapAllowEqualEndStart . ToString ( ) ) ;
textWriter . WriteElementString ( "FixCommonErrorsSkipStepOne" , settings . Tools . FixCommonErrorsSkipStepOne . ToString ( ) ) ;
textWriter . WriteElementString ( "ImportTextSplitting" , settings . Tools . ImportTextSplitting ) ;
textWriter . WriteElementString ( "ImportTextMergeShortLines" , settings . Tools . ImportTextMergeShortLines . ToString ( ) ) ;
textWriter . WriteElementString ( "ImportTextLineBreak" , settings . Tools . ImportTextLineBreak ) ;
2017-04-27 10:10:49 +02:00
textWriter . WriteElementString ( "ImportTextMergeShortLines" , settings . Tools . ImportTextMergeShortLines . ToString ( ) ) ;
textWriter . WriteElementString ( "ImportTextRemoveEmptyLines" , settings . Tools . ImportTextRemoveEmptyLines . ToString ( ) ) ;
textWriter . WriteElementString ( "ImportTextRemoveLinesNoLetters" , settings . Tools . ImportTextRemoveLinesNoLetters . ToString ( ) ) ;
textWriter . WriteElementString ( "ImportTextGenerateTimeCodes" , settings . Tools . ImportTextGenerateTimeCodes . ToString ( ) ) ;
textWriter . WriteElementString ( "ImportTextAutoBreak" , settings . Tools . ImportTextAutoBreak . ToString ( ) ) ;
textWriter . WriteElementString ( "ImportTextGap" , settings . Tools . ImportTextGap . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ImportTextDurationAuto" , settings . Tools . ImportTextDurationAuto . ToString ( ) ) ;
textWriter . WriteElementString ( "ImportTextFixedDuration" , settings . Tools . ImportTextFixedDuration . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "GenerateTimeCodePatterns" , settings . Tools . GenerateTimeCodePatterns ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "GenerateTimeCodePatterns" , settings . Tools . GenerateTimeCodePatterns ) ;
textWriter . WriteElementString ( "MusicSymbolStyle" , settings . Tools . MusicSymbolStyle ) ;
textWriter . WriteElementString ( "BridgeGapMilliseconds" , settings . Tools . BridgeGapMilliseconds . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "ExportCustomTemplates" , settings . Tools . ExportCustomTemplates ) ;
textWriter . WriteElementString ( "ChangeCasingChoice" , settings . Tools . ChangeCasingChoice ) ;
textWriter . WriteElementString ( "UseNoLineBreakAfter" , settings . Tools . UseNoLineBreakAfter . ToString ( ) ) ;
textWriter . WriteElementString ( "NoLineBreakAfterEnglish" , settings . Tools . NoLineBreakAfterEnglish ) ;
2016-08-08 18:19:36 +02:00
textWriter . WriteElementString ( "UseNoLineBreakAfter" , settings . Tools . ExportTextFormatText ) ;
2016-08-10 22:00:05 +02:00
textWriter . WriteElementString ( "ExportTextRemoveStyling" , settings . Tools . ExportTextRemoveStyling . ToString ( ) ) ;
textWriter . WriteElementString ( "ExportTextShowLineNumbers" , settings . Tools . ExportTextShowLineNumbers . ToString ( ) ) ;
textWriter . WriteElementString ( "ExportTextShowLineNumbersNewLine" , settings . Tools . ExportTextShowLineNumbersNewLine . ToString ( ) ) ;
textWriter . WriteElementString ( "ExportTextShowTimeCodes" , settings . Tools . ExportTextShowTimeCodes . ToString ( ) ) ;
textWriter . WriteElementString ( "ExportTextShowTimeCodesNewLine" , settings . Tools . ExportTextShowTimeCodesNewLine . ToString ( ) ) ;
textWriter . WriteElementString ( "ExportTextNewLineAfterText" , settings . Tools . ExportTextNewLineAfterText . ToString ( ) ) ;
textWriter . WriteElementString ( "ExportTextNewLineBetweenSubtitles" , settings . Tools . ExportTextNewLineBetweenSubtitles . ToString ( ) ) ;
2018-02-04 19:40:33 +01:00
textWriter . WriteElementString ( "ExportTextTimeCodeFormat" , settings . Tools . ExportTextTimeCodeFormat ) ;
textWriter . WriteElementString ( "ExportTextTimeCodeSeparator" , settings . Tools . ExportTextTimeCodeSeparator ) ;
2016-08-10 22:00:05 +02:00
textWriter . WriteElementString ( "VideoOffsetKeepTimeCodes" , settings . Tools . VideoOffsetKeepTimeCodes . ToString ( ) ) ;
2017-11-06 18:22:49 +01:00
textWriter . WriteElementString ( "MoveStartEndMs" , settings . Tools . MoveStartEndMs . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-12-23 09:17:51 +01:00
textWriter . WriteElementString ( "AdjustDurationSeconds" , settings . Tools . AdjustDurationSeconds . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "AdjustDurationPercent" , settings . Tools . AdjustDurationPercent . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "AdjustDurationLast" , settings . Tools . AdjustDurationLast ) ;
2016-02-08 21:11:03 +01:00
if ( settings . Tools . FindHistory ! = null & & settings . Tools . FindHistory . Count > 0 )
{
const int maximumFindHistoryItems = 10 ;
textWriter . WriteStartElement ( "FindHistory" , string . Empty ) ;
int maxIndex = settings . Tools . FindHistory . Count ;
if ( maxIndex > maximumFindHistoryItems )
maxIndex = maximumFindHistoryItems ;
for ( int index = 0 ; index < maxIndex ; index + + )
{
var text = settings . Tools . FindHistory [ index ] ;
textWriter . WriteElementString ( "Text" , text ) ;
}
textWriter . WriteEndElement ( ) ;
}
textWriter . WriteEndElement ( ) ;
textWriter . WriteStartElement ( "SubtitleSettings" , string . Empty ) ;
textWriter . WriteElementString ( "SsaFontName" , settings . SubtitleSettings . SsaFontName ) ;
textWriter . WriteElementString ( "SsaFontSize" , settings . SubtitleSettings . SsaFontSize . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "SsaFontColorArgb" , settings . SubtitleSettings . SsaFontColorArgb . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "SsaFontBold" , settings . SubtitleSettings . SsaFontBold . ToString ( ) ) ;
textWriter . WriteElementString ( "SsaOutline" , settings . SubtitleSettings . SsaOutline . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "SsaShadow" , settings . SubtitleSettings . SsaShadow . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "SsaOpaqueBox" , settings . SubtitleSettings . SsaOpaqueBox . ToString ( ) ) ;
textWriter . WriteElementString ( "SsaMarginLeft" , settings . SubtitleSettings . SsaMarginLeft . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "SsaMarginRight" , settings . SubtitleSettings . SsaMarginRight . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "SsaMarginTopBottom" , settings . SubtitleSettings . SsaMarginTopBottom . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "DCinemaFontFile" , settings . SubtitleSettings . DCinemaFontFile ) ;
textWriter . WriteElementString ( "DCinemaFontSize" , settings . SubtitleSettings . DCinemaFontSize . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "DCinemaBottomMargin" , settings . SubtitleSettings . DCinemaBottomMargin . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "DCinemaZPosition" , settings . SubtitleSettings . DCinemaZPosition . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "DCinemaFadeUpTime" , settings . SubtitleSettings . DCinemaFadeUpTime . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "DCinemaFadeDownTime" , settings . SubtitleSettings . DCinemaFadeDownTime . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "SamiDisplayTwoClassesAsTwoSubtitles" , settings . SubtitleSettings . SamiDisplayTwoClassesAsTwoSubtitles . ToString ( ) ) ;
textWriter . WriteElementString ( "SamiFullHtmlEncode" , settings . SubtitleSettings . SamiHtmlEncodeMode . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "TimedText10TimeCodeFormat" , settings . SubtitleSettings . TimedText10TimeCodeFormat ) ;
textWriter . WriteElementString ( "TimedText10ShowStyleAndLanguage" , settings . SubtitleSettings . TimedText10ShowStyleAndLanguage . ToString ( ) ) ;
textWriter . WriteElementString ( "FcpFontSize" , settings . SubtitleSettings . FcpFontSize . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "FcpFontName" , settings . SubtitleSettings . FcpFontName ) ;
2016-04-09 21:20:30 +02:00
textWriter . WriteElementString ( "Cavena890StartOfMessage" , settings . SubtitleSettings . Cavena890StartOfMessage ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "EbuStlTeletextUseBox" , settings . SubtitleSettings . EbuStlTeletextUseBox . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "EbuStlTeletextUseDoubleHeight" , settings . SubtitleSettings . EbuStlTeletextUseDoubleHeight . ToString ( CultureInfo . InvariantCulture ) ) ;
2017-02-04 17:41:13 +01:00
textWriter . WriteElementString ( "EbuStlMarginTop" , settings . SubtitleSettings . EbuStlMarginTop . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "EbuStlMarginBottom" , settings . SubtitleSettings . EbuStlMarginBottom . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "EbuStlNewLineRows" , settings . SubtitleSettings . EbuStlNewLineRows . ToString ( CultureInfo . InvariantCulture ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "CheetahCaptionAlwayWriteEndTime" , settings . SubtitleSettings . CheetahCaptionAlwayWriteEndTime . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "NuendoCharacterListFile" , settings . SubtitleSettings . NuendoCharacterListFile ) ;
textWriter . WriteEndElement ( ) ;
textWriter . WriteStartElement ( "Proxy" , string . Empty ) ;
textWriter . WriteElementString ( "ProxyAddress" , settings . Proxy . ProxyAddress ) ;
textWriter . WriteElementString ( "UserName" , settings . Proxy . UserName ) ;
textWriter . WriteElementString ( "Password" , settings . Proxy . Password ) ;
textWriter . WriteElementString ( "Domain" , settings . Proxy . Domain ) ;
textWriter . WriteEndElement ( ) ;
textWriter . WriteStartElement ( "WordLists" , string . Empty ) ;
textWriter . WriteElementString ( "LastLanguage" , settings . WordLists . LastLanguage ) ;
2017-04-10 19:23:24 +02:00
textWriter . WriteElementString ( "Names" , settings . WordLists . NamesUrl ) ;
textWriter . WriteElementString ( "UseOnlineNames" , settings . WordLists . UseOnlineNames . ToString ( ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteEndElement ( ) ;
2017-10-30 18:07:41 +01:00
textWriter . WriteStartElement ( "FcpExportSettings" , string . Empty ) ;
textWriter . WriteElementString ( "FontName" , settings . FcpExportSettings . FontName ) ;
textWriter . WriteElementString ( "FontSize" , settings . FcpExportSettings . FontSize . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "Alignment" , settings . FcpExportSettings . Alignment ) ;
textWriter . WriteElementString ( "Baseline" , settings . FcpExportSettings . Baseline . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "Color" , settings . FcpExportSettings . Color . ToArgb ( ) . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteEndElement ( ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteStartElement ( "CommonErrors" , string . Empty ) ;
textWriter . WriteElementString ( "StartPosition" , settings . CommonErrors . StartPosition ) ;
textWriter . WriteElementString ( "StartSize" , settings . CommonErrors . StartSize ) ;
textWriter . WriteElementString ( "EmptyLinesTicked" , settings . CommonErrors . EmptyLinesTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "OverlappingDisplayTimeTicked" , settings . CommonErrors . OverlappingDisplayTimeTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "TooShortDisplayTimeTicked" , settings . CommonErrors . TooShortDisplayTimeTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "TooLongDisplayTimeTicked" , settings . CommonErrors . TooLongDisplayTimeTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "InvalidItalicTagsTicked" , settings . CommonErrors . InvalidItalicTagsTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "BreakLongLinesTicked" , settings . CommonErrors . BreakLongLinesTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "MergeShortLinesTicked" , settings . CommonErrors . MergeShortLinesTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "MergeShortLinesAllTicked" , settings . CommonErrors . MergeShortLinesAllTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "UnneededSpacesTicked" , settings . CommonErrors . UnneededSpacesTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "UnneededPeriodsTicked" , settings . CommonErrors . UnneededPeriodsTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "MissingSpacesTicked" , settings . CommonErrors . MissingSpacesTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "AddMissingQuotesTicked" , settings . CommonErrors . AddMissingQuotesTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "Fix3PlusLinesTicked" , settings . CommonErrors . Fix3PlusLinesTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "FixHyphensTicked" , settings . CommonErrors . FixHyphensTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "FixHyphensAddTicked" , settings . CommonErrors . FixHyphensAddTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "UppercaseIInsideLowercaseWordTicked" , settings . CommonErrors . UppercaseIInsideLowercaseWordTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "DoubleApostropheToQuoteTicked" , settings . CommonErrors . DoubleApostropheToQuoteTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "AddPeriodAfterParagraphTicked" , settings . CommonErrors . AddPeriodAfterParagraphTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "StartWithUppercaseLetterAfterParagraphTicked" , settings . CommonErrors . StartWithUppercaseLetterAfterParagraphTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "StartWithUppercaseLetterAfterPeriodInsideParagraphTicked" , settings . CommonErrors . StartWithUppercaseLetterAfterPeriodInsideParagraphTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "StartWithUppercaseLetterAfterColonTicked" , settings . CommonErrors . StartWithUppercaseLetterAfterColonTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "AloneLowercaseIToUppercaseIEnglishTicked" , settings . CommonErrors . AloneLowercaseIToUppercaseIEnglishTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "FixOcrErrorsViaReplaceListTicked" , settings . CommonErrors . FixOcrErrorsViaReplaceListTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "RemoveSpaceBetweenNumberTicked" , settings . CommonErrors . RemoveSpaceBetweenNumberTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "FixDialogsOnOneLineTicked" , settings . CommonErrors . FixDialogsOnOneLineTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "TurkishAnsiTicked" , settings . CommonErrors . TurkishAnsiTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "DanishLetterITicked" , settings . CommonErrors . DanishLetterITicked . ToString ( ) ) ;
textWriter . WriteElementString ( "SpanishInvertedQuestionAndExclamationMarksTicked" , settings . CommonErrors . SpanishInvertedQuestionAndExclamationMarksTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "FixDoubleDashTicked" , settings . CommonErrors . FixDoubleDashTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "FixDoubleGreaterThanTicked" , settings . CommonErrors . FixDoubleGreaterThanTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "FixEllipsesStartTicked" , settings . CommonErrors . FixEllipsesStartTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "FixMissingOpenBracketTicked" , settings . CommonErrors . FixMissingOpenBracketTicked . ToString ( ) ) ;
textWriter . WriteElementString ( "FixMusicNotationTicked" , settings . CommonErrors . FixMusicNotationTicked . ToString ( ) ) ;
textWriter . WriteEndElement ( ) ;
textWriter . WriteStartElement ( "VideoControls" , string . Empty ) ;
textWriter . WriteElementString ( "CustomSearchText1" , settings . VideoControls . CustomSearchText1 ) ;
textWriter . WriteElementString ( "CustomSearchText2" , settings . VideoControls . CustomSearchText2 ) ;
textWriter . WriteElementString ( "CustomSearchText3" , settings . VideoControls . CustomSearchText3 ) ;
textWriter . WriteElementString ( "CustomSearchText4" , settings . VideoControls . CustomSearchText4 ) ;
textWriter . WriteElementString ( "CustomSearchText5" , settings . VideoControls . CustomSearchText5 ) ;
textWriter . WriteElementString ( "CustomSearchText6" , settings . VideoControls . CustomSearchText6 ) ;
textWriter . WriteElementString ( "CustomSearchUrl1" , settings . VideoControls . CustomSearchUrl1 ) ;
textWriter . WriteElementString ( "CustomSearchUrl2" , settings . VideoControls . CustomSearchUrl2 ) ;
textWriter . WriteElementString ( "CustomSearchUrl3" , settings . VideoControls . CustomSearchUrl3 ) ;
textWriter . WriteElementString ( "CustomSearchUrl4" , settings . VideoControls . CustomSearchUrl4 ) ;
textWriter . WriteElementString ( "CustomSearchUrl5" , settings . VideoControls . CustomSearchUrl5 ) ;
textWriter . WriteElementString ( "CustomSearchUrl6" , settings . VideoControls . CustomSearchUrl6 ) ;
textWriter . WriteElementString ( "LastActiveTab" , settings . VideoControls . LastActiveTab ) ;
textWriter . WriteElementString ( "WaveformDrawGrid" , settings . VideoControls . WaveformDrawGrid . ToString ( ) ) ;
2017-01-16 18:57:29 +01:00
textWriter . WriteElementString ( "WaveformDrawCps" , settings . VideoControls . WaveformDrawCps . ToString ( ) ) ;
textWriter . WriteElementString ( "WaveformDrawWpm" , settings . VideoControls . WaveformDrawWpm . ToString ( ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "WaveformAllowOverlap" , settings . VideoControls . WaveformAllowOverlap . ToString ( ) ) ;
textWriter . WriteElementString ( "WaveformFocusOnMouseEnter" , settings . VideoControls . WaveformFocusOnMouseEnter . ToString ( ) ) ;
textWriter . WriteElementString ( "WaveformListViewFocusOnMouseEnter" , settings . VideoControls . WaveformListViewFocusOnMouseEnter . ToString ( ) ) ;
2017-01-15 09:46:26 +01:00
textWriter . WriteElementString ( "WaveformSetVideoPositionOnMoveStartEnd" , settings . VideoControls . WaveformSetVideoPositionOnMoveStartEnd . ToString ( ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "WaveformBorderHitMs" , settings . VideoControls . WaveformBorderHitMs . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "WaveformGridColor" , settings . VideoControls . WaveformGridColor . ToArgb ( ) . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "WaveformColor" , settings . VideoControls . WaveformColor . ToArgb ( ) . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "WaveformSelectedColor" , settings . VideoControls . WaveformSelectedColor . ToArgb ( ) . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "WaveformBackgroundColor" , settings . VideoControls . WaveformBackgroundColor . ToArgb ( ) . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "WaveformTextColor" , settings . VideoControls . WaveformTextColor . ToArgb ( ) . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "WaveformTextSize" , settings . VideoControls . WaveformTextSize . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "WaveformTextBold" , settings . VideoControls . WaveformTextBold . ToString ( ) ) ;
textWriter . WriteElementString ( "WaveformDoubleClickOnNonParagraphAction" , settings . VideoControls . WaveformDoubleClickOnNonParagraphAction ) ;
textWriter . WriteElementString ( "WaveformRightClickOnNonParagraphAction" , settings . VideoControls . WaveformRightClickOnNonParagraphAction ) ;
textWriter . WriteElementString ( "WaveformMouseWheelScrollUpIsForward" , settings . VideoControls . WaveformMouseWheelScrollUpIsForward . ToString ( ) ) ;
textWriter . WriteElementString ( "GenerateSpectrogram" , settings . VideoControls . GenerateSpectrogram . ToString ( ) ) ;
textWriter . WriteElementString ( "SpectrogramAppearance" , settings . VideoControls . SpectrogramAppearance ) ;
textWriter . WriteElementString ( "WaveformMinimumSampleRate" , settings . VideoControls . WaveformMinimumSampleRate . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "WaveformSeeksSilenceDurationSeconds" , settings . VideoControls . WaveformSeeksSilenceDurationSeconds . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "WaveformSeeksSilenceMaxVolume" , settings . VideoControls . WaveformSeeksSilenceMaxVolume . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteEndElement ( ) ;
textWriter . WriteStartElement ( "NetworkSettings" , string . Empty ) ;
textWriter . WriteElementString ( "SessionKey" , settings . NetworkSettings . SessionKey ) ;
textWriter . WriteElementString ( "UserName" , settings . NetworkSettings . UserName ) ;
textWriter . WriteElementString ( "WebServiceUrl" , settings . NetworkSettings . WebServiceUrl ) ;
textWriter . WriteElementString ( "PollIntervalSeconds" , settings . NetworkSettings . PollIntervalSeconds . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "NewMessageSound" , settings . NetworkSettings . NewMessageSound ) ;
textWriter . WriteEndElement ( ) ;
textWriter . WriteStartElement ( "VobSubOcr" , string . Empty ) ;
textWriter . WriteElementString ( "XOrMorePixelsMakesSpace" , settings . VobSubOcr . XOrMorePixelsMakesSpace . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "AllowDifferenceInPercent" , settings . VobSubOcr . AllowDifferenceInPercent . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "BlurayAllowDifferenceInPercent" , settings . VobSubOcr . BlurayAllowDifferenceInPercent . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "LastImageCompareFolder" , settings . VobSubOcr . LastImageCompareFolder ) ;
textWriter . WriteElementString ( "LastModiLanguageId" , settings . VobSubOcr . LastModiLanguageId . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "LastOcrMethod" , settings . VobSubOcr . LastOcrMethod ) ;
textWriter . WriteElementString ( "TesseractLastLanguage" , settings . VobSubOcr . TesseractLastLanguage ) ;
textWriter . WriteElementString ( "UseModiInTesseractForUnknownWords" , settings . VobSubOcr . UseModiInTesseractForUnknownWords . ToString ( ) ) ;
textWriter . WriteElementString ( "UseItalicsInTesseract" , settings . VobSubOcr . UseItalicsInTesseract . ToString ( ) ) ;
textWriter . WriteElementString ( "UseMusicSymbolsInTesseract" , settings . VobSubOcr . UseMusicSymbolsInTesseract . ToString ( ) ) ;
textWriter . WriteElementString ( "RightToLeft" , settings . VobSubOcr . RightToLeft . ToString ( ) ) ;
textWriter . WriteElementString ( "TopToBottom" , settings . VobSubOcr . TopToBottom . ToString ( ) ) ;
textWriter . WriteElementString ( "DefaultMillisecondsForUnknownDurations" , settings . VobSubOcr . DefaultMillisecondsForUnknownDurations . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "PromptForUnknownWords" , settings . VobSubOcr . PromptForUnknownWords . ToString ( ) ) ;
textWriter . WriteElementString ( "GuessUnknownWords" , settings . VobSubOcr . GuessUnknownWords . ToString ( ) ) ;
textWriter . WriteElementString ( "AutoBreakSubtitleIfMoreThanTwoLines" , settings . VobSubOcr . AutoBreakSubtitleIfMoreThanTwoLines . ToString ( ) ) ;
textWriter . WriteElementString ( "ItalicFactor" , settings . VobSubOcr . ItalicFactor . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "LineOcrDraw" , settings . VobSubOcr . LineOcrDraw . ToString ( ) ) ;
textWriter . WriteElementString ( "LineOcrAdvancedItalic" , settings . VobSubOcr . LineOcrAdvancedItalic . ToString ( ) ) ;
textWriter . WriteElementString ( "LineOcrLastLanguages" , settings . VobSubOcr . LineOcrLastLanguages ) ;
textWriter . WriteElementString ( "LineOcrLastSpellCheck" , settings . VobSubOcr . LineOcrLastSpellCheck ) ;
textWriter . WriteElementString ( "LineOcrXOrMorePixelsMakesSpace" , settings . VobSubOcr . LineOcrXOrMorePixelsMakesSpace . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "LineOcrMinLineHeight" , settings . VobSubOcr . LineOcrMinLineHeight . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "LineOcrMaxLineHeight" , settings . VobSubOcr . LineOcrMaxLineHeight . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "LastBinaryImageCompareDb" , settings . VobSubOcr . LastBinaryImageCompareDb ) ;
textWriter . WriteElementString ( "LastBinaryImageSpellCheck" , settings . VobSubOcr . LastBinaryImageSpellCheck ) ;
textWriter . WriteEndElement ( ) ;
2016-06-26 16:23:40 +02:00
textWriter . WriteStartElement ( "MultipleSearchAndReplaceGroups" , string . Empty ) ;
foreach ( var group in settings . MultipleSearchAndReplaceGroups )
2016-02-08 21:11:03 +01:00
{
2016-06-26 16:23:40 +02:00
textWriter . WriteStartElement ( "Group" , string . Empty ) ;
textWriter . WriteElementString ( "Name" , group . Name ) ;
textWriter . WriteElementString ( "Enabled" , group . Enabled . ToString ( ) ) ;
foreach ( var item in group . Rules )
{
textWriter . WriteStartElement ( "Rule" , string . Empty ) ;
textWriter . WriteElementString ( "Enabled" , item . Enabled . ToString ( ) ) ;
textWriter . WriteElementString ( "FindWhat" , item . FindWhat ) ;
textWriter . WriteElementString ( "ReplaceWith" , item . ReplaceWith ) ;
textWriter . WriteElementString ( "SearchType" , item . SearchType ) ;
2017-12-11 21:11:32 +01:00
textWriter . WriteElementString ( "Description" , item . Description ) ;
2016-06-26 16:23:40 +02:00
textWriter . WriteEndElement ( ) ;
}
2016-02-08 21:11:03 +01:00
textWriter . WriteEndElement ( ) ;
}
textWriter . WriteEndElement ( ) ;
textWriter . WriteStartElement ( "Shortcuts" , string . Empty ) ;
textWriter . WriteElementString ( "GeneralGoToFirstSelectedLine" , settings . Shortcuts . GeneralGoToFirstSelectedLine ) ;
textWriter . WriteElementString ( "GeneralGoToNextEmptyLine" , settings . Shortcuts . GeneralGoToNextEmptyLine ) ;
textWriter . WriteElementString ( "GeneralMergeSelectedLines" , settings . Shortcuts . GeneralMergeSelectedLines ) ;
textWriter . WriteElementString ( "GeneralMergeSelectedLinesOnlyFirstText" , settings . Shortcuts . GeneralMergeSelectedLinesOnlyFirstText ) ;
2016-10-18 11:50:28 +02:00
textWriter . WriteElementString ( "GeneralMergeWithNext" , settings . Shortcuts . GeneralMergeWithNext ) ;
textWriter . WriteElementString ( "GeneralMergeWithPrevious" , settings . Shortcuts . GeneralMergeWithPrevious ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "GeneralToggleTranslationMode" , settings . Shortcuts . GeneralToggleTranslationMode ) ;
textWriter . WriteElementString ( "GeneralSwitchOriginalAndTranslation" , settings . Shortcuts . GeneralSwitchOriginalAndTranslation ) ;
textWriter . WriteElementString ( "GeneralMergeOriginalAndTranslation" , settings . Shortcuts . GeneralMergeOriginalAndTranslation ) ;
textWriter . WriteElementString ( "GeneralGoToNextSubtitle" , settings . Shortcuts . GeneralGoToNextSubtitle ) ;
textWriter . WriteElementString ( "GeneralGoToPrevSubtitle" , settings . Shortcuts . GeneralGoToPrevSubtitle ) ;
textWriter . WriteElementString ( "GeneralGoToEndOfCurrentSubtitle" , settings . Shortcuts . GeneralGoToEndOfCurrentSubtitle ) ;
textWriter . WriteElementString ( "GeneralGoToStartOfCurrentSubtitle" , settings . Shortcuts . GeneralGoToStartOfCurrentSubtitle ) ;
2017-01-11 21:24:34 +01:00
textWriter . WriteElementString ( "GeneralGoToPreviousSubtitleAndFocusVideo" , settings . Shortcuts . GeneralGoToPreviousSubtitleAndFocusVideo ) ;
2016-08-03 14:47:45 +02:00
textWriter . WriteElementString ( "GeneralGoToNextSubtitleAndFocusVideo" , settings . Shortcuts . GeneralGoToNextSubtitleAndFocusVideo ) ;
textWriter . WriteElementString ( "GeneralExtendCurrentSubtitle" , settings . Shortcuts . GeneralExtendCurrentSubtitle ) ;
2016-10-18 11:50:28 +02:00
textWriter . WriteElementString ( "GeneralAutoCalcCurrentDuration" , settings . Shortcuts . GeneralAutoCalcCurrentDuration ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "GeneralPlayFirstSelected" , settings . Shortcuts . GeneralPlayFirstSelected ) ;
2016-10-02 19:28:58 +02:00
textWriter . WriteElementString ( "GeneralHelp" , settings . Shortcuts . GeneralHelp ) ;
2018-02-03 10:41:51 +01:00
textWriter . WriteElementString ( "GeneralUnbrekNoSpace" , settings . Shortcuts . GeneralUnbrekNoSpace ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "MainFileNew" , settings . Shortcuts . MainFileNew ) ;
textWriter . WriteElementString ( "MainFileOpen" , settings . Shortcuts . MainFileOpen ) ;
textWriter . WriteElementString ( "MainFileOpenKeepVideo" , settings . Shortcuts . MainFileOpenKeepVideo ) ;
textWriter . WriteElementString ( "MainFileSave" , settings . Shortcuts . MainFileSave ) ;
textWriter . WriteElementString ( "MainFileSaveOriginal" , settings . Shortcuts . MainFileSaveOriginal ) ;
textWriter . WriteElementString ( "MainFileSaveOriginalAs" , settings . Shortcuts . MainFileSaveOriginalAs ) ;
textWriter . WriteElementString ( "MainFileSaveAs" , settings . Shortcuts . MainFileSaveAs ) ;
2017-10-10 20:50:18 +02:00
textWriter . WriteElementString ( "MainFileCloseOriginal" , settings . Shortcuts . MainFileCloseOriginal ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "MainFileSaveAll" , settings . Shortcuts . MainFileSaveAll ) ;
2017-10-04 16:00:15 +02:00
textWriter . WriteElementString ( "MainFileImportPlainText" , settings . Shortcuts . MainFileImportPlainText ) ;
textWriter . WriteElementString ( "MainFileImportTimeCodes" , settings . Shortcuts . MainFileImportTimeCodes ) ;
textWriter . WriteElementString ( "MainFileExportEbu" , settings . Shortcuts . MainFileExportEbu ) ;
2017-10-10 20:50:18 +02:00
textWriter . WriteElementString ( "MainFileExportPlainText" , settings . Shortcuts . MainFileExportPlainText ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "MainFileExportEbu" , settings . Shortcuts . MainFileExportEbu ) ;
textWriter . WriteElementString ( "MainEditUndo" , settings . Shortcuts . MainEditUndo ) ;
textWriter . WriteElementString ( "MainEditRedo" , settings . Shortcuts . MainEditRedo ) ;
textWriter . WriteElementString ( "MainEditFind" , settings . Shortcuts . MainEditFind ) ;
textWriter . WriteElementString ( "MainEditFindNext" , settings . Shortcuts . MainEditFindNext ) ;
textWriter . WriteElementString ( "MainEditReplace" , settings . Shortcuts . MainEditReplace ) ;
textWriter . WriteElementString ( "MainEditMultipleReplace" , settings . Shortcuts . MainEditMultipleReplace ) ;
textWriter . WriteElementString ( "MainEditGoToLineNumber" , settings . Shortcuts . MainEditGoToLineNumber ) ;
textWriter . WriteElementString ( "MainEditRightToLeft" , settings . Shortcuts . MainEditRightToLeft ) ;
textWriter . WriteElementString ( "MainToolsFixCommonErrors" , settings . Shortcuts . MainToolsFixCommonErrors ) ;
textWriter . WriteElementString ( "MainToolsFixCommonErrorsPreview" , settings . Shortcuts . MainToolsFixCommonErrorsPreview ) ;
textWriter . WriteElementString ( "MainToolsMergeShortLines" , settings . Shortcuts . MainToolsMergeShortLines ) ;
2017-10-04 16:00:15 +02:00
textWriter . WriteElementString ( "MainToolsMakeEmptyFromCurrent" , settings . Shortcuts . MainToolsMakeEmptyFromCurrent ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "MainToolsSplitLongLines" , settings . Shortcuts . MainToolsSplitLongLines ) ;
textWriter . WriteElementString ( "MainToolsRenumber" , settings . Shortcuts . MainToolsRenumber ) ;
textWriter . WriteElementString ( "MainToolsRemoveTextForHI" , settings . Shortcuts . MainToolsRemoveTextForHI ) ;
textWriter . WriteElementString ( "MainToolsChangeCasing" , settings . Shortcuts . MainToolsChangeCasing ) ;
textWriter . WriteElementString ( "MainToolsAutoDuration" , settings . Shortcuts . MainToolsAutoDuration ) ;
textWriter . WriteElementString ( "MainToolsBatchConvert" , settings . Shortcuts . MainToolsBatchConvert ) ;
textWriter . WriteElementString ( "MainToolsBeamer" , settings . Shortcuts . MainToolsBeamer ) ;
textWriter . WriteElementString ( "MainToolsToggleTranslationOriginalInPreviews" , settings . Shortcuts . MainEditToggleTranslationOriginalInPreviews ) ;
textWriter . WriteElementString ( "MainEditInverseSelection" , settings . Shortcuts . MainEditInverseSelection ) ;
textWriter . WriteElementString ( "MainEditModifySelection" , settings . Shortcuts . MainEditModifySelection ) ;
2017-10-04 16:00:15 +02:00
textWriter . WriteElementString ( "MainVideoOpen" , settings . Shortcuts . MainVideoOpen ) ;
textWriter . WriteElementString ( "MainVideoClose" , settings . Shortcuts . MainVideoClose ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "MainVideoPause" , settings . Shortcuts . MainVideoPause ) ;
textWriter . WriteElementString ( "MainVideoPlayPauseToggle" , settings . Shortcuts . MainVideoPlayPauseToggle ) ;
textWriter . WriteElementString ( "MainVideoShowHideVideo" , settings . Shortcuts . MainVideoShowHideVideo ) ;
textWriter . WriteElementString ( "MainVideoToggleVideoControls" , settings . Shortcuts . MainVideoToggleVideoControls ) ;
textWriter . WriteElementString ( "MainVideo1FrameLeft" , settings . Shortcuts . MainVideo1FrameLeft ) ;
textWriter . WriteElementString ( "MainVideo1FrameRight" , settings . Shortcuts . MainVideo1FrameRight ) ;
2017-06-29 19:21:23 +02:00
textWriter . WriteElementString ( "MainVideo1FrameLeftWithPlay" , settings . Shortcuts . MainVideo1FrameLeftWithPlay ) ;
textWriter . WriteElementString ( "MainVideo1FrameRightWithPlay" , settings . Shortcuts . MainVideo1FrameRightWithPlay ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "MainVideo100MsLeft" , settings . Shortcuts . MainVideo100MsLeft ) ;
textWriter . WriteElementString ( "MainVideo100MsRight" , settings . Shortcuts . MainVideo100MsRight ) ;
textWriter . WriteElementString ( "MainVideo500MsLeft" , settings . Shortcuts . MainVideo500MsLeft ) ;
textWriter . WriteElementString ( "MainVideo500MsRight" , settings . Shortcuts . MainVideo500MsRight ) ;
textWriter . WriteElementString ( "MainVideo1000MsLeft" , settings . Shortcuts . MainVideo1000MsLeft ) ;
textWriter . WriteElementString ( "MainVideo1000MsRight" , settings . Shortcuts . MainVideo1000MsRight ) ;
2016-09-15 17:43:49 +02:00
textWriter . WriteElementString ( "MainVideo5000MsLeft" , settings . Shortcuts . MainVideo5000MsLeft ) ;
textWriter . WriteElementString ( "MainVideo5000MsRight" , settings . Shortcuts . MainVideo5000MsRight ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "MainVideoFullscreen" , settings . Shortcuts . MainVideoFullscreen ) ;
textWriter . WriteElementString ( "MainSpellCheck" , settings . Shortcuts . MainSpellCheck ) ;
textWriter . WriteElementString ( "MainSpellCheckFindDoubleWords" , settings . Shortcuts . MainSpellCheckFindDoubleWords ) ;
textWriter . WriteElementString ( "MainSpellCheckAddWordToNames" , settings . Shortcuts . MainSpellCheckAddWordToNames ) ;
textWriter . WriteElementString ( "MainSynchronizationAdjustTimes" , settings . Shortcuts . MainSynchronizationAdjustTimes ) ;
textWriter . WriteElementString ( "MainSynchronizationVisualSync" , settings . Shortcuts . MainSynchronizationVisualSync ) ;
textWriter . WriteElementString ( "MainSynchronizationPointSync" , settings . Shortcuts . MainSynchronizationPointSync ) ;
2017-10-04 16:00:15 +02:00
textWriter . WriteElementString ( "MainSynchronizationPointSyncViaFile" , settings . Shortcuts . MainSynchronizationPointSyncViaFile ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "MainSynchronizationChangeFrameRate" , settings . Shortcuts . MainSynchronizationChangeFrameRate ) ;
textWriter . WriteElementString ( "MainListViewItalic" , settings . Shortcuts . MainListViewItalic ) ;
textWriter . WriteElementString ( "MainListViewToggleDashes" , settings . Shortcuts . MainListViewToggleDashes ) ;
textWriter . WriteElementString ( "MainListViewAlignment" , settings . Shortcuts . MainListViewAlignment ) ;
textWriter . WriteElementString ( "MainListViewCopyText" , settings . Shortcuts . MainListViewCopyText ) ;
textWriter . WriteElementString ( "MainListViewCopyTextFromOriginalToCurrent" , settings . Shortcuts . MainListViewCopyTextFromOriginalToCurrent ) ;
textWriter . WriteElementString ( "MainListViewAutoDuration" , settings . Shortcuts . MainListViewAutoDuration ) ;
textWriter . WriteElementString ( "MainListViewColumnDeleteText" , settings . Shortcuts . MainListViewColumnDeleteText ) ;
textWriter . WriteElementString ( "MainListViewColumnInsertText" , settings . Shortcuts . MainListViewColumnInsertText ) ;
textWriter . WriteElementString ( "MainListViewColumnPaste" , settings . Shortcuts . MainListViewColumnPaste ) ;
2018-01-31 16:03:43 +01:00
textWriter . WriteElementString ( "MainListViewColumnTextUp" , settings . Shortcuts . MainListViewColumnTextUp ) ;
textWriter . WriteElementString ( "MainListViewColumnTextDown" , settings . Shortcuts . MainListViewColumnTextDown ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "MainListViewFocusWaveform" , settings . Shortcuts . MainListViewFocusWaveform ) ;
textWriter . WriteElementString ( "MainListViewGoToNextError" , settings . Shortcuts . MainListViewGoToNextError ) ;
textWriter . WriteElementString ( "MainEditReverseStartAndEndingForRTL" , settings . Shortcuts . MainEditReverseStartAndEndingForRTL ) ;
textWriter . WriteElementString ( "MainTextBoxItalic" , settings . Shortcuts . MainTextBoxItalic ) ;
textWriter . WriteElementString ( "MainTextBoxSplitAtCursor" , settings . Shortcuts . MainTextBoxSplitAtCursor ) ;
textWriter . WriteElementString ( "MainTextBoxMoveLastWordDown" , settings . Shortcuts . MainTextBoxMoveLastWordDown ) ;
textWriter . WriteElementString ( "MainTextBoxMoveFirstWordFromNextUp" , settings . Shortcuts . MainTextBoxMoveFirstWordFromNextUp ) ;
2018-01-15 19:46:16 +01:00
textWriter . WriteElementString ( "MainTextBoxMoveLastWordDownCurrent" , settings . Shortcuts . MainTextBoxMoveLastWordDownCurrent ) ;
textWriter . WriteElementString ( "MainTextBoxMoveFirstWordUpCurrent" , settings . Shortcuts . MainTextBoxMoveFirstWordUpCurrent ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "MainTextBoxSelectionToLower" , settings . Shortcuts . MainTextBoxSelectionToLower ) ;
textWriter . WriteElementString ( "MainTextBoxSelectionToUpper" , settings . Shortcuts . MainTextBoxSelectionToUpper ) ;
textWriter . WriteElementString ( "MainTextBoxToggleAutoDuration" , settings . Shortcuts . MainTextBoxToggleAutoDuration ) ;
textWriter . WriteElementString ( "MainCreateInsertSubAtVideoPos" , settings . Shortcuts . MainCreateInsertSubAtVideoPos ) ;
textWriter . WriteElementString ( "MainCreatePlayFromJustBefore" , settings . Shortcuts . MainCreatePlayFromJustBefore ) ;
textWriter . WriteElementString ( "MainCreateSetStart" , settings . Shortcuts . MainCreateSetStart ) ;
textWriter . WriteElementString ( "MainCreateSetEnd" , settings . Shortcuts . MainCreateSetEnd ) ;
textWriter . WriteElementString ( "MainCreateSetEndAddNewAndGoToNew" , settings . Shortcuts . MainCreateSetEndAddNewAndGoToNew ) ;
textWriter . WriteElementString ( "MainCreateStartDownEndUp" , settings . Shortcuts . MainCreateStartDownEndUp ) ;
textWriter . WriteElementString ( "MainAdjustSetStartAndOffsetTheRest" , settings . Shortcuts . MainAdjustSetStartAndOffsetTheRest ) ;
textWriter . WriteElementString ( "MainAdjustSetEndAndOffsetTheRest" , settings . Shortcuts . MainAdjustSetEndAndOffsetTheRest ) ;
textWriter . WriteElementString ( "MainAdjustSetEndAndOffsetTheRestAndGoToNext" , settings . Shortcuts . MainAdjustSetEndAndOffsetTheRestAndGoToNext ) ;
textWriter . WriteElementString ( "MainAdjustSetEndAndGotoNext" , settings . Shortcuts . MainAdjustSetEndAndGotoNext ) ;
textWriter . WriteElementString ( "MainAdjustViaEndAutoStartAndGoToNext" , settings . Shortcuts . MainAdjustViaEndAutoStartAndGoToNext ) ;
textWriter . WriteElementString ( "MainAdjustSetStartAutoDurationAndGoToNext" , settings . Shortcuts . MainAdjustSetStartAutoDurationAndGoToNext ) ;
textWriter . WriteElementString ( "MainAdjustSetEndNextStartAndGoToNext" , settings . Shortcuts . MainAdjustSetEndNextStartAndGoToNext ) ;
textWriter . WriteElementString ( "MainAdjustStartDownEndUpAndGoToNext" , settings . Shortcuts . MainAdjustStartDownEndUpAndGoToNext ) ;
textWriter . WriteElementString ( "MainAdjustSetStart" , settings . Shortcuts . MainAdjustSetStart ) ;
textWriter . WriteElementString ( "MainAdjustSetStartKeepDuration" , settings . Shortcuts . MainAdjustSetStartKeepDuration ) ;
textWriter . WriteElementString ( "MainAdjustSetEnd" , settings . Shortcuts . MainAdjustSetEnd ) ;
textWriter . WriteElementString ( "MainAdjustSelected100MsForward" , settings . Shortcuts . MainAdjustSelected100MsForward ) ;
textWriter . WriteElementString ( "MainAdjustSelected100MsBack" , settings . Shortcuts . MainAdjustSelected100MsBack ) ;
2017-11-06 18:22:49 +01:00
textWriter . WriteElementString ( "MainAdjustStartXMsBack" , settings . Shortcuts . MainAdjustStartXMsBack ) ;
textWriter . WriteElementString ( "MainAdjustStartXMsForward" , settings . Shortcuts . MainAdjustStartXMsForward ) ;
textWriter . WriteElementString ( "MainAdjustEndXMsBack" , settings . Shortcuts . MainAdjustEndXMsBack ) ;
textWriter . WriteElementString ( "MainAdjustEndXMsForward" , settings . Shortcuts . MainAdjustEndXMsForward ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "MainInsertAfter" , settings . Shortcuts . MainInsertAfter ) ;
textWriter . WriteElementString ( "MainTextBoxInsertAfter" , settings . Shortcuts . MainTextBoxInsertAfter ) ;
textWriter . WriteElementString ( "MainTextBoxAutoBreak" , settings . Shortcuts . MainTextBoxAutoBreak ) ;
textWriter . WriteElementString ( "MainTextBoxUnbreak" , settings . Shortcuts . MainTextBoxUnbreak ) ;
textWriter . WriteElementString ( "MainWaveformInsertAtCurrentPosition" , settings . Shortcuts . MainWaveformInsertAtCurrentPosition ) ;
textWriter . WriteElementString ( "MainInsertBefore" , settings . Shortcuts . MainInsertBefore ) ;
textWriter . WriteElementString ( "MainMergeDialog" , settings . Shortcuts . MainMergeDialog ) ;
textWriter . WriteElementString ( "MainToggleFocus" , settings . Shortcuts . MainToggleFocus ) ;
textWriter . WriteElementString ( "WaveformVerticalZoom" , settings . Shortcuts . WaveformVerticalZoom ) ;
textWriter . WriteElementString ( "WaveformVerticalZoomOut" , settings . Shortcuts . WaveformVerticalZoomOut ) ;
textWriter . WriteElementString ( "WaveformZoomIn" , settings . Shortcuts . WaveformZoomIn ) ;
textWriter . WriteElementString ( "WaveformZoomOut" , settings . Shortcuts . WaveformZoomOut ) ;
textWriter . WriteElementString ( "WaveformPlaySelection" , settings . Shortcuts . WaveformPlaySelection ) ;
textWriter . WriteElementString ( "WaveformPlaySelectionEnd" , settings . Shortcuts . WaveformPlaySelectionEnd ) ;
textWriter . WriteElementString ( "WaveformSearchSilenceForward" , settings . Shortcuts . WaveformSearchSilenceForward ) ;
textWriter . WriteElementString ( "WaveformSearchSilenceBack" , settings . Shortcuts . WaveformSearchSilenceBack ) ;
textWriter . WriteElementString ( "WaveformAddTextHere" , settings . Shortcuts . WaveformAddTextHere ) ;
textWriter . WriteElementString ( "WaveformAddTextHereFromClipboard" , settings . Shortcuts . WaveformAddTextHereFromClipboard ) ;
textWriter . WriteElementString ( "WaveformFocusListView" , settings . Shortcuts . WaveformFocusListView ) ;
2017-05-02 04:37:06 +02:00
textWriter . WriteElementString ( "WaveformGoToNextSubtitle" , settings . Shortcuts . WaveformGoToNextSubtitle ) ;
2017-11-03 20:24:16 +01:00
textWriter . WriteElementString ( "WaveformGoToPreviousSceneChange" , settings . Shortcuts . WaveformGoToPreviousSceneChange ) ;
2016-08-07 10:38:43 +02:00
textWriter . WriteElementString ( "WaveformGoToNextSceneChange" , settings . Shortcuts . WaveformGoToNextSceneChange ) ;
textWriter . WriteElementString ( "WaveformToggleSceneChange" , settings . Shortcuts . WaveformToggleSceneChange ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "MainTranslateCustomSearch1" , settings . Shortcuts . MainTranslateCustomSearch1 ) ;
textWriter . WriteElementString ( "MainTranslateCustomSearch2" , settings . Shortcuts . MainTranslateCustomSearch2 ) ;
textWriter . WriteElementString ( "MainTranslateCustomSearch3" , settings . Shortcuts . MainTranslateCustomSearch3 ) ;
textWriter . WriteElementString ( "MainTranslateCustomSearch4" , settings . Shortcuts . MainTranslateCustomSearch4 ) ;
textWriter . WriteElementString ( "MainTranslateCustomSearch5" , settings . Shortcuts . MainTranslateCustomSearch5 ) ;
textWriter . WriteElementString ( "MainTranslateCustomSearch6" , settings . Shortcuts . MainTranslateCustomSearch6 ) ;
textWriter . WriteEndElement ( ) ;
textWriter . WriteStartElement ( "RemoveTextForHearingImpaired" , string . Empty ) ;
textWriter . WriteElementString ( "RemoveTextBetweenBrackets" , settings . RemoveTextForHearingImpaired . RemoveTextBetweenBrackets . ToString ( ) ) ;
textWriter . WriteElementString ( "RemoveTextBetweenParentheses" , settings . RemoveTextForHearingImpaired . RemoveTextBetweenParentheses . ToString ( ) ) ;
textWriter . WriteElementString ( "RemoveTextBetweenCurlyBrackets" , settings . RemoveTextForHearingImpaired . RemoveTextBetweenCurlyBrackets . ToString ( ) ) ;
textWriter . WriteElementString ( "RemoveTextBetweenQuestionMarks" , settings . RemoveTextForHearingImpaired . RemoveTextBetweenQuestionMarks . ToString ( ) ) ;
textWriter . WriteElementString ( "RemoveTextBetweenCustom" , settings . RemoveTextForHearingImpaired . RemoveTextBetweenCustom . ToString ( ) ) ;
textWriter . WriteElementString ( "RemoveTextBetweenCustomBefore" , settings . RemoveTextForHearingImpaired . RemoveTextBetweenCustomBefore ) ;
textWriter . WriteElementString ( "RemoveTextBetweenCustomAfter" , settings . RemoveTextForHearingImpaired . RemoveTextBetweenCustomAfter ) ;
textWriter . WriteElementString ( "RemoveTextBetweenOnlySeperateLines" , settings . RemoveTextForHearingImpaired . RemoveTextBetweenOnlySeperateLines . ToString ( ) ) ;
textWriter . WriteElementString ( "RemoveTextBeforeColon" , settings . RemoveTextForHearingImpaired . RemoveTextBeforeColon . ToString ( ) ) ;
textWriter . WriteElementString ( "RemoveTextBeforeColonOnlyIfUppercase" , settings . RemoveTextForHearingImpaired . RemoveTextBeforeColonOnlyIfUppercase . ToString ( ) ) ;
textWriter . WriteElementString ( "RemoveTextBeforeColonOnlyOnSeparateLine" , settings . RemoveTextForHearingImpaired . RemoveTextBeforeColonOnlyOnSeparateLine . ToString ( ) ) ;
textWriter . WriteElementString ( "RemoveInterjections" , settings . RemoveTextForHearingImpaired . RemoveInterjections . ToString ( ) ) ;
2018-02-03 22:35:44 +01:00
textWriter . WriteElementString ( "RemoveInterjectionsOnlyOnSeparateLine" , settings . RemoveTextForHearingImpaired . RemoveInterjectionsOnlyOnSeparateLine . ToString ( ) ) ;
2016-02-08 21:11:03 +01:00
textWriter . WriteElementString ( "RemoveIfAllUppercase" , settings . RemoveTextForHearingImpaired . RemoveIfAllUppercase . ToString ( ) ) ;
textWriter . WriteElementString ( "RemoveIfContains" , settings . RemoveTextForHearingImpaired . RemoveIfContains . ToString ( ) ) ;
textWriter . WriteElementString ( "RemoveIfContainsText" , settings . RemoveTextForHearingImpaired . RemoveIfContainsText ) ;
textWriter . WriteEndElement ( ) ;
textWriter . WriteStartElement ( "SubtitleBeaming" , string . Empty ) ;
textWriter . WriteElementString ( "FontName" , settings . SubtitleBeaming . FontName ) ;
textWriter . WriteElementString ( "FontColor" , settings . SubtitleBeaming . FontColor . ToArgb ( ) . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "FontSize" , settings . SubtitleBeaming . FontSize . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "BorderColor" , settings . SubtitleBeaming . BorderColor . ToArgb ( ) . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteElementString ( "BorderWidth" , settings . SubtitleBeaming . BorderWidth . ToString ( CultureInfo . InvariantCulture ) ) ;
textWriter . WriteEndElement ( ) ;
textWriter . WriteEndElement ( ) ;
textWriter . WriteEndDocument ( ) ;
textWriter . Flush ( ) ;
try
{
File . WriteAllText ( fileName , sb . ToString ( ) . Replace ( "encoding=\"utf-16\"" , "encoding=\"utf-8\"" ) , Encoding . UTF8 ) ;
}
catch
{
}
}
}
}
}