Add respository link to AboutView and AboutViewModel.

This commit is contained in:
Daniel Kraus 2015-09-06 12:06:39 +02:00
parent c733c238de
commit 95dfa95562
5 changed files with 47 additions and 2 deletions

View File

@ -255,5 +255,14 @@ namespace zaaReloaded2.Properties {
return ((string)(this["ManualCommentPrompt"]));
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("http://git.bovender.de")]
public string Repository {
get {
return ((string)(this["Repository"]));
}
}
}
}

View File

@ -74,5 +74,8 @@
<Setting Name="ManualCommentPrompt" Type="System.String" Scope="Application">
<Value Profile="(Default)">BITTE_ERGÄNZEN</Value>
</Setting>
<Setting Name="Repository" Type="System.String" Scope="Application">
<Value Profile="(Default)">http://git.bovender.de</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@ -79,6 +79,14 @@ namespace zaaReloaded2.ViewModels
}
}
public string Repository
{
get
{
return Properties.Settings.Default.Repository.ToString();
}
}
public string LicenseUrl
{
get
@ -104,6 +112,19 @@ namespace zaaReloaded2.ViewModels
}
}
public DelegatingCommand GotoRepositoryCommand
{
get
{
if (_gotoRepositoryCommand == null)
{
_gotoRepositoryCommand = new DelegatingCommand(
param => { Process.Start(new ProcessStartInfo(Repository)); });
}
return _gotoRepositoryCommand;
}
}
public DelegatingCommand GotoLicenseCommand
{
get
@ -131,6 +152,7 @@ namespace zaaReloaded2.ViewModels
#region Fields
DelegatingCommand _gotoHomepageCommand;
DelegatingCommand _gotoRepositoryCommand;
DelegatingCommand _gotoLicenseCommand;
#endregion

View File

@ -20,7 +20,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:b="clr-namespace:Bovender.Mvvm.Views.Settings;assembly=Bovender"
Width="360" Height="320" ResizeMode="NoResize" ShowInTaskbar="False"
Width="360" SizeToContent="Height" ResizeMode="NoResize" ShowInTaskbar="False"
b:WindowState.CenterScreen="True"
Title="Über..."
>
@ -30,7 +30,10 @@
<StackPanel Margin="20">
<Image Source="/zaaReloaded2;component/Icons/icon.png" Width="64" VerticalAlignment="Center" Margin="0 0 0 10" />
<TextBlock TextAlignment="Center" Text="{Binding AddinName}" FontSize="20" FontWeight="Bold" />
<TextBlock TextAlignment="Center" Text="{Binding Version}" Margin="0, 5, 0, 10" />
<TextBlock TextAlignment="Center" Margin="0, 5, 0, 10" FontWeight="Bold">
Version
<TextBlock Text="{Binding Version}" />
</TextBlock>
<TextBlock TextAlignment="Center" Text="{Binding CopyrightString}" Margin="0, 0, 0, 10" />
<TextBlock TextAlignment="Center" Margin="0, 10, 0, 10">
Homepage:
@ -38,6 +41,11 @@
<TextBlock Text="zaa.nephrowiki.de" />
</Hyperlink>
<LineBreak />
Quellcode:
<Hyperlink Command="{Binding GotoRepositoryCommand}">
<TextBlock Text="git.bovender.de" />
</Hyperlink>
<LineBreak />
Lizenz:
<Hyperlink Command="{Binding GotoLicenseCommand}">
<TextBlock Text="Apache 2.0" />

View File

@ -83,6 +83,9 @@
<setting name="ManualCommentPrompt" serializeAs="String">
<value>BITTE_ERGÄNZEN</value>
</setting>
<setting name="Repository" serializeAs="String">
<value>http://git.bovender.de</value>
</setting>
</zaaReloaded2.Properties.Settings>
</applicationSettings>
<userSettings>