Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
hauerCodes committed Dec 13, 2014
1 parent 411d270 commit ff018a9
Show file tree
Hide file tree
Showing 143 changed files with 39,119 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ namespace NumberRecognizer.App.Common
public class NavigationHelper : DependencyObject
{
private Page Page { get; set; }

private Frame Frame { get { return this.Page.Frame; } }

/// <summary>
Expand Down
13 changes: 9 additions & 4 deletions NumberRecognizer/NumberRecognizer.App/Control/InkCanvasRT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public InkCanvasRT()
this.BackgroundColor = Colors.White;
this.Background = new SolidColorBrush(this.BackgroundColor);
this.Margin = new Thickness() { Bottom = 2, Left = 2, Right = 2, Top = 2 };
this.StrokeThickness = 4.0;
this.StrokeThickness = 2.0;
this.PointerPressed += this.InkCanvasRT_PointerPressed;
this.PointerReleased += this.InkCanvasRT_PointerReleased;
this.PointerExited += this.InkCanvasRT_PointerReleased;
Expand Down Expand Up @@ -177,19 +177,24 @@ private void InkCanvasRT_PointerMoved(object sender, PointerRoutedEventArgs e)

if (Distance(this.previousContactPoint, this.currentContactPoint) > this.StrokeThickness)
{
Polyline polyLine = new Polyline()
Line line = new Line()
{
Points = { this.previousContactPoint, this.currentContactPoint },
X1 = this.previousContactPoint.X,
Y1 = this.previousContactPoint.Y,
X2 = this.currentContactPoint.X,
Y2 = this.currentContactPoint.Y,
StrokeThickness = this.StrokeThickness,
Stroke = new SolidColorBrush(this.ForegroundColor)
};

this.previousContactPoint = this.currentContactPoint;
this.Children.Add(polyLine);
this.Children.Add(line);
}

this.inkManager.ProcessPointerUpdate(pointerPoint);
}

e.Handled = true;
}

/// <summary>
Expand Down
23 changes: 18 additions & 5 deletions NumberRecognizer/NumberRecognizer.App/NumberRecognizer.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@
<Compile Include="View\GroupedNetworksPage.xaml.cs">
<DependentUpon>GroupedNetworksPage.xaml</DependentUpon>
</Compile>
<Compile Include="View\RecognizePage.xaml.cs">
<DependentUpon>RecognizePage.xaml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
Expand Down Expand Up @@ -206,16 +209,22 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="View\RecognizePage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Reference Include="GalaSoft.MvvmLight">
<HintPath>..\packages\MvvmLightLibs.5.0.2.0\lib\netcore451\GalaSoft.MvvmLight.dll</HintPath>
<HintPath>..\packages\Portable.MvvmLightLibs.5.0.2.0\lib\netcore451\GalaSoft.MvvmLight.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight.Extras">
<HintPath>..\packages\MvvmLightLibs.5.0.2.0\lib\netcore451\GalaSoft.MvvmLight.Extras.dll</HintPath>
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.0.2.32242, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Portable.MvvmLightLibs.5.0.2.0\lib\netcore451\GalaSoft.MvvmLight.Extras.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight.Platform">
<HintPath>..\packages\MvvmLightLibs.5.0.2.0\lib\netcore451\GalaSoft.MvvmLight.Platform.dll</HintPath>
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.0.2.32241, Culture=neutral, PublicKeyToken=7a953f43091b5a17, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Portable.MvvmLightLibs.5.0.2.0\lib\netcore451\GalaSoft.MvvmLight.Platform.dll</HintPath>
</Reference>
<Reference Include="Microsoft.ApplicationInsights">
<HintPath>..\packages\Microsoft.ApplicationInsights.0.12.0-build17386\lib\portable-win81+wpa81\Microsoft.ApplicationInsights.winmd</HintPath>
Expand All @@ -229,6 +238,10 @@
<Reference Include="Microsoft.Practices.ServiceLocation">
<HintPath>..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
</Reference>
<Reference Include="Mutzl.MvvmLight">
<HintPath>..\packages\Mutzl.Mvvm.DependentRelayCommand.0.9.5.0\lib\Mutzl.MvvmLight.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<WCFMetadataStorage Include="Service References\NumberRecognizerService\" />
Expand Down
21 changes: 20 additions & 1 deletion NumberRecognizer/NumberRecognizer.App/Style/AppStyle.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,24 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:NumberRecognizer.App.Style">

<Style x:Key="CustomHeaderTextBlockStyle" BasedOn="{StaticResource BaseTextBlockStyle}" TargetType="TextBlock">
<Setter Property="FontSize" Value="56"/>
<Setter Property="FontWeight" Value="Light"/>
<Setter Property="LineHeight" Value="40"/>
<Setter Property="Foreground" Value="Orange" />
<Setter Property="IsHitTestVisible" Value="false" />
<Setter Property="TextWrapping" Value="NoWrap" />
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="Margin" Value="0,0,30,40" />
</Style>
<Style x:Key="CustomTextBlockStyle" BasedOn="{StaticResource BaseTextBlockStyle}" TargetType="TextBlock">
<Setter Property="FontSize" Value="26.667"/>
<Setter Property="FontWeight" Value="Light"/>
<Setter Property="LineHeight" Value="30"/>
<Setter Property="Foreground" Value="Orange" />
<Setter Property="IsHitTestVisible" Value="false" />
<Setter Property="TextWrapping" Value="NoWrap" />
<Setter Property="VerticalAlignment" Value="Bottom" />
</Style>

</ResourceDictionary>
127 changes: 73 additions & 54 deletions NumberRecognizer/NumberRecognizer.App/View/CreateNetworkPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
mc:Ignorable="d">

<Page.Resources>
<!-- TODO: Delete this line if the key AppName is declared in App.xaml -->
<x:String x:Key="PageName">Phone Number Recognition: Create Network</x:String>
<x:Double x:Key="StrokeThickness">6.0</x:Double>
<x:Double x:Key="StrokeThickness">4.0</x:Double>
<x:Double x:Key="FontSize">40.0</x:Double>
<x:Double x:Key="InkHeight">100</x:Double>
</Page.Resources>

<!--
Expand Down Expand Up @@ -47,57 +46,77 @@
AutomationProperties.Name="Back"
AutomationProperties.AutomationId="BackButton"
AutomationProperties.ItemType="Navigation Button"/>
<TextBlock x:Name="pageTitle" Text="{StaticResource PageName}" Foreground="OrangeRed" Style="{StaticResource HeaderTextBlockStyle}" Grid.Column="1"
IsHitTestVisible="false" TextWrapping="NoWrap" VerticalAlignment="Bottom" Margin="0,0,30,40"/>
<Button Grid.Column="2" x:Name="nextButton" Margin="39,59,39,0" Style="{StaticResource NavigationBackButtonNormalStyle}" RenderTransformOrigin="0.5,0.5" Click="NextButton_Click">
<Button.RenderTransform>
<CompositeTransform Rotation="180"/>
</Button.RenderTransform>
</Button>
</Grid>
<Grid Grid.Row="1" Margin="100,50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="50"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="Description:&#42;" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBox Grid.Row="0" Grid.Column="1" Name="NameTextBox" FontSize="{StaticResource FontSize}"/>
<TextBlock Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="1" Text="Please write some Network Training Data Numbers on each Canvas." Style="{StaticResource SubheaderTextBlockStyle}" Foreground="OrangeRed" VerticalAlignment="Center"/>
<TextBlock Grid.Row="2" Grid.Column="0" Text="0" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="2" Grid.Column="1" x:Name="InkCanvasRT0" StrokeThickness="{StaticResource StrokeThickness}"/>
<TextBlock Grid.Row="3" Grid.Column="0" Text="1" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="3" Grid.Column="1" x:Name="InkCanvasRT1" StrokeThickness="{StaticResource StrokeThickness}"/>
<TextBlock Grid.Row="4" Grid.Column="0" Text="2" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="4" Grid.Column="1" x:Name="InkCanvasRT2" StrokeThickness="{StaticResource StrokeThickness}"/>
<TextBlock Grid.Row="5" Grid.Column="0" Text="3" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="5" Grid.Column="1" x:Name="InkCanvasRT3" StrokeThickness="{StaticResource StrokeThickness}"/>
<TextBlock Grid.Row="6" Grid.Column="0" Text="4" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="6" Grid.Column="1" x:Name="InkCanvasRT4" StrokeThickness="{StaticResource StrokeThickness}"/>
<TextBlock Grid.Row="7" Grid.Column="0" Text="5" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="7" Grid.Column="1" x:Name="InkCanvasRT5" StrokeThickness="{StaticResource StrokeThickness}"/>
<TextBlock Grid.Row="8" Grid.Column="0" Text="6" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="8" Grid.Column="1" x:Name="InkCanvasRT6" StrokeThickness="{StaticResource StrokeThickness}"/>
<TextBlock Grid.Row="9" Grid.Column="0" Text="7" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="9" Grid.Column="1" x:Name="InkCanvasRT7" StrokeThickness="{StaticResource StrokeThickness}"/>
<TextBlock Grid.Row="10" Grid.Column="0" Text="8" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="10" Grid.Column="1" x:Name="InkCanvasRT8" StrokeThickness="{StaticResource StrokeThickness}"/>
<TextBlock Grid.Row="11" Grid.Column="0" Text="9" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="11" Grid.Column="1" x:Name="InkCanvasRT9" StrokeThickness="{StaticResource StrokeThickness}"/>
<StackPanel Grid.Column="1" Orientation="Horizontal" >
<TextBlock x:Name="pageTitle" Text="{StaticResource AppName}" Style="{StaticResource CustomHeaderTextBlockStyle}" />
<TextBlock x:Name="pageSubTitle" Text=" - Create Network" Foreground="OrangeRed" Style="{StaticResource CustomHeaderTextBlockStyle}" />
</StackPanel>
</Grid>
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Visible">
<Grid Grid.Row="1" Margin="100,50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="Description:&#42;" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBox Grid.Row="0" Grid.Column="1" Name="NameTextBox" FontSize="{StaticResource FontSize}"/>
<TextBlock Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="1" Text="Please write some Network Training Data Numbers on each Canvas."
Style="{StaticResource CustomTextBlockStyle}" Margin="0, 10"
Foreground="OrangeRed" VerticalAlignment="Center"/>
<TextBlock Grid.Row="2" Grid.Column="0" Text="0" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="2" Grid.Column="1" x:Name="InkCanvasRT0"
StrokeThickness="{StaticResource StrokeThickness}"
Height="{StaticResource InkHeight}" Margin="0,10" />
<TextBlock Grid.Row="3" Grid.Column="0" Text="1" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="3" Grid.Column="1" x:Name="InkCanvasRT1"
StrokeThickness="{StaticResource StrokeThickness}"
Height="{StaticResource InkHeight}" Margin="0,10"/>
<TextBlock Grid.Row="4" Grid.Column="0" Text="2" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="4" Grid.Column="1" x:Name="InkCanvasRT2"
StrokeThickness="{StaticResource StrokeThickness}"
Height="{StaticResource InkHeight}" Margin="0,10"/>
<TextBlock Grid.Row="5" Grid.Column="0" Text="3" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="5" Grid.Column="1" x:Name="InkCanvasRT3"
StrokeThickness="{StaticResource StrokeThickness}"
Height="{StaticResource InkHeight}" Margin="0,10"/>
<TextBlock Grid.Row="6" Grid.Column="0" Text="4" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="6" Grid.Column="1" x:Name="InkCanvasRT4"
StrokeThickness="{StaticResource StrokeThickness}"
Height="{StaticResource InkHeight}" Margin="0,10"/>
<TextBlock Grid.Row="7" Grid.Column="0" Text="5" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="7" Grid.Column="1" x:Name="InkCanvasRT5"
StrokeThickness="{StaticResource StrokeThickness}"
Height="{StaticResource InkHeight}" Margin="0,10"/>
<TextBlock Grid.Row="8" Grid.Column="0" Text="6" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="8" Grid.Column="1" x:Name="InkCanvasRT6"
StrokeThickness="{StaticResource StrokeThickness}"
Height="{StaticResource InkHeight}" Margin="0,10"/>
<TextBlock Grid.Row="9" Grid.Column="0" Text="7" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="9" Grid.Column="1" x:Name="InkCanvasRT7"
StrokeThickness="{StaticResource StrokeThickness}"
Height="{StaticResource InkHeight}" Margin="0,10"/>
<TextBlock Grid.Row="10" Grid.Column="0" Text="8" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="10" Grid.Column="1" x:Name="InkCanvasRT8"
StrokeThickness="{StaticResource StrokeThickness}"
Height="{StaticResource InkHeight}" Margin="0,10"/>
<TextBlock Grid.Row="11" Grid.Column="0" Text="9" Style="{StaticResource SubheaderTextBlockStyle}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<control:InkCanvasRT Grid.Row="11" Grid.Column="1" x:Name="InkCanvasRT9"
StrokeThickness="{StaticResource StrokeThickness}"
Height="{StaticResource InkHeight}" Margin="0,10"/>
</Grid>
</ScrollViewer>
</Grid>
</Page>
Loading

0 comments on commit ff018a9

Please sign in to comment.