Skip to content

Commit cc1a13d

Browse files
authored
Merge pull request #1 from adityaoberai/hackmit-update
Merged HackMIT work in 'master' branch
2 parents 3dcd1b5 + 84a2c40 commit cc1a13d

30 files changed

+784
-289
lines changed

.gitattributes

Lines changed: 0 additions & 2 deletions
This file was deleted.

CodeCapture/CodeCapture.Android/CodeCapture.Android.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
6262
<Version>6.2.10</Version>
6363
</PackageReference>
64+
<PackageReference Include="Twilio">
65+
<Version>5.47.0</Version>
66+
</PackageReference>
6467
<PackageReference Include="Xam.Plugin.Media">
6568
<Version>5.0.1</Version>
6669
</PackageReference>

CodeCapture/CodeCapture.UWP/CodeCapture.UWP.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,15 @@
143143
</Page>
144144
</ItemGroup>
145145
<ItemGroup>
146+
<PackageReference Include="NETStandard.Library">
147+
<Version>2.0.3</Version>
148+
</PackageReference>
149+
<PackageReference Include="Newtonsoft.Json">
150+
<Version>12.0.3</Version>
151+
</PackageReference>
152+
<PackageReference Include="Twilio">
153+
<Version>5.47.0</Version>
154+
</PackageReference>
146155
<PackageReference Include="Xam.Plugin.Media">
147156
<Version>5.0.1</Version>
148157
</PackageReference>

CodeCapture/CodeCapture.UWP/Package.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
IgnorableNamespaces="uap mp">
88

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

CodeCapture/CodeCapture.iOS/CodeCapture.iOS.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,15 @@
127127
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
128128
<Version>6.2.10</Version>
129129
</PackageReference>
130+
<PackageReference Include="NETStandard.Library">
131+
<Version>2.0.3</Version>
132+
</PackageReference>
133+
<PackageReference Include="Newtonsoft.Json">
134+
<Version>12.0.3</Version>
135+
</PackageReference>
136+
<PackageReference Include="Twilio">
137+
<Version>5.47.0</Version>
138+
</PackageReference>
130139
<PackageReference Include="Xam.Plugin.Media">
131140
<Version>5.0.1</Version>
132141
</PackageReference>

CodeCapture/CodeCapture/AboutUs.xaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4+
x:Class="CodeCapture.AboutUs">
5+
<ContentPage.Content>
6+
<Grid>
7+
<Label
8+
Text="About CodeCapture"
9+
HorizontalOptions="CenterAndExpand"
10+
FontSize="Title"
11+
Grid.Row="0"
12+
Grid.ColumnSpan="7"/>
13+
14+
<Image
15+
Source="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cd/CodeCapture-Banner-JPG.jpg/1024px-CodeCapture-Banner-JPG.jpg"
16+
Grid.Row="1"
17+
Grid.RowSpan="3"
18+
Grid.Column="0"
19+
Grid.ColumnSpan="7"/>
20+
21+
<Label
22+
x:Name="aboutUs"
23+
Text=""
24+
Grid.Row="4"
25+
Grid.RowSpan="4"
26+
Grid.Column="1"
27+
Grid.ColumnSpan="5"/>
28+
29+
<Button
30+
x:Name="returnButton"
31+
Text="Return"
32+
Clicked="returnButton_Clicked"
33+
BackgroundColor="MediumAquamarine"
34+
BorderColor="Black"
35+
BorderWidth="1.5"
36+
HorizontalOptions="FillAndExpand"
37+
VerticalOptions="CenterAndExpand"
38+
Grid.Row="8"
39+
Grid.Column="2"
40+
Grid.ColumnSpan="3"/>
41+
</Grid>
42+
</ContentPage.Content>
43+
</ContentPage>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
using Xamarin.Forms;
8+
using Xamarin.Forms.Xaml;
9+
10+
namespace CodeCapture
11+
{
12+
[XamlCompilation(XamlCompilationOptions.Compile)]
13+
public partial class AboutUs : ContentPage
14+
{
15+
public string description;
16+
public AboutUs()
17+
{
18+
InitializeComponent();
19+
20+
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.";
21+
aboutUs.Text = description;
22+
}
23+
24+
private async void returnButton_Clicked(object sender, EventArgs e)
25+
{
26+
await Navigation.PopModalAsync();
27+
}
28+
}
29+
}

CodeCapture/CodeCapture/App.xaml.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using Plugin.Media;
2-
using System;
1+
using System;
32
using Xamarin.Forms;
43
using Xamarin.Forms.Xaml;
54

CodeCapture/CodeCapture/CodeCapture.csproj

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@
1515
<ItemGroup>
1616
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.10" />
1717
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
18+
<PackageReference Include="Twilio" Version="5.47.0" />
1819
<PackageReference Include="Xam.Plugin.Media" Version="5.0.1" />
1920
<PackageReference Include="Xamarin.Forms" Version="4.8.0.1364" />
2021
<PackageReference Include="Xamarin.Essentials" Version="1.5.3.2" />
2122
</ItemGroup>
2223

2324
<ItemGroup>
24-
<EmbeddedResource Update="CompileCode.xaml">
25+
<EmbeddedResource Update="AboutUs.xaml">
2526
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
2627
</EmbeddedResource>
27-
<EmbeddedResource Update="EmailResult.xaml">
28+
<EmbeddedResource Update="CompileCode.xaml">
2829
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
2930
</EmbeddedResource>
3031
<EmbeddedResource Update="ExtractText.xaml">
@@ -33,5 +34,20 @@
3334
<EmbeddedResource Update="ImageCapture.xaml">
3435
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
3536
</EmbeddedResource>
37+
<EmbeddedResource Update="LessonMenu.xaml">
38+
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
39+
</EmbeddedResource>
40+
<EmbeddedResource Update="LessonView.xaml">
41+
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
42+
</EmbeddedResource>
43+
<EmbeddedResource Update="PracticeView.xaml">
44+
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
45+
</EmbeddedResource>
46+
</ItemGroup>
47+
48+
<ItemGroup>
49+
<None Update="PracticeView.xaml">
50+
<Generator>MSBuild:Compile</Generator>
51+
</None>
3652
</ItemGroup>
3753
</Project>

CodeCapture/CodeCapture/CompileCode.xaml

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,62 +5,96 @@
55
<ContentPage.Content>
66
<Grid>
77
<Label
8-
Text="Output of Code"
8+
Text="Output Of Code"
99
HorizontalOptions="CenterAndExpand"
1010
FontSize="Title"
1111
Grid.Row="0"
1212
Grid.Column="0"
13-
Grid.ColumnSpan="7"/>
13+
Grid.ColumnSpan="8"/>
1414

1515
<Editor
1616
x:Name="editor"
1717
Text="Waiting For Output From Compiler..."
1818
HorizontalOptions="FillAndExpand"
1919
VerticalOptions="FillAndExpand"
2020
Grid.Row="1"
21-
Grid.RowSpan="6"
21+
Grid.RowSpan="3"
2222
Grid.Column="1"
2323
Grid.ColumnSpan="6"/>
2424

2525
<Button
2626
x:Name="returnButton"
27-
Text="Return"
27+
Text="Return To Editor"
2828
BackgroundColor="MediumAquamarine"
2929
BorderColor="Black"
3030
BorderWidth="1.5"
3131
Clicked="returnButton_Clicked"
3232
HorizontalOptions="FillAndExpand"
3333
Grid.Row="7"
3434
Grid.Column="0"
35-
Grid.ColumnSpan="2"
35+
Grid.ColumnSpan="3"
3636
Margin="10,0,0,10"/>
3737

3838
<Button
39-
x:Name="captureNewImageButton"
40-
Text="Capture New Image"
39+
x:Name="menuButton"
40+
Text="Return To Lessons Menu"
4141
BackgroundColor="MediumAquamarine"
4242
BorderColor="Black"
4343
BorderWidth="1.5"
44-
Clicked="captureNewImageButton_Clicked"
44+
Clicked="menuButton_Clicked"
4545
HorizontalOptions="FillAndExpand"
4646
Grid.Row="7"
47-
Grid.Column="3"
48-
Grid.ColumnSpan="2"
49-
Margin="0,0,0,10"/>
47+
Grid.Column="5"
48+
Grid.ColumnSpan="3"
49+
Margin="0,0,10,10"/>
5050

5151
<Button
52-
x:Name="emailButton"
53-
Text="Email Result"
52+
x:Name="shareButton"
53+
Text="Email/SMS Result"
5454
BackgroundColor="#7F0DFF00"
5555
BorderColor="Black"
5656
BorderWidth="1.5"
57-
Clicked="emailButton_Clicked"
57+
Clicked="shareButton_Clicked"
58+
VerticalOptions="EndAndExpand"
5859
HorizontalOptions="FillAndExpand"
59-
Grid.Row="7"
60-
Grid.Column="6"
61-
Grid.ColumnSpan="2"
62-
Margin="0,0,10,10"/>
60+
Grid.Row="6"
61+
Grid.RowSpan="1"
62+
Grid.Column="2"
63+
Grid.ColumnSpan="4"
64+
Margin="0,0,0,30"/>
65+
66+
<Label
67+
Text="Share Your Result"
68+
HorizontalOptions="CenterAndExpand"
69+
VerticalOptions="CenterAndExpand"
70+
FontSize="Title"
71+
Grid.Row="4"
72+
Grid.Column="0"
73+
Grid.ColumnSpan="8"/>
74+
75+
<Editor
76+
x:Name="emailID"
77+
Placeholder="Your Email Address (e.g. [email protected])"
78+
Text=""
79+
VerticalOptions="EndAndExpand"
80+
HorizontalOptions="StartAndExpand"
81+
Grid.Row="5"
82+
Grid.RowSpan="1"
83+
Grid.Column="0"
84+
Grid.ColumnSpan="4"
85+
Margin="10,0,0,15"/>
6386

87+
<Editor
88+
x:Name="phoneNumber"
89+
Placeholder="Your Phone Number (e.g. +919123456789)"
90+
Text=""
91+
VerticalOptions="EndAndExpand"
92+
HorizontalOptions="StartAndExpand"
93+
Grid.Row="5"
94+
Grid.RowSpan="1"
95+
Grid.Column="4"
96+
Grid.ColumnSpan="4"
97+
Margin="0,0,10,15"/>
6498
</Grid>
6599
</ContentPage.Content>
66100
</ContentPage>

0 commit comments

Comments
 (0)