Skip to content

Commit

Permalink
Merge branch 'netstandart'
Browse files Browse the repository at this point in the history
  • Loading branch information
wcoder committed Aug 9, 2017
2 parents 4dbd4e6 + f98a148 commit 76b9cd2
Show file tree
Hide file tree
Showing 158 changed files with 123 additions and 387 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Application
x:Class="FB2Sample.UWP.App"
x:Class="FB2Library.Sample.UWP.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:FB2Sample.UWP"
xmlns:local="using:FB2Library.Sample.UWP"
RequestedTheme="Light">

</Application>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

namespace FB2Sample.UWP
namespace FB2Library.Sample.UWP
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
Expand All @@ -39,14 +39,6 @@ public App()
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{

#if DEBUG
if (System.Diagnostics.Debugger.IsAttached)
{
this.DebugSettings.EnableFrameRateCounter = true;
}
#endif

Frame rootFrame = Window.Current.Content as Frame;

// Do not repeat app initialization when the Window already has content,
Expand All @@ -67,15 +59,18 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
Window.Current.Content = rootFrame;
}

if (rootFrame.Content == null)
if (e.PrelaunchActivated == false)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(MainPage), e.Arguments);
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
// Ensure the current window is active
Window.Current.Activate();
}
// Ensure the current window is active
Window.Current.Activate();
}

/// <summary>
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{4A6A3054-2DA2-49E5-9556-C7F529414FB9}</ProjectGuid>
<ProjectGuid>{9E25F85E-486A-4B68-AF44-3E47CA962433}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FB2Sample.UWP</RootNamespace>
<AssemblyName>FB2Sample.UWP</AssemblyName>
<RootNamespace>FB2Library.Sample.UWP</RootNamespace>
<AssemblyName>FB2Library.Sample.UWP</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.10586.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.15063.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PackageCertificateKeyFile>FB2Sample.UWP_TemporaryKey.pfx</PackageCertificateKeyFile>
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<PackageCertificateKeyFile>FB2Library.Sample.UWP_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -87,10 +88,9 @@
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<None Include="project.json" />
</ItemGroup>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
Expand All @@ -104,7 +104,7 @@
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<None Include="FB2Sample.UWP_TemporaryKey.pfx" />
<None Include="FB2Library.Sample.UWP_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<Content Include="Properties\Default.rd.xml" />
Expand All @@ -127,7 +127,12 @@
</Page>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\FB2Library\FB2Library.csproj">
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.2.3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FB2Library\FB2Library.csproj">
<Project>{718ce136-bcdc-4bf8-9863-adc7633eb2ca}</Project>
<Name>FB2Library</Name>
</ProjectReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Page
x:Class="FB2Sample.UWP.MainPage"
x:Class="FB2Library.Sample.UWP.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:FB2Sample.UWP"
xmlns:local="using:FB2Library.Sample.UWP"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="200" />
Expand All @@ -16,9 +16,9 @@
<ScrollViewer Grid.Column="0">
<StackPanel x:Name="bookContent" />
</ScrollViewer>

<StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">

<Button Content="Choose fb2 file..." Click="Choose_Click"/>
<Button Content="Close file" Click="Close_Click" />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
using System;
using System.IO;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
using Windows.Storage;
using Windows.Storage.Pickers;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.Storage;
using FB2Library;
using Windows.UI.Text;

namespace FB2Sample.UWP
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

namespace FB2Library.Sample.UWP
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class MainPage : Page
{
private FB2File _file;
Expand Down Expand Up @@ -123,42 +124,13 @@ private async Task<string> GetStringFromStreamAsync(Stream stream)
return xml;
}



//private void DisplayLines()
//{
// foreach (var line in _lines)
// {
// if (line is HeaderLine)
// {
// bookContent.Children.Add(new TextBlock
// {
// FontWeight = new FontWeight { Weight = 700 },
// Text = ((HeaderLine)line).Text
// });
// }
// else if (line is TextLine)
// {
// bookContent.Children.Add(new TextBlock { Text = ((TextLine)line).Text });
// }
// else if (line is ImageLine)
// {
// var image = ((ImageLine)line);
// bookContent.Children.Add(new Image { Width = 100, Height = 100 });
// }
// }
//}




private void Close_Click(object sender, RoutedEventArgs e)
{
bookInfo.Text = string.Empty;
textBlock.Text = "Closed";
_file = null;
//_lines = null;
bookContent.Children.Clear();

GC.Collect();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
IgnorableNamespaces="uap mp">

<Identity
Name="33eecefb-a10d-45cc-8168-726bfbe25545"
Name="3b0e90e9-9a3b-4a57-93d9-58e543bd5412"
Publisher="CN=yauhe"
Version="1.0.0.0" />

<mp:PhoneIdentity PhoneProductId="33eecefb-a10d-45cc-8168-726bfbe25545" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<mp:PhoneIdentity PhoneProductId="3b0e90e9-9a3b-4a57-93d9-58e543bd5412" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

<Properties>
<DisplayName>FB2Sample.UWP</DisplayName>
<DisplayName>FB2Library.Sample.UWP</DisplayName>
<PublisherDisplayName>yauhe</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
Expand All @@ -30,12 +30,12 @@
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="FB2Sample.UWP.App">
EntryPoint="FB2Library.Sample.UWP.App">
<uap:VisualElements
DisplayName="FB2Sample.UWP"
DisplayName="FB2Library.Sample.UWP"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="FB2Sample.UWP"
Description="FB2Library.Sample.UWP"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("FB2Sample.UWP")]
[assembly: AssemblyTitle("FB2Library.Sample.UWP")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FB2Sample.UWP")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyProduct("FB2Library.Sample.UWP")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.
Runtime Directives are documented at http://go.microsoft.com/fwlink/?LinkID=391919
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>
Expand Down
54 changes: 26 additions & 28 deletions demo/FB2Sample.sln → FB2Library.sln
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
# Visual Studio 15
VisualStudioVersion = 15.0.26430.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FB2Sample.UWP", "FB2Sample.UWP\FB2Sample.UWP.csproj", "{4A6A3054-2DA2-49E5-9556-C7F529414FB9}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FB2Library", "FB2Library\FB2Library.csproj", "{718CE136-BCDC-4BF8-9863-ADC7633EB2CA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FB2Library", "..\src\FB2Library\FB2Library.csproj", "{718CE136-BCDC-4BF8-9863-ADC7633EB2CA}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FB2Library.Sample.UWP", "FB2Library.Sample.UWP\FB2Library.Sample.UWP.csproj", "{9E25F85E-486A-4B68-AF44-3E47CA962433}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -19,30 +19,6 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Debug|Any CPU.ActiveCfg = Debug|x86
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Debug|Any CPU.Build.0 = Debug|x86
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Debug|Any CPU.Deploy.0 = Debug|x86
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Debug|ARM.ActiveCfg = Debug|ARM
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Debug|ARM.Build.0 = Debug|ARM
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Debug|ARM.Deploy.0 = Debug|ARM
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Debug|x64.ActiveCfg = Debug|x64
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Debug|x64.Build.0 = Debug|x64
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Debug|x64.Deploy.0 = Debug|x64
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Debug|x86.ActiveCfg = Debug|x86
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Debug|x86.Build.0 = Debug|x86
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Debug|x86.Deploy.0 = Debug|x86
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Release|Any CPU.ActiveCfg = Release|x86
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Release|Any CPU.Build.0 = Release|x86
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Release|Any CPU.Deploy.0 = Release|x86
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Release|ARM.ActiveCfg = Release|ARM
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Release|ARM.Build.0 = Release|ARM
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Release|ARM.Deploy.0 = Release|ARM
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Release|x64.ActiveCfg = Release|x64
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Release|x64.Build.0 = Release|x64
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Release|x64.Deploy.0 = Release|x64
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Release|x86.ActiveCfg = Release|x86
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Release|x86.Build.0 = Release|x86
{4A6A3054-2DA2-49E5-9556-C7F529414FB9}.Release|x86.Deploy.0 = Release|x86
{718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand All @@ -59,6 +35,28 @@ Global
{718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Release|x64.Build.0 = Release|Any CPU
{718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Release|x86.ActiveCfg = Release|Any CPU
{718CE136-BCDC-4BF8-9863-ADC7633EB2CA}.Release|x86.Build.0 = Release|Any CPU
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|Any CPU.ActiveCfg = Debug|x86
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|Any CPU.Build.0 = Debug|x86
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|Any CPU.Deploy.0 = Debug|x86
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|ARM.ActiveCfg = Debug|ARM
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|ARM.Build.0 = Debug|ARM
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|ARM.Deploy.0 = Debug|ARM
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|x64.ActiveCfg = Debug|x64
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|x64.Build.0 = Debug|x64
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|x64.Deploy.0 = Debug|x64
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|x86.ActiveCfg = Debug|x86
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|x86.Build.0 = Debug|x86
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Debug|x86.Deploy.0 = Debug|x86
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|Any CPU.ActiveCfg = Release|x86
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|ARM.ActiveCfg = Release|ARM
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|ARM.Build.0 = Release|ARM
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|ARM.Deploy.0 = Release|ARM
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|x64.ActiveCfg = Release|x64
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|x64.Build.0 = Release|x64
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|x64.Deploy.0 = Release|x64
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|x86.ActiveCfg = Release|x86
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|x86.Build.0 = Release|x86
{9E25F85E-486A-4B68-AF44-3E47CA962433}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 27 additions & 0 deletions FB2Library/FB2Library.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<Version>1.3</Version>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<Authors>lordkiron, Yauheni Pakala</Authors>
<PackageLicenseUrl>https://github.com/wcoder/FB2Library/blob/master/LICENSE.md</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/wcoder/FB2Library</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/wcoder/FB2Library/master/nuget/icon.png</PackageIconUrl>
<RepositoryUrl>https://github.com/wcoder/FB2Library</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>netstandard, pcl, fb2, ebook, windows, uwp, android, ios, linux, macos, xamarin, xamarin.forms</PackageTags>
<PackageReleaseNotes>v.1.3 - Ported to .Net Standard Library
v.1.2.1 - Merge pull request from g0rdan/master https://github.com/wcoder/FB2Library/pull/3
v.1.2 - Added class-reader.
v.1.1 - Ported to PCL.</PackageReleaseNotes>
<Description>Cross-Platform .NET library for read .FB2 ebook files This ebook files format is widely acceptable in Russia. If you doing some converter, reader or editor for ebooks and you using one of the .Net languages - this project for you.</Description>
<Product></Product>
<PackageTitle>Cross-Platform .NET library for read .FB2 ebook files</PackageTitle>
<Company />
<Copyright>Copyright (c) 2009-2015 lordkiron / 2016 Yauheni Pakala</Copyright>
<AssemblyVersion>1.2.1.0</AssemblyVersion>
<FileVersion>1.2.1.0</FileVersion>
</PropertyGroup>
</Project>
Loading

0 comments on commit 76b9cd2

Please sign in to comment.