-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSqlQuery_Update_XAML.ps1
More file actions
113 lines (100 loc) · 5.49 KB
/
SqlQuery_Update_XAML.ps1
File metadata and controls
113 lines (100 loc) · 5.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Define the XAML file path
$xamlFilePath = "C:\Git\SqlQueryEditor\scripts\SqlQueryEditor.xaml"
# Define the new XAML content
$newXamlContent = @"
<Window x:Class="SqlQueryEditor.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="SqlQueryEditor" Height="800" Width="1200" Topmost="False"
ResizeMode="CanResizeWithGrip" ShowInTaskbar="True"
WindowStartupLocation="CenterScreen"
x:Name="MainForm"
Background="AliceBlue" UseLayoutRounding="True">
<Grid>
<TabControl x:Name="_tabControl" Grid.Row="0" Margin="5" Padding="0"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
Background="LightGray" BorderThickness="2" BorderBrush="Gray"
SelectedIndex="0" IsSynchronizedWithCurrentItem="True">
<TabItem x:Name="tbDocumentTree" Tag="0" Header="Document Management" ToolTip="Browsing, Scanning, and Managing Documents">
<!-- Add Document Management UI components here -->
</TabItem>
<TabItem x:Name="tbLkUpTableEdit" Tag="1" Header="Data Grid" ToolTip="Edit Data and Lookup Tables">
<!-- Add Data Grid UI components here -->
</TabItem>
<TabItem x:Name="tbSelection" Tag="2" Header="SQLQuery Editor" ToolTip="Select SQL Queries to Execute, Edit, Delete, or Add to SQL Query Database">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="20*" />
<ColumnDefinition Width="5" />
<ColumnDefinition Width="75*" />
</Grid.ColumnDefinitions>
<!-- Toggle Button -->
<ToggleButton x:Name="toggleEditMode" Grid.Row="0" Grid.Column="0" Margin="5" Content="Toggle Edit Mode" />
<!-- TreeView -->
<TreeView x:Name="treeViewSqlQueries" Grid.Row="1" Grid.Column="0" Margin="5">
<!-- TreeView items will be dynamically populated from the database -->
</TreeView>
<!-- GridSplitter -->
<GridSplitter Grid.Row="1" Grid.Column="1" Width="5" HorizontalAlignment="Left" VerticalAlignment="Stretch" Background="Gray"/>
<!-- Master-Detail Grids -->
<Grid Grid.Row="1" Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- Master DataGrid Menu -->
<Menu Grid.Row="0">
<MenuItem Header="File">
<MenuItem Header="Export">
<MenuItem Header="Copy to Clipboard" />
<MenuItem Header="Export as CSV" />
<MenuItem Header="Export as Excel" />
<MenuItem Header="Import from Excel" />
</MenuItem>
<MenuItem Header="Add" />
<MenuItem Header="Cancel" />
<MenuItem Header="Save" />
<MenuItem Header="Delete" />
</MenuItem>
<MenuItem Header="Edit">
<MenuItem Header="First" />
<MenuItem Header="Previous" />
<MenuItem Header="Next" />
<MenuItem Header="Last" />
</MenuItem>
</Menu>
<!-- Master DataGrid -->
<DataGrid x:Name="dataGridSqlQuery" Grid.Row="1" AutoGenerateColumns="True" Margin="5">
<!-- DataGrid for Master SqlQuery records -->
</DataGrid>
<!-- Detail DataGrid Menu -->
<Menu Grid.Row="2">
<MenuItem Header="Actions">
<MenuItem Header="Add" />
<MenuItem Header="Cancel" />
<MenuItem Header="Save" />
<MenuItem Header="Delete" />
</MenuItem>
</Menu>
<!-- Detail DataGrid -->
<DataGrid x:Name="dataGridSqlQueryParms" Grid.Row="3" AutoGenerateColumns="True" Margin="5">
<!-- DataGrid for Detail SqlQueryParms records -->
</DataGrid>
</Grid>
</Grid>
</TabItem>
</TabControl>
</Grid>
</Window>
"@
# Write the new content to the XAML file
Set-Content -Path $xamlFilePath -Value $newXamlContent -Force
Write-Host "SqlQueryEditor.xaml has been successfully updated."