Finish the save
This commit is contained in:
parent
f49705ec11
commit
e13341010b
@ -839,7 +839,6 @@ namespace EduNetworkBuilder
|
||||
|
||||
Dictionary<string, bool> Response = NB.CheckPromptBox(HWList, "Homework to include", Properties.Resources.NBIco);
|
||||
if (Response == null) return; //if we canceled out
|
||||
|
||||
//Add each homework to a list
|
||||
List<SchoolworkClass> HWClassList = new List<SchoolworkClass>();
|
||||
int index = 0;
|
||||
@ -852,9 +851,9 @@ namespace EduNetworkBuilder
|
||||
}
|
||||
index++;
|
||||
}
|
||||
if (HWClassList.Count == 0) return; //none selected.
|
||||
|
||||
OpenFileDialog mydialog = new OpenFileDialog();
|
||||
mydialog.AddExtension = true;
|
||||
//If we have a user loaded, we can open homework files
|
||||
string filter = "EduNetworkBuilder Homework File (*.enbh)|*.enbh;";
|
||||
mydialog.Filter = filter;
|
||||
@ -862,11 +861,12 @@ namespace EduNetworkBuilder
|
||||
mydialog.ShowHelp = true;
|
||||
mydialog.CheckFileExists = true;
|
||||
mydialog.CheckPathExists = true;
|
||||
mydialog.AddExtension = true;
|
||||
DialogResult result = mydialog.ShowDialog();
|
||||
if (result == System.Windows.Forms.DialogResult.Cancel) return; //Choose a file
|
||||
|
||||
//save that list in that file
|
||||
|
||||
|
||||
SchoolworkClass.Save(HWClassList, mydialog.FileName);
|
||||
}
|
||||
|
||||
private void btnReadAllStudentHomework_Click(object sender, EventArgs e)
|
||||
|
Loading…
Reference in New Issue
Block a user