Skip to content

Commit

Permalink
💄 fix #新建连接页面样式优化
Browse files Browse the repository at this point in the history
  • Loading branch information
zfluok committed Mar 27, 2023
1 parent ba1c854 commit 9a04ed3
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 44 deletions.
19 changes: 17 additions & 2 deletions SmartSQL/SmartSQL.Framework/SqliteModel/GroupInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,26 @@ public class GroupInfo
/// <summary>
/// 排序标记
/// </summary>
public DateTime OrderFlag { get; set; }=DateTime.Now;
public DateTime OrderFlag { get; set; } = DateTime.Now;
/// <summary>
/// 对象数量
/// </summary>
public int SubCount { get; set; }
private int _subCount;
public int SubCount
{
get
{
var sqLiteHelper = new SQLiteHelper();
var groupCount = sqLiteHelper.db
.Table<GroupObjects>()
.Count(x => x.GroupId == Id);
return groupCount;
}
set
{
_subCount = value;
}
}
[Ignore]
public bool IsSelected { get; set; }
}
Expand Down
8 changes: 6 additions & 2 deletions SmartSQL/SmartSQL/UserControl/Connect/ConnectMainUC.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
mc:Ignorable="d">
<Grid>
<Grid Height="40" VerticalAlignment="Top">
<Image Source="pack://application:,,,/Resources/Img/connect_bg.png" Stretch="Fill" />
<Border BorderThickness="0" CornerRadius="8 8 0 0 ">
<Border.Background>
<ImageBrush ImageSource="pack://application:,,,/Resources/Img/connect_bg.png" Stretch="Fill" />
</Border.Background>
</Border>
<StackPanel Margin="20,12,0,0" HorizontalAlignment="Left">
<TextBlock FontWeight="Bold" Foreground="#36425a">选择连接类型</TextBlock>
</StackPanel>
</Grid>
<ListBox
Margin="15,40,15,0"
Margin="0,40,0,0"
Padding="0,20,0,30"
BorderThickness="0"
Cursor="Arrow"
Expand Down
13 changes: 7 additions & 6 deletions SmartSQL/SmartSQL/UserControl/Connect/DmUC .xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
mc:Ignorable="d">

<Grid>
<Grid
Height="50"
VerticalAlignment="Top"
Background="#e3e4e7">
<Image Source="pack://application:,,,/Resources/Img/connect_bg.png" Stretch="Fill" />
<Grid Height="50" VerticalAlignment="Top">
<Border BorderThickness="0" CornerRadius="8 8 0 0 ">
<Border.Background>
<ImageBrush ImageSource="pack://application:,,,/Resources/Img/connect_bg.png" Stretch="Fill" />
</Border.Background>
</Border>
<StackPanel>
<TextBlock
Margin="20,18"
Expand All @@ -36,7 +37,7 @@
Source="pack://application:,,,/Resources/svg/[email protected]" />
</StackPanel>
</Grid>
<Grid Margin="0,50,0,0">
<Grid Margin="0,50,0,0" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="*" />
Expand Down
8 changes: 6 additions & 2 deletions SmartSQL/SmartSQL/UserControl/Connect/MySqlUC.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@

<Grid>
<Grid Height="50" VerticalAlignment="Top">
<Image Source="pack://application:,,,/Resources/Img/connect_bg.png" Stretch="Fill" />
<Border BorderThickness="0" CornerRadius="8 8 0 0 ">
<Border.Background>
<ImageBrush ImageSource="pack://application:,,,/Resources/Img/connect_bg.png" Stretch="Fill" />
</Border.Background>
</Border>
<StackPanel>
<TextBlock
Margin="20,18"
Expand All @@ -33,7 +37,7 @@
Source="pack://application:,,,/Resources/svg/[email protected]" />
</StackPanel>
</Grid>
<Grid Margin="0,50,0,0">
<Grid Margin="0,50,0,0" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="*" />
Expand Down
13 changes: 7 additions & 6 deletions SmartSQL/SmartSQL/UserControl/Connect/OracleUC.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
mc:Ignorable="d">

<Grid>
<Grid
Height="50"
VerticalAlignment="Top"
Background="#e3e4e7">
<Image Source="pack://application:,,,/Resources/Img/connect_bg.png" Stretch="Fill" />
<Grid Height="50" VerticalAlignment="Top">
<Border BorderThickness="0" CornerRadius="8 8 0 0 ">
<Border.Background>
<ImageBrush ImageSource="pack://application:,,,/Resources/Img/connect_bg.png" Stretch="Fill" />
</Border.Background>
</Border>
<StackPanel>
<TextBlock
Margin="20,18"
Expand All @@ -36,7 +37,7 @@
Source="pack://application:,,,/Resources/svg/[email protected]" />
</StackPanel>
</Grid>
<Grid Margin="0,50,0,0">
<Grid Margin="0,50,0,0" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="*" />
Expand Down
8 changes: 6 additions & 2 deletions SmartSQL/SmartSQL/UserControl/Connect/PostgreSqlUC.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
mc:Ignorable="d">
<Grid>
<Grid Height="50" VerticalAlignment="Top">
<Image Source="pack://application:,,,/Resources/Img/connect_bg.png" Stretch="Fill" />
<Border BorderThickness="0" CornerRadius="8 8 0 0 ">
<Border.Background>
<ImageBrush ImageSource="pack://application:,,,/Resources/Img/connect_bg.png" Stretch="Fill" />
</Border.Background>
</Border>
<StackPanel>
<TextBlock
Margin="20,18"
Expand All @@ -32,7 +36,7 @@
Source="pack://application:,,,/Resources/svg/[email protected]" />
</StackPanel>
</Grid>
<Grid Margin="0,50,0,0">
<Grid Margin="0,50,0,0" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="*" />
Expand Down
48 changes: 28 additions & 20 deletions SmartSQL/SmartSQL/UserControl/Connect/SqlServerUC.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,35 @@
Loaded="SqlServerUC_OnLoaded"
mc:Ignorable="d">
<Grid>
<Grid Height="50" VerticalAlignment="Top">
<Image Source="pack://application:,,,/Resources/Img/connect_bg.png" Stretch="Fill" />
<StackPanel>
<TextBlock
Margin="20,18"
HorizontalAlignment="Left"
FontWeight="Bold"
Foreground="#697b8c"
Text="SQLServer 连接设置" />
</StackPanel>
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Center">
<svgc:SvgViewbox
Width="50"
Height="45"
Margin="5"
HorizontalAlignment="Left"
IsHitTestVisible="False"
Source="pack://application:,,,/Resources/svg/[email protected]" />
</StackPanel>
<Grid
Height="50"
VerticalAlignment="Top">
<Grid>
<Border BorderThickness="0" CornerRadius="8 8 0 0 ">
<Border.Background>
<ImageBrush ImageSource="pack://application:,,,/Resources/Img/connect_bg.png" />
</Border.Background>
</Border>
<StackPanel>
<TextBlock
Margin="20,18"
HorizontalAlignment="Left"
FontWeight="Bold"
Foreground="#697b8c"
Text="SQLServer 连接设置" />
</StackPanel>
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Center">
<svgc:SvgViewbox
Width="50"
Height="45"
Margin="5"
HorizontalAlignment="Left"
IsHitTestVisible="False"
Source="pack://application:,,,/Resources/svg/[email protected]" />
</StackPanel>
</Grid>
</Grid>
<Grid Margin="0,50,0,0">
<Grid Margin="0,50,0,0" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="*" />
Expand Down
8 changes: 6 additions & 2 deletions SmartSQL/SmartSQL/UserControl/Connect/SqliteUC.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
mc:Ignorable="d">
<Grid>
<Grid Height="50" VerticalAlignment="Top">
<Image Source="pack://application:,,,/Resources/Img/connect_bg.png" Stretch="Fill" />
<Border BorderThickness="0" CornerRadius="8 8 0 0 ">
<Border.Background>
<ImageBrush ImageSource="pack://application:,,,/Resources/Img/connect_bg.png" Stretch="Fill" />
</Border.Background>
</Border>
<StackPanel>
<TextBlock
Margin="20,18"
Expand All @@ -32,7 +36,7 @@
Source="pack://application:,,,/Resources/svg/[email protected]" />
</StackPanel>
</Grid>
<Grid Margin="0,50,0,0">
<Grid Margin="0,50,0,0" Background="White">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="*" />
Expand Down
1 change: 0 additions & 1 deletion SmartSQL/SmartSQL/Views/Category/GroupsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
<TextBlock
Margin="5,1,5,1"
VerticalAlignment="Center"
FontWeight="Bold"
Foreground="{StaticResource ThirdlyTextBrush}"
Text="{Binding SubCount}" />
</Border>
Expand Down
2 changes: 1 addition & 1 deletion SmartSQL/SmartSQL/Views/ConnectManage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
<Grid
Grid.Column="1"
Margin="0,5,5,5"
Background="White">
Background="Transparent">
<Grid>
<UserControl Name="UcMainContent" Content="{Binding MainContent}" />
</Grid>
Expand Down

0 comments on commit 9a04ed3

Please sign in to comment.