Skip to content

Commit c437dcc

Browse files
author
MPCoreDeveloper
committed
current UI state
1 parent 5b2ec66 commit c437dcc

File tree

12 files changed

+792
-169
lines changed

12 files changed

+792
-169
lines changed

SharpCoreDB.Viewer/App.axaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,19 @@
99
<local:ViewLocator/>
1010
</Application.DataTemplates>
1111

12+
<Application.Resources>
13+
<!-- Icon Resources -->
14+
<ResourceDictionary>
15+
<ResourceDictionary.MergedDictionaries>
16+
<ResourceInclude Source="/Resources/Icons.axaml"/>
17+
</ResourceDictionary.MergedDictionaries>
18+
</ResourceDictionary>
19+
</Application.Resources>
20+
1221
<Application.Styles>
1322
<FluentTheme />
23+
24+
<!-- Custom Visual Studio Dark Theme -->
25+
<StyleInclude Source="/Styles/VSTheme.axaml"/>
1426
</Application.Styles>
1527
</Application>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
using Avalonia.Data.Converters;
2+
using Avalonia.Media;
3+
using SharpCoreDB.Viewer.Services;
4+
using System;
5+
using System.Globalization;
6+
7+
namespace SharpCoreDB.Viewer.Converters;
8+
9+
/// <summary>
10+
/// Converters for password visibility toggle functionality
11+
/// </summary>
12+
public static class BoolConverters
13+
{
14+
private static readonly LocalizationService _localization = LocalizationService.Instance;
15+
16+
/// <summary>
17+
/// Converts boolean to PasswordChar: empty string (visible) or bullet (hidden)
18+
/// </summary>
19+
public static readonly IValueConverter PasswordCharConverter =
20+
new FuncValueConverter<bool, char>(isVisible => isVisible ? '\0' : '?');
21+
22+
/// <summary>
23+
/// Converts boolean to Eye icon: EyeIcon (visible) or EyeOffIcon (hidden)
24+
/// </summary>
25+
public static readonly IValueConverter EyeIconConverter =
26+
new FuncValueConverter<bool, StreamGeometry?>(isVisible =>
27+
{
28+
var key = isVisible ? "EyeOffIcon" : "EyeIcon";
29+
if (Avalonia.Application.Current?.Resources.TryGetResource(key, null, out var resource) == true)
30+
{
31+
return resource as StreamGeometry;
32+
}
33+
return null;
34+
});
35+
36+
/// <summary>
37+
/// Converts boolean to localized tooltip text
38+
/// </summary>
39+
public static readonly IValueConverter ShowHidePasswordTooltip =
40+
new FuncValueConverter<bool, string>(isVisible =>
41+
isVisible ? _localization["HidePassword"] : _localization["ShowPassword"]);
42+
}
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
<ResourceDictionary xmlns="https://github.com/avaloniaui"
2+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
3+
4+
<!-- Professional Material Design Icons (16x16 optimized) -->
5+
6+
<!-- Database Icon -->
7+
<StreamGeometry x:Key="DatabaseIcon">
8+
M12 3C7.58 3 4 4.79 4 7s3.58 4 8 4 8-1.79 8-4-3.58-4-8-4M4 9v3c0 2.21 3.58 4 8 4s8-1.79 8-4V9c0 2.21-3.58 4-8 4s-8-1.79-8-4m0 5v3c0 2.21 3.58 4 8 4s8-1.79 8-4v-3c0 2.21-3.58 4-8 4s-8-1.79-8-4Z
9+
</StreamGeometry>
10+
11+
<!-- Connect Icon -->
12+
<StreamGeometry x:Key="ConnectIcon">
13+
M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z
14+
</StreamGeometry>
15+
16+
<!-- Disconnect Icon -->
17+
<StreamGeometry x:Key="DisconnectIcon">
18+
M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z
19+
</StreamGeometry>
20+
21+
<!-- Play/Execute Icon -->
22+
<StreamGeometry x:Key="PlayIcon">
23+
M8 5v14l11-7z
24+
</StreamGeometry>
25+
26+
<!-- Settings Icon -->
27+
<StreamGeometry x:Key="SettingsIcon">
28+
M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94L14.4 2.81c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z
29+
</StreamGeometry>
30+
31+
<!-- Table Icon -->
32+
<StreamGeometry x:Key="TableIcon">
33+
M3 3v18h18V3H3zm8 16H5v-6h6v6zm0-8H5V5h6v6zm8 8h-6v-6h6v6zm0-8h-6V5h6v6z
34+
</StreamGeometry>
35+
36+
<!-- Code Icon -->
37+
<StreamGeometry x:Key="CodeIcon">
38+
M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z
39+
</StreamGeometry>
40+
41+
<!-- Folder Icon -->
42+
<StreamGeometry x:Key="FolderIcon">
43+
M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z
44+
</StreamGeometry>
45+
46+
<!-- Lock Icon -->
47+
<StreamGeometry x:Key="LockIcon">
48+
M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z
49+
</StreamGeometry>
50+
51+
<!-- Save Icon -->
52+
<StreamGeometry x:Key="SaveIcon">
53+
M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z
54+
</StreamGeometry>
55+
56+
<!-- Info Icon -->
57+
<StreamGeometry x:Key="InfoIcon">
58+
M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z
59+
</StreamGeometry>
60+
61+
<!-- Error Icon -->
62+
<StreamGeometry x:Key="ErrorIcon">
63+
M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z
64+
</StreamGeometry>
65+
66+
<!-- Language Icon -->
67+
<StreamGeometry x:Key="LanguageIcon">
68+
M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z
69+
</StreamGeometry>
70+
71+
<!-- Theme/Color Icon -->
72+
<StreamGeometry x:Key="ThemeIcon">
73+
M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z
74+
</StreamGeometry>
75+
76+
<!-- Sun Icon (Light theme) -->
77+
<StreamGeometry x:Key="SunIcon">
78+
M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41l-1.06-1.06zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z
79+
</StreamGeometry>
80+
81+
<!-- Moon Icon (Dark theme) -->
82+
<StreamGeometry x:Key="MoonIcon">
83+
M9 2c-1.05 0-2.05.16-3 .46 4.06 1.27 7 5.06 7 9.54 0 4.48-2.94 8.27-7 9.54.95.3 1.95.46 3 .46 5.52 0 10-4.48 10-10S14.52 2 9 2z
84+
</StreamGeometry>
85+
86+
<!-- Document Icon -->
87+
<StreamGeometry x:Key="DocumentIcon">
88+
M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z
89+
</StreamGeometry>
90+
91+
<!-- Exit Icon -->
92+
<StreamGeometry x:Key="ExitIcon">
93+
M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z
94+
</StreamGeometry>
95+
96+
<!-- SSMS-style Toolbar Icons (smaller, simpler) -->
97+
98+
<!-- Plug Connect (Simple) -->
99+
<StreamGeometry x:Key="PlugConnectIcon">
100+
M16 7V3h-2v4h-4V3H8v4h-.01C6.9 7 6 7.9 6 8.99v5.49L9.5 18v3h5v-3l3.5-3.51v-5.5c0-1.09-.9-1.99-2-1.99V7z
101+
</StreamGeometry>
102+
103+
<!-- Disconnect (Simple X) -->
104+
<StreamGeometry x:Key="DisconnectSimpleIcon">
105+
M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z
106+
</StreamGeometry>
107+
108+
<!-- Execute/Run (Simple Play Triangle) -->
109+
<StreamGeometry x:Key="ExecuteIcon">
110+
M8 5v14l11-7z
111+
</StreamGeometry>
112+
113+
<!-- Refresh Icon -->
114+
<StreamGeometry x:Key="RefreshIcon">
115+
M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z
116+
</StreamGeometry>
117+
118+
<!-- Stop Icon -->
119+
<StreamGeometry x:Key="StopIcon">
120+
M6 6h12v12H6z
121+
</StreamGeometry>
122+
123+
<!-- Eye Icon (Show Password) -->
124+
<StreamGeometry x:Key="EyeIcon">
125+
M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z
126+
</StreamGeometry>
127+
128+
<!-- Eye Off Icon (Hide Password) -->
129+
<StreamGeometry x:Key="EyeOffIcon">
130+
M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z
131+
</StreamGeometry>
132+
133+
</ResourceDictionary>

SharpCoreDB.Viewer/Resources/Strings.en-US.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@
3838
"SelectNewDatabaseLocation": "Select Location for New SharpCoreDB Database",
3939
"SettingsTitle": "Settings",
4040
"LanguageLabel": "Language",
41-
"LanguageDescription": "Select your preferred language. Changes will take effect immediately.",
41+
"LanguageDescription": "Changes apply immediately. Click 'Save Settings' to remember your choice on next startup.",
4242
"ThemeLabel": "Theme",
43-
"ThemeDescription": "Choose between light and dark theme.",
43+
"ThemeDescription": "Toggle to preview. Click 'Save Settings' to remember your choice on next startup.",
4444
"FileMenu": "File",
4545
"SettingsMenu": "Settings",
46-
"ExitMenu": "Exit"
46+
"ExitMenu": "Exit",
47+
"ShowPassword": "Show password",
48+
"HidePassword": "Hide password"
4749
}

SharpCoreDB.Viewer/Resources/Strings.nl-NL.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@
3838
"SelectNewDatabaseLocation": "Selecteer Locatie voor Nieuwe SharpCoreDB Database",
3939
"SettingsTitle": "Instellingen",
4040
"LanguageLabel": "Taal",
41-
"LanguageDescription": "Selecteer uw voorkeurstaal. Wijzigingen worden direct toegepast.",
41+
"LanguageDescription": "Wijzigingen worden direct toegepast. Klik op 'Instellingen Opslaan' om uw keuze te onthouden bij de volgende start.",
4242
"ThemeLabel": "Thema",
43-
"ThemeDescription": "Kies tussen licht en donker thema.",
43+
"ThemeDescription": "Schakel om te bekijken. Klik op 'Instellingen Opslaan' om uw keuze te onthouden bij de volgende start.",
4444
"FileMenu": "Bestand",
4545
"SettingsMenu": "Instellingen",
46-
"ExitMenu": "Afsluiten"
46+
"ExitMenu": "Afsluiten",
47+
"ShowPassword": "Wachtwoord tonen",
48+
"HidePassword": "Wachtwoord verbergen"
4749
}

SharpCoreDB.Viewer/SharpCoreDB.Viewer.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111

1212
<ItemGroup>
1313
<AvaloniaResource Include="Assets\**" />
14+
<AvaloniaResource Include="Styles\**" />
15+
<AvaloniaResource Include="Resources\**" />
1416
</ItemGroup>
1517

1618
<ItemGroup>
1719
<AvaloniaResource Remove="Assets\SharpCoreDB.jpg" />
20+
<AvaloniaResource Remove="Resources\Strings.en-US.json" />
21+
<AvaloniaResource Remove="Resources\Strings.nl-NL.json" />
1822
</ItemGroup>
1923

2024
<ItemGroup>

0 commit comments

Comments
 (0)