This commit is contained in:
Florian Späth
2025-01-31 01:49:31 +01:00
commit afb2f418fc
56 changed files with 2822 additions and 0 deletions

61
GUIS/info.ps1 Normal file
View File

@@ -0,0 +1,61 @@
function Load_info {
param ($root)
[XML]$Form = @"
<?xaml encoding="utf-8"?>
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
xmlns:winForms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
Name="Window" Title="Cleaner - Information" Height="440" Width="624" Icon="{Binding Icon}" ResizeMode="NoResize" WindowStyle="None">
<Grid Background="#00344E">
<TextBlock Name="text" Text="" HorizontalAlignment="Left" Margin="34,44,0,0" TextWrapping="Wrap" Foreground="White" Width="554" TextAlignment="Center" Height="360" VerticalAlignment="Top" FontSize="16"></TextBlock>
<Button Name="btnok" Content="OK" HorizontalAlignment="Left" Margin="264,390,0,0" VerticalAlignment="Top" Width="100" Height="36" BorderThickness="0" Background="#00b8d4" Foreground="White">
<Button.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="2"/>
</Style>
</Button.Resources>
<Button.Style>
<Style TargetType="Button">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
<Label Content="Information" HorizontalAlignment="Left" VerticalAlignment="Top" Width="624" HorizontalContentAlignment="Center" Foreground="White" FontSize="20" FontWeight="Bold"/>
</Grid>
</Window>
"@
# Lädt das Fenster
$window=[Windows.Markup.XamlReader]::Load((New-Object System.Xml.XmlNodeReader $Form))
$NR=(New-Object System.Xml.XmlNodeReader $Form)
$window=[Windows.Markup.XamlReader]::Load($NR)
# Objekt - Variablen Verknüpfung
$text = $window.FindName("text")
$Script:infook = $window.findName("btnok")
# Verknüpft feste Elemente
$window.Title = $Script:Version
$window.icon="$root/Source/Logo.png"
$text.Text = "Das Admin Panel wurde geschaffen um Skripte welche von dem einzig waren Florian Spaeth entwickelt wurden in einer grafischen Oberfläche zu steuern.
Die Anwendung wurde so entworfen das diese maximale Wartungsfreundlichkeit bietet und auch Usern mit wenig Powershell Erfahrung die Möglichkeit gibt, neue Fenster hinzu zu fügen.
Im GitLab unter `"AllgemeineSkripte/examples`" kann Beispiel Code entnommen werden, wenn man sind in den BR hacken kann (: `n`nBugs in der GUI werden nicht aktiv verfolgt!`n`n$Script:Version `nCopyright bei Leiter (2024)`nAutor: Florian Spaeth `nDSGVO-Konform"
return $window
}
$Script:info = Load_info $args[0] # Variable: $info
$info.Add_MouseLeftButtonDown({
$info.DragMove()
})
$infook.Add_Click({
$info.Hide()
})