Put license into About view; adjust install license file.

This commit is contained in:
Daniel Kraus
2015-07-28 18:16:39 +02:00
parent 4bae35b665
commit f2e75b1abe
6 changed files with 163 additions and 345 deletions

View File

@ -98,5 +98,14 @@ namespace zaaReloaded2.Properties {
this["LastUpdateCheck"] = value;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("http://www.apache.org/licenses/LICENSE-2.0")]
public global::System.Uri LicenseUrl {
get {
return ((global::System.Uri)(this["LicenseUrl"]));
}
}
}
}

View File

@ -26,5 +26,8 @@
<Setting Name="LastUpdateCheck" Type="System.DateTime" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="LicenseUrl" Type="System.Uri" Scope="Application">
<Value Profile="(Default)">http://www.apache.org/licenses/LICENSE-2.0</Value>
</Setting>
</Settings>
</SettingsFile>

View File

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

View File

@ -32,9 +32,15 @@
<TextBlock TextAlignment="Center" Text="{Binding Version}" Margin="0, 5, 0, 10" />
<TextBlock TextAlignment="Center" Text="{Binding CopyrightString}" Margin="0, 0, 0, 10" />
<TextBlock TextAlignment="Center" Margin="0, 10, 0, 10">
Homepage:
<Hyperlink Command="{Binding GotoHomepageCommand}">
<TextBlock Text="{Binding Homepage}" />
</Hyperlink>
<LineBreak />
Lizenz:
<Hyperlink Command="{Binding GotoLicenseCommand}">
<TextBlock Text="Apache 2.0" />
</Hyperlink>
</TextBlock>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0, 10, 0, 0">
<Button Content="Schließen" Command="{Binding CloseViewCommand}" />

View File

@ -47,6 +47,9 @@
<setting name="ExceptionPostUrl" serializeAs="String">
<value>http://zaa.nephrowiki.de/postreport.php</value>
</setting>
<setting name="LicenseUrl" serializeAs="String">
<value>http://www.apache.org/licenses/LICENSE-2.0</value>
</setting>
</zaaReloaded2.Properties.Settings>
</applicationSettings>
<userSettings>