Formatting.

This commit is contained in:
XhmikosR 2014-09-28 21:37:38 +03:00
parent c7ee1076b2
commit 32381d6d1c
11 changed files with 15 additions and 21 deletions

View File

@ -1,10 +1,7 @@
using Nikse.SubtitleEdit.Logic;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Windows.Forms;
using System.Xml;
namespace Nikse.SubtitleEdit.Forms
{

View File

@ -287,7 +287,7 @@ namespace Nikse.SubtitleEdit.Forms
}
position += 0x800;
progressBarRip.Value = (int) ((position * 100) / length);
progressBarRip.Value = (int)((position * 100) / length);
Application.DoEvents();
lba++;
}

View File

@ -1016,7 +1016,7 @@ namespace Nikse.SubtitleEdit.Forms
}
if (!found)
cultures.Add(culture);
}
}
else if (Directory.GetFiles(dir, culture.ThreeLetterISOLanguageName + "_OCRFixReplaceList_User.xml").Length == 1)
{
bool found = false;
@ -2085,7 +2085,6 @@ namespace Nikse.SubtitleEdit.Forms
if (key.Length == 0 || value.Length == 0 || key == value || Utilities.IsInteger(key))
return;
var cb = comboBoxWordListLanguage.Items[comboBoxWordListLanguage.SelectedIndex] as ComboBoxLanguage;
if (cb == null)
return;
@ -2136,7 +2135,7 @@ namespace Nikse.SubtitleEdit.Forms
int index = listBoxOcrFixList.SelectedIndex;
string text = listBoxOcrFixList.Items[index].ToString();
string key = text.Substring(0, text.IndexOf(" --> ", StringComparison.Ordinal));
if (_ocrFixReplaceList.WordReplaceList.ContainsKey(key) || _ocrFixReplaceList.PartialLineWordBoundaryReplaceList.ContainsKey(key))
{
DialogResult result;

View File

@ -9,7 +9,7 @@ namespace Nikse.SubtitleEdit.Logic
public class Configuration
{
private static readonly Lazy<Configuration> _instance = new Lazy<Configuration>(() => new Configuration());
private readonly string _baseDir;
private readonly string _dataDir;
private readonly Lazy<Settings> _settings;
@ -160,7 +160,6 @@ namespace Nikse.SubtitleEdit.Logic
}
}
/// <summary>
/// Retrieves the specified registry subkey value.
/// </summary>

View File

@ -75,7 +75,7 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
AutoGuessesUsed = new List<string>();
UnknownWordsFound = new List<string>();
}
}
private void LoadSpellingDictionaries(string threeLetterIsoLanguageName, string hunspellName)
{
@ -582,7 +582,7 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
}
return text;
}
public static string FixLowerCaseLInsideUpperCaseWord(string word)
{
if (word.Length > 3 && word.Replace("l", string.Empty).ToUpper() == word.Replace("l", string.Empty))

View File

@ -44,7 +44,6 @@ namespace Nikse.SubtitleEdit.Logic
var doc = LoadXmlReplaceListDocument();
var userDoc = LoadXmlReplaceListUserDocument();
WordReplaceList = LoadReplaceList(doc, "WholeWords");
_partialWordReplaceListAlways = LoadReplaceList(doc, "PartialWordsAlways");
_partialWordReplaceList = LoadReplaceList(doc, "PartialWords");
@ -780,7 +779,7 @@ namespace Nikse.SubtitleEdit.Logic
}
}
return removed;
}
}
private XmlDocument LoadXmlReplaceListDocument()
{
@ -900,7 +899,7 @@ namespace Nikse.SubtitleEdit.Logic
userDoc.Save(ReplaceListXmlFileNameUser);
}
return true;
}
}
public void AddToWholeLineList(string fromLine, string toLine)
{

View File

@ -110,7 +110,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
text = Utilities.RemoveHtmlTags(text);
if (text.Length > 118)
text = text.Substring(0, 118);
fs.WriteByte((byte) (text.Length));
fs.WriteByte((byte)(text.Length));
buffer = Encoding.GetEncoding(1252).GetBytes(text);
fs.Write(buffer, 0, buffer.Length);

View File

@ -84,7 +84,8 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
System.Windows.Forms.RichTextBox rtBox = null;
try
{
rtBox = new System.Windows.Forms.RichTextBox {
rtBox = new System.Windows.Forms.RichTextBox
{
Rtf = rtf
};

View File

@ -8,7 +8,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
public class SonyDVDArchitect : SubtitleFormat
{
static Regex Regex = new Regex(@"^\d\d:\d\d:\d\d:\d\d[ ]+-[ ]+\d\d:\d\d:\d\d:\d\d", RegexOptions.Compiled);
private static Regex Regex = new Regex(@"^\d\d:\d\d:\d\d:\d\d[ ]+-[ ]+\d\d:\d\d:\d\d:\d\d", RegexOptions.Compiled);
public override string Extension
{

View File

@ -356,7 +356,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
if (_form != null)
{
_form.OnCopyData -= OnCopyData;
// _form.Dispose(); this give an error when doing File -> Exit...
//_form.Dispose(); this gives an error when doing File -> Exit...
_form = null;
}

View File

@ -78,9 +78,9 @@ namespace Test.Logic
{
File.Delete(fileName);
}
catch
catch
{
}
}
@ -217,6 +217,5 @@ namespace Test.Logic
}
}
}
}