Da mein Skript wird immer ziemlich lange, und es wird immer länger ich mich gefragt, ob ich ohne changeing wirklich den Umfang oder die Werte einige Codeblöcke umwickeln könnte.Powershell structur „Wrapping“ Codeblöcke ohne Rahmen Verschiebung
Ich speacking von so etwas wie div-Container auf html oder sogar so etwas wie nur Wrap-around „int main (void)“ von c Sprachen
#Select which option Form
$form = New-Object System.Windows.Forms.Form
$form.Text = "CSV Liste"
$form.Size = New-Object System.Drawing.Size(300,300)
$form.StartPosition = "CenterScreen"
$OKButton = New-Object System.Windows.Forms.Button
$OKButton.Location = New-Object System.Drawing.Point(75,195)
$OKButton.Size = New-Object System.Drawing.Size(75,23)
$OKButton.Text = "OK"
$OKButton.DialogResult = [System.Windows.Forms.DialogResult]::OK
$form.AcceptButton = $OKButton
$form.Controls.Add($OKButton)
$CancelButton = New-Object System.Windows.Forms.Button
$CancelButton.Location = New-Object System.Drawing.Point(150,195)
$CancelButton.Size = New-Object System.Drawing.Size(75,23)
$CancelButton.Text = "Cancel"
$CancelButton.DialogResult = [System.Windows.Forms.DialogResult]::Cancel
$form.CancelButton = $CancelButton
$form.Controls.Add($CancelButton)
$label = New-Object System.Windows.Forms.Label
$label.Location = New-Object System.Drawing.Point(10,20)
$label.Size = New-Object System.Drawing.Size(280,20)
$label.Text = "Welche CSV Liste soll geladen werden:"
$form.Controls.Add($label)
$listBox = New-Object System.Windows.Forms.ListBox
$listBox.Location = New-Object System.Drawing.Point(10,40)
$listBox.Size = New-Object System.Drawing.Size(260,20)
$listBox.Height = 150
[void] $listBox.Items.Add("AS400 Computer")
[void] $listBox.Items.Add("AS400 Personalstamm")
[void] $listBox.Items.Add("ADComputer")
[void] $listBox.Items.Add("ADBenutzer")
#Formclosed
Dies wäre der perfekte Teil meines Skript zu wickeln um in so etwas wie ein div Container etwas structur in zu bekommen, aber ich weiß nicht, ob es eine Option
wie dies ohne Änderung Tive ist
das wird tun, was ich brauche, gibt es eine Möglichkeit, ein oder zwei Region in einem anderen größeren zu haben? – Kevin
Ja, Sie können sie verschachteln. –