Example #1
0
 //Utility function for adding items to the comparelists.  Adding all of these at the same time ensures that our index is the same for
 //all sublists in the PlanCompareLists class object for a given comparison item.
 public void AddPlanCompItem(PlanCompareLists theList, int dataType, string dataTag, double P1_numData, string P1_stringData, double P2_numData, string P2_stringData, string cbName, double thePassThreshold)
 {
     theList.dataInfo.Add(new CLDataInfo(dataType, dataTag));
     theList.plan1List.Add(new CompareListItem(P1_numData, P1_stringData));
     theList.plan2List.Add(new CompareListItem(P2_numData, P2_stringData));
     //passingThreshold should be set to -1 for comparison items that are not using a passing threshold
     theList.resultList.Add(new ResultsItems(cbName, thePassThreshold));
     theList.count = theList.count + 1;
 }
Example #2
0
 //Find the compare lists index for a particulare plan data, by the stored dataTag in the dataInfo list.
 public int GetCompareListIndexByTag(PlanCompareLists aPlanCompareListsObj, string aDataTag)
 {
     for (int i = 0; i < aPlanCompareListsObj.count; i++)
     {
         if (aPlanCompareListsObj.dataInfo[i].dataTag == aDataTag)
         {
             return(i);
         }
     }
     return(-1);
 }
Example #3
0
        //Constructor
        public DataManager()
        {
            theCourses[0] = null;
            theCourses[1] = null;
            theCourses[2] = null;

            thePlans[0] = null;
            thePlans[1] = null;
            thePlans[2] = null;

            planCompLists[0] = null;
            planCompLists[1] = new PlanCompareLists();
            planCompLists[2] = new PlanCompareLists();

            planCompareResults = new PlanCompareResults();
        }
Example #4
0
        // * * * Constructor * * *
        public DataManager(PlanSetup aPlan)
        {
            courseIDs = new ObservableCollection <string>()
            {
                "", "", ""
            };
            theCourses = new MyCourseCollection()
            {
                null, null, null
            };

            thePlans    = new PlanData[3];
            thePlans[0] = null;
            thePlans[1] = null;
            thePlans[2] = null;

            clGeneral = new PlanCompareLists();
            clFields  = new List <PlanCompareLists>();

            passingThreshold = 1;
        }