private void button1_Click(object sender, EventArgs e) { if (!editing) { string classroomname = textBox1.Text; bool projector = checkBox1.Checked; Classroom newClassroom = new Classroom(classroomname, projector, new List <Computer>()); MainProgram.rooms.Add(newClassroom); } else { currentClassroom.Classroomname = textBox1.Text; currentClassroom.Projectoravailable = checkBox1.Checked; } ClassroomsForm owner = (ClassroomsForm)this.Owner; owner.updateGrid(); this.Close(); }
static void opt7() { ClassroomsForm frm = new ClassroomsForm(); Application.Run(frm); }