diff --git a/.gui-state/Start-SPMigration/settings.json b/.gui-state/Start-SPMigration/settings.json deleted file mode 100644 index 79debaa..0000000 --- a/.gui-state/Start-SPMigration/settings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "WindowHeight": 940, - "FontSize": 9, - "LastOutputPath": "C:\\Users\\CodexSandboxOffline\\.codex\\.sandbox\\cwd\\c85dc9d4b6e088fe\\SPMigrationOutput", - "LastMappingTablePath": "", - "LastSourceUrl": "", - "WindowWidth": 1400, - "LastTargetUrl": "" -} \ No newline at end of file diff --git a/Start-SPMigrationGUI.ps1 b/Start-SPMigrationGUI.ps1 index 4165f30..fa9ebff 100644 --- a/Start-SPMigrationGUI.ps1 +++ b/Start-SPMigrationGUI.ps1 @@ -10,19 +10,13 @@ param( Set-StrictMode -Version Latest $ErrorActionPreference = "Stop" -$script:ApplicationDataRoot = Join-Path -Path (Split-Path -Parent $PSCommandPath) -ChildPath ".gui-state" class SettingsManager { [string]$SettingsPath [hashtable]$Settings = @{} SettingsManager([string]$AppName) { - $appRoot = if ([string]::IsNullOrWhiteSpace($script:ApplicationDataRoot)) { - [Environment]::GetFolderPath("ApplicationData") - } - else { - $script:ApplicationDataRoot - } + $appRoot = [Environment]::GetFolderPath("ApplicationData") $appFolder = Join-Path -Path $appRoot -ChildPath $AppName if (-not (Test-Path -LiteralPath $appFolder)) { @@ -151,12 +145,7 @@ class LogManager { [bool]$EnableConsole = $false LogManager([string]$AppName) { - $appRoot = if ([string]::IsNullOrWhiteSpace($script:ApplicationDataRoot)) { - [Environment]::GetFolderPath("ApplicationData") - } - else { - $script:ApplicationDataRoot - } + $appRoot = [Environment]::GetFolderPath("ApplicationData") $logFolder = Join-Path -Path $appRoot -ChildPath (Join-Path -Path $AppName -ChildPath "Logs") if (-not (Test-Path -LiteralPath $logFolder)) { @@ -800,8 +789,8 @@ class DialogBuilder : BaseComponent { [System.Windows.Forms.Application]::EnableVisualStyles() [System.Windows.Forms.Application]::SetCompatibleTextRenderingDefault($false) -$script:SettingsManager = [SettingsManager]::new("Start-SPMigration") -$script:LogManager = [LogManager]::new("Start-SPMigration") +$script:SettingsManager = [SettingsManager]::new("SPMigrationTool") +$script:LogManager = [LogManager]::new("SPMigrationTool") [BaseComponent]::InitializeShared($script:SettingsManager, $script:LogManager) $script:MigrationScriptPath = Join-Path -Path (Split-Path -Parent $PSCommandPath) -ChildPath "Start-SPMigration.ps1"