public Data dataProgram { get; set; } // The data to save and load public Form1() { InitializeComponent(); this.RightToLeftLayout = true; checkedLessonsFromCourses = new List<Lesson>(); PanelCoursesList.WIDTH_WINDOWS = panelMain.Width; PanelCoursesList.HEIGHT_WINDOWS = panelMain.Height; form_Import = new FormImport(this); lbl_NameUser.SendToBack(); Data dataRef = new Data(); dataProgram = dataRef.LoadData(); updateDateFromSavement(); // setup at first home page schedule enablePanel(btn_home); panel_Scheduler = new PanelSchedule(this); panel_CourseList_cards = new PanelCoursesList(this, importCourses); panel_CourseList_array = new PanelCoursesListBackup(importCourses); panel_savements = new PanelSavements(this); updateDateFromSavement(); if (newCheckingCoursesDone) { if (checkedCourses == null) checkedCourses = new LessonList(); panel_Scheduler.setNewList(checkedCourses); panel_Scheduler.ClickRightsRadioButtonsByLessonsSelected(checkedLessonsFromCourses); newCheckingCoursesDone = false; } pnl_schedule = panel_Scheduler.getPanel(); panelMain.Controls.Add(pnl_schedule); Bunifu.Framework.UI.BunifuFlatButton ext = btn_exit_out; iconExitRed = new Bitmap(Schedule.Properties.Resources.ShutdownRed, btn_exit_out.Iconimage.Size.Width, btn_exit_out.Iconimage.Size.Height); iconExitWhite = new Bitmap(Schedule.Properties.Resources.shutdown, btn_exit_out.Iconimage.Size.Width, btn_exit_out.Iconimage.Size.Height); ImportNewDataFromFile = false; newCheckingCoursesDone = false; }
public CourseCard(PanelSchedule panelSchedule, LessonList course, int x, int y) { if (course == null) { return; } lessons = course; lessons.sortBy("type", true); locationCard = new Point(x, y); id = amount; lessonSelected = new Lesson[3]; int len = course[0].courseName.Length > 20 ? 20 : course[0].courseName.Length; this.panelSchedule = panelSchedule; init_card(amount); init_title(course[0].courseName.Substring(0, len)); init_toggle(); init_lessons(); amount++; }