Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increased the width database details in Add Database and width of Connection string in Edit Database page #3767

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions Ginger/Ginger/Environments/AddNewDatabasePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,10,0,0" >
<Label Style="{StaticResource $LabelStyle}" Width="180" FontSize="13" Content="Database:"/>
<StackPanel Orientation="Vertical">
<ComboBox Name="xDatabaseComboBox" Style="{StaticResource $FlatEditInputComboBoxStyle}" Width="250" SelectionChanged="xDatabaseComboBox_SelectionChanged" ></ComboBox>
<ComboBox Name="xDatabaseComboBox" Style="{StaticResource $FlatEditInputComboBoxStyle}" Width="350" SelectionChanged="xDatabaseComboBox_SelectionChanged" ></ComboBox>
<TextBlock Name="xDatabaseTypeError" VerticalAlignment="Bottom" Margin="0,0,0,0" Visibility="Collapsed" Foreground="Red"/>
</StackPanel>
</StackPanel>
Expand All @@ -33,37 +33,37 @@
<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,10,0,0">
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="Database Name:" />
<StackPanel Orientation="Vertical">
<TextBox Style="{StaticResource $TextBoxStyle}" x:Name="xDatabaseName" Width="250" Height="25"></TextBox>
<TextBox Style="{StaticResource $TextBoxStyle}" x:Name="xDatabaseName" Width="350" Height="25"></TextBox>
<TextBlock Name="xDatabaseNameError" VerticalAlignment="Bottom" Margin="0,0,0,0" Visibility="Collapsed" Foreground="Red"/>
</StackPanel>
</StackPanel>

<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,10,0,0">
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="Description:"/>
<TextBox Style="{StaticResource $TextBoxStyle}" x:Name="xDatabaseDescription" Width="250"></TextBox>
<TextBox Style="{StaticResource $TextBoxStyle}" x:Name="xDatabaseDescription" Width="350"></TextBox>
</StackPanel>
<StackPanel x:Name="xDatabaseDetailsPanel">
<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,10,0,0">
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="TNS / File Path:" Name="xDatabaseTNSName"/>
<StackPanel Orientation="Vertical">
<businessflowwindows:UCValueExpression x:Name="xDatabaseTNS" Width="280" Height="25"></businessflowwindows:UCValueExpression>
<businessflowwindows:UCValueExpression x:Name="xDatabaseTNS" Width="380" Height="25"></businessflowwindows:UCValueExpression>
<TextBlock Name="xDatabaseTNSError" VerticalAlignment="Bottom" Margin="0,0,0,0" Visibility="Collapsed" Foreground="Red"/>
</StackPanel>
</StackPanel>

<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" Margin="0,10,0,0">
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="User Name:"/>
<StackPanel Orientation="Vertical">
<businessflowwindows:UCValueExpression x:Name="xDatabaseUserName" Width="280" Height="25"></businessflowwindows:UCValueExpression>
<businessflowwindows:UCValueExpression x:Name="xDatabaseUserName" Width="380" Height="25"></businessflowwindows:UCValueExpression>
<TextBlock Name="xDatabaseUserNameError" VerticalAlignment="Bottom" Margin="0,0,0,0" Visibility="Collapsed" Foreground="Red"/>
</StackPanel>
</StackPanel>

<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,10,0,0" >
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="User Password:"/>
<StackPanel Orientation="Vertical">
<businessflowwindows:UCValueExpression x:Name="xDatabasePassword" Width="280" Height="25" LostKeyboardFocus="ChangeDatabasePass"></businessflowwindows:UCValueExpression>
<TextBlock Name="xDatabaseUserPassError" Width="250" VerticalAlignment="Bottom" Margin="0,0,0,0" Visibility="Collapsed" Foreground="Red"/>
<businessflowwindows:UCValueExpression x:Name="xDatabasePassword" Width="380" Height="25" LostKeyboardFocus="ChangeDatabasePass"></businessflowwindows:UCValueExpression>
<TextBlock Name="xDatabaseUserPassError" Width="380" VerticalAlignment="Bottom" Margin="0,0,0,0" Visibility="Collapsed" Foreground="Red"/>
</StackPanel>
</StackPanel>

Expand All @@ -74,25 +74,25 @@
<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,10,0,0">
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="Account End Point:" />
<StackPanel Orientation="Vertical">
<businessflowwindows:UCValueExpression x:Name="xDBAccEndPoint" Width="280" Height="25"></businessflowwindows:UCValueExpression>
<businessflowwindows:UCValueExpression x:Name="xDBAccEndPoint" Width="380" Height="25"></businessflowwindows:UCValueExpression>
<TextBlock Name="xDBAccEndPointError" VerticalAlignment="Bottom" Margin="0,0,0,0" Visibility="Collapsed" Foreground="Red"/>
</StackPanel>
</StackPanel>

<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,10,0,0">
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="Account Key:" />
<StackPanel Orientation="Vertical">
<businessflowwindows:UCValueExpression x:Name="xDBAccKey" Width="280" Height="25"></businessflowwindows:UCValueExpression>
<businessflowwindows:UCValueExpression x:Name="xDBAccKey" Width="380" Height="25"></businessflowwindows:UCValueExpression>
<TextBlock Name="xDBAccKeyError" VerticalAlignment="Bottom" Margin="0,0,0,0" Visibility="Collapsed" Foreground="Red"/>
</StackPanel>
</StackPanel>

</StackPanel>

<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,10,0,0" Name="xDBConnectionStringPanel" Visibility="Collapsed">
<Label Style="{StaticResource $LabelStyle}" Width="180" Height="25" Content="Connection String:"/>
<Label Style="{StaticResource $LabelStyle}" Width="180" Height="40" Content="Connection String:"/>
<StackPanel Orientation="Horizontal">
<businessflowwindows:UCValueExpression x:Name="xDatabaseConnectionString" Height="25" Width="280"></businessflowwindows:UCValueExpression>
<businessflowwindows:UCValueExpression x:Name="xDatabaseConnectionString" Height="40" Width="380"></businessflowwindows:UCValueExpression>
<usercontrols:ImageMakerControl
VerticalAlignment="Center"
x:Name="xConnectionStringInfo" SetAsFontImageWithSize="12" ImageType="Info" Width="12" Height="12" FontWeight="Bold" Foreground="{StaticResource $BackgroundColor_DarkGray}" Margin="2,0,0,0"/>
Expand Down
2 changes: 2 additions & 0 deletions Ginger/Ginger/Environments/AddNewDatabasePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public AddNewDatabasePage(ObservableList<IDatabase> dataSourceList, Context cont
xDBAccKey.Init(context, database, nameof(Database.Pass));

xDatabaseConnectionString.Init(context, database, nameof(Database.ConnectionString));
xDatabaseConnectionString.Row.Height = new System.Windows.GridLength(100);
xDatabaseConnectionString.ValueTextBox.Height = 40;
BindingHandler.ObjFieldBinding(xDatabaseName, TextBox.TextProperty, database, nameof(Database.Name));
BindingHandler.ObjFieldBinding(xDatabaseDescription, TextBox.TextProperty, database, nameof(Database.Description));
BindingHandler.ObjFieldBinding(xDatabaseComboBox, ComboBox.SelectedValueProperty, database, nameof(Database.DBType));
Expand Down
26 changes: 13 additions & 13 deletions Ginger/Ginger/Variables/EditDatabasePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,32 @@
<Border Margin="0,10,0,0" BorderBrush="{StaticResource $BackgroundColor_DarkGray}" BorderThickness="0.6" CornerRadius="3" HorizontalAlignment="Stretch">
<StackPanel Background="{StaticResource $BackgroundColor_White}" Margin="10,10,10,10" Orientation="Vertical">

<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,10,0,0" >
<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,15,0,0" >
<Label Style="{StaticResource $LabelStyle}" Width="180" FontSize="13" Content="Database:"/>
<TextBox x:Name="xDatabaseType" IsReadOnly="True" Width="400" Style="{StaticResource $TextBoxStyle}" Background="#FFEFEFF2" Margin="0,0,50,0" />
</StackPanel>

<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,10,0,0">
<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,15,0,0">
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="Database Name:" />
<TextBox Style="{StaticResource $TextBoxStyle}" Height="25" LostKeyboardFocus="XDatabaseName_TextChanged" x:Name="xDatabaseName" Width="400" Margin="0,0,0,8" ></TextBox>
<TextBox Style="{StaticResource $TextBoxStyle}" Height="25" LostKeyboardFocus="XDatabaseName_TextChanged" x:Name="xDatabaseName" Width="400"></TextBox>
</StackPanel>

<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,10,0,0">
<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,15,0,0">
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="Description:"/>
<TextBox Style="{StaticResource $TextBoxStyle}" x:Name="xDatabaseDescription" Width="400"></TextBox>
</StackPanel>
<StackPanel x:Name="xDatabaseDetailsPanel">
<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,10,0,0">
<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,15,0,0">
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="Data Source" Name="xDatabaseTNSName"/>
<businessflowwindows:UCValueExpression x:Name="xDatabaseTNS" Width="430"></businessflowwindows:UCValueExpression>
</StackPanel>

<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" Margin="0,10,0,0">
<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" Margin="0,15,0,0">
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="User Name:"/>
<businessflowwindows:UCValueExpression x:Name="xDatabaseUserName" Width="430"></businessflowwindows:UCValueExpression>
</StackPanel>

<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,10,0,0" >
<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,15,0,0" >
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="User Password:"/>
<businessflowwindows:UCValueExpression x:Name="xDatabasePassword" Width="430" LostKeyboardFocus="ChangeDatabasePass"></businessflowwindows:UCValueExpression>
</StackPanel>
Expand All @@ -47,17 +47,17 @@

<StackPanel Name="xCosmosDetailsPanel" Visibility="Collapsed">

<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,10,0,0">
<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,15,0,0">
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="Account End Point:" />
<businessflowwindows:UCValueExpression x:Name="xDBAccEndPoint" Width="430" Height="25"></businessflowwindows:UCValueExpression>
</StackPanel>

<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,10,0,0">
<StackPanel Orientation="Horizontal" Height="auto" MinHeight="25" VerticalAlignment="Top" Margin="0,15,0,0">
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="Account Key:" />
<businessflowwindows:UCValueExpression x:Name="xDBAccKey" Width="430" Height="25"></businessflowwindows:UCValueExpression>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,10,0,0">
<StackPanel Orientation="Horizontal" Margin="0,15,0,0">
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="Connection String:"/>
<StackPanel Orientation="Horizontal">
<businessflowwindows:UCValueExpression x:Name="xDatabaseConnectionString" MinHeight="20" MaxHeight="40" Width="430"></businessflowwindows:UCValueExpression>
Expand All @@ -67,12 +67,12 @@
</StackPanel>
</StackPanel>

<StackPanel Orientation="Horizontal" Name="xKeepConnectOpenPanel" Margin="0,10,0,0" >
<StackPanel Orientation="Horizontal" Name="xKeepConnectOpenPanel" Margin="0,15,0,0" >
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="Keep Connection Open:"/>
<CheckBox VerticalAlignment="Center" Name="xKeepConnectOpen" ></CheckBox>
</StackPanel>
<StackPanel Orientation="Horizontal" Name="xVersionStackPanel" Visibility="Collapsed" Margin="0,10,0,0">

<StackPanel Orientation="Horizontal" Name="xVersionStackPanel" Visibility="Collapsed" Margin="0,15,0,0">
<Label Style="{StaticResource $LabelStyle}" Width="180" Content="Is DB Version lower than 10.2:"/>
<CheckBox VerticalAlignment="Center" Name="xOracleVersion"></CheckBox>
</StackPanel>
Expand Down
3 changes: 2 additions & 1 deletion Ginger/Ginger/Variables/EditDatabasePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public EditDatabasePage(Database database, Context context)
xDBAccEndPoint.Init(context, database, nameof(Database.User));
xDBAccKey.Init(context, database, nameof(Database.Pass));
xDatabaseConnectionString.Init(context, database, nameof(Database.ConnectionString));

xDatabaseConnectionString.Row.Height = new System.Windows.GridLength(100);
xDatabaseConnectionString.ValueTextBox.Height = 40;
((DatabaseOperations)this.database.DatabaseOperations).NameBeforeEdit = this.database.Name;

BindingHandler.ObjFieldBinding(xDatabaseName, TextBox.TextProperty, database, nameof(Database.Name));
Expand Down
Loading