Skip to content

Commit 09fa1b1

Browse files
authored
changed bracket placements for style consistency
1 parent 83c396c commit 09fa1b1

File tree

1 file changed

+12
-24
lines changed

1 file changed

+12
-24
lines changed

AssistantComputerControl/Actions.cs

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -445,46 +445,34 @@ public void Open(string parameter) {
445445
}
446446
}
447447
}
448-
public void OpenAny(string parameter)
449-
{
448+
public void OpenAny(string parameter) {
450449
string fileLocation = MainProgram.shortcutLocation;
451450
Regex rx = new Regex("^" + parameter + Regex.Escape(".") + ".*", RegexOptions.IgnoreCase);
452-
if (Directory.Exists(fileLocation) || Uri.IsWellFormedUriString(fileLocation, UriKind.Absolute))
453-
{
451+
452+
if (Directory.Exists(fileLocation) || Uri.IsWellFormedUriString(fileLocation, UriKind.Absolute)) {
454453
DirectoryInfo d = new DirectoryInfo(fileLocation);
455454
bool opened = false;
456-
foreach (var dirFile in d.GetFiles())
457-
{
458-
if (!MainProgram.testingAction)
459-
{
455+
foreach (var dirFile in d.GetFiles()) {
456+
if (!MainProgram.testingAction) {
460457
bool result = rx.IsMatch(dirFile.Name);
461-
if (result)
462-
{
458+
if (result) {
463459
Process.Start(dirFile.FullName);
464460
opened = true;
465461
break;
466462
}
467463
}
468464
}
469-
if (!opened)
470-
{
465+
466+
if (!opened) {
471467
Error("File(" + parameter + ") doesn't exist at" + " (" + fileLocation + ")");
472-
}
473-
else
474-
{
475-
if (!MainProgram.testingAction)
476-
{
468+
} else {
469+
if (!MainProgram.testingAction) {
477470
successMessage = "OPEN: opened " + parameter;
478-
}
479-
else
480-
{
471+
} else {
481472
successMessage = "OPEN: simulated opening " + parameter;
482473
}
483474
}
484-
485-
}
486-
else
487-
{
475+
} else {
488476
Error("Directory doesn't exist (" + fileLocation + ")");
489477
}
490478
}

0 commit comments

Comments
 (0)