forked from VelocityDB/VelocityDB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConnectionDialog.xaml
121 lines (118 loc) · 6.29 KB
/
ConnectionDialog.xaml
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
114
115
116
117
118
119
120
121
<Window x:Class="DatabaseManager.ConnectionDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
Title="VelocityDB Connection"
Height="380" Width="900" Icon="Images/Earth.ico" MinHeight="360" MinWidth="700">
<DockPanel>
<DockPanel Margin="0,5,1,5" LastChildFill="False" DockPanel.Dock="Bottom">
<Button Margin="5,0,0,0" Content="Cancel" DockPanel.Dock="Right" MinWidth="70" VerticalAlignment="Top" TabIndex="2" IsCancel="True" Padding="3"/>
<Button Margin="5,0,5,0" Content="OK" DockPanel.Dock="Right" MinWidth="70" VerticalAlignment="Top" TabIndex="1" IsDefault="True" Click="BtnOkClick" Padding="3"/>
</DockPanel>
<Grid DockPanel.Dock="Top" Margin="7">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300*" MaxWidth="350"/>
<ColumnDefinition Width="300*"/>
<ColumnDefinition Width="300*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="100*"/>
</Grid.RowDefinitions>
<DockPanel Margin="7" Grid.Column="0" Grid.Row="0">
<Label Content="Database Directory" DockPanel.Dock="Top"/>
<DockPanel Margin="0,5,0,5" DockPanel.Dock="Top">
<Label DockPanel.Dock="Right">
<Hyperlink Click="BrowseDBDir">Browse...</Hyperlink>
</Label>
<TextBox x:Name="DBDirTextBox" DockPanel.Dock="Left"/>
</DockPanel>
<GroupBox Header="Session Details" Margin="0,5,0,0">
<StackPanel Margin="0,5,0,5">
<RadioButton x:Name="RadioNoServ" Content="Not using VelocityDBServer" Margin="0,0,0,5"></RadioButton>
<RadioButton x:Name="RadioServer" Content="Using VelocityDBServer" Checked="EnableServerParameters" Unchecked="DisableServerParameters" Margin="0,0,0,5"/>
<DockPanel Margin="20,5,10,5">
<Label>Host</Label>
<TextBox x:Name="HostTextBox" Text="{Binding Host}" IsEnabled="False"/>
</DockPanel>
<CheckBox x:Name="PessimisticBox" IsChecked="{Binding Path=PessimisticLocking, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged }" Content="Pessimistic Locking" Margin="0,5,0,0"/>
<CheckBox x:Name="WindowsAuthenticationBox" IsChecked="{Binding Path=WindowsAuthentication, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Content="Use Windows Authentication" Margin="0,5,0,0"/>
<CheckBox x:Name="CreateNewBox" IsChecked="{Binding Path=CreateNew, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Content="Create New (if system databases missing)" Margin="0,5,0,0"/>
<DockPanel Margin="0,5,10,5">
<Label>WaitForMilliseconds</Label>
<TextBox x:Name="WaitForMilliSecondsTextBox"/>
</DockPanel>
</StackPanel>
</GroupBox>
</DockPanel>
<GroupBox Header="Assemblies" Grid.Column="1" Grid.Row="0" Margin="7">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="100*"/>
<RowDefinition Height="100*"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0" Grid.Column="0">
<Label Content="Classes Assemblies" DockPanel.Dock="Top"/>
<DockPanel LastChildFill="False" DockPanel.Dock="Bottom" Margin="0,4">
<Button DockPanel.Dock="Right" Padding="8,2"
HorizontalAlignment="Right" Margin="10,0,0,0"
Click="AddClass">
Add
</Button>
<Button DockPanel.Dock="Right" Padding="8,2"
HorizontalAlignment="Right" IsEnabled="False"
x:Name="BtnRemoveAssembly" Click="RemoveAssembly">
Remove
</Button>
</DockPanel>
<ListView x:Name="AssemblyList" SelectionChanged="AssemblySelection"/>
</DockPanel>
<DockPanel Grid.Row="1" Grid.Column="0">
<Label Content="Dependency Assemblies" DockPanel.Dock="Top"/>
<DockPanel LastChildFill="False" DockPanel.Dock="Bottom" Margin="0,4">
<Button DockPanel.Dock="Right" Padding="8,2"
HorizontalAlignment="Right" Margin="10,0,0,0"
Click="AddDependency">
Add
</Button>
<Button DockPanel.Dock="Right" Padding="8,2"
HorizontalAlignment="Right" IsEnabled="False"
x:Name="BtnRemoveDependency" Click="RemoveDependency">
Remove
</Button>
</DockPanel>
<ListView x:Name="DependencyList" SelectionChanged="DependencySelection"/>
</DockPanel>
</Grid>
</GroupBox>
<DockPanel Margin="7" Grid.Column="3" Grid.Row="0">
<GroupBox Header="Restore From" Margin="0,5,0,0">
<StackPanel Margin="0,5,0,5">
<Label Content="Backup Directory" DockPanel.Dock="Top"/>
<DockPanel Margin="0,5,0,5" DockPanel.Dock="Top">
<Label DockPanel.Dock="Right">
<Hyperlink Click="BrowseBackupDir">Browse...</Hyperlink>
</Label>
<TextBox x:Name="BackupDirTextBox" Text="{Binding Path=BackupFolder, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" DockPanel.Dock="Left"/>
</DockPanel>
<DockPanel Margin="0,5,10,5">
<Label>Host</Label>
<TextBox x:Name="BackupHostTextBox" Text="{Binding Host}"/>
</DockPanel>
<DockPanel Margin="0,5,10,5">
<Label>Database Number</Label>
<TextBox x:Name="BackupRootDbNumTextBox" Text="100000000"/>
</DockPanel>
<DockPanel Margin="0,5,10,5">
<Label>Restore up to</Label>
<DatePicker x:Name="RestoreUpToDateTime"/>
</DockPanel>
</StackPanel>
</GroupBox>
</DockPanel>
</Grid>
</DockPanel>
</Window>