Ejemplo n.º 1
0
        private void InitAssgnCheckedListBox(string curveName)
        {
            CheckedListBoxAssignments.Items.Clear();

            Curve         curve        = _schoolClass.curves[_schoolClass.CurveExists(curveName)];
            List <string> assgnsInCats = new List <string>();

            foreach (int index in curve.appliedCatIndexes)
            {
                Assignment[] tempAssgns = _schoolClass.GetAssgnsInCat(index);
                foreach (Assignment assgn in tempAssgns)
                {
                    assgnsInCats.Add(assgn.name);
                }
            }
            foreach (string assgnName in assgnsInCats)
            {
                CheckedListBoxAssignments.Items.Add(assgnName);
                CheckedListBoxAssignments.SetItemChecked(CheckedListBoxAssignments.Items.IndexOf(assgnName),
                                                         curve.appliedAssgnNames.Contains(assgnName));
            }
        }