public void SaveScheduleAs(string name)
        {
            var schedule = Activator.CreateInstance <TSchedule>();

            schedule.Context = Context;
            ActiveSchedule.CloneData(schedule);
            SchedulesContainer.Schedules.Add(schedule);
            schedule.Add(Context);
            schedule.Save();

            ActiveSchedule.Name = name;
            ActiveSchedule.Settings.EditMode = ScheduleEditMode.Regular;
            ActiveSchedule.Save();

            ScheduleNameChanged?.Invoke(this, EventArgs.Empty);
        }
Пример #2
0
 public static void Postfix(ScheduleScreenEntry __instance)
 {
     ScheduleNameChanged?.Invoke(__instance.schedule);
 }