Add license page, add page transition animations
LicenseInformationPage is unaccessible unless in Debug mode for now. A license for Circle itself has not been chosen yet. Only licenses for Roboto and WPtoolkit were added. Also, page transition animations were added for MainPage and LicenseInformationPage.
This commit is contained in:
@@ -136,6 +136,9 @@
|
||||
<DependentUpon>AppResources.en.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LocalizedStrings.cs" />
|
||||
<Compile Include="Views\LicenseInformationPage.xaml.cs">
|
||||
<DependentUpon>LicenseInformationPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\MainPage.xaml.cs">
|
||||
<DependentUpon>MainPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -162,6 +165,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\LicenseInformationPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\MainPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -186,6 +193,9 @@
|
||||
<Content Include="Fonts\roboto-Thin.ttf">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Licenses\LICENSE-Circle.txt" />
|
||||
<Content Include="Licenses\LICENSE-Roboto.txt" />
|
||||
<Content Include="Licenses\LICENSE-WPtoolkit.txt" />
|
||||
<Content Include="SplashScreenImage.jpg" />
|
||||
<None Include="Fonts\segmdl2.ttf">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
@@ -239,6 +249,7 @@
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Phone.Controls, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.Phone.Controls.Toolkit">
|
||||
<HintPath>..\packages\WPtoolkit.4.2013.08.16\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
3
Circle/Licenses/LICENSE-Circle.txt
Normal file
3
Circle/Licenses/LICENSE-Circle.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
Circle Stopwatch Version 2.1
|
||||
|
||||
TO-DO
|
||||
94
Circle/Licenses/LICENSE-Roboto.txt
Normal file
94
Circle/Licenses/LICENSE-Roboto.txt
Normal file
@@ -0,0 +1,94 @@
|
||||
Roboto font
|
||||
|
||||
Copyright 2011 The Roboto Project Authors (https://github.com/googlefonts/roboto-classic)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
https://openfontlicense.org
|
||||
|
||||
-------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
24
Circle/Licenses/LICENSE-WPtoolkit.txt
Normal file
24
Circle/Licenses/LICENSE-WPtoolkit.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
WPtoolkit Version 4.2013.08.16
|
||||
|
||||
Microsoft Public License (MS-PL)
|
||||
|
||||
This license governs use of the accompanying software. If you use the software, you
|
||||
accept this license. If you do not accept the license, do not use the software.
|
||||
|
||||
1. Definitions
|
||||
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the
|
||||
same meaning here as under U.S. copyright law.
|
||||
A "contribution" is the original software, or any additions or changes to the software.
|
||||
A "contributor" is any person that distributes its contribution under this license.
|
||||
"Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
|
||||
2. Grant of Rights
|
||||
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
|
||||
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
|
||||
|
||||
3. Conditions and Limitations
|
||||
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
|
||||
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
|
||||
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
|
||||
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
|
||||
79
Circle/Views/LicenseInformationPage.xaml
Normal file
79
Circle/Views/LicenseInformationPage.xaml
Normal file
@@ -0,0 +1,79 @@
|
||||
<phone:PhoneApplicationPage
|
||||
x:Class="Circle.Views.LicenseInformationPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||
shell:SystemTray.BackgroundColor="{StaticResource PhoneAccentColor}"
|
||||
shell:SystemTray.ForegroundColor="White"
|
||||
shell:SystemTray.IsVisible="True"
|
||||
shell:SystemTray.Opacity="0"
|
||||
Orientation="Portrait"
|
||||
SupportedOrientations="Portrait">
|
||||
|
||||
<toolkit:TransitionService.NavigationInTransition>
|
||||
<toolkit:NavigationInTransition>
|
||||
<toolkit:NavigationInTransition.Backward>
|
||||
<toolkit:TurnstileTransition Mode="BackwardIn" />
|
||||
</toolkit:NavigationInTransition.Backward>
|
||||
<toolkit:NavigationInTransition.Forward>
|
||||
<toolkit:TurnstileTransition Mode="ForwardIn" />
|
||||
</toolkit:NavigationInTransition.Forward>
|
||||
</toolkit:NavigationInTransition>
|
||||
</toolkit:TransitionService.NavigationInTransition>
|
||||
<toolkit:TransitionService.NavigationOutTransition>
|
||||
<toolkit:NavigationOutTransition>
|
||||
<toolkit:NavigationOutTransition.Backward>
|
||||
<toolkit:TurnstileTransition Mode="BackwardOut" />
|
||||
</toolkit:NavigationOutTransition.Backward>
|
||||
<toolkit:NavigationOutTransition.Forward>
|
||||
<toolkit:TurnstileTransition Mode="ForwardOut" />
|
||||
</toolkit:NavigationOutTransition.Forward>
|
||||
</toolkit:NavigationOutTransition>
|
||||
</toolkit:TransitionService.NavigationOutTransition>
|
||||
|
||||
<Grid x:Name="LayoutRoot" Background="Transparent">
|
||||
<!-- hard coded height - works for Silverlight but not WinRT -->
|
||||
<Rectangle
|
||||
Height="90"
|
||||
VerticalAlignment="Top"
|
||||
Fill="{StaticResource PhoneAccentBrush}" />
|
||||
<phone:Pivot
|
||||
HeaderTemplate="{StaticResource smallPivot}">
|
||||
<!-- Circle -->
|
||||
<phone:PivotItem Header="Circle Stopwatch">
|
||||
<ScrollViewer>
|
||||
<TextBlock
|
||||
x:Name="CircleLicenseTextBlock"
|
||||
TextWrapping="Wrap" />
|
||||
</ScrollViewer>
|
||||
</phone:PivotItem>
|
||||
|
||||
<!-- Roboto font -->
|
||||
<phone:PivotItem Header="Roboto">
|
||||
<ScrollViewer>
|
||||
<TextBlock
|
||||
x:Name="RobotoLicenseTextBlock"
|
||||
TextWrapping="Wrap" />
|
||||
</ScrollViewer>
|
||||
</phone:PivotItem>
|
||||
|
||||
<!-- Windows Phone Toolkit -->
|
||||
<phone:PivotItem Header="WPtoolkit">
|
||||
<ScrollViewer>
|
||||
<TextBlock
|
||||
x:Name="WPtoolkitLicenseTextBlock"
|
||||
TextWrapping="Wrap" />
|
||||
</ScrollViewer>
|
||||
</phone:PivotItem>
|
||||
</phone:Pivot>
|
||||
</Grid>
|
||||
|
||||
</phone:PhoneApplicationPage>
|
||||
38
Circle/Views/LicenseInformationPage.xaml.cs
Normal file
38
Circle/Views/LicenseInformationPage.xaml.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using Microsoft.Phone.Controls;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Resources;
|
||||
|
||||
namespace Circle.Views
|
||||
{
|
||||
public partial class LicenseInformationPage : PhoneApplicationPage
|
||||
{
|
||||
public LicenseInformationPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
CircleLicenseTextBlock.Text = ReadLicenseFile("Circle");
|
||||
RobotoLicenseTextBlock.Text = ReadLicenseFile("Roboto");
|
||||
WPtoolkitLicenseTextBlock.Text = ReadLicenseFile("WPtoolkit");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the license file for a given tool/resource.
|
||||
/// </summary>
|
||||
/// <param name="name">Tool/Resource name</param>
|
||||
/// <returns>License text</returns>
|
||||
private string ReadLicenseFile(string name)
|
||||
{
|
||||
StreamResourceInfo stream = Application.GetResourceStream(new Uri($"Licenses/LICENSE-{name}.txt", UriKind.Relative));
|
||||
StreamReader reader = new StreamReader(stream.Stream);
|
||||
|
||||
string license = reader.ReadToEnd()
|
||||
.Replace("\n\n", "<lb>")
|
||||
.Replace("\n", " ")
|
||||
.Replace("<lb>", "\n\n");
|
||||
|
||||
return license;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,27 @@
|
||||
SupportedOrientations="Portrait"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<toolkit:TransitionService.NavigationInTransition>
|
||||
<toolkit:NavigationInTransition>
|
||||
<toolkit:NavigationInTransition.Backward>
|
||||
<toolkit:TurnstileTransition Mode="BackwardIn" />
|
||||
</toolkit:NavigationInTransition.Backward>
|
||||
<toolkit:NavigationInTransition.Forward>
|
||||
<toolkit:TurnstileTransition Mode="ForwardIn" />
|
||||
</toolkit:NavigationInTransition.Forward>
|
||||
</toolkit:NavigationInTransition>
|
||||
</toolkit:TransitionService.NavigationInTransition>
|
||||
<toolkit:TransitionService.NavigationOutTransition>
|
||||
<toolkit:NavigationOutTransition>
|
||||
<toolkit:NavigationOutTransition.Backward>
|
||||
<toolkit:TurnstileTransition Mode="BackwardOut" />
|
||||
</toolkit:NavigationOutTransition.Backward>
|
||||
<toolkit:NavigationOutTransition.Forward>
|
||||
<toolkit:TurnstileTransition Mode="ForwardOut" />
|
||||
</toolkit:NavigationOutTransition.Forward>
|
||||
</toolkit:NavigationOutTransition>
|
||||
</toolkit:TransitionService.NavigationOutTransition>
|
||||
|
||||
<Grid Background="{StaticResource PhoneBackgroundBrush}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
@@ -305,15 +326,24 @@
|
||||
TextAlignment="Center" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- repo button -->
|
||||
<Button
|
||||
Name="RepoButton"
|
||||
Grid.Row="2"
|
||||
Background="{StaticResource PhoneSemitransparentBrush}"
|
||||
BorderThickness="0"
|
||||
Click="RepoButton_Click"
|
||||
Content="__Visit repository__"
|
||||
IsEnabled="False" />
|
||||
<!-- additional buttons -->
|
||||
<StackPanel Grid.Row="2">
|
||||
<!-- repo button -->
|
||||
<Button
|
||||
Name="RepoButton"
|
||||
Background="{StaticResource PhoneSemitransparentBrush}"
|
||||
BorderThickness="0"
|
||||
Click="RepoButton_Click"
|
||||
Content="__Visit repository__"
|
||||
IsEnabled="False" />
|
||||
<Button
|
||||
Name="LicenseInformationButton"
|
||||
Background="{StaticResource PhoneSemitransparentBrush}"
|
||||
BorderThickness="0"
|
||||
Click="LicenseInformationButton_Click"
|
||||
Content="__License information__"
|
||||
IsEnabled="False" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</phone:PivotItem>
|
||||
</phone:Pivot>
|
||||
|
||||
@@ -77,6 +77,10 @@ namespace Circle
|
||||
// replace gui strings
|
||||
VersionTextBlock.Text = VersionTextBlock.Text.Replace("%vString", AppResources.versionString);
|
||||
ShowAdditionalButtonsToggleSwitch.Header = AppResources.showAdditionalButtonsString.Replace("%b", AppResources.shareAllTimesString);
|
||||
|
||||
#if DEBUG
|
||||
LicenseInformationButton.IsEnabled = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -403,6 +407,11 @@ namespace Circle
|
||||
SetAppSetting("threeDigits", toggleSwitch.IsChecked, true);
|
||||
}
|
||||
|
||||
private void LicenseInformationButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
NavigationService.Navigate(new Uri("/Views/LicenseInformationPage.xaml", UriKind.Relative));
|
||||
}
|
||||
|
||||
private void ShareAllButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (TimesListBox.Items.Count > 0)
|
||||
|
||||
Reference in New Issue
Block a user