Skip to content
Closed
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
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</PropertyGroup>

<PropertyGroup>
<SignAssembly Condition="'$(SignAssembly)' == '' and '$(IsUwpProject)' != 'true'" >true</SignAssembly>
<SignAssembly Condition="'$(SignAssembly)' == '' and '$(IsUwpProject)' != 'true' and '$(IsTestSampleProject)' != 'true'" >true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)toolkit.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

Expand Down
13 changes: 8 additions & 5 deletions GazeInputTest/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Microsoft.Toolkit.Uwp.Input.GazeInteraction;
using System;
using Microsoft.Toolkit.Uwp.Input.GazeInteraction;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;
Expand All @@ -15,9 +15,10 @@ namespace GazeInputTest
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
sealed partial class App : Application
public sealed partial class App : Application
{
/// <summary>
/// Initializes a new instance of the <see cref="App"/> class.
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
Expand Down Expand Up @@ -47,7 +48,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)

if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
// TODO: Load state from previously suspended application
}

// Place the frame in the current Window
Expand All @@ -63,6 +64,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
// parameter
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}

// Ensure the current window is active
Window.Current.Activate();
}
Expand All @@ -75,7 +77,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
/// </summary>
/// <param name="sender">The Frame which failed navigation</param>
/// <param name="e">Details about the navigation failure</param>
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
private void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}
Expand All @@ -90,7 +92,8 @@ void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
//TODO: Save application state and stop any background activity

// TODO: Save application state and stop any background activity
deferral.Complete();
}
}
Expand Down
3 changes: 3 additions & 0 deletions GazeInputTest/GazeInputTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.9</Version>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers">
<Version>1.0.2</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.Toolkit.UWP.Input.GazeInteraction\Microsoft.Toolkit.Uwp.Input.GazeInteraction.vcxproj">
Expand Down
14 changes: 7 additions & 7 deletions GazeInputTest/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Microsoft.Toolkit.Uwp.Input.GazeInteraction;
using System;
using Microsoft.Toolkit.Uwp.Input.GazeInteraction;
using Windows.ApplicationModel.Core;
using Windows.UI.Core;
using Windows.UI.ViewManagement;
Expand Down Expand Up @@ -50,18 +50,18 @@ private void ShowCursor_Toggle(object sender, RoutedEventArgs e)
}
}

int clickCount;
private int _clickCount;

private void OnLegacyInvoked(object sender, RoutedEventArgs e)
{
clickCount++;
HowButton.Content = string.Format("{0}: Legacy click", clickCount);
_clickCount++;
HowButton.Content = string.Format("{0}: Legacy click", _clickCount);
}

private void OnGazeInvoked(object sender, DwellInvokedRoutedEventArgs e)
{
clickCount++;
HowButton.Content = string.Format("{0}: Accessible click", clickCount);
_clickCount++;
HowButton.Content = string.Format("{0}: Accessible click", _clickCount);
e.Handled = true;
}

Expand All @@ -71,13 +71,13 @@ private void OnInvokeProgress(object sender, DwellProgressEventArgs e)
{
ProgressShow.Value = 100.0 * e.Progress;
}

ProgressShow.IsIndeterminate = e.State == DwellProgressState.Complete;
e.Handled = true;
}

private async void SpawnClicked(object sender, RoutedEventArgs e)
{

var newView = CoreApplication.CreateNewView();
var newViewId = 0;

Expand Down
23 changes: 23 additions & 0 deletions UnitTests/Helpers/TestCollectionCapableDeepLinkParser.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using Microsoft.Toolkit.Uwp.Helpers;

namespace UnitTests
{
internal class TestCollectionCapableDeepLinkParser : CollectionFormingDeepLinkParser
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors", Justification = "Call stack reviewed.")]
public TestCollectionCapableDeepLinkParser(string uri)
: base(uri)
{
}

public TestCollectionCapableDeepLinkParser(Uri uri)
: base(uri)
{
}
}
}
20 changes: 3 additions & 17 deletions UnitTests/Helpers/TestDeepLinkParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using Microsoft.Toolkit.Uwp.Helpers;

namespace UnitTests
{
using System;
using Microsoft.Toolkit.Uwp.Helpers;

internal class TestDeepLinkParser : DeepLinkParser
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors", Justification = "Call stack reviewed.")]
Expand All @@ -20,18 +20,4 @@ public TestDeepLinkParser(Uri uri)
{
}
}

internal class TestCollectionCapableDeepLinkParser : CollectionFormingDeepLinkParser
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors", Justification = "Call stack reviewed.")]
public TestCollectionCapableDeepLinkParser(string uri)
: base(uri)
{
}

public TestCollectionCapableDeepLinkParser(Uri uri)
: base(uri)
{
}
}
}
1 change: 1 addition & 0 deletions UnitTests/Properties/UnitTestApp.rd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<Assembly Name="*Application*" Dynamic="Required All" />
<!-- Add your application specific runtime directives here. -->

<Type Name="Windows.UI.Xaml.Controls.Page" Serialize="Required All" />

</Application>
</Directives>
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@

<IsPackable>false</IsPackable>

<NoWarn>;CS8002</NoWarn>

</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="MSTest.TestAdapter" Version="1.2.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<UnitTestPlatformVersion Condition="'$(UnitTestPlatformVersion)' == ''">$(VisualStudioVersion)</UnitTestPlatformVersion>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
</PropertyGroup>
<Target Name="Pack">
</Target>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
Expand All @@ -34,7 +36,7 @@
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoWarn>;2008;CS8002</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
Expand All @@ -58,7 +60,7 @@
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoWarn>;2008;CS8002</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
Expand All @@ -82,7 +84,7 @@
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoWarn>;2008;CS8002</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
Expand All @@ -109,7 +111,7 @@
<OutputPath>bin\ARM64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoWarn>;2008;CS8002</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<UnitTestPlatformVersion Condition="'$(UnitTestPlatformVersion)' == ''">$(VisualStudioVersion)</UnitTestPlatformVersion>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
</PropertyGroup>
<Target Name="Pack">
</Target>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
Expand All @@ -34,7 +36,7 @@
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS;WINRT</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoWarn>;2008;CS8002</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
Expand All @@ -58,7 +60,7 @@
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP;WINRT</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoWarn>;2008;CS8002</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
Expand All @@ -82,7 +84,7 @@
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP;WINRT</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoWarn>;2008;CS8002</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
Expand All @@ -109,7 +111,7 @@
<OutputPath>bin\ARM64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP;WINRT</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<NoWarn>;2008;CS8002</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
Expand All @@ -125,10 +127,10 @@
<Version>6.2.9</Version>
</PackageReference>
<PackageReference Include="MSTest.TestAdapter">
<Version>1.2.0</Version>
<Version>2.1.0</Version>
</PackageReference>
<PackageReference Include="MSTest.TestFramework">
<Version>1.2.0</Version>
<Version>2.1.0</Version>
</PackageReference>
<PackageReference Include="System.Xml.ReaderWriter">
<Version>4.3.0</Version>
Expand Down
10 changes: 8 additions & 2 deletions UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<UnitTestPlatformVersion Condition="'$(UnitTestPlatformVersion)' == ''">$(VisualStudioVersion)</UnitTestPlatformVersion>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
</PropertyGroup>
<Target Name="Pack">
</Target>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
Expand Down Expand Up @@ -105,10 +107,13 @@
<Version>6.2.9</Version>
</PackageReference>
<PackageReference Include="MSTest.TestAdapter">
<Version>1.2.0</Version>
<Version>2.1.0</Version>
</PackageReference>
<PackageReference Include="MSTest.TestFramework">
<Version>1.2.0</Version>
<Version>2.1.0</Version>
</PackageReference>
<PackageReference Include="System.Xml.XPath.XmlDocument">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Xml.XPath.XmlDocument">
<Version>4.3.0</Version>
Expand All @@ -129,6 +134,7 @@
<Compile Include="Extensions\Test_ArrayExtensions.cs" />
<Compile Include="Extensions\Test_NullableBoolMarkupExtension.cs" />
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="Helpers\TestCollectionCapableDeepLinkParser.cs" />
<Compile Include="Helpers\TestDeepLinkParser.cs" />
<Compile Include="Helpers\Test_AdvancedCollectionView.cs" />
<Compile Include="Helpers\Test_BackgroundTaskHelper.cs" />
Expand Down
5 changes: 4 additions & 1 deletion Windows Community Toolkit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ Global
{A139968E-AD78-4E8C-93B8-9A5523BCAC89}.Native|x64.ActiveCfg = Release|x64
{A139968E-AD78-4E8C-93B8-9A5523BCAC89}.Native|x86.ActiveCfg = Release|x86
{A139968E-AD78-4E8C-93B8-9A5523BCAC89}.Release|Any CPU.ActiveCfg = Release|x86
{A139968E-AD78-4E8C-93B8-9A5523BCAC89}.Release|Any CPU.Build.0 = Release|x86
{A139968E-AD78-4E8C-93B8-9A5523BCAC89}.Release|ARM.ActiveCfg = Release|ARM
{A139968E-AD78-4E8C-93B8-9A5523BCAC89}.Release|ARM.Build.0 = Release|ARM
{A139968E-AD78-4E8C-93B8-9A5523BCAC89}.Release|ARM.Deploy.0 = Release|ARM
Expand Down Expand Up @@ -349,6 +350,7 @@ Global
{BAB1CAF4-C400-4A7F-A987-C576DE63CFFD}.Native|x64.ActiveCfg = Release|x64
{BAB1CAF4-C400-4A7F-A987-C576DE63CFFD}.Native|x86.ActiveCfg = Release|x86
{BAB1CAF4-C400-4A7F-A987-C576DE63CFFD}.Release|Any CPU.ActiveCfg = Release|x86
{BAB1CAF4-C400-4A7F-A987-C576DE63CFFD}.Release|Any CPU.Build.0 = Release|x86
{BAB1CAF4-C400-4A7F-A987-C576DE63CFFD}.Release|ARM.ActiveCfg = Release|ARM
{BAB1CAF4-C400-4A7F-A987-C576DE63CFFD}.Release|ARM.Build.0 = Release|ARM
{BAB1CAF4-C400-4A7F-A987-C576DE63CFFD}.Release|ARM.Deploy.0 = Release|ARM
Expand Down Expand Up @@ -526,6 +528,7 @@ Global
{94994424-5F60-4CD8-ABA2-101779066208}.Native|x64.ActiveCfg = Release|Any CPU
{94994424-5F60-4CD8-ABA2-101779066208}.Native|x86.ActiveCfg = Release|Any CPU
{94994424-5F60-4CD8-ABA2-101779066208}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94994424-5F60-4CD8-ABA2-101779066208}.Release|Any CPU.Build.0 = Release|Any CPU
{94994424-5F60-4CD8-ABA2-101779066208}.Release|ARM.ActiveCfg = Release|Any CPU
{94994424-5F60-4CD8-ABA2-101779066208}.Release|ARM.Build.0 = Release|Any CPU
{94994424-5F60-4CD8-ABA2-101779066208}.Release|ARM64.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -554,6 +557,7 @@ Global
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Native|x64.ActiveCfg = Release|x64
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Native|x86.ActiveCfg = Release|x86
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Release|Any CPU.ActiveCfg = Release|x86
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Release|Any CPU.Build.0 = Release|x86
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Release|ARM.ActiveCfg = Release|ARM
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Release|ARM.Build.0 = Release|ARM
{EFA96B3C-857E-4659-B942-6BEF7719F4CA}.Release|ARM.Deploy.0 = Release|ARM
Expand Down Expand Up @@ -790,7 +794,6 @@ Global
{75F9EE44-3EFA-47BC-AEDD-351B9834A0AF}.Native|x64.ActiveCfg = Debug|Any CPU
{75F9EE44-3EFA-47BC-AEDD-351B9834A0AF}.Native|x64.Build.0 = Debug|Any CPU
{75F9EE44-3EFA-47BC-AEDD-351B9834A0AF}.Native|x86.ActiveCfg = Debug|Any CPU
{75F9EE44-3EFA-47BC-AEDD-351B9834A0AF}.Native|x86.Build.0 = Debug|Any CPU
{75F9EE44-3EFA-47BC-AEDD-351B9834A0AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{75F9EE44-3EFA-47BC-AEDD-351B9834A0AF}.Release|Any CPU.Build.0 = Release|Any CPU
{75F9EE44-3EFA-47BC-AEDD-351B9834A0AF}.Release|ARM.ActiveCfg = Release|Any CPU
Expand Down
Loading