Merge pull request #1098 from ivandrofly/patch-b2

Refactor only
This commit is contained in:
Nikolaj Olsson 2015-08-02 08:35:43 +02:00
commit 74d9aa75f7
6 changed files with 7 additions and 9 deletions

View File

@ -6,6 +6,7 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
{
public int Id { get; set; }
public string Text { get; set; }
public override string ToString()
{
return Text;
@ -17,7 +18,7 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
{
get
{
List<ModiLanguage> list = new List<ModiLanguage>();
var list = new List<ModiLanguage>();
list.Add(new ModiLanguage { Id = DefaultLanguageId, Text = "Default" });
list.Add(new ModiLanguage { Id = 2052, Text = "Chinese simplified" });
list.Add(new ModiLanguage { Id = 1028, Text = "Chinese traditional" });

View File

@ -36,7 +36,7 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
if (addIfNotExists)
{
OcrCharacter ch = new OcrCharacter(text);
var ch = new OcrCharacter(text);
OcrCharacters.Add(ch);
return ch;
}

View File

@ -787,4 +787,4 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
}
}
}
}

View File

@ -25,7 +25,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
private Process _process;
private IntPtr _messageHandlerHandle = IntPtr.Zero;
private string _videoFileName;
private System.Windows.Forms.Timer _positionTimer;
private Timer _positionTimer;
private double _positionInSeconds = 0;
private double _durationInSeconds = 0;
private MessageHandlerWindow _form;
@ -101,7 +101,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
get { return _playMode == ModePlay; }
}
public override void Initialize(System.Windows.Forms.Control ownerControl, string videoFileName, EventHandler onVideoLoaded, EventHandler onVideoEnded)
public override void Initialize(Control ownerControl, string videoFileName, EventHandler onVideoLoaded, EventHandler onVideoEnded)
{
if (ownerControl == null)
return;

View File

@ -7,7 +7,6 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
/// </summary>
public static class MpcHcCommand
{
public const UInt32 Connect = 0x50000000;
public const UInt32 State = 0x50000001;
public const UInt32 PlayMode = 0x50000002;

View File

@ -7,7 +7,6 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
{
internal static class NativeMethods
{
internal delegate bool EnumedWindow(IntPtr handleWindow, ArrayList handles);
#region structs, constants and enums
@ -153,5 +152,4 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
#endregion Win32 API
}
}
}