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