private void addProblemToolStripMenuItem_Click(object sender, EventArgs e) { FPSListBinder.Add(new FPSItem { Title = "New problem", TimeLimit = 1, TimeLimitUnit = "s", MemoryLimit = 256, MemoryLimitUnit = "mb", TestInput = new string[0], TestOutput = new string[0], Solutions = new FPSItemSolution[0], Images = new FPSItemImage[0], SpecialJudge = new FPSItemSpecialJudge[0] }); }
private void AddFPSFile(string xmlFilePath) { FPSItem[] fpsItems; try { fpsItems = new FPSParser().ParseFile(xmlFilePath); } catch { MessageBox.Show("Parse error!\r\n" + xmlFilePath); return; } foreach (FPSItem fpsItem in fpsItems) { FPSListBinder.Add(fpsItem); } }