21 lines
832 B
PowerShell
21 lines
832 B
PowerShell
function Import-ConfigurationData {
|
|
$result = (
|
|
[DialogBuilder]::OpenFile().
|
|
SetTitle("Templates auswählen").
|
|
SetCommonFilter("PSD1").
|
|
SetMultiselect($true).
|
|
SetInitialDirectory($settingsManager.Get("DeploymentPath")).
|
|
Show()
|
|
)
|
|
if ($result.Result) {
|
|
foreach ($file in $result.FileNames) {
|
|
$newItem = New-Object PSObject -Property @{ BaseName = [System.IO.Path]::GetFileNameWithoutExtension($file); FullName = $file }
|
|
$selectionList.Items.Add($newItem)
|
|
$stateManager.SetState("hasSelection", $true)
|
|
$stateManager.SetState("isMerged", $false)
|
|
$stateManager.UpdateAllButtons()
|
|
$statusBar.SetText("Status", "Zur Auswahl hinzugefügt: $($file.fullPath)")
|
|
}
|
|
Merge-Templates
|
|
}
|
|
} |