Merge pull request #981 from ivandrofly/patch-6

Refactor
This commit is contained in:
Nikolaj Olsson 2015-07-05 13:12:43 +02:00
commit 71ce198e5e
3 changed files with 4 additions and 15 deletions

View File

@ -4618,19 +4618,17 @@ namespace Nikse.SubtitleEdit.Forms
if (s.Length < Configuration.Settings.General.SubtitleLineMaximumLength * 1.9)
{
labelTextLineTotal.ForeColor = Color.Black;
labelTextLineTotal.Text = string.Format(_languageGeneral.TotalLengthX, s.Length);
}
else if (s.Length < Configuration.Settings.General.SubtitleLineMaximumLength * 2.1)
{
labelTextLineTotal.ForeColor = Color.Orange;
labelTextLineTotal.Text = string.Format(_languageGeneral.TotalLengthX, s.Length);
}
else
{
labelTextLineTotal.ForeColor = Color.Red;
labelTextLineTotal.Text = string.Format(_languageGeneral.TotalLengthX, s.Length);
buttonSplitLine.Visible = true;
}
labelTextLineTotal.Text = string.Format(_languageGeneral.TotalLengthX, s.Length);
}
private void ButtonFixesSelectAllClick(object sender, EventArgs e)

View File

@ -209,15 +209,15 @@ namespace Nikse.SubtitleEdit.Forms
string fileName = Path.GetFileName(entry.FilenameInZip);
// French fix
if (fileName.StartsWith("fr-moderne"))
if (fileName.StartsWith("fr-moderne", StringComparison.Ordinal))
fileName = fileName.Replace("fr-moderne", "fr_FR");
// German fix
if (fileName.StartsWith("de_DE_frami"))
if (fileName.StartsWith("de_DE_frami", StringComparison.Ordinal))
fileName = fileName.Replace("de_DE_frami", "de_DE");
// Russian fix
if (fileName.StartsWith("russian-aot"))
if (fileName.StartsWith("russian-aot", StringComparison.Ordinal))
fileName = fileName.Replace("russian-aot", "ru_RU");
string path = Path.Combine(dictionaryFolder, fileName);

View File

@ -734,7 +734,6 @@ namespace Nikse.SubtitleEdit.SeNetworkService
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://tempuri.org/")]
public partial class SeUser
{
private string userNameField;
private string ipField;
@ -791,7 +790,6 @@ namespace Nikse.SubtitleEdit.SeNetworkService
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class StartCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal StartCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
@ -831,7 +829,6 @@ namespace Nikse.SubtitleEdit.SeNetworkService
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class JoinCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal JoinCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
@ -875,7 +872,6 @@ namespace Nikse.SubtitleEdit.SeNetworkService
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class DeleteLinesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal DeleteLinesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
@ -905,7 +901,6 @@ namespace Nikse.SubtitleEdit.SeNetworkService
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class InsertLineCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal InsertLineCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
@ -935,7 +930,6 @@ namespace Nikse.SubtitleEdit.SeNetworkService
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class UpdateLineCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal UpdateLineCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
@ -965,7 +959,6 @@ namespace Nikse.SubtitleEdit.SeNetworkService
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SendMessageCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal SendMessageCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
@ -995,7 +988,6 @@ namespace Nikse.SubtitleEdit.SeNetworkService
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetUpdatesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal GetUpdatesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
@ -1105,7 +1097,6 @@ namespace Nikse.SubtitleEdit.SeNetworkService
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetOriginalSubtitleCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal GetOriginalSubtitleCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :