Commit a70b2763 authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

Added WP8 support

parent 296609ca
Subproject commit da02ed9233026812f4e21f0792bda6e1566966bd
Subproject commit f817722ab7eac04d450a6f46b93af7d1a77ad1c2
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}</ProjectGuid>
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NLua.WP8</RootNamespace>
<AssemblyName>NLua.WP8</AssemblyName>
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
<SilverlightApplication>false</SilverlightApplication>
<ValidateXaml>true</ValidateXaml>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\x86\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\x86\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\ARM\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\ARM\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="CheckType.cs" />
<Compile Include="Config\NLuaConfig.cs" />
<Compile Include="Event\DebugHookEventArgs.cs" />
<Compile Include="Event\EventCodes.cs" />
<Compile Include="Event\EventMasks.cs" />
<Compile Include="Event\HookExceptionEventArgs.cs" />
<Compile Include="Exceptions\LuaException.cs" />
<Compile Include="Exceptions\LuaScriptException.cs" />
<Compile Include="Extensions\GeneralExtensions.cs" />
<Compile Include="GenerateEventAssembly\ClassGenerator.cs" />
<Compile Include="GenerateEventAssembly\CodeGeneration.cs" />
<Compile Include="GenerateEventAssembly\DelegateGenerator.cs" />
<Compile Include="GenerateEventAssembly\ILuaGeneratedType.cs" />
<Compile Include="GenerateEventAssembly\LuaClassType.cs" />
<Compile Include="Lua.cs" />
<Compile Include="LuaBase.cs" />
<Compile Include="LuaFunction.cs" />
<Compile Include="LuaGlobalAttribute.cs" />
<Compile Include="LuaHideAttribute.cs" />
<Compile Include="LuaLib\GCOptions.cs" />
<Compile Include="LuaLib\LuaEnums.cs" />
<Compile Include="LuaLib\LuaIndexes.cs" />
<Compile Include="LuaLib\LuaLib.cs" />
<Compile Include="LuaLib\LuaTypes.cs" />
<Compile Include="LuaLib\References.cs" />
<Compile Include="LuaRegistrationHelper.cs" />
<Compile Include="LuaTable.cs" />
<Compile Include="LuaUserData.cs" />
<Compile Include="Metatables.cs" />
<Compile Include="Method\EventHandlerContainer.cs" />
<Compile Include="Method\LuaClassHelper.cs" />
<Compile Include="Method\LuaDelegate.cs" />
<Compile Include="Method\LuaEventHandler.cs" />
<Compile Include="Method\LuaMethodWrapper.cs" />
<Compile Include="Method\MethodArgs.cs" />
<Compile Include="Method\MethodCache.cs" />
<Compile Include="Method\RegisterEventHandler.cs" />
<Compile Include="ObjectTranslator.cs" />
<Compile Include="ObjectTranslatorPool.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ProxyType.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\KeraLua\external\lua\wp8_build\lua\lua52\lua52.vcxproj">
<Project>{ABD36435-56AD-4940-B51A-10AEECA46C01}</Project>
<Name>lua52</Name>
</ProjectReference>
<ProjectReference Include="..\KeraLua\src\WP8\KeraLua.WP8.csproj">
<Project>{2C343545-0778-49BB-9665-1FA656013466}</Project>
<Name>KeraLua.WP8</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<ProjectExtensions />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NLua.WP8", "Core\NLua\NLua.WP8.csproj", "{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeraLua.WP8", "Core\KeraLua\src\WP8\KeraLua.WP8.csproj", "{2C343545-0778-49BB-9665-1FA656013466}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua52", "Core\KeraLua\external\lua\wp8_build\lua\lua52\lua52.vcxproj", "{ABD36435-56AD-4940-B51A-10AEECA46C01}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NLuaTest.WP8", "NLuaTest.WP8\NLuaTest.WP8.csproj", "{0AF57940-43F8-492B-9684-0369259C990B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|ARM.ActiveCfg = Debug|ARM
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|ARM.Build.0 = Debug|ARM
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Mixed Platforms.Build.0 = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Win32.ActiveCfg = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Win32.Build.0 = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|x86.ActiveCfg = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|x86.Build.0 = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Any CPU.Build.0 = Release|Any CPU
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|ARM.ActiveCfg = Release|ARM
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|ARM.Build.0 = Release|ARM
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Mixed Platforms.ActiveCfg = Release|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Mixed Platforms.Build.0 = Release|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Win32.ActiveCfg = Release|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Win32.Build.0 = Release|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|x86.ActiveCfg = Release|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|x86.Build.0 = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C343545-0778-49BB-9665-1FA656013466}.Debug|ARM.ActiveCfg = Debug|ARM
{2C343545-0778-49BB-9665-1FA656013466}.Debug|ARM.Build.0 = Debug|ARM
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Mixed Platforms.Build.0 = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Win32.ActiveCfg = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Win32.Build.0 = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|x86.ActiveCfg = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|x86.Build.0 = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C343545-0778-49BB-9665-1FA656013466}.Release|Any CPU.Build.0 = Release|Any CPU
{2C343545-0778-49BB-9665-1FA656013466}.Release|ARM.ActiveCfg = Release|ARM
{2C343545-0778-49BB-9665-1FA656013466}.Release|ARM.Build.0 = Release|ARM
{2C343545-0778-49BB-9665-1FA656013466}.Release|Mixed Platforms.ActiveCfg = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|Mixed Platforms.Build.0 = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|Win32.ActiveCfg = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|Win32.Build.0 = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|x86.ActiveCfg = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|x86.Build.0 = Release|x86
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|Any CPU.ActiveCfg = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|ARM.ActiveCfg = Debug|ARM
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|ARM.Build.0 = Debug|ARM
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|Win32.ActiveCfg = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|Win32.Build.0 = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|x86.ActiveCfg = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|x86.Build.0 = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|Any CPU.ActiveCfg = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|ARM.ActiveCfg = Release|ARM
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|ARM.Build.0 = Release|ARM
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|Mixed Platforms.Build.0 = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|Win32.ActiveCfg = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|Win32.Build.0 = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|x86.ActiveCfg = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|x86.Build.0 = Release|Win32
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Any CPU.ActiveCfg = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|ARM.ActiveCfg = Debug|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|ARM.Build.0 = Debug|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|ARM.Deploy.0 = Debug|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Mixed Platforms.Build.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Mixed Platforms.Deploy.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Win32.ActiveCfg = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Win32.Build.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Win32.Deploy.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|x86.ActiveCfg = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|x86.Build.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|x86.Deploy.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Any CPU.ActiveCfg = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|ARM.ActiveCfg = Release|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Release|ARM.Build.0 = Release|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Release|ARM.Deploy.0 = Release|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Mixed Platforms.ActiveCfg = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Mixed Platforms.Build.0 = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Mixed Platforms.Deploy.0 = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Win32.ActiveCfg = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Win32.Build.0 = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Win32.Deploy.0 = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|x86.ActiveCfg = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|x86.Build.0 = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<Application
x:Class="TestApp1.App"
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">
<!--Application Resources-->
<Application.Resources>
<local:LocalizedStrings xmlns:local="clr-namespace:TestApp1" x:Key="LocalizedStrings"/>
</Application.Resources>
<Application.ApplicationLifetimeObjects>
<!--Required object that handles lifetime events for the application-->
<shell:PhoneApplicationService
Launching="Application_Launching" Closing="Application_Closing"
Activated="Application_Activated" Deactivated="Application_Deactivated"/>
</Application.ApplicationLifetimeObjects>
</Application>
\ No newline at end of file
using System;
using System.Diagnostics;
using System.Resources;
using System.Windows;
using System.Windows.Markup;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using NLuaTest.Resources;
namespace NLuaTest
{
public partial class App : Application
{
/// <summary>
/// Provides easy access to the root frame of the Phone Application.
/// </summary>
/// <returns>The root frame of the Phone Application.</returns>
public static PhoneApplicationFrame RootFrame { get; private set; }
/// <summary>
/// Constructor for the Application object.
/// </summary>
public App()
{
// Global handler for uncaught exceptions.
UnhandledException += Application_UnhandledException;
// Standard XAML initialization
// InitializeComponent();
// Phone-specific initialization
InitializePhoneApplication();
// Language display initialization
InitializeLanguage();
// Show graphics profiling information while debugging.
if (Debugger.IsAttached)
{
// Display the current frame rate counters.
Application.Current.Host.Settings.EnableFrameRateCounter = true;
// Show the areas of the app that are being redrawn in each frame.
//Application.Current.Host.Settings.EnableRedrawRegions = true;
// Enable non-production analysis visualization mode,
// which shows areas of a page that are handed off to GPU with a colored overlay.
//Application.Current.Host.Settings.EnableCacheVisualization = true;
// Prevent the screen from turning off while under the debugger by disabling
// the application's idle detection.
// Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run
// and consume battery power when the user is not using the phone.
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
}
}
// Code to execute when the application is launching (eg, from Start)
// This code will not execute when the application is reactivated
private void Application_Launching(object sender, LaunchingEventArgs e)
{
}
// Code to execute when the application is activated (brought to foreground)
// This code will not execute when the application is first launched
private void Application_Activated(object sender, ActivatedEventArgs e)
{
}
// Code to execute when the application is deactivated (sent to background)
// This code will not execute when the application is closing
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
}
// Code to execute when the application is closing (eg, user hit Back)
// This code will not execute when the application is deactivated
private void Application_Closing(object sender, ClosingEventArgs e)
{
}
// Code to execute if a navigation fails
private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
if (Debugger.IsAttached)
{
// A navigation has failed; break into the debugger
Debugger.Break();
}
}
// Code to execute on Unhandled Exceptions
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
{
if (Debugger.IsAttached)
{
// An unhandled exception has occurred; break into the debugger
Debugger.Break();
}
}
#region Phone application initialization
// Avoid double-initialization
private bool phoneApplicationInitialized = false;
// Do not add any additional code to this method
private void InitializePhoneApplication()
{
if (phoneApplicationInitialized)
return;
// Create the frame but don't set it as RootVisual yet; this allows the splash
// screen to remain active until the application is ready to render.
RootFrame = new PhoneApplicationFrame();
RootFrame.Navigated += CompleteInitializePhoneApplication;
// Handle navigation failures
RootFrame.NavigationFailed += RootFrame_NavigationFailed;
// Handle reset requests for clearing the backstack
RootFrame.Navigated += CheckForResetNavigation;
// Ensure we don't initialize again
phoneApplicationInitialized = true;
}
// Do not add any additional code to this method
private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
{
// Set the root visual to allow the application to render
if (RootVisual != RootFrame)
RootVisual = RootFrame;
// Remove this handler since it is no longer needed
RootFrame.Navigated -= CompleteInitializePhoneApplication;
}
private void CheckForResetNavigation(object sender, NavigationEventArgs e)
{
// If the app has received a 'reset' navigation, then we need to check
// on the next navigation to see if the page stack should be reset
if (e.NavigationMode == NavigationMode.Reset)
RootFrame.Navigated += ClearBackStackAfterReset;
}
private void ClearBackStackAfterReset(object sender, NavigationEventArgs e)
{
// Unregister the event so it doesn't get called again
RootFrame.Navigated -= ClearBackStackAfterReset;
// Only clear the stack for 'new' (forward) and 'refresh' navigations
if (e.NavigationMode != NavigationMode.New && e.NavigationMode != NavigationMode.Refresh)
return;
// For UI consistency, clear the entire page stack
while (RootFrame.RemoveBackEntry() != null)
{
; // do nothing
}
}
#endregion
// Initialize the app's font and flow direction as defined in its localized resource strings.
//
// To ensure that the font of your application is aligned with its supported languages and that the
// FlowDirection for each of those languages follows its traditional direction, ResourceLanguage
// and ResourceFlowDirection should be initialized in each resx file to match these values with that
// file's culture. For example:
//
// AppResources.es-ES.resx
// ResourceLanguage's value should be "es-ES"
// ResourceFlowDirection's value should be "LeftToRight"
//
// AppResources.ar-SA.resx
// ResourceLanguage's value should be "ar-SA"
// ResourceFlowDirection's value should be "RightToLeft"
//
// For more info on localizing Windows Phone apps see http://go.microsoft.com/fwlink/?LinkId=262072.
//
private void InitializeLanguage()
{
try
{
// Set the font to match the display language defined by the
// ResourceLanguage resource string for each supported language.
//
// Fall back to the font of the neutral language if the Display
// language of the phone is not supported.
//
// If a compiler error is hit then ResourceLanguage is missing from
// the resource file.
RootFrame.Language = XmlLanguage.GetLanguage(AppResources.ResourceLanguage);
// Set the FlowDirection of all elements under the root frame based
// on the ResourceFlowDirection resource string for each
// supported language.
//
// If a compiler error is hit then ResourceFlowDirection is missing from
// the resource file.
FlowDirection flow = (FlowDirection)Enum.Parse(typeof(FlowDirection), AppResources.ResourceFlowDirection);
RootFrame.FlowDirection = flow;
}
catch
{
// If an exception is caught here it is most likely due to either
// ResourceLangauge not being correctly set to a supported language
// code or ResourceFlowDirection is set to a value other than LeftToRight
// or RightToLeft.
if (Debugger.IsAttached)
{
Debugger.Break();
}
throw;
}
}
}
}
\ No newline at end of file
using NLuaTest.Resources;
namespace NLuaTest
{
/// <summary>
/// Provides access to string resources.
/// </summary>
public class LocalizedStrings
{
private static AppResources _localizedResources = new AppResources();
public AppResources LocalizedResources { get { return _localizedResources; } }
}
}
\ No newline at end of file
<phone:PhoneApplicationPage
x:Class="TestApp1.MainPage"
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: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}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True">
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- LOCALIZATION NOTE:
To localize the displayed strings copy their values to appropriately named
keys in the app's neutral language resource file (AppResources.resx) then
replace the hard-coded text value between the attributes' quotation marks
with the binding clause whose path points to that string name.
For example:
Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"
This binding points to the template's string resource named "ApplicationTitle".
Adding supported languages in the Project Properties tab will create a
new resx file per language that can carry the translated values of your
UI strings. The binding in these examples will cause the value of the
attributes to be drawn from the .resx file that matches the
CurrentUICulture of the app at run time.
-->
<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="TEST APP" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
<TextBlock Text="Unit Test" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<TextBlock x:Name="label" Text="Tests running" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
<!--Uncomment to see an alignment grid to help ensure your controls are
aligned on common boundaries. The image has a top margin of -32px to
account for the System Tray. Set this to 0 (or remove the margin altogether)
if the System Tray is hidden.
Before shipping remove this XAML and the image itself.-->
<!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" />-->
</Grid>
</phone:PhoneApplicationPage>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using NLuaTest.Resources;
using System.Threading;
using Microsoft.VisualStudio.TestPlatform.Core;
using vstest_executionengine_platformbridge;
using Microsoft.VisualStudio.TestPlatform.TestExecutor;
using System.Reflection;
namespace NLuaTest
{
public partial class MainPage : PhoneApplicationPage
{
// Constructor
public MainPage()
{
// InitializeComponent();
var wrapper = new TestExecutorServiceWrapper();
new Thread(new ServiceMain((param0, param1) => wrapper.SendMessage((ContractName)param0, param1)).Run).Start();
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0AF57940-43F8-492B-9684-0369259C990B}</ProjectGuid>
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NLuaTest</RootNamespace>
<AssemblyName>NLuaTest</AssemblyName>
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
<SilverlightApplication>true</SilverlightApplication>
<WPTestProject>true</WPTestProject>
<SupportedCultures>
</SupportedCultures>
<XapOutputs>true</XapOutputs>
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
<XapFilename>TestApp1_$(Configuration)_$(Platform).xap</XapFilename>
<SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
<SilverlightAppEntry>TestApp1.App</SilverlightAppEntry>
<ValidateXaml>false</ValidateXaml>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\x86\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\x86\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\ARM\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\ARM\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\NLuaTest\LoadFileTests.cs">
<Link>LoadFileTests.cs</Link>
</Compile>
<Compile Include="..\tests\Core.cs">
<Link>Core.cs</Link>
</Compile>
<Compile Include="..\tests\Entity.cs">
<Link>Entity.cs</Link>
</Compile>
<Compile Include="..\tests\LuaTests.cs">
<Link>LuaTests.cs</Link>
</Compile>
<Compile Include="..\tests\TestLua.cs">
<Link>TestLua.cs</Link>
</Compile>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="LocalizedStrings.cs" />
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Resources\AppResources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>AppResources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</ApplicationDefinition>
<Page Include="MainPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Content Include="..\tests\test.lua">
<Link>Resources\test.lua</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="Properties\AppManifest.xml" />
<None Include="Properties\WMAppManifest.xml">
<SubType>Designer</SubType>
</None>
<None Include="Resources\.git" />
</ItemGroup>
<ItemGroup>
<Content Include="Assets\AlignmentGrid.png" />
<Content Include="Assets\ApplicationIcon.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Tiles\FlipCycleTileLarge.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Tiles\FlipCycleTileMedium.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Tiles\FlipCycleTileSmall.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\AppResources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>AppResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\KeraLua\external\lua\wp8_build\lua\lua52\lua52.vcxproj">
<Project>{ABD36435-56AD-4940-B51A-10AEECA46C01}</Project>
<Name>lua52</Name>
</ProjectReference>
<ProjectReference Include="..\Core\KeraLua\src\WP8\KeraLua.WP8.csproj">
<Project>{2C343545-0778-49BB-9665-1FA656013466}</Project>
<Name>KeraLua.WP8</Name>
</ProjectReference>
<ProjectReference Include="..\Core\NLua\NLua.WP8.csproj">
<Project>{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}</Project>
<Name>NLua.WP8</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<SDKReference Include="MSTestFramework, Version=11.0">
<Name>MSTest for Managed Projects</Name>
</SDKReference>
<SDKReference Include="TestPlatform, Version=11.0">
<Name>Microsoft Visual Studio Windows Phone Test Core</Name>
</SDKReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ProjectExtensions />
</Project>
\ No newline at end of file
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Deployment.Parts>
</Deployment.Parts>
</Deployment>
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Resources;
// 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("NLuaTest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NLuaTest")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ba95d268-0e19-4bbc-a735-8a00795084d2")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
<?xml version="1.0" encoding="utf-8"?>
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2012/deployment" AppPlatformVersion="8.0">
<DefaultLanguage xmlns="" code="en-US"/>
<App xmlns="" ProductID="{0af57940-43f8-492b-9684-0369259c990b}" Title="TestApp1" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="TestApp1 author" Description="Sample description" Publisher="TestApp1" PublisherID="{6662bc62-7649-418b-a0ac-acc2f917ead4}">
<IconPath IsRelative="true" IsResource="false">Assets\ApplicationIcon.png</IconPath>
<Capabilities>
<Capability Name="ID_CAP_NETWORKING"/>
<Capability Name="ID_CAP_MEDIALIB_AUDIO"/>
<Capability Name="ID_CAP_MEDIALIB_PLAYBACK"/>
<Capability Name="ID_CAP_SENSORS"/>
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT"/>
</Capabilities>
<Tasks>
<DefaultTask Name ="_default" NavigationPage="MainPage.xaml"/>
</Tasks>
<Tokens>
<PrimaryToken TokenID="TestApp1Token" TaskName="_default">
<TemplateFlip>
<SmallImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileSmall.png</SmallImageURI>
<Count>0</Count>
<BackgroundImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileMedium.png</BackgroundImageURI>
<Title>TestApp1</Title>
<BackContent></BackContent>
<BackBackgroundImageURI></BackBackgroundImageURI>
<BackTitle></BackTitle>
<DeviceLockImageURI></DeviceLockImageURI>
<HasLarge></HasLarge>
</TemplateFlip>
</PrimaryToken>
</Tokens>
<ActivatableClasses>
<InProcessServer>
<Path>vstest_executionengine_platformbridge.dll</Path>
<ActivatableClass ActivatableClassId="vstest_executionengine_platformbridge.ServiceMain" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="vstest_executionengine_platformbridge.MessageTransmitter" ThreadingModel="both" />
<ActivatableClass ActivatableClassId="vstest_executionengine_platformbridge.NativeMethods" ThreadingModel="both" />
</InProcessServer>
</ActivatableClasses>
<ScreenResolutions>
<ScreenResolution Name="ID_RESOLUTION_WVGA"/>
<ScreenResolution Name="ID_RESOLUTION_WXGA"/>
<ScreenResolution Name="ID_RESOLUTION_HD720P"/>
</ScreenResolutions>
</App>
</Deployment>
\ No newline at end of file
Resources @ ec14ccfa
Subproject commit ec14ccfa5cc2f0cda6781029d145abc99f7a9728
using System;
using NUnit.Framework;
using NLua;
using NLuaTest.Mock;
#if WINDOWS_PHONE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using SetUp = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestInitializeAttribute;
using TearDown = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestCleanupAttribute;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#else
using NUnit.Framework;
#endif
#if MONOTOUCH
using MonoTouch.Foundation;
using MonoTouch;
......
using System;
using NUnit.Framework;
using NLua;
using NLua.Exceptions;
using System.IO;
using System.IO;
#if WINDOWS_PHONE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using SetUp = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestInitializeAttribute;
using TearDown = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestCleanupAttribute;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#else
using NUnit.Framework;
#endif
#if MONOTOUCH
using MonoTouch.Foundation;
......@@ -54,7 +63,6 @@ namespace NLuaTest
public void Bisect ()
{
TestLuaFile ("bisect");
Assert.True (true);
}
[Test]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment