Jun 2, 2026, 3:54 PM
This commit is contained in:
+58
-15
@@ -1,30 +1,73 @@
|
||||
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="DBAToolBox - MS SQL Management" Height="450" Width="600" Background="#F0F0F0">
|
||||
Title="DBAToolBox - MS SQL Management" Height="550" Width="850" Background="#F0F0F0">
|
||||
<Grid Margin="10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Header -->
|
||||
<TextBlock Text="DBAToolBox" FontSize="24" FontWeight="Bold" Foreground="#2D3E50" Margin="0,0,0,10"/>
|
||||
|
||||
<!-- Connection Panel -->
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,0,0,10">
|
||||
<Label Content="Server Name:" VerticalAlignment="Center"/>
|
||||
<TextBox x:Name="txtServerName" Width="250" VerticalAlignment="Center" Margin="5,0,10,0" Padding="3"/>
|
||||
<Button x:Name="btnConnect" Content="Connect & Test" Width="120" Padding="5" Background="#007ACC" Foreground="White" BorderThickness="0"/>
|
||||
</StackPanel>
|
||||
<!-- Main Workspace divided into Left (Tree View) and Right (Details) -->
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="220" MinWidth="180"/>
|
||||
<ColumnDefinition Width="5"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Main Content Area -->
|
||||
<GroupBox Grid.Row="2" Header="Server Information" Margin="0,0,0,10">
|
||||
<DataGrid x:Name="dgServerInfo" AutoGenerateColumns="True" IsReadOnly="True" Background="White"/>
|
||||
</GroupBox>
|
||||
<!-- Left Panel: SQL Servers Tree -->
|
||||
<GroupBox Header="SQL Server Directory" Grid.Column="0" Margin="0,0,5,0" Foreground="#2D3E50" FontWeight="SemiBold">
|
||||
<Grid Margin="5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TreeView x:Name="tvServers" Margin="0,0,0,5" Background="White" BorderBrush="#CCCCCC" BorderThickness="1">
|
||||
<!-- Items will be populated dynamically from PowerShell -->
|
||||
</TreeView>
|
||||
|
||||
<!-- Buttons to manage servers list -->
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button x:Name="btnAddServer" Content="Add Server" Grid.Column="0" Margin="0,0,3,0" Padding="5,4" Background="#007ACC" Foreground="White" BorderThickness="0" FontWeight="Normal" Cursor="Hand"/>
|
||||
<Button x:Name="btnRemoveServer" Content="Remove" Grid.Column="1" Margin="3,0,0,0" Padding="5,4" Background="#D13438" Foreground="White" BorderThickness="0" FontWeight="Normal" Cursor="Hand"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<!-- Log Area -->
|
||||
<TextBox Grid.Row="3" x:Name="txtLogs" Height="100" IsReadOnly="True" VerticalScrollBarVisibility="Auto" Background="#E8E8E8" FontFamily="Consolas" FontSize="11" TextWrapping="Wrap"/>
|
||||
<!-- GridSplitter to resize columns -->
|
||||
<GridSplitter Grid.Column="1" HorizontalAlignment="Stretch" Background="#D8D8D8" ResizeBehavior="PreviousAndNext" Cursor="SizeWE"/>
|
||||
|
||||
<!-- Right Panel: Connection and Main Workspace -->
|
||||
<Grid Grid.Column="2" Margin="10,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Connection Panel -->
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
|
||||
<Label Content="Server Name:" VerticalAlignment="Center" FontWeight="SemiBold"/>
|
||||
<TextBox x:Name="txtServerName" Width="250" VerticalAlignment="Center" Margin="5,0,10,0" Padding="4"/>
|
||||
<Button x:Name="btnConnect" Content="Connect & Test" Width="120" Padding="5" Background="#007ACC" Foreground="White" BorderThickness="0" Cursor="Hand"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Main Content Area -->
|
||||
<GroupBox Grid.Row="1" Header="Server Information" Margin="0,0,0,10" Foreground="#2D3E50" FontWeight="SemiBold">
|
||||
<DataGrid x:Name="dgServerInfo" AutoGenerateColumns="True" IsReadOnly="True" Background="White" BorderBrush="#CCCCCC" Margin="5"/>
|
||||
</GroupBox>
|
||||
|
||||
<!-- Log Area -->
|
||||
<TextBox Grid.Row="2" x:Name="txtLogs" Height="120" IsReadOnly="True" VerticalScrollBarVisibility="Auto" Background="#E8E8E8" FontFamily="Consolas" FontSize="11" TextWrapping="Wrap" BorderBrush="#CCCCCC" Padding="5"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user