-
Notifications
You must be signed in to change notification settings - Fork 1
/
ConnectionDialog.xaml
401 lines (393 loc) · 36.9 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
<Window x:Class="Aerospike.Database.LINQPadDriver.ConnectionDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Aerospike.Database.LINQPadDriver"
Title="Aerospike Connection Details"
Background="{x:Static SystemColors.ControlBrush}"
SizeToContent="Height"
WindowStartupLocation="CenterScreen" Icon="/Aerospike.Database.LINQPadDriver;component/Connection.png" Width="550" Height="668">
<Window.Resources>
<Style x:Key="DisableOnError" TargetType="Button">
<Setter Property="IsEnabled" Value="False"/>
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Path=(Validation.HasError), ElementName=txtPort}" Value="False"/>
<Condition Binding="{Binding Path=(Validation.HasError), ElementName=txtConnTimeout}" Value="False"/>
<Condition Binding="{Binding Path=(Validation.HasError), ElementName=txtTotalTimeout}" Value="False"/>
<Condition Binding="{Binding Path=(Validation.HasError), ElementName=txtSocketTimeout}" Value="False"/>
<Condition Binding="{Binding Path=(Validation.HasError), ElementName=txtSleepRetries}" Value="False"/>
<Condition Binding="{Binding Path=(Validation.HasError), ElementName=txtSampleRecs}" Value="False"/>
<Condition Binding="{Binding Path=(Validation.HasError), ElementName=txtCldPort}" Value="False"/>
<Condition Binding="{Binding Path=(Validation.HasError), ElementName=txtSampleRecsPercent}" Value="False"/>
</MultiDataTrigger.Conditions>
<Setter Property="IsEnabled" Value="True"/>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</Window.Resources>
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<StackPanel Margin="12" Name="StackPanelMain">
<GroupBox Header="Database" BorderThickness="4">
<StackPanel Margin="5,0,0,5">
<TabControl x:Name="tcDBType" SelectedIndex="{Binding DBTypeIdx}" SelectionChanged="tcDBType_SelectionChanged">
<TabItem Header="Self Managed" Name="Native">
<StackPanel>
<Label Padding="0,0,0,2">Seed Nodes separated by a comma:</Label>
<TextBox Name="txtSeedNodes" Padding="2" ToolTip="Cluster Seed Node List (default localhost)" TextWrapping="WrapWithOverflow" Text="{Binding ConnectionInfo.DatabaseInfo.Server, FallbackValue='localhost'}" Margin="1,0,0,5" />
<CheckBox IsChecked="{Binding UseExternalIP}" ToolTip="Enable if connecting to the DB over the Internet. See useServicesAlternate client Property." HorizontalAlignment="Left" Margin="10,10,0,0">
<Hyperlink NavigateUri="https://docs.aerospike.com/reference/configuration#alternate-access-address" RequestNavigate="Hyperlink_RequestNavigate">
Enable Public/Alternate Address
</Hyperlink>
</CheckBox>
<StackPanel Orientation="Horizontal">
<Label Padding="0,0,0,2" Margin="0,5,0,5" HorizontalAlignment="Center">Port:</Label>
<TextBox Name="txtPort" Padding="2" ToolTip="Cluster DB Port (default 3000)" MaxLines="1" MinLines="1" Width="50" HorizontalAlignment="Center" Margin="0,5,0,5">
<TextBox.Text>
<Binding Path="Port" FallbackValue="3000" StringFormat="{}{0:0}"
ValidatesOnExceptions="True" ValidatesOnDataErrors="True">
<Binding.ValidationRules>
<local:NumericValidationRule ValidationStep="RawProposedValue" Min="1000"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label Padding="0,0,0,2" VerticalAlignment="Center">UserName:</Label>
<TextBox Name="txtUserName" Padding="2" ToolTip="User Name used for login" MaxLines="1" MinLines="1" Text="{Binding ConnectionInfo.DatabaseInfo.UserName}" Width="250" HorizontalAlignment="Left" Margin="5,0,0,5"/>
</StackPanel>
<CheckBox IsChecked="{Binding UsePasswordManager}" Name="cbUsePassMgr" Click="cbUsePassMgr_Click" ToolTip="Use the LINQPad Password Manager is available via the File menu" HorizontalAlignment="Left" Margin="12,0,0,5">
LINQPad Password Manager
</CheckBox>
<Grid>
<StackPanel Grid.Row="0" Grid.ZIndex="1" Orientation="Horizontal" Name="spPassword">
<Label Padding="0,0,0,2" VerticalAlignment="Center">Password:</Label>
<PasswordBox Name="passwordBox" Padding="0,0,0,2" Width="250" HorizontalAlignment="Left" Margin="12,0,0,5" PasswordChar="*" local:PasswordHelper.Attach="True" local:PasswordHelper.Password="{Binding Path=ConnectionInfo.DatabaseInfo.Password, Mode=TwoWay}"/>
<TextBox Name="txtPassword" Padding="0,0,0,2" ToolTip="Password" MaxLines="1" MinLines="1" Text="{Binding Path=ConnectionInfo.DatabaseInfo.Password, Mode=TwoWay}" Width="250" HorizontalAlignment="Left" Margin="12,0,0,5" Visibility="Collapsed" />
<CheckBox Name="cbShowPasswordChars" Content="Show password" Checked="cbShowPasswordChars_Checked" Unchecked="cbShowPasswordChars_Unchecked" />
</StackPanel>
<StackPanel Grid.Row="0" Grid.ZIndex="2" Orientation="Horizontal" Name="spPasswordNames">
<Label Padding="0,0,0,2" VerticalAlignment="Center">Password Name:</Label>
<ComboBox Name="comboPasswordNames" Padding="0,0,0,2" Text="{Binding PasswordManagerName}" Width="250" HorizontalAlignment="Left" Margin="12,0,0,5" ToolTip="Name associated with the password in LINQPad Password Manager">
<ComboBoxItem Content="<None>"/>
</ComboBox>
</StackPanel>
</Grid>
<Expander Name="TLSGrpBox" Header="TLS" ToolTip="Expands the TLS options" Background="LightGray"
BorderThickness="4" Margin="5,0,5,0" ExpandDirection="Down" IsExpanded="False">
<StackPanel Margin="5,0,0,0">
<StackPanel>
<Label Padding="0,0,0,2">Protocols:</Label>
<ListBox Name="lbProtocols" ItemsSource="{Binding TLSProtocolsList}" SelectionMode="Multiple" Padding="2" ToolTip="A list of TLS protocols" Margin="0,0,5,5">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel IsItemsHost="True" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<CheckBox Content="{Binding Content}" Tag="{Binding Name}" IsChecked="{Binding IsChecked ,Mode=TwoWay}" ToolTip="{Binding ToolTip}" Checked="lbProtocols_Checked" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
<StackPanel>
<Label Padding="0,0,0,2">
<Hyperlink NavigateUri="https://docs.aerospike.com/apidocs/csharp/html/f_aerospike_client_host_tlsname" RequestNavigate="Hyperlink_RequestNavigate">
TLS Certificate Common Name:
</Hyperlink>
</Label>
<TextBox Name="txtTLSCertName" Padding="2" ToolTip="TLS certificate common name used for secure connections. The certificate must exist in your Trusted Root Certification repository." MaxLines="1" MinLines="1" Text="{Binding TLSCertName}" Margin="0,0,5,5" IsEnabled="False"/>
</StackPanel>
<StackPanel>
<Label Padding="0,0,0,2">Client Certificate File:</Label>
<DockPanel HorizontalAlignment="Stretch" LastChildFill="True">
<Button Name="btnCertFile" Click="btnCertFile_Click" DockPanel.Dock="Right" Margin="5,0,5,5" FontSize="8" ToolTip="Select Certificate File" IsEnabled="False">Select File</Button>
<TextBox Name="txtCertFile" Padding="2" ToolTip="File containing the client certs" MaxLines="1" MinLines="1" Text="{Binding TLSClientCertFile}" Margin="0,0,0,5" HorizontalContentAlignment="Stretch" IsEnabled="False"/>
</DockPanel>
</StackPanel>
<StackPanel>
<Label Padding="0,0,0,2">Reject Server Certificates:</Label>
<TextBox Name="txtRejectCerts" Padding="2" ToolTip="Reject server certificates whose serial numbers match a serial number in this list separated by comma" MaxLines="1" MinLines="1" Text="{Binding TLSRevokeCerts}" Margin="0,0,5,5" IsEnabled="False"/>
</StackPanel>
<CheckBox Name="cbTLSOnlyLogin" IsChecked="{Binding TLSOnlyLogin}" ToolTip="Use TLS connections only for login authentication" HorizontalAlignment="Left" Margin="5,10,0,5" IsEnabled="False">Only for Login</CheckBox>
</StackPanel>
</Expander>
</StackPanel>
</TabItem>
<TabItem Header="Cloud" Name="Cloud">
<StackPanel>
<StackPanel Orientation="Horizontal">
<Label Padding="0,0,0,2">Host Name (</Label>
<Label Padding="0,0,0,2" HorizontalAlignment="Left">
<Hyperlink NavigateUri="https://auth.control.aerospike.cloud" RequestNavigate="Hyperlink_RequestNavigate">
Goto Login Page to obtain information
</Hyperlink>
</Label>
<Label Padding="0,0,0,2">):</Label>
</StackPanel>
<TextBox Name="txtCldhostName" Padding="2" ToolTip="Database host name provided in the dashboard" TextWrapping="WrapWithOverflow" Text="{Binding ConnectionInfo.DatabaseInfo.Server}" Margin="1,0,0,5" TextChanged="txtCloudField_TextChanged" />
<StackPanel Orientation="Horizontal">
<Label Padding="0,0,0,2" Margin="0,5,0,5" HorizontalAlignment="Center">Port:</Label>
<TextBox Name="txtCldPort" Padding="2" ToolTip="Cluster DB Port (default 4000)" MaxLines="1" MinLines="1" Width="50" HorizontalAlignment="Center" Margin="0,5,0,5">
<TextBox.Text>
<Binding Path="Port" FallbackValue="4000" StringFormat="{}{0:0}" ValidatesOnExceptions="True" ValidatesOnDataErrors="True">
<Binding.ValidationRules>
<local:NumericValidationRule ValidationStep="RawProposedValue" Min="1000"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<Label Padding="0,0,0,2" Margin="0,5,0,5">
<Hyperlink NavigateUri="https://docs.aerospike.com/cloud/connect/private-link" RequestNavigate="Hyperlink_RequestNavigate">
Original Host Name (VPC Only):
</Hyperlink>
</Label>
<TextBox Name="txtCldVPCServerName" Padding="2" ToolTip="The original cloud host name. Host Name field should be the VPC End Point." TextWrapping="WrapWithOverflow" Text="{Binding TLSCertName}" Margin="1,0,0,5" />
<StackPanel Orientation="Horizontal">
<Label Padding="0,0,0,2" VerticalAlignment="Center">API Key:</Label>
<TextBox Name="txtAPIKey" Padding="2" ToolTip="API Key" MaxLines="1" MinLines="1" Text="{Binding ConnectionInfo.DatabaseInfo.UserName}" Width="250" HorizontalAlignment="Left" Margin="5,0,0,5" TextChanged="txtCloudField_TextChanged"/>
<Button Name="btnKeyFile" Click="btnKeyFile_Click" Margin="5,0,5,5" FontSize="8" ToolTip="Use the API Key CSV File to populate Key and Secret">Use API Key File</Button>
</StackPanel>
<CheckBox IsChecked="{Binding UsePasswordManager}" Name="cbCldUsePassMgr" Click="cbCldUsePassMgr_Click" ToolTip="Use the LINQPad Password Manager is available via the File menu" HorizontalAlignment="Left" Margin="12,0,0,5">
LINQPad Password Manager
</CheckBox>
<Grid>
<StackPanel Grid.Row="0" Grid.ZIndex="1" Orientation="Horizontal" Name="spCldPassword">
<Label Padding="0,0,0,2" VerticalAlignment="Center">API Secret:</Label>
<PasswordBox Name="CldpasswordBox" Padding="0,0,0,2" Width="250" HorizontalAlignment="Left" Margin="12,0,0,5" PasswordChar="*" local:PasswordHelper.Attach="True" local:PasswordHelper.Password="{Binding Path=ConnectionInfo.DatabaseInfo.Password, Mode=TwoWay}" PasswordChanged="CldpasswordBox_PasswordChanged"/>
<TextBox Name="txtCldPassword" Padding="0,0,0,2" ToolTip="API Secret" MaxLines="1" MinLines="1" Text="{Binding Path=ConnectionInfo.DatabaseInfo.Password, Mode=TwoWay}" Width="250" HorizontalAlignment="Left" Margin="12,0,0,5" Visibility="Collapsed" TextChanged="txtCloudField_TextChanged"/>
<CheckBox Name="cbCldShowPasswordChars" Content="Show Secret" Checked="cbCldShowPasswordChars_Checked" Unchecked="cbCldShowPasswordChars_Unchecked" />
</StackPanel>
<StackPanel Grid.Row="0" Grid.ZIndex="2" Orientation="Horizontal" Name="spCldPasswordNames">
<Label Padding="0,0,0,2" VerticalAlignment="Center">Secret Name:</Label>
<ComboBox Name="comboCldPasswordNames" Padding="0,0,0,2" Text="{Binding PasswordManagerName}" Width="250" HorizontalAlignment="Left" Margin="12,0,0,5" ToolTip="Name associated with the password in LINQPad Password Manager" SelectionChanged="comboCldPasswordNames_SelectionChanged">
<ComboBoxItem Content="<None>"/>
</ComboBox>
</StackPanel>
</Grid>
<StackPanel Orientation="Horizontal">
<Label Padding="0,0,0,2" VerticalAlignment="Center">Namespace:</Label>
<TextBox Name="txtCldNamespace" Padding="2" ToolTip="Namespace" MaxLines="1" MinLines="1" Text="{Binding NamespaceCloud, FallbackValue='aerospike_cloud'}" Width="250" HorizontalAlignment="Left" Margin="5,0,0,5" TextChanged="txtCloudField_TextChanged"/>
</StackPanel>
<StackPanel Orientation="Vertical">
<Label Padding="0,0,0,2" VerticalAlignment="Center">Set Names (separated by comma):</Label>
<TextBox Name="txtCldSetNames" Padding="2" ToolTip="Static list of Set Names that can be in this Namespace." MaxLines="10" MinLines="1" Text="{Binding SetNamesCloud}" HorizontalAlignment="Left" Margin="5,0,0,5" Width="473"/>
</StackPanel>
<Label Padding="0,0,0,2" Margin="0,5,0,5" HorizontalAlignment="Left">
<Hyperlink NavigateUri="https://docs.aerospike.com/cloud/connect/available" RequestNavigate="Hyperlink_RequestNavigate">
Note: Available Client Features can be found here.
</Hyperlink>
</Label>
<Label Padding="0,0,0,2" Margin="0,5,0,5" HorizontalAlignment="Left">
<Hyperlink NavigateUri="https://aerospike.com/products/aerospike-cloud" RequestNavigate="Hyperlink_RequestNavigate">
Learn more about Aerospike Cloud
</Hyperlink>
</Label>
</StackPanel>
</TabItem>
</TabControl>
<GroupBox Header="Timeout" BorderThickness="4" Margin="5,0,5,0">
<StackPanel Margin="5,0,0,0" Orientation="Horizontal">
<StackPanel Orientation="Horizontal">
<Label Padding="0,0,0,2" VerticalAlignment="Center" Margin="0,5,0,5">Connection:</Label>
<TextBox Name="txtConnTimeout" Padding="2" ToolTip="Connection Timeout in milliseconds" MaxLines="1" MinLines="1" Width="50" HorizontalAlignment="Left" Margin="8,5,5,5">
<TextBox.Text>
<Binding Path="ConnectionTimeout" StringFormat="{}{0:0}"
ValidatesOnExceptions="True" ValidatesOnDataErrors="True">
<Binding.ValidationRules>
<local:NumericValidationRule ValidationStep="RawProposedValue"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label Padding="0,0,0,2" VerticalAlignment="Center" Margin="0,5,0,5">Write (Total):</Label>
<TextBox Name="txtTotalTimeout" Padding="2" ToolTip="Total Timeout in milliseconds used for operations like Get, Write, Delete, etc. Does not apply to any operations with reads." MaxLines="1" MinLines="1" Width="50" HorizontalAlignment="Left" Margin="0,5,5,5"
>
<TextBox.Text>
<Binding Path="TotalTimeout" StringFormat="{}{0:0}"
ValidatesOnExceptions="True" ValidatesOnDataErrors="True">
<Binding.ValidationRules>
<local:NumericValidationRule ValidationStep="RawProposedValue"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label Padding="0,0,0,2" VerticalAlignment="Center" Margin="0,5,0,5">Socket:</Label>
<TextBox Name="txtSocketTimeout" Padding="2" ToolTip="Socket Timeout in milliseconds for all operations" MaxLines="1" MinLines="1" Width="50" HorizontalAlignment="Left" Margin="0,5,0,5"
>
<TextBox.Text>
<Binding Path="SocketTimeout" StringFormat="{}{0:0}"
ValidatesOnExceptions="True" ValidatesOnDataErrors="True">
<Binding.ValidationRules>
<local:NumericValidationRule ValidationStep="RawProposedValue"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label Padding="0,0,0,2" VerticalAlignment="Center" Margin="0,5,0,5">Sleep:</Label>
<TextBox Name="txtSleepRetries" Padding="2" ToolTip="Sleep between retrying operations in milliseconds. Enter zero to skip sleep." MaxLines="1" MinLines="1" Width="50" HorizontalAlignment="Left" Margin="0,5,0,5"
>
<TextBox.Text>
<Binding Path="SleepBetweenRetries" StringFormat="{}{0:0}"
ValidatesOnExceptions="True" ValidatesOnDataErrors="True">
<Binding.ValidationRules>
<local:NumericValidationRule ValidationStep="RawProposedValue"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
</StackPanel>
</GroupBox>
<StackPanel Orientation="Horizontal" Margin="5,0,0,5">
<CheckBox IsChecked="{Binding SendKey}" ToolTip="If enabled, the primary key's value is saved as part of the record" HorizontalAlignment="Left" VerticalAlignment="Center" >Send Key</CheckBox>
<Label Name="lblConnPool" Margin="5" VerticalAlignment="Center">
<Hyperlink NavigateUri="https://aerospike.com/docs/server/architecture/clients" RequestNavigate="Hyperlink_RequestNavigate">
Connection Pool per Node:
</Hyperlink>
</Label>
<TextBox Name="txtConnPool" Padding="2" ToolTip="The number of physical connections per node. If -1, determined based on number of cores of the client." MaxLines="1" MinLines="1" Width="50" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBox.Text>
<Binding Path="ConnectionsPerNode" FallbackValue="-1" StringFormat="{}{0:0}"
ValidatesOnExceptions="True" ValidatesOnDataErrors="True">
<Binding.ValidationRules>
<local:NumericValidationRule ValidationStep="RawProposedValue" Min="-1" />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="5,0,0,5">
<Label ToolTip="Expected Duration of Queries." Height="30">
<Hyperlink NavigateUri="https://aerospike.com/docs/server/guide/queries" RequestNavigate="Hyperlink_RequestNavigate">
Expected Duration (Query Policy):
</Hyperlink>
</Label>
<ListBox Name="lbExprctedDuration" ItemsSource="{Binding ExpectedDurationList}" SelectionMode="Multiple" Padding="2" ToolTip="Expected Duration of Queries" HorizontalAlignment="Left">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel IsItemsHost="True" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<RadioButton Content="{Binding Content}" Tag="{Binding Name}" IsChecked="{Binding IsChecked ,Mode=TwoWay}" IsEnabled="{Binding IsEnabled ,Mode=TwoWay}" ToolTip="{Binding ToolTip}" Checked="lbEnsureDuration_Checked" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
<CheckBox Name="cbNetworkCompression" IsChecked="{Binding NetworkCompression}" ToolTip="Enable Network Compression" HorizontalAlignment="Left" Margin="5,0,0,5">
Use Compression
</CheckBox>
<CheckBox IsChecked="{Binding RespondAllOps}" ToolTip="Enabling makes it easier to debug operational expressions by returning all results of each operation" HorizontalAlignment="Left" Margin="5,0,0,5">
<Hyperlink NavigateUri="https://docs.aerospike.com/apidocs/csharp/html/f_aerospike_client_writepolicy_respondallops" RequestNavigate="Hyperlink_RequestNavigate">
Return a result for every operational expression (Write Policy)
</Hyperlink>
</CheckBox>
<CheckBox Name="cbUseDocAPI" IsChecked="{Binding DocumentAPI}" ToolTip="Enable Document/JSON API based on Newtonsoft.Json and GelJSON.Net." HorizontalAlignment="Left" Margin="5,0,0,5">Document/JSON API</CheckBox>
<CheckBox IsChecked="{Binding DriverLogging}" ToolTip="Enable Driver Logging" HorizontalAlignment="Left" Margin="5,0,0,5">Driver Logging</CheckBox>
<TextBlock Margin="5,0,5,0">You can override the connection polices at the namespace and set levels.</TextBlock>
<TextBlock Margin="5,0,5,5" ToolTip="Policies">
<Hyperlink NavigateUri="https://docs.aerospike.com/apidocs/csharp/html/t_aerospike_client_clientpolicy" RequestNavigate="Hyperlink_RequestNavigate">
For more information about Policies, click here
</Hyperlink>
</TextBlock>
</StackPanel>
</GroupBox>
<Label Padding="0,0,0,2">Friendly name for this connection (optional):</Label>
<TextBox Name="txtFriendlyName" Padding="2" Text="{Binding ConnectionInfo.DisplayName}" Margin="0,0,0,5" />
<Expander Name="DisplayExpander" ToolTip="Expands the Display, Serialize, etc. Options" Background="LightGray"
HorizontalAlignment="Left" Header="Display/Conversion Options"
ExpandDirection="Down" IsExpanded="false" BorderThickness="4">
<StackPanel>
<Label Name="lblSampleNbrTxt" Padding="0,5,0,5">Sample Number of Records (0 to disable):</Label>
<StackPanel Name="spSampleRecs" Orientation="Horizontal">
<TextBox Name="txtSampleRecs" Padding="0,5,0,5" ToolTip="The number of records to read from a set to determine the data type usage. A value of zero will disable this feature" MaxLines="1" MinLines="1" Margin="0,0,0,5" Width="99" HorizontalAlignment="Left" TextChanged="txtSampleRecs_TextChanged">
<TextBox.Text>
<Binding Path="DBRecordSampleSet" FallbackValue="10" StringFormat="{}{0:0}"
ValidatesOnExceptions="True" ValidatesOnDataErrors="True">
<Binding.ValidationRules>
<local:NumericValidationRule ValidationStep="RawProposedValue" Min="0"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
<Label Padding="10,5,2,5">Minimal Percentage:</Label>
<TextBox Name="txtSampleRecsPercent" Padding="0,5,0,5" ToolTip="A percentage of the Sample Number records returned that will be considered as a valid sampling." MaxLines="1" MinLines="1" Margin="0,0,0,5" Width="36" HorizontalAlignment="Left"
>
<TextBox.Text>
<Binding Path="DBRecordSampleSetPercentStr" FallbackValue="50%" StringFormat="P0"
ValidatesOnExceptions="True" ValidatesOnDataErrors="True">
<Binding.ValidationRules>
<local:NumericValidationRule ValidationStep="RawProposedValue" Min="1" Max="100" HasPercent="True"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel>
<Label Padding="0,0,0,2" ToolTip="Options on How Records are Displayed in LinqPad when using the Dump function">Record Display Views:</Label>
<ListBox Name="lbRecordViews" ItemsSource="{Binding RecordViewList}" SelectionMode="Multiple" Padding="2" ToolTip="A list of Possible Views of a Record being Displayed" Margin="0,0,5,5">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel IsItemsHost="True" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<RadioButton Content="{Binding Content}" Tag="{Binding Name}" IsChecked="{Binding IsChecked ,Mode=TwoWay}" IsEnabled="{Binding IsEnabled ,Mode=TwoWay}" ToolTip="{Binding ToolTip}" Checked="lbRecordViews_Checked" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
<GroupBox Header="Serialize/Deserialize Formats" BorderThickness="4">
<StackPanel>
<CheckBox IsChecked="{Binding AllDateTimeUseUnixEpochNano, FallbackValue=false}" ToolTip="If true all date/time values are converted to nanoseconds from Unix Epoch DateTime." HorizontalAlignment="Left" Margin="5,0,0,5" Checked="cbAllDTNumeric_Checked" Unchecked="cbAllDTNumeric_Checked" >All DateTimes use Nanoseconds</CheckBox>
<CheckBox Name="cbUseUnixEpoch" IsChecked="{Binding UseUnixEpochNanoForNumericDateTime, FallbackValue=true}" ToolTip="Numeric Date/Time values are based on nanoseconds from Unix Epoch DateTime. If disabled treat as .Net ticks." HorizontalAlignment="Left" Margin="5,0,0,5">Numeric Nanoseconds for Date/Time Values</CheckBox>
<Label Padding="0,0,0,2" HorizontalAlignment="Left" Margin="2,0,0,0">Date Time:</Label>
<TextBox Name="txtDateTimeFmt" HorizontalAlignment="Left" Margin="10,0,5,0" ToolTip="Serialize/Deserialize Date/Time Format used by the C# Parser" MaxLines="1" MinLines="1" Text="{Binding DateTimeFmt}" Width="300" />
<Label Padding="0,0,0,2" HorizontalAlignment="Left" Margin="2,0,0,0">Date Time Offset:</Label>
<TextBox Name="txtDateTimeOffsetFmt" HorizontalAlignment="Left" Margin="10,0,5,0" ToolTip="Serialize/Deserialize DateTime Offset Format used by the C# Parser" MaxLines="1" MinLines="1" Text="{Binding DateTimeOffsetFmt}" Width="300" />
<Label Padding="0,0,0,2" HorizontalAlignment="Left" Margin="2,0,0,0">Time:</Label>
<TextBox Name="txtTimeSpanFmt" HorizontalAlignment="Left" Margin="10,0,5,5" ToolTip="Serialize/Deserialize Time Span Format used by the C# Parser" MaxLines="1" MinLines="1" Text="{Binding TimespanFmt}" Width="300" />
<TextBlock Margin="5,0,5,5" ToolTip="DateTime Format Information">
<Hyperlink NavigateUri="https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings" RequestNavigate="Hyperlink_RequestNavigate">
For more information about DateTime and Offset formats, click here
</Hyperlink>
</TextBlock>
<TextBlock Margin="5,0,5,5" ToolTip="TimeSpan Format Information">
<Hyperlink NavigateUri="https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-timespan-format-strings" RequestNavigate="Hyperlink_RequestNavigate">
For more information about TimeSpan formats, click here
</Hyperlink>
</TextBlock>
</StackPanel>
</GroupBox>
<CheckBox Name="cbUseAValues" IsChecked="{Binding AlwaysUseAValues}" ToolTip="Enabled, always use Auto-Values (AValue). Disabled, if possible use native types" HorizontalAlignment="Left" Margin="5,0,0,5">Always Use Auto-Values</CheckBox>
<Label Margin="0,5,0,0" HorizontalAlignment="Left">Primary Key Name:</Label>
<TextBox Name="txtPKName" HorizontalAlignment="Left" Margin="0,0,0,5" ToolTip="Property Name of the Primary Key" MaxLines="1" MinLines="1" Text="{Binding PKName}" Width="150" />
<CheckBox IsChecked="{Binding Debug}" ToolTip="only use for internal debugging" VerticalAlignment="Top">Enable Debugging</CheckBox>
</StackPanel>
</Expander>
<DockPanel LastChildFill="False" Margin="0,15,0,0" Height="42">
<StackPanel>
<CheckBox IsChecked="{Binding ConnectionInfo.Persist}" VerticalAlignment="Center">Remember this connection</CheckBox>
<CheckBox IsChecked="{Binding ConnectionInfo.IsProduction}" ToolTip="Enabled for a Production Cluster. Operations like Truncate, Import, etc. will throw an Invalid Operation Exception." VerticalAlignment="Top">Production Cluster</CheckBox>
</StackPanel>
<Button Name="btnCancel" DockPanel.Dock="Right" Content="Cancel" Margin="6,0,0,0" Padding="10,3" MinWidth="60" IsCancel="True" TabIndex="2" />
<Button Name="btnOK" DockPanel.Dock="Right" Content="OK" Margin="6,0,0,0" Padding="10,3" MinWidth="60" IsDefault="True" TabIndex="1" Click="btnOK_Click"
Style="{StaticResource DisableOnError}"/>
<Button Name="btnTest" ToolTip="Test Connection" DockPanel.Dock="Right" Content="Test" Margin="6,0,0,0" Padding="10,3" MinWidth="60" TabIndex="3" Click="btnTestConnection_Click"
Style="{StaticResource DisableOnError}"/>
</DockPanel>
</StackPanel>
</ScrollViewer>
</Window>