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

Pointing Task #27

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
8 changes: 8 additions & 0 deletions Apps/Pointing_Task/App2/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Application
x:Class="Pointing_Task.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Pointing_Task"
RequestedTheme="Light">

</Application>
100 changes: 100 additions & 0 deletions Apps/Pointing_Task/App2/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

namespace Pointing_Task
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
sealed partial class App : Application
{
/// <summary>
/// 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>
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
}

/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
Frame rootFrame = Window.Current.Content as Frame;

// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();

rootFrame.NavigationFailed += OnNavigationFailed;

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

// Place the frame in the current Window
Window.Current.Content = rootFrame;
}

if (e.PrelaunchActivated == false)
{
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();
}
}

/// <summary>
/// Invoked when Navigation to a certain page fails
/// </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)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}

/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory still intact.
/// </summary>
/// <param name="sender">The source of the suspend request.</param>
/// <param name="e">Details about the suspend request.</param>
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
//TODO: Save application state and stop any background activity
deferral.Complete();
}
}
}
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Apps/Pointing_Task/App2/Assets/StoreLogo.png
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.
33 changes: 33 additions & 0 deletions Apps/Pointing_Task/App2/MainPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<Page
x:Class="Pointing_Task.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Pointing_Task"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:gaze="using:Microsoft.Toolkit.Uwp.Input.GazeInteraction"
gaze:GazeInput.Interaction="Enabled"
mc:Ignorable="d">

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<!--<Grid.RowDefinitions>
<RowDefinition Height="619*"/>
<RowDefinition Height="381*"/>
</Grid.RowDefinitions>-->
<Button x:Name="StartButton" Content="Click Me" HorizontalAlignment="Left" Margin="673,565,0,0" VerticalAlignment="Top" RenderTransformOrigin="2.712,3.755" Height="96" UseLayoutRounding="False" Width="170" d:LayoutRounding="Auto" Click="StartButton_Click" Grid.RowSpan="2">
<Button.RenderTransform>
<CompositeTransform Rotation="0"/>
</Button.RenderTransform>
</Button>
<Button x:Name="button1" Content="X" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top" Height="100" Width="100" RenderTransformOrigin="1,1" FontSize="50" Foreground="White" Background="Black" Click="Button5_Click"></Button>
<Button x:Name="button2" Content="" HorizontalAlignment="Left" VerticalAlignment="Top" Width="100" RenderTransformOrigin="2.167,2.724" Height="100" Background="#FF0068FF" Foreground="#330068FF" Margin="559,109,0,0" Click="Button5_Click" AllowDrop="True"/>
<Button x:Name="button3" Content="" HorizontalAlignment="Left" VerticalAlignment="Top" Height="100" Width="100" RenderTransformOrigin="2.167,2.724" Background="#FF0068FF" Foreground="#330068FF" Margin="843,158,0,0" Click="Button5_Click"/>
<Button x:Name="button4" Content="" HorizontalAlignment="Left" Margin="642,310,0,0" VerticalAlignment="Top" Height="100" Width="100" RenderTransformOrigin="2.167,2.724" Background="#FF0068FF" Foreground="#330068FF" Click="Button5_Click"/>
<Button x:Name="button5" Content="" HorizontalAlignment="Left" Margin="818,234,0,0" VerticalAlignment="Top" Height="100" Width="100" RenderTransformOrigin="2.167,2.724" Click="Button5_Click" Background="#FF0068FF" Foreground="Black"/>
<Button x:Name="button6" Content="" HorizontalAlignment="Left" Margin="818,234,0,0" VerticalAlignment="Top" Height="100" Width="100" RenderTransformOrigin="2.167,2.724" Click="Button5_Click" Background="#FF0068FF" Foreground="Black"/>
<Button x:Name="button7" Content="" HorizontalAlignment="Left" Margin="818,234,0,0" VerticalAlignment="Top" Height="100" Width="100" RenderTransformOrigin="2.167,2.724" Click="Button5_Click" Background="#FF0068FF" Foreground="Black"/>
<Button x:Name="button8" Content="" HorizontalAlignment="Left" Margin="818,234,0,0" VerticalAlignment="Top" Height="100" Width="100" RenderTransformOrigin="2.167,2.724" Click="Button5_Click" Background="#FF0068FF" Foreground="Black"/>
<Button x:Name="centerButton" Content="" HorizontalAlignment="Left" Margin="818,234,0,0" VerticalAlignment="Top" Height="150" Width="150" RenderTransformOrigin="2.167,2.724" Click="Button5_Click" Background="#FF0068FF" Foreground="Black"/>

</Grid>
</Page>
Loading