Skip to content
This repository was archived by the owner on Nov 25, 2023. It is now read-only.

Commit e9408a9

Browse files
committed
Add contributor section to About Window
1 parent a0fdea8 commit e9408a9

File tree

2 files changed

+42
-3
lines changed

2 files changed

+42
-3
lines changed

src/InvvardDev.EZLayoutDisplay.Desktop/View/AboutWindow.xaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
66
mc:Ignorable="d"
7-
Title="{Binding WindowTitle}" Height="330" Width="500"
7+
Title="{Binding WindowTitle}" Height="350" Width="500"
88
ResizeMode="NoResize" Background="{StaticResource WindowBackgroundBrush}"
99
WindowStartupLocation="CenterScreen" Icon="{StaticResource WindowIcon}"
1010
DataContext="{Binding About, Source={StaticResource Locator}}">
@@ -22,6 +22,7 @@
2222
<RowDefinition/>
2323
<RowDefinition/>
2424
<RowDefinition/>
25+
<RowDefinition/>
2526
<RowDefinition Height="10"/>
2627
<RowDefinition/>
2728
</Grid.RowDefinitions>
@@ -67,7 +68,13 @@
6768
Command="{Binding NavigateRedditUrlCommand}" />
6869
</StackPanel>
6970

70-
<Button Grid.Row="8" Grid.Column="2" Content="{Binding CloseButtonLabel}"
71+
<Label Grid.Row="7" Grid.Column="1" Content="{Binding ContributorsTitleLabel}" Style="{StaticResource TitleLabelStyle}" />
72+
<StackPanel Orientation="Horizontal" Grid.Row="7" Grid.Column="2">
73+
<Button Style="{StaticResource HyperlinkStyledButton}" Content="{Binding VladZahariaLabel}"
74+
Command="{Binding NavigateGithubVZUrlCommand}" />
75+
</StackPanel>
76+
77+
<Button Grid.Row="9" Grid.Column="2" Content="{Binding CloseButtonLabel}"
7178
Command="{Binding CloseAboutCommand}"
7279
Width="100" Margin="0,5,5,5" HorizontalAlignment="Right"/>
7380
</Grid>

src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/AboutViewModel.cs

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,25 @@ public class AboutViewModel : ViewModelBase
2828
private string _projectHomeTitleLabel;
2929
private string _contactTitleLabel;
3030
private string _creatorInfoLabel;
31+
private string _contributorsLabel;
3132
private string _basedOnInfoLabel;
3233
private string _projectHomeInfoLabel;
3334
private string _twitterInfoLabel;
3435
private string _redditInfoLabel;
36+
private string _vladZahariaLabel;
3537
private string _closeButtonLabel;
3638

3739
private readonly string _basedOnUrl;
3840
private readonly string _projectHomeUrl;
3941
private readonly string _twitterUrl;
4042
private readonly string _redditUrl;
43+
private readonly string _githubVZUrl;
4144

4245
private ICommand _navigateBasedOnUrlCommand;
4346
private ICommand _navigateProjectHomeUrlCommand;
4447
private ICommand _navigateTwitterUrlCommand;
4548
private ICommand _navigateRedditUrlCommand;
49+
private ICommand _navigateGithubVZUrlCommand;
4650
private ICommand _closeAboutCommand;
4751

4852
#endregion
@@ -100,6 +104,12 @@ public string CreatorInfoLabel
100104
set => Set(ref _creatorInfoLabel, value);
101105
}
102106

107+
public string ContributorsTitleLabel
108+
{
109+
get => _contributorsLabel;
110+
set => Set(ref _contributorsLabel, value);
111+
}
112+
103113
public string BasedOnInfoLabel
104114
{
105115
get => _basedOnInfoLabel;
@@ -124,6 +134,12 @@ public string RedditInfoLabel
124134
set => Set(ref _redditInfoLabel, value);
125135
}
126136

137+
public string VladZahariaLabel
138+
{
139+
get => _vladZahariaLabel;
140+
set => Set(ref _vladZahariaLabel, value);
141+
}
142+
127143
public string CloseButtonLabel
128144
{
129145
get => _closeButtonLabel;
@@ -162,6 +178,13 @@ public string CloseButtonLabel
162178
_navigateRedditUrlCommand
163179
?? (_navigateRedditUrlCommand = new RelayCommand(NavigateRedditUrl));
164180

181+
/// <summary>
182+
/// Navigate to Vlad Zaharia Github URL command.
183+
/// </summary>
184+
public ICommand NavigateGithubVZUrlCommand =>
185+
_navigateGithubVZUrlCommand
186+
?? (_navigateGithubVZUrlCommand = new RelayCommand(NavigateGithubVZUrl));
187+
165188
/// <summary>
166189
/// Close about window command.
167190
/// </summary>
@@ -180,10 +203,11 @@ public AboutViewModel(IWindowService windowService, IProcessService processServi
180203
_windowService = windowService;
181204
_processService = processService;
182205

183-
_basedOnUrl = "https://configure.ergodox-ez.com/layouts/default/latest/0";
206+
_basedOnUrl = "https://configure.zsa.io/ergodox-ez/";
184207
_projectHomeUrl = "https://github.com/Invvard/EZLayoutDisplay";
185208
_twitterUrl = "https://twitter.com/invvard";
186209
_redditUrl = "https://www.reddit.com/r/EZLayoutDisplay/";
210+
_githubVZUrl = "https://github.com/vladzaharia";
187211

188212
SetLabelUi();
189213
}
@@ -208,6 +232,8 @@ private void SetLabelUi()
208232
ProjectHomeInfoLabel = appTitle;
209233
TwitterInfoLabel = "@Invvard";
210234
RedditInfoLabel = "r/EZLayoutDisplay";
235+
ContributorsTitleLabel = "Contributors";
236+
VladZahariaLabel = "Vlad Zaharia";
211237
CloseButtonLabel = "OK";
212238
}
213239

@@ -259,6 +285,12 @@ private void NavigateRedditUrl()
259285
_processService.StartWebUrl(_redditUrl);
260286
}
261287

288+
private void NavigateGithubVZUrl()
289+
{
290+
Logger.TraceRelayCommand();
291+
_processService.StartWebUrl(_githubVZUrl);
292+
}
293+
262294
private void CloseAboutWindow()
263295
{
264296
Logger.TraceRelayCommand();

0 commit comments

Comments
 (0)