예제 #1
0
        void AddLesson()
        {
            LessonDialog dialog = new LessonDialog(host.CurrentTheme);
            Lesson       lesson = dialog.CreateObject(this);

            if (lesson != null)
            {
                AddLessonNode(lesson);
                treeLessons.Nodes[0].Expand();
            }
        }
예제 #2
0
        void ButtonEditClick(object sender, EventArgs e)
        {
            Lesson lesson = CurrentLesson;

            if (lesson != null)
            {
                LessonDialog dialog = new LessonDialog(host.CurrentTheme);
                lesson = dialog.Edit(this, lesson);
                if (lesson != null)
                {
                    treeLessons.SelectedNode.Tag  = lesson;
                    treeLessons.SelectedNode.Text = lesson.Name;
                }
            }
        }