mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 12:44:46 +01:00
More find/replace
This commit is contained in:
parent
f14ba0ae25
commit
0e4eaedc27
@ -725,7 +725,8 @@ Read more info (web)?</WhisperNotFound>
|
||||
</ExtractDateTimeInfo>
|
||||
<FindDialog>
|
||||
<Title>Find</Title>
|
||||
<Find>&Find</Find>
|
||||
<FindNext>&Find next</FindNext>
|
||||
<FindPrevious>Find &previous</FindPrevious>
|
||||
<Normal>&Normal</Normal>
|
||||
<CaseSensitive>&Case sensitive</CaseSensitive>
|
||||
<RegularExpression>Regular e&xpression</RegularExpression>
|
||||
|
@ -271,12 +271,12 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
else if (radioButtonNormal.Checked)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
_findAndReplaceMethods.FindDialogFindPrevious();
|
||||
_findAndReplaceMethods.FindDialogFindPrevious(FindText);
|
||||
}
|
||||
else if (radioButtonCaseSensitive.Checked)
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
_findAndReplaceMethods.FindDialogFindPrevious();
|
||||
_findAndReplaceMethods.FindDialogFindPrevious(FindText);
|
||||
}
|
||||
else if (radioButtonRegEx.Checked)
|
||||
{
|
||||
@ -284,7 +284,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
_regEx = new Regex(RegexUtils.FixNewLine(searchText), RegexOptions.Compiled, TimeSpan.FromSeconds(5));
|
||||
DialogResult = DialogResult.OK;
|
||||
_findAndReplaceMethods.FindDialogFindPrevious();
|
||||
_findAndReplaceMethods.FindDialogFindPrevious(FindText);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
@ -6245,8 +6245,11 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
|
||||
public void FindDialogFindPrevious()
|
||||
public void FindDialogFindPrevious(string findText)
|
||||
{
|
||||
_findHelper = _findHelper ?? _findDialog.GetFindDialogHelper(_subtitleListViewIndex);
|
||||
_findHelper.FindText = findText;
|
||||
_findHelper.FindTextLength = findText.Length;
|
||||
FindPrevious();
|
||||
}
|
||||
|
||||
|
@ -9827,13 +9827,15 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
||||
}
|
||||
}
|
||||
|
||||
public void FindDialogFindPrevious()
|
||||
public void FindDialogFindPrevious(string findText)
|
||||
{
|
||||
if (_findHelper == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_findHelper.FindText = findText;
|
||||
_findHelper.FindTextLength = findText.Length;
|
||||
_findHelper.InProgress = true;
|
||||
var tb = textBoxCurrentText;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
public interface IFindAndReplace
|
||||
{
|
||||
void FindDialogFind(string findText);
|
||||
void FindDialogFindPrevious();
|
||||
void FindDialogFindPrevious(string findText);
|
||||
void FindDialogClose();
|
||||
|
||||
void ReplaceDialogFind();
|
||||
|
@ -1894,6 +1894,12 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
case "FindDialog/Title":
|
||||
language.FindDialog.Title = reader.Value;
|
||||
break;
|
||||
case "FindDialog/FindNext":
|
||||
language.FindDialog.FindNext = reader.Value;
|
||||
break;
|
||||
case "FindDialog/FindPrevious":
|
||||
language.FindDialog.FindPrevious = reader.Value;
|
||||
break;
|
||||
case "FindDialog/Normal":
|
||||
language.FindDialog.Normal = reader.Value;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user