private void ResetData() { // Clear all the data (except classes List) and empty the textfields. classroom = null; studDist = null; students = null; amountOfStudents = 0; classRoomRows = 0; classRoomColumns = 0; txtAmountOfStudents.Text = ""; txtColumns.Text = ""; txtMaxSwaps.Text = ""; txtMinHeight.Text = ""; txtRows.Text = ""; cmbClasses.Text = ""; lblSelectedClass.Text = SELECTEDLABEL_DEFAULT; cmbClasses.Select(); lblXmlSelected.Text = LBLSELECTEDXML_DEFAULT; }
private void bDistHeight_Click(object sender, EventArgs e) { ResetClassroom(); GetValues(); // Define the distributor as a StudentDistributorHeight studDist = new StudentDistributorHeight(classRoomRows, classRoomColumns); PrepareClassroom(); }
private void bDistSmart_Click(object sender, EventArgs e) { ResetClassroom(); GetValues(); GetExtraValues(); // We need to get the values from the fields on the left as well. // Define the distributor as a StudentDistributorSmart studDist = new StudentDistributorSmart(classRoomRows, classRoomColumns, MaxSwaps, MinHeightDifference); PrepareClassroom(); }
private void BDistGrade_Click(object sender, EventArgs e) { ResetClassroom(); GetValues(); studDist = new StudentDistributorGrade(classRoomRows, classRoomColumns); PrepareClassroom(); }