Browse Source

Improved code readability

pull/635/head
Dmitry Nefedov 3 weeks ago
parent
commit
0a3e9f23c0
  1. 1
      Wrapper/Localizations/de-DE/ui.json
  2. 1
      Wrapper/Localizations/en-US/ui.json
  3. 1
      Wrapper/Localizations/ru-RU/ui.json
  4. BIN
      Wrapper/SophiaScriptWrapper.exe
  5. 8
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  6. 2
      src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
  7. 2
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
  8. 8
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  9. 8
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  10. 2
      src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1
  11. 8
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

1
Wrapper/Localizations/de-DE/ui.json

@ -6,6 +6,7 @@
"menuImportPreset": "Voreinstellung importieren",
"menuExportPreset": "Voreinstellung exportieren",
"menuAutosave": "Automatisches Speichern",
"menuPresets": "Voreinstellungen",
"menuOpposite": "Alle umkehren",
"menuClear": "Löschen",
"menuClearTab": "Registerkarte löschen",

1
Wrapper/Localizations/en-US/ui.json

@ -6,6 +6,7 @@
"menuImportPreset": "Import Preset",
"menuExportPreset": "Export Preset",
"menuAutosave": "Autosave",
"menuPresets": "Presets",
"menuOpposite": "Opposite",
"menuClear": "Clear",
"menuClearTab": "Clear Tab",

1
Wrapper/Localizations/ru-RU/ui.json

@ -6,6 +6,7 @@
"menuImportPreset": "Импортировать пресет",
"menuExportPreset": "Экспортировать пресет",
"menuAutosave": "Автосохранение",
"menuPresets": "Пресеты",
"menuOpposite": "Противоположные значения",
"menuClear": "Очистить",
"menuClearTab": "Очистить вкладку",

BIN
Wrapper/SophiaScriptWrapper.exe

Binary file not shown.

8
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -5261,7 +5261,7 @@ public static bool MarkFileDelete (string sourcefile)
}
else
{
Start-Process -FilePath explorer -ArgumentList $env:OneDrive
Start-Process -FilePath "$env:SystemRoot\explorer.exe" -ArgumentList $env:OneDrive
}
}
@ -5289,7 +5289,7 @@ public static bool MarkFileDelete (string sourcefile)
$FileSyncShell64dlls = Get-ChildItem -Path "$OneDriveFolder\*\FileSyncShell64.dll" -Force
foreach ($FileSyncShell64dll in $FileSyncShell64dlls.FullName)
{
Start-Process -FilePath regsvr32.exe -ArgumentList "/u /s $FileSyncShell64dll" -Wait
Start-Process -FilePath "$env:SystemRoot\System32\regsvr32.exe" -ArgumentList "/u /s $FileSyncShell64dll" -Wait
Remove-Item -Path $FileSyncShell64dll -Force -ErrorAction Ignore
if (Test-Path -Path $FileSyncShell64dll)
@ -5305,7 +5305,7 @@ public static bool MarkFileDelete (string sourcefile)
}
# We need to wait for a few seconds to let explore launch unless it will fail to do so
Start-Process -FilePath explorer
Start-Process -FilePath "$env:SystemRoot\explorer.exe"
Start-Sleep -Seconds 3
$Path = @(
@ -15119,7 +15119,7 @@ public static void PostMessage()
{
if (Test-Path -Path $Script:OpenedFolder)
{
Start-Process -FilePath explorer -ArgumentList $Script:OpenedFolder
Start-Process -FilePath "$env:SystemRoot\explorer.exe" -ArgumentList $Script:OpenedFolder
}
}
}

2
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -11666,7 +11666,7 @@ public static void PostMessage()
{
if (Test-Path -Path $Script:OpenedFolder)
{
Start-Process -FilePath explorer -ArgumentList $Script:OpenedFolder
Start-Process -FilePath "$env:SystemRoot\explorer.exe" -ArgumentList $Script:OpenedFolder
}
}
}

2
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -13055,7 +13055,7 @@ public static void PostMessage()
{
if (Test-Path -Path $Script:OpenedFolder)
{
Start-Process -FilePath explorer -ArgumentList $Script:OpenedFolder
Start-Process -FilePath "$env:SystemRoot\explorer.exe" -ArgumentList $Script:OpenedFolder
}
}
}

8
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -5295,7 +5295,7 @@ public static bool MarkFileDelete (string sourcefile)
}
else
{
Start-Process -FilePath explorer -ArgumentList $env:OneDrive
Start-Process -FilePath "$env:SystemRoot\explorer.exe" -ArgumentList $env:OneDrive
}
}
@ -5323,7 +5323,7 @@ public static bool MarkFileDelete (string sourcefile)
$FileSyncShell64dlls = Get-ChildItem -Path "$OneDriveFolder\*\FileSyncShell64.dll" -Force
foreach ($FileSyncShell64dll in $FileSyncShell64dlls.FullName)
{
Start-Process -FilePath regsvr32.exe -ArgumentList "/u /s $FileSyncShell64dll" -Wait
Start-Process -FilePath "$env:SystemRoot\System32\regsvr32.exe" -ArgumentList "/u /s $FileSyncShell64dll" -Wait
Remove-Item -Path $FileSyncShell64dll -Force -ErrorAction Ignore
if (Test-Path -Path $FileSyncShell64dll)
@ -5339,7 +5339,7 @@ public static bool MarkFileDelete (string sourcefile)
}
# We need to wait for a few seconds to let explore launch unless it will fail to do so
Start-Process -FilePath explorer
Start-Process -FilePath "$env:SystemRoot\explorer.exe"
Start-Sleep -Seconds 3
$Path = @(
@ -15163,7 +15163,7 @@ public static void PostMessage()
{
if (Test-Path -Path $Script:OpenedFolder)
{
Start-Process -FilePath explorer -ArgumentList $Script:OpenedFolder
Start-Process -FilePath "$env:SystemRoot\explorer.exe" -ArgumentList $Script:OpenedFolder
}
}
}

8
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -4871,7 +4871,7 @@ public static bool MarkFileDelete (string sourcefile)
}
else
{
Start-Process -FilePath explorer -ArgumentList $env:OneDrive
Start-Process -FilePath "$env:SystemRoot\explorer.exe" -ArgumentList $env:OneDrive
}
}
@ -4899,7 +4899,7 @@ public static bool MarkFileDelete (string sourcefile)
$FileSyncShell64dlls = Get-ChildItem -Path "$OneDriveFolder\*\FileSyncShell64.dll" -Force
foreach ($FileSyncShell64dll in $FileSyncShell64dlls.FullName)
{
Start-Process -FilePath regsvr32.exe -ArgumentList "/u /s $FileSyncShell64dll" -Wait
Start-Process -FilePath "$env:SystemRoot\System32\regsvr32.exe" -ArgumentList "/u /s $FileSyncShell64dll" -Wait
Remove-Item -Path $FileSyncShell64dll -Force -ErrorAction Ignore
if (Test-Path -Path $FileSyncShell64dll)
@ -4915,7 +4915,7 @@ public static bool MarkFileDelete (string sourcefile)
}
# We need to wait for a few seconds to let explore launch unless it will fail to do so
Start-Process -FilePath explorer
Start-Process -FilePath "$env:SystemRoot\explorer.exe"
Start-Sleep -Seconds 3
$Path = @(
@ -14153,7 +14153,7 @@ public static void PostMessage()
{
if (Test-Path -Path $Script:OpenedFolder)
{
Start-Process -FilePath explorer -ArgumentList $Script:OpenedFolder
Start-Process -FilePath "$env:SystemRoot\explorer.exe" -ArgumentList $Script:OpenedFolder
}
}
}

2
src/Sophia_Script_for_Windows_11_LTSC_2024/Module/Sophia.psm1

@ -13047,7 +13047,7 @@ public static void PostMessage()
{
if (Test-Path -Path $Script:OpenedFolder)
{
Start-Process -FilePath explorer -ArgumentList $Script:OpenedFolder
Start-Process -FilePath "$env:SystemRoot\explorer.exe" -ArgumentList $Script:OpenedFolder
}
}
}

8
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -4905,7 +4905,7 @@ public static bool MarkFileDelete (string sourcefile)
}
else
{
Start-Process -FilePath explorer -ArgumentList $env:OneDrive
Start-Process -FilePath "$env:SystemRoot\explorer.exe" -ArgumentList $env:OneDrive
}
}
@ -4933,7 +4933,7 @@ public static bool MarkFileDelete (string sourcefile)
$FileSyncShell64dlls = Get-ChildItem -Path "$OneDriveFolder\*\FileSyncShell64.dll" -Force
foreach ($FileSyncShell64dll in $FileSyncShell64dlls.FullName)
{
Start-Process -FilePath regsvr32.exe -ArgumentList "/u /s $FileSyncShell64dll" -Wait
Start-Process -FilePath "$env:SystemRoot\System32\regsvr32.exe" -ArgumentList "/u /s $FileSyncShell64dll" -Wait
Remove-Item -Path $FileSyncShell64dll -Force -ErrorAction Ignore
if (Test-Path -Path $FileSyncShell64dll)
@ -4949,7 +4949,7 @@ public static bool MarkFileDelete (string sourcefile)
}
# We need to wait for a few seconds to let explore launch unless it will fail to do so
Start-Process -FilePath explorer
Start-Process -FilePath "$env:SystemRoot\explorer.exe"
Start-Sleep -Seconds 3
$Path = @(
@ -14197,7 +14197,7 @@ public static void PostMessage()
{
if (Test-Path -Path $Script:OpenedFolder)
{
Start-Process -FilePath explorer -ArgumentList $Script:OpenedFolder
Start-Process -FilePath "$env:SystemRoot\explorer.exe" -ArgumentList $Script:OpenedFolder
}
}
}

Loading…
Cancel
Save