예제 #1
0
        void scheduleEdit_Click(object sender, EventArgs e)
        {
            GroupSchedule schedule = lvGroupSchedules.SelectedItems[0].Tag as GroupSchedule;

            using (GroupScheduleForm form = new GroupScheduleForm(schedule))
            {
                Hide();

                DialogResult result = form.ShowDialog();
                if (result == System.Windows.Forms.DialogResult.OK)
                {
                    HasSchedulesChanges = true;
                    lvGroupSchedules.SelectedItems[0].Text             = schedule.Name;
                    lvGroupSchedules.SelectedItems[0].SubItems[1].Text = schedule.ToString();
                }

                Show();
            }
        }
예제 #2
0
        void scheduleNew_Click(object sender, EventArgs e)
        {
            GroupSchedule schedule = new GroupSchedule(currentGroup.ID, "", true);

            using (GroupScheduleForm form = new GroupScheduleForm(schedule))
            {
                Hide();

                DialogResult result = form.ShowDialog();
                if (result == System.Windows.Forms.DialogResult.OK)
                {
                    HasSchedulesChanges = true;
                    ListViewItem item = new ListViewItem(new string[] { schedule.Name, schedule.ToString() });
                    item.Tag = schedule;
                    lvGroupSchedules.Items.Add(item);
                }

                Show();
            }
        }
예제 #3
0
 public string GetScheduleInfo(GroupSchedule groupSchedule)
 {
     return(groupSchedule.ToString());
 }