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,7 +899,9 @@ 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)
|
||||||
|
{
|
||||||
|
DialogResult answer = MessageBox.Show(NB.Translate("N_MarkAsSolvedDone"), NB.Translate("_Solved"), MessageBoxButtons.YesNo);
|
||||||
|
|
||||||
if (answer == DialogResult.Yes)
|
if (answer == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
@ -907,6 +910,19 @@ namespace EduNetworkBuilder
|
|||||||
LBW.ShowDialog();
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void KillAllExtraWindows(bool EvenRTF=false)
|
void KillAllExtraWindows(bool EvenRTF=false)
|
||||||
{
|
{
|
||||||
|
@ -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