protected virtual void OnAddActionActivated(object sender, System.EventArgs e) { var lesson = new LessonNode (0, "New Lesson"); var dlg = new EditLessonDialog (); dlg.Id = lesson.Id; dlg.Description = lesson.Description; if (dlg.Run () == (int)ResponseType.Ok) { lesson.Id = dlg.Id; lesson.Description = dlg.Description; nodeview3.NodeStore.AddNode (lesson); } dlg.Destroy (); }
protected virtual void OnAddActionActivated(object sender, System.EventArgs e) { var lesson = new LessonNode(0, "New Lesson"); var dlg = new EditLessonDialog(); dlg.Id = lesson.Id; dlg.Description = lesson.Description; if (dlg.Run() == (int)ResponseType.Ok) { lesson.Id = dlg.Id; lesson.Description = dlg.Description; nodeview3.NodeStore.AddNode(lesson); } dlg.Destroy(); }