コード例 #1
0
ファイル: MainForm.cs プロジェクト: kristofberge/Classroom
        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;
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: kristofberge/Classroom
 private void bDistHeight_Click(object sender, EventArgs e)
 {
     ResetClassroom();
     GetValues();
     // Define the distributor as a StudentDistributorHeight
     studDist = new StudentDistributorHeight(classRoomRows, classRoomColumns);
     PrepareClassroom();
 }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: kristofberge/Classroom
        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();
        }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: kristofberge/Classroom
 private void BDistGrade_Click(object sender, EventArgs e)
 {
     ResetClassroom();
     GetValues();
     studDist = new StudentDistributorGrade(classRoomRows, classRoomColumns);
     PrepareClassroom();
 }