public static CourseSelect GetForm2() { if (courseSelect.IsDisposed) { courseSelect = new CourseSelect(); } return(courseSelect); }
private void ShowSelectCourse(Label label) { CourseSelect courseSelect = CourseSelect.GetForm2(); if (!courseSelect.Visible) { Point newPoint = new Point(MousePosition.X + 10, MousePosition.Y + 10); courseSelect.OutLabel = label; courseSelect.Location = newPoint; courseSelect.Show(this); } }