Scripts/Show-WsustainableSettingsView.ps1

enum Win32OperatingSystemProductType{
    WorkStation = 1
    DomainController = 2
    Server = 3
}

Function Global:Show-WsustainableSettingsView{
    Add-Type -AssemblyName System,System.Core,System.Windows.Forms,PresentationFramework,PresentationCore,WindowsBase,WindowsFormsIntegration,System.Xml.Linq,System.Dynamic | Out-Null
    #[Console].AssemblyQualifiedName
    [Windows.Forms.Application]::EnableVisualStyles()
    [System.Environment]::CurrentDirectory = (Get-Location)
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

    $Global:DefaultConfig = Get-Content (Join-Path $PSScriptRoot "..\Config\Default.json") -Encoding UTF8 | ConvertFrom-Json
    $Global:CurrentConfig = Set-RequiredConfigurationValues (Get-Content (Join-Path $PSScriptRoot "..\Config\Config.json") -Encoding UTF8 | ConvertFrom-Json)

    Get-ChildItem -Path (Join-Path $PSScriptRoot "..\View\*.ps1") | ForEach-Object { . $_}

    Get-ViewClass
    Get-MainWindow
    If (($MainWindow.ShowDialog()) -eq $False)
    {
        Write-Verbose "キャンセルされました"
    }
}
Export-ModuleMember -Function Show-WsustainableSettingsView