Skip to content

Commit

Permalink
Merge pull request #1 from adityaoberai/hackmit-update
Browse files Browse the repository at this point in the history
Merged HackMIT work in 'master' branch
  • Loading branch information
adityaoberai authored Sep 21, 2020
2 parents 3dcd1b5 + 84a2c40 commit cc1a13d
Show file tree
Hide file tree
Showing 30 changed files with 784 additions and 289 deletions.
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

3 changes: 3 additions & 0 deletions CodeCapture/CodeCapture.Android/CodeCapture.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.10</Version>
</PackageReference>
<PackageReference Include="Twilio">
<Version>5.47.0</Version>
</PackageReference>
<PackageReference Include="Xam.Plugin.Media">
<Version>5.0.1</Version>
</PackageReference>
Expand Down
9 changes: 9 additions & 0 deletions CodeCapture/CodeCapture.UWP/CodeCapture.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,15 @@
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="NETStandard.Library">
<Version>2.0.3</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.3</Version>
</PackageReference>
<PackageReference Include="Twilio">
<Version>5.47.0</Version>
</PackageReference>
<PackageReference Include="Xam.Plugin.Media">
<Version>5.0.1</Version>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion CodeCapture/CodeCapture.UWP/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
IgnorableNamespaces="uap mp">

<Identity
Name="d95a89e8-ef73-4fb8-86a1-99b637d5b896"
Name="HackMIT2020-CodeCapture"
Publisher="CN=66047c87-bfde-4ba3-abee-151d086e9d7e"
Version="1.0.0.0" />

Expand Down
9 changes: 9 additions & 0 deletions CodeCapture/CodeCapture.iOS/CodeCapture.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,15 @@
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.10</Version>
</PackageReference>
<PackageReference Include="NETStandard.Library">
<Version>2.0.3</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
<Version>12.0.3</Version>
</PackageReference>
<PackageReference Include="Twilio">
<Version>5.47.0</Version>
</PackageReference>
<PackageReference Include="Xam.Plugin.Media">
<Version>5.0.1</Version>
</PackageReference>
Expand Down
43 changes: 43 additions & 0 deletions CodeCapture/CodeCapture/AboutUs.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="CodeCapture.AboutUs">
<ContentPage.Content>
<Grid>
<Label
Text="About CodeCapture"
HorizontalOptions="CenterAndExpand"
FontSize="Title"
Grid.Row="0"
Grid.ColumnSpan="7"/>

<Image
Source="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cd/CodeCapture-Banner-JPG.jpg/1024px-CodeCapture-Banner-JPG.jpg"
Grid.Row="1"
Grid.RowSpan="3"
Grid.Column="0"
Grid.ColumnSpan="7"/>

<Label
x:Name="aboutUs"
Text=""
Grid.Row="4"
Grid.RowSpan="4"
Grid.Column="1"
Grid.ColumnSpan="5"/>

<Button
x:Name="returnButton"
Text="Return"
Clicked="returnButton_Clicked"
BackgroundColor="MediumAquamarine"
BorderColor="Black"
BorderWidth="1.5"
HorizontalOptions="FillAndExpand"
VerticalOptions="CenterAndExpand"
Grid.Row="8"
Grid.Column="2"
Grid.ColumnSpan="3"/>
</Grid>
</ContentPage.Content>
</ContentPage>
29 changes: 29 additions & 0 deletions CodeCapture/CodeCapture/AboutUs.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

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

namespace CodeCapture
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class AboutUs : ContentPage
{
public string description;
public AboutUs()
{
InitializeComponent();

description = "\nCodeCapture is a cross-platform app that aims to assist remote learning experiences in Computer Science for students without computers by taking code from paper to mobile. CodeCapture has the functionality to extract code (C++, Java, JavaScript, or Python) from images of handwritten text and then allow the user to edit, compile, and share the result via email/SMS.\n\nWe also have various lessons on C++ (more languages coming soon) to assist with students' Computer Science education especially in times like these, where the COVID-19 pandemic and the enforced lockdown have kept students away from school.";
aboutUs.Text = description;
}

private async void returnButton_Clicked(object sender, EventArgs e)
{
await Navigation.PopModalAsync();
}
}
}
3 changes: 1 addition & 2 deletions CodeCapture/CodeCapture/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Plugin.Media;
using System;
using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;

Expand Down
20 changes: 18 additions & 2 deletions CodeCapture/CodeCapture/CodeCapture.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.10" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Twilio" Version="5.47.0" />
<PackageReference Include="Xam.Plugin.Media" Version="5.0.1" />
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1364" />
<PackageReference Include="Xamarin.Essentials" Version="1.5.3.2" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="CompileCode.xaml">
<EmbeddedResource Update="AboutUs.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="EmailResult.xaml">
<EmbeddedResource Update="CompileCode.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="ExtractText.xaml">
Expand All @@ -33,5 +34,20 @@
<EmbeddedResource Update="ImageCapture.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="LessonMenu.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="LessonView.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="PracticeView.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<None Update="PracticeView.xaml">
<Generator>MSBuild:Compile</Generator>
</None>
</ItemGroup>
</Project>
70 changes: 52 additions & 18 deletions CodeCapture/CodeCapture/CompileCode.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,62 +5,96 @@
<ContentPage.Content>
<Grid>
<Label
Text="Output of Code"
Text="Output Of Code"
HorizontalOptions="CenterAndExpand"
FontSize="Title"
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="7"/>
Grid.ColumnSpan="8"/>

<Editor
x:Name="editor"
Text="Waiting For Output From Compiler..."
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
Grid.Row="1"
Grid.RowSpan="6"
Grid.RowSpan="3"
Grid.Column="1"
Grid.ColumnSpan="6"/>

<Button
x:Name="returnButton"
Text="Return"
Text="Return To Editor"
BackgroundColor="MediumAquamarine"
BorderColor="Black"
BorderWidth="1.5"
Clicked="returnButton_Clicked"
HorizontalOptions="FillAndExpand"
Grid.Row="7"
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.ColumnSpan="3"
Margin="10,0,0,10"/>

<Button
x:Name="captureNewImageButton"
Text="Capture New Image"
x:Name="menuButton"
Text="Return To Lessons Menu"
BackgroundColor="MediumAquamarine"
BorderColor="Black"
BorderWidth="1.5"
Clicked="captureNewImageButton_Clicked"
Clicked="menuButton_Clicked"
HorizontalOptions="FillAndExpand"
Grid.Row="7"
Grid.Column="3"
Grid.ColumnSpan="2"
Margin="0,0,0,10"/>
Grid.Column="5"
Grid.ColumnSpan="3"
Margin="0,0,10,10"/>

<Button
x:Name="emailButton"
Text="Email Result"
x:Name="shareButton"
Text="Email/SMS Result"
BackgroundColor="#7F0DFF00"
BorderColor="Black"
BorderWidth="1.5"
Clicked="emailButton_Clicked"
Clicked="shareButton_Clicked"
VerticalOptions="EndAndExpand"
HorizontalOptions="FillAndExpand"
Grid.Row="7"
Grid.Column="6"
Grid.ColumnSpan="2"
Margin="0,0,10,10"/>
Grid.Row="6"
Grid.RowSpan="1"
Grid.Column="2"
Grid.ColumnSpan="4"
Margin="0,0,0,30"/>

<Label
Text="Share Your Result"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"
FontSize="Title"
Grid.Row="4"
Grid.Column="0"
Grid.ColumnSpan="8"/>

<Editor
x:Name="emailID"
Placeholder="Your Email Address (e.g. [email protected])"
Text=""
VerticalOptions="EndAndExpand"
HorizontalOptions="StartAndExpand"
Grid.Row="5"
Grid.RowSpan="1"
Grid.Column="0"
Grid.ColumnSpan="4"
Margin="10,0,0,15"/>

<Editor
x:Name="phoneNumber"
Placeholder="Your Phone Number (e.g. +919123456789)"
Text=""
VerticalOptions="EndAndExpand"
HorizontalOptions="StartAndExpand"
Grid.Row="5"
Grid.RowSpan="1"
Grid.Column="4"
Grid.ColumnSpan="4"
Margin="0,0,10,15"/>
</Grid>
</ContentPage.Content>
</ContentPage>
Loading

0 comments on commit cc1a13d

Please sign in to comment.