Pop up a "submit homework" button when the homework has been completed.
This commit is contained in:
parent
042d66e7c9
commit
c905a5a952
@ -120,6 +120,7 @@ namespace EduNetworkBuilder
|
|||||||
dest.PuzzleName = source.PuzzleName;
|
dest.PuzzleName = source.PuzzleName;
|
||||||
dest.NetMessage = new LanguageStrings(source.NetMessage);
|
dest.NetMessage = new LanguageStrings(source.NetMessage);
|
||||||
dest.WhatFrom = source.WhatFrom; //We remember the schoolwork class we came from.
|
dest.WhatFrom = source.WhatFrom; //We remember the schoolwork class we came from.
|
||||||
|
dest.PuzzleIsSolved = source.PuzzleIsSolved;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Network Clone()
|
public Network Clone()
|
||||||
@ -898,13 +899,28 @@ namespace EduNetworkBuilder
|
|||||||
//kill all extra windows that no longer need to be open.
|
//kill all extra windows that no longer need to be open.
|
||||||
KillAllExtraWindows();
|
KillAllExtraWindows();
|
||||||
|
|
||||||
DialogResult answer = MessageBox.Show(NB.Translate("N_MarkAsSolvedDone"),NB.Translate("_Solved"),MessageBoxButtons.YesNo);
|
if (WhatFrom == null)
|
||||||
|
|
||||||
if (answer == DialogResult.Yes)
|
|
||||||
{
|
{
|
||||||
KillAllExtraWindows(true);
|
DialogResult answer = MessageBox.Show(NB.Translate("N_MarkAsSolvedDone"), NB.Translate("_Solved"), MessageBoxButtons.YesNo);
|
||||||
ListBoxWindow LBW = new ListBoxWindow();
|
|
||||||
LBW.ShowDialog();
|
if (answer == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
KillAllExtraWindows(true);
|
||||||
|
ListBoxWindow LBW = new ListBoxWindow();
|
||||||
|
LBW.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//It was homework. Ask if we want to submit it.
|
||||||
|
DialogResult answer = MessageBox.Show(NB.Translate("N_PromptToSubmit"), NB.Translate("_Solved"), MessageBoxButtons.YesNo);
|
||||||
|
|
||||||
|
if (answer == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
KillAllExtraWindows(true);
|
||||||
|
BuilderWindow BW = NB.GetBuilderWin();
|
||||||
|
BW.SubmitHomework();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2034,7 +2034,7 @@ namespace EduNetworkBuilder
|
|||||||
UpdateMenu();
|
UpdateMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SubmitHomework()
|
public void SubmitHomework()
|
||||||
{
|
{
|
||||||
if (myNetwork.WhatFrom == null) return; //We cannot submit it
|
if (myNetwork.WhatFrom == null) return; //We cannot submit it
|
||||||
|
|
||||||
|
@ -1881,4 +1881,8 @@
|
|||||||
<value>Name already exists.</value>
|
<value>Name already exists.</value>
|
||||||
<comment>PC_HWHasName = Name already exists.</comment>
|
<comment>PC_HWHasName = Name already exists.</comment>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="N_PromptToSubmit" xml:space="preserve">
|
||||||
|
<value>You have completed the homework. Would you like to submit it? If you want to clean it up and submit later, click No. Go to "Edit" -> "Submit" when you want to submit it.</value>
|
||||||
|
<comment>N_PromptToSubmit = You have completed the homework. Would you like to submit it? If you want to clean it up and submit later, click No. Go to "Edit" -> "Submit" when you want to submit it.</comment>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
Loading…
Reference in New Issue
Block a user