Merge pull request #74 from ivandrofly/master

minor fix in SE
This commit is contained in:
Nikolaj Olsson 2014-05-17 07:26:35 +02:00
commit 28bd02757d
4 changed files with 6 additions and 6 deletions

View File

@ -11586,7 +11586,7 @@ namespace Nikse.SubtitleEdit.Forms
var tmp = new Subtitle();
var format = new SubRip();
var list = new List<string>();
foreach (string line in text.Replace(Environment.NewLine, "|").Split("|".ToCharArray(), StringSplitOptions.None))
foreach (string line in text.Replace(Environment.NewLine, "\n").Split('\n'))
list.Add(line);
format.LoadSubtitle(tmp, list, null);
if (SubtitleListview1.SelectedItems.Count == 1 && tmp.Paragraphs.Count > 0)
@ -18459,7 +18459,7 @@ namespace Nikse.SubtitleEdit.Forms
var tmp = new Subtitle();
var format = new SubRip();
var list = new List<string>();
foreach (string line in text.Replace(Environment.NewLine, "|").Split("|".ToCharArray(), StringSplitOptions.None))
foreach (string line in text.Replace(Environment.NewLine, "\n").Split('\n'))
list.Add(line);
format.LoadSubtitle(tmp, list, null);
@ -18472,7 +18472,7 @@ namespace Nikse.SubtitleEdit.Forms
if (tmp.Paragraphs.Count == 0)
{
foreach (string line in text.Replace(Environment.NewLine, "|").Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries))
foreach (string line in text.Replace(Environment.NewLine, "\n").Split('\n'))
tmp.Paragraphs.Add(new Paragraph(0, 0, line));
}

View File

@ -89,7 +89,7 @@
//
this.textBoxFind.Location = new System.Drawing.Point(15, 25);
this.textBoxFind.Name = "textBoxFind";
this.textBoxFind.Size = new System.Drawing.Size(262, 21);
this.textBoxFind.Size = new System.Drawing.Size(265, 21);
this.textBoxFind.TabIndex = 0;
this.textBoxFind.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxFindKeyDown);
//

View File

@ -173,7 +173,7 @@ namespace Nikse.SubtitleEdit.Forms
if (sender == radioButtonRegEx)
textBoxFind.ContextMenu = FindReplaceDialogHelper.GetRegExContextMenu(textBoxFind);
else
textBoxFind.ContextMenuStrip = null;
textBoxFind.ContextMenu = null;
}
private void TextBoxFindKeyDown(object sender, KeyEventArgs e)

View File

@ -156,7 +156,7 @@ namespace Nikse.SubtitleEdit.Logic
cm.MenuItems.Add("New line (\\r\\n)", delegate { textBox.SelectedText = "\\r\\n"; });
cm.MenuItems.Add("Any digit (\\d)", delegate { textBox.SelectedText = "\\d"; });
cm.MenuItems.Add("Any character (.)", delegate { textBox.SelectedText = "."; });
cm.MenuItems.Add("Any whitespace", delegate { textBox.SelectedText = "\\s"; });
cm.MenuItems.Add("Any whitespace (\\s)", delegate { textBox.SelectedText = "\\s"; });
cm.MenuItems.Add("Zero or more (*)", delegate { textBox.SelectedText = "*"; });
cm.MenuItems.Add("One or more (+)", delegate { textBox.SelectedText = "+"; });
cm.MenuItems.Add("In character group ([test])", delegate { textBox.SelectedText = "[test]"; });