Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2018-05-15 AspNetCoreWasm #161

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 53 additions & 20 deletions Ooui.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,30 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2010
MinimumVisualStudioVersion = 15.0.26124.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ooui", "Ooui\Ooui.csproj", "{DFDFD036-BF48-4D3A-BF99-88CA1EA8E4B9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ooui", "Ooui\Ooui.csproj", "{DFDFD036-BF48-4D3A-BF99-88CA1EA8E4B9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples", "Samples\Samples.csproj", "{CDF8BB01-40BB-402F-8446-47AA6F1628F3}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples", "Samples\Samples.csproj", "{CDF8BB01-40BB-402F-8446-47AA6F1628F3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{78F6E9E7-4322-4F87-8CE9-1EEF1B16D268}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ooui.Forms", "Ooui.Forms\Ooui.Forms.csproj", "{DB819A2F-91E1-40FB-8D48-6544169966B8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ooui.Forms", "Ooui.Forms\Ooui.Forms.csproj", "{DB819A2F-91E1-40FB-8D48-6544169966B8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ooui.AspNetCore", "Ooui.AspNetCore\Ooui.AspNetCore.csproj", "{2EDF0328-698B-458A-B10C-AB1B4786A6CA}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ooui.AspNetCore", "Ooui.AspNetCore\Ooui.AspNetCore.csproj", "{2EDF0328-698B-458A-B10C-AB1B4786A6CA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PlatformSamples", "PlatformSamples", "{12ADF328-BBA8-48FC-9AF1-F11B7921D9EA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspNetCoreMvc", "PlatformSamples\AspNetCoreMvc\AspNetCoreMvc.csproj", "{7C6D477C-3378-4A86-9C31-AAD51204120B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNetCoreMvc", "PlatformSamples\AspNetCoreMvc\AspNetCoreMvc.csproj", "{7C6D477C-3378-4A86-9C31-AAD51204120B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ooui.Wasm.Build.Tasks", "Ooui.Wasm.Build.Tasks\Ooui.Wasm.Build.Tasks.csproj", "{6E9C9582-0DA8-4496-BAE0-23EFAF4A10C2}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ooui.Wasm.Build.Tasks", "Ooui.Wasm.Build.Tasks\Ooui.Wasm.Build.Tasks.csproj", "{6E9C9582-0DA8-4496-BAE0-23EFAF4A10C2}"
EndProject
Project("{9344BDBB-3E7F-41FC-A0DD-8665D75EE146}") = "OouiTemplates", "Templates\OouiTemplates\OouiTemplates.csproj", "{7D3B32CF-38A3-40DE-8123-2E7A0D87104D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNetCoreWasm.Client", "PlatformSamples\AspNetCoreWasm\AspNetCoreWasm.Client\AspNetCoreWasm.Client.csproj", "{FF231D37-1282-42F5-BF86-C641DDEEE200}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNetCoreWasm.Server", "PlatformSamples\AspNetCoreWasm\AspNetCoreWasm.Server\AspNetCoreWasm.Server.csproj", "{24143AF7-F86E-4F29-BC30-23DA84E389E7}"
ProjectSection(ProjectDependencies) = postProject
{FF231D37-1282-42F5-BF86-C641DDEEE200} = {FF231D37-1282-42F5-BF86-C641DDEEE200}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OouiTemplates", "Templates\OouiTemplates\OouiTemplates.csproj", "{1DA10AAB-EB41-49CF-9441-B4D28D0A7F96}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -114,24 +121,50 @@ Global
{6E9C9582-0DA8-4496-BAE0-23EFAF4A10C2}.Release|x64.Build.0 = Release|Any CPU
{6E9C9582-0DA8-4496-BAE0-23EFAF4A10C2}.Release|x86.ActiveCfg = Release|Any CPU
{6E9C9582-0DA8-4496-BAE0-23EFAF4A10C2}.Release|x86.Build.0 = Release|Any CPU
{7D3B32CF-38A3-40DE-8123-2E7A0D87104D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D3B32CF-38A3-40DE-8123-2E7A0D87104D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D3B32CF-38A3-40DE-8123-2E7A0D87104D}.Debug|x64.ActiveCfg = Debug|Any CPU
{7D3B32CF-38A3-40DE-8123-2E7A0D87104D}.Debug|x64.Build.0 = Debug|Any CPU
{7D3B32CF-38A3-40DE-8123-2E7A0D87104D}.Debug|x86.ActiveCfg = Debug|Any CPU
{7D3B32CF-38A3-40DE-8123-2E7A0D87104D}.Debug|x86.Build.0 = Debug|Any CPU
{7D3B32CF-38A3-40DE-8123-2E7A0D87104D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7D3B32CF-38A3-40DE-8123-2E7A0D87104D}.Release|Any CPU.Build.0 = Release|Any CPU
{7D3B32CF-38A3-40DE-8123-2E7A0D87104D}.Release|x64.ActiveCfg = Release|Any CPU
{7D3B32CF-38A3-40DE-8123-2E7A0D87104D}.Release|x64.Build.0 = Release|Any CPU
{7D3B32CF-38A3-40DE-8123-2E7A0D87104D}.Release|x86.ActiveCfg = Release|Any CPU
{7D3B32CF-38A3-40DE-8123-2E7A0D87104D}.Release|x86.Build.0 = Release|Any CPU
{FF231D37-1282-42F5-BF86-C641DDEEE200}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF231D37-1282-42F5-BF86-C641DDEEE200}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF231D37-1282-42F5-BF86-C641DDEEE200}.Debug|x64.ActiveCfg = Debug|Any CPU
{FF231D37-1282-42F5-BF86-C641DDEEE200}.Debug|x64.Build.0 = Debug|Any CPU
{FF231D37-1282-42F5-BF86-C641DDEEE200}.Debug|x86.ActiveCfg = Debug|Any CPU
{FF231D37-1282-42F5-BF86-C641DDEEE200}.Debug|x86.Build.0 = Debug|Any CPU
{FF231D37-1282-42F5-BF86-C641DDEEE200}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF231D37-1282-42F5-BF86-C641DDEEE200}.Release|Any CPU.Build.0 = Release|Any CPU
{FF231D37-1282-42F5-BF86-C641DDEEE200}.Release|x64.ActiveCfg = Release|Any CPU
{FF231D37-1282-42F5-BF86-C641DDEEE200}.Release|x64.Build.0 = Release|Any CPU
{FF231D37-1282-42F5-BF86-C641DDEEE200}.Release|x86.ActiveCfg = Release|Any CPU
{FF231D37-1282-42F5-BF86-C641DDEEE200}.Release|x86.Build.0 = Release|Any CPU
{24143AF7-F86E-4F29-BC30-23DA84E389E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{24143AF7-F86E-4F29-BC30-23DA84E389E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{24143AF7-F86E-4F29-BC30-23DA84E389E7}.Debug|x64.ActiveCfg = Debug|Any CPU
{24143AF7-F86E-4F29-BC30-23DA84E389E7}.Debug|x64.Build.0 = Debug|Any CPU
{24143AF7-F86E-4F29-BC30-23DA84E389E7}.Debug|x86.ActiveCfg = Debug|Any CPU
{24143AF7-F86E-4F29-BC30-23DA84E389E7}.Debug|x86.Build.0 = Debug|Any CPU
{24143AF7-F86E-4F29-BC30-23DA84E389E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{24143AF7-F86E-4F29-BC30-23DA84E389E7}.Release|Any CPU.Build.0 = Release|Any CPU
{24143AF7-F86E-4F29-BC30-23DA84E389E7}.Release|x64.ActiveCfg = Release|Any CPU
{24143AF7-F86E-4F29-BC30-23DA84E389E7}.Release|x64.Build.0 = Release|Any CPU
{24143AF7-F86E-4F29-BC30-23DA84E389E7}.Release|x86.ActiveCfg = Release|Any CPU
{24143AF7-F86E-4F29-BC30-23DA84E389E7}.Release|x86.Build.0 = Release|Any CPU
{1DA10AAB-EB41-49CF-9441-B4D28D0A7F96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1DA10AAB-EB41-49CF-9441-B4D28D0A7F96}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1DA10AAB-EB41-49CF-9441-B4D28D0A7F96}.Debug|x64.ActiveCfg = Debug|Any CPU
{1DA10AAB-EB41-49CF-9441-B4D28D0A7F96}.Debug|x64.Build.0 = Debug|Any CPU
{1DA10AAB-EB41-49CF-9441-B4D28D0A7F96}.Debug|x86.ActiveCfg = Debug|Any CPU
{1DA10AAB-EB41-49CF-9441-B4D28D0A7F96}.Debug|x86.Build.0 = Debug|Any CPU
{1DA10AAB-EB41-49CF-9441-B4D28D0A7F96}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1DA10AAB-EB41-49CF-9441-B4D28D0A7F96}.Release|Any CPU.Build.0 = Release|Any CPU
{1DA10AAB-EB41-49CF-9441-B4D28D0A7F96}.Release|x64.ActiveCfg = Release|Any CPU
{1DA10AAB-EB41-49CF-9441-B4D28D0A7F96}.Release|x64.Build.0 = Release|Any CPU
{1DA10AAB-EB41-49CF-9441-B4D28D0A7F96}.Release|x86.ActiveCfg = Release|Any CPU
{1DA10AAB-EB41-49CF-9441-B4D28D0A7F96}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{7C6D477C-3378-4A86-9C31-AAD51204120B} = {12ADF328-BBA8-48FC-9AF1-F11B7921D9EA}
{FF231D37-1282-42F5-BF86-C641DDEEE200} = {12ADF328-BBA8-48FC-9AF1-F11B7921D9EA}
{24143AF7-F86E-4F29-BC30-23DA84E389E7} = {12ADF328-BBA8-48FC-9AF1-F11B7921D9EA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9370DD6D-816D-4E0F-8356-835F65DCF3AA}
Expand Down
6 changes: 6 additions & 0 deletions PlatformSamples/AspNetCoreWasm/AspNetCoreWasm.Client/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<Application xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="OouiWXF.App">

</Application>
20 changes: 20 additions & 0 deletions PlatformSamples/AspNetCoreWasm/AspNetCoreWasm.Client/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Xamarin.Forms;
using Xamarin.Forms.Xaml;

namespace OouiWXF
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class App : Application
{
public App ()
{
InitializeComponent ();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Compile Remove="packages\**" />
<Compile Remove="WebHost\**" />
<EmbeddedResource Remove="packages\**" />
<EmbeddedResource Remove="WebHost\**" />
<None Remove="packages\**" />
<None Remove="WebHost\**" />
</ItemGroup>

<ItemGroup>
<None Remove=".gitattributes" />
<None Remove=".gitignore" />
<None Remove="Assets\Resources\OptimiserLogo.png" />
<None Remove="Assets\Resources\ORGO.png" />
<None Remove="OptimiserLogo.png" />
<None Remove="ORGO.png" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Assets\Resources\OptimiserLogo.png" />
<EmbeddedResource Include="Assets\Resources\ORGO.png" />
<Content Include="OptimiserLogo.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="ORGO.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<PackageReference Include="CSLA-Core-NS" Version="4.7.101" />
<PackageReference Include="Ooui.Forms" Version="0.10.222" />
<PackageReference Include="Ooui.Wasm" Version="0.10.222" />
<PackageReference Include="Xamarin.Forms" Version="2.5.0.122203" />
</ItemGroup>

<ItemGroup>
<Compile Update="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="App.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<None Update="HomePage.xaml">
<Generator>MSBuild:Compile</Generator>
</None>
</ItemGroup>

</Project>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using System;
using Xamarin.Forms.Xaml;
using Xamarin.Forms;
using Xamarin.Forms.Internals;

//
// 2018-05-01 Mark Stega
// Created
//

namespace OouiWXF
{
// You exclude the 'Extension' suffix when using in Xaml markup
[Preserve(AllMembers = true)]
[ContentProperty (nameof(Source))]
public class ImageResourceExtension : IMarkupExtension
{
public string Source { get; set; }

public object ProvideValue (IServiceProvider serviceProvider)
{
if (Source == null)
return null;

// Do your translation lookup here, using whatever method you require
var imageSource = ImageSource.FromResource(Source);

return imageSource;
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using System.Globalization;
using Xamarin.Forms;

//
// 2018-05-01 Mark Stega
// Created
//

namespace OouiWXF.Infrastructure.MVVMFramework.Converters
{
public class BoolToOpacityConverter : IValueConverter
{
public object Convert(object value, Type targetType,
object parameter, CultureInfo culture)
{
if (value == null)
{
return 0.4;
}
if (value.GetType() != typeof(bool))
{
return 0.4;
}
return ((bool)value) ? 1.0 : 0.4;
}

public object ConvertBack(object value,
Type targetType,
object parameter,
CultureInfo culture)
{
return value;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.CompilerServices;

//
// 2018-05-01 Mark Stega
// Created
//

namespace OouiWXF.Infrastructure.MVVMFramework.ViewModel
{
public class ViewModelBase : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;

protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
var handler = PropertyChanged;
if (handler != null)
handler(this, new PropertyChangedEventArgs(propertyName));
}

private Dictionary<string, object> properties = new Dictionary<string, object>();

protected void SetValue<T>(T value, [CallerMemberName] string propertyName = null)
{
if (!properties.ContainsKey(propertyName))
{
properties.Add(propertyName, default(T));
}

var oldValue = GetValue<T>(propertyName);
if (!EqualityComparer<T>.Default.Equals(oldValue, value))
{
properties[propertyName] = value;
OnPropertyChanged(propertyName);
}
}

protected T GetValue<T>([CallerMemberName] string propertyName = null)
{
if (!properties.ContainsKey(propertyName))
{
return default(T);
}
else
{
return (T)properties[propertyName];
}
}
}
}
Loading