Skip to content

Commit 0f974d2

Browse files
author
Sébastien Geiser
committed
Refactoring
1 parent eb05a24 commit 0f974d2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

RegexDialog/RegExToolDialog.xaml.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ List<RegexResult> GetMatchesFor(string text, string fileName = "", int selection
567567

568568
MatchesResultLabel.Content = $"{i} matches [Index,Length] + {countAllCaptures - i} empties matches found in {ff}/{ft} files";
569569
}
570-
else if(Config.Instance.TextSourceOn == RegexTextSource.CSharpScript)
570+
else if (Config.Instance.TextSourceOn == RegexTextSource.CSharpScript)
571571
{
572572
dynamic sourceScript = CSharpTextSourceScript;
573573

@@ -857,7 +857,7 @@ private void ExtractMatchesButton_Click(object sender, RoutedEventArgs e)
857857

858858
void Extract(string text, string fileName = "")
859859
{
860-
List<Match> matches = regex.Matches((string)script?.Before(text,fileName) ?? text)
860+
List<Match> matches = regex.Matches((string)script?.Before(text, fileName) ?? text)
861861
.Cast<Match>()
862862
.ToList();
863863

@@ -894,7 +894,7 @@ void Extract(string text, string fileName = "")
894894
fileNames = GetFiles();
895895
fileNames.ForEach(fileName => Extract(File.ReadAllText(fileName), fileName));
896896
}
897-
else if(Config.Instance.TextSourceOn == RegexTextSource.CSharpScript)
897+
else if (Config.Instance.TextSourceOn == RegexTextSource.CSharpScript)
898898
{
899899
dynamic sourceScript = CSharpTextSourceScript;
900900
Extract(sourceScript.Get().ToString(), "script");
@@ -2020,7 +2020,7 @@ private void TestCSharpTextSourceButton_Click(object sender, RoutedEventArgs e)
20202020
SetText(result);
20212021
}
20222022
}
2023-
catch(Exception exception)
2023+
catch (Exception exception)
20242024
{
20252025
MessageBox.Show($"{exception}");
20262026
}
@@ -2043,7 +2043,7 @@ private void ExportToVisualStudio_Click(object sender, RoutedEventArgs e)
20432043
{
20442044
string projectName = inputDialog.Input.Replace(" ", string.Empty);
20452045

2046-
if(string.IsNullOrWhiteSpace(projectName))
2046+
if (string.IsNullOrWhiteSpace(projectName))
20472047
{
20482048
MessageBox.Show("The project name can not be empty or only whitespaces", "Exportation Aborted", MessageBoxButton.OK, MessageBoxImage.Information);
20492049
return;
@@ -2060,9 +2060,9 @@ private void ExportToVisualStudio_Click(object sender, RoutedEventArgs e)
20602060

20612061
// Write solution file
20622062
if (!File.Exists(projectFile)
2063-
|| MessageBox.Show($"The solution file \"{solutionFile}\" already exists.\r\nDo you want to override it ?",
2064-
"Solution file override",
2065-
MessageBoxButton.YesNo,
2063+
|| MessageBox.Show($"The solution file \"{solutionFile}\" already exists.\r\nDo you want to override it ?",
2064+
"Solution file override",
2065+
MessageBoxButton.YesNo,
20662066
MessageBoxImage.Question) == MessageBoxResult.Yes)
20672067
{
20682068
File.WriteAllText(solutionFile,
@@ -2074,7 +2074,7 @@ private void ExportToVisualStudio_Click(object sender, RoutedEventArgs e)
20742074
}
20752075

20762076
// Write project file
2077-
if(!File.Exists(projectFile)
2077+
if (!File.Exists(projectFile)
20782078
|| MessageBox.Show($"The project file \"{projectFile}\" already exists.\r\nDo you want to override it ?",
20792079
"Project file override",
20802080
MessageBoxButton.YesNo,

0 commit comments

Comments
 (0)