Skip to content

Commit

Permalink
Fixing bug that prevented app from closing when a survey or an
Browse files Browse the repository at this point in the history
instruction failed
  • Loading branch information
ishiikurisu committed Feb 8, 2017
1 parent 75bf928 commit f888062
Show file tree
Hide file tree
Showing 24 changed files with 84 additions and 4 deletions.
Binary file modified Scalemate/.vs/Scalemate/v14/.suo
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ C:\Users\cris\Documents\work\Lab\src\github.com\ishiikurisu\scalemate\Scalemate\
C:\Users\cris\Documents\work\Lab\src\github.com\ishiikurisu\scalemate\Scalemate\Scalemate\obj\Debug\Scalemate.csprojResolveAssemblyReference.cache
C:\Users\cris\Documents\work\Lab\src\github.com\ishiikurisu\scalemate\Scalemate\Scalemate\obj\Debug\Scalemate.dll
C:\Users\cris\Documents\work\Lab\src\github.com\ishiikurisu\scalemate\Scalemate\Scalemate\obj\Debug\Scalemate.pdb
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\Scalemate\bin\Debug\Scalemate.dll
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\Scalemate\bin\Debug\Scalemate.pdb
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\Scalemate\obj\Debug\Scalemate.csprojResolveAssemblyReference.cache
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\Scalemate\obj\Debug\Scalemate.dll
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\Scalemate\obj\Debug\Scalemate.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ C:\Users\cris\Documents\work\Lab\src\github.com\ishiikurisu\scalemate\Scalemate\
C:\Users\cris\Documents\work\Lab\src\github.com\ishiikurisu\scalemate\Scalemate\Scalemate\bin\Release\Scalemate.pdb
C:\Users\cris\Documents\work\Lab\src\github.com\ishiikurisu\scalemate\Scalemate\Scalemate\obj\Release\Scalemate.dll
C:\Users\cris\Documents\work\Lab\src\github.com\ishiikurisu\scalemate\Scalemate\Scalemate\obj\Release\Scalemate.pdb
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\Scalemate\bin\Release\Scalemate.dll
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\Scalemate\bin\Release\Scalemate.pdb
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\Scalemate\obj\Release\Scalemate.csprojResolveAssemblyReference.cache
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\Scalemate\obj\Release\Scalemate.dll
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\Scalemate\obj\Release\Scalemate.pdb
Binary file not shown.
1 change: 1 addition & 0 deletions Scalemate/ScalemateForms/View/FormData.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Scalemate/ScalemateForms/View/FormData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ namespace ScalemateForms.View
public partial class FormData : Form
{
public bool Ended { get; set; }
public bool Completed { get; set; }
public string[] Survey { get; private set; }

public FormData()
{
InitializeComponent();
WindowState = FormWindowState.Maximized;
Ended = false;
Completed = false;
}

private void buttonContinue_Click(object sender, EventArgs e)
Expand All @@ -25,6 +27,7 @@ private void buttonContinue_Click(object sender, EventArgs e)
if (everythingAnswered)
{
Ended = true;
Completed = true;
Survey = answers.ToArray<string>();
}
else
Expand Down
1 change: 1 addition & 0 deletions Scalemate/ScalemateForms/View/FormInstructions.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Scalemate/ScalemateForms/View/FormInstructions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace ScalemateForms.View
public partial class FormInstructions : Form
{
public bool Ended = false;
public bool Completed = false;

public FormInstructions()
{
Expand All @@ -28,6 +29,7 @@ public void SetInstructions(string instructions)
private void button1_Click(object sender, EventArgs e)
{
this.Ended = true;
this.Completed = true;
}
}
}
16 changes: 14 additions & 2 deletions Scalemate/ScalemateForms/View/FormInventory.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Scalemate/ScalemateForms/View/FormInventory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ private void buttonContinue_Click(object sender, EventArgs e)
// Update form
if (Mate.Ended)
{
Mate.CalculateResults();
ShowResults();
}
else
Expand Down
18 changes: 16 additions & 2 deletions Scalemate/ScalemateForms/View/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,22 @@ private async void buttonStart_Click(object sender, EventArgs e)
FormInventory form = new FormInventory(mate);
form.Mother = this;

await form.CollectInformation();
await form.Instruct();
// Conduct survey
bool ok = await form.CollectInformation();
if (!ok)
{
form.Close();
return;
}

// Instructing
ok = await form.Instruct();
if (!ok)
{
form.Close();
return;
}

form.Start();
}

Expand Down
1 change: 1 addition & 0 deletions Scalemate/ScalemateForms/View/FormResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public FormResult(Tester mate)

private void buttonFinish_Click(object sender, EventArgs e)
{
Mother.Show();
this.Close();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
procast checkme 40 Procrastinator
eqwrt 321 ç adsf qwre 987 8 asdf qwer
0 0 4 4 0 4 0 4 0 0 4 0 4 4 4 0 0 4 0 4
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,19 @@ C:\Users\cris\Documents\work\Lab\src\github.com\ishiikurisu\scalemate\Scalemate\
C:\Users\cris\Documents\work\Lab\src\github.com\ishiikurisu\scalemate\Scalemate\ScalemateForms\obj\Debug\ScalemateForms.Properties.Resources.resources
C:\Users\cris\Documents\work\Lab\src\github.com\ishiikurisu\scalemate\Scalemate\ScalemateForms\obj\Debug\ScalemateForms.exe
C:\Users\cris\Documents\work\Lab\src\github.com\ishiikurisu\scalemate\Scalemate\ScalemateForms\obj\Debug\ScalemateForms.pdb
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\bin\Debug\ScalemateForms.exe.config
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\bin\Debug\ScalemateForms.exe
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\bin\Debug\ScalemateForms.pdb
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\bin\Debug\Scalemate.dll
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\bin\Debug\Scalemate.pdb
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Debug\ScalemateForms.csprojResolveAssemblyReference.cache
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Debug\ScalemateForms.View.FormInventory.resources
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Debug\ScalemateForms.View.FormMain.resources
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Debug\ScalemateForms.View.FormData.resources
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Debug\ScalemateForms.View.FormInstructions.resources
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Debug\ScalemateForms.Properties.Resources.resources
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Debug\ScalemateForms.View.FormPreferences.resources
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Debug\ScalemateForms.View.FormResult.resources
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Debug\ScalemateForms.csproj.GenerateResource.Cache
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Debug\ScalemateForms.exe
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Debug\ScalemateForms.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,19 @@ C:\Users\cris\Documents\work\Lab\src\github.com\ishiikurisu\scalemate\Scalemate\
C:\Users\cris\Documents\work\Lab\src\github.com\ishiikurisu\scalemate\Scalemate\ScalemateForms\obj\Release\ScalemateForms.csproj.GenerateResource.Cache
C:\Users\cris\Documents\work\Lab\src\github.com\ishiikurisu\scalemate\Scalemate\ScalemateForms\obj\Release\ScalemateForms.exe
C:\Users\cris\Documents\work\Lab\src\github.com\ishiikurisu\scalemate\Scalemate\ScalemateForms\obj\Release\ScalemateForms.pdb
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\bin\Release\ScalemateForms.exe.config
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\bin\Release\ScalemateForms.exe
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\bin\Release\ScalemateForms.pdb
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\bin\Release\Scalemate.dll
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\bin\Release\Scalemate.pdb
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Release\ScalemateForms.csprojResolveAssemblyReference.cache
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Release\ScalemateForms.View.FormInventory.resources
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Release\ScalemateForms.View.FormMain.resources
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Release\ScalemateForms.View.FormData.resources
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Release\ScalemateForms.View.FormInstructions.resources
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Release\ScalemateForms.Properties.Resources.resources
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Release\ScalemateForms.View.FormPreferences.resources
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Release\ScalemateForms.View.FormResult.resources
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Release\ScalemateForms.csproj.GenerateResource.Cache
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Release\ScalemateForms.exe
C:\Users\neuro\Documents\Lab\src\github.com\ishiikurisu\Scalemate\Scalemate\ScalemateForms\obj\Release\ScalemateForms.pdb
Binary file not shown.
Binary file not shown.

0 comments on commit f888062

Please sign in to comment.