public void setText(CoursesClass curCourse)
 {
     courseIDTF.Text    = curCourse.Uid;
     courseIDTF.Enabled = false;
     locationTF.Text    = curCourse.LocationName;
     surfaceTF.Text     = curCourse.SurfaceType;
     distanceTF.Text    = curCourse.Distance.ToString();
     unitsTF.Text       = curCourse.Units;
     handicapTF.Text    = curCourse.Handicap.ToString();
     handicapFTF.Text   = curCourse.HandicapBuffer;
     handicapCTF.Text   = curCourse.HandicapCutOff;
     //penaltyTF.Text = curLoc.penalty;
     relayTF.Text = curCourse.IsRelay.ToString();
     //leg1TF.Text = curLoc.
     //leg2TF.Text =
     //leg3TF.Text =
     //leg4TF.Text =
     //keepRecordTF.Text = curLoc.
     if (curCourse.MinAge > 31)
     {
         minAge31TF.Text = "True";
     }
     else
     {
         minAge31TF.Text = "False";
     }
 }
Ejemplo n.º 2
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            UITableViewCell cell     = tableView.DequeueReusableCell("course_id");
            CoursesClass    thisList = curCourses[indexPath.Row];

            cell.TextLabel.Text = thisList.CourseName;
            return(cell);
        }
Ejemplo n.º 3
0
        static void locationToDict()
        {
            for (int i = 0; i < AppData.offlineLocationList.Count; i++)
            {
                var allItemsDict = new NSMutableDictionary();
                NSMutableDictionary anyListDataDict = new NSMutableDictionary();
                LocationClass       location        = AppData.offlineLocationList[i];
                for (int j = 0; j < location.courses.Count; j++)
                {
                    CoursesClass        item         = location.courses[j];
                    NSMutableDictionary eachItemDict = new NSMutableDictionary();
                    eachItemDict.SetValueForKey((NSString)item.Uid,
                                                (NSString)"uid");
                    eachItemDict.SetValueForKey((NSString)item.CourseName,
                                                (NSString)"course_name");
                    eachItemDict.SetValueForKey((NSString)item.LocationID,
                                                (NSString)"location_id");
                    eachItemDict.SetValueForKey((NSString)item.LocationName,
                                                (NSString)"location_name");
                    eachItemDict.SetValueForKey((NSString)item.SurfaceType,
                                                (NSString)"surface_type");
                    eachItemDict.SetValueForKey((NSString)item.Distance.ToString(),
                                                (NSString)"distance");
                    eachItemDict.SetValueForKey((NSString)item.Units,
                                                (NSString)"units");
                    eachItemDict.SetValueForKey((NSString)item.ConversionFactor.ToString(),
                                                (NSString)"conversion_factor");
                    eachItemDict.SetValueForKey((NSString)item.HandicapBuffer,
                                                (NSString)"handicap_buffer");
                    eachItemDict.SetValueForKey((NSString)item.HandicapCutOff,
                                                (NSString)"handicap_cutoff");
                    eachItemDict.SetValueForKey((NSString)item.IsRelay.ToString(),
                                                (NSString)"is_relay");
                    eachItemDict.SetValueForKey((NSString)item.RelayIDs.ToString(),
                                                (NSString)"relay_id");
                    eachItemDict.SetValueForKey((NSString)item.MinAge.ToString(),
                                                (NSString)"min_age");
                    eachItemDict.SetValueForKey((NSString)item.TrophyAwards.ToString(),
                                                (NSString)"trophy_awards");
                    eachItemDict.SetValueForKey((NSString)item.TrophyID.ToString(),
                                                (NSString)"trophy_id");
                    eachItemDict.SetValueForKey((NSString)item.NumberOfLegs.ToString(),
                                                (NSString)"num_legs");

                    allItemsDict.SetValueForKey(eachItemDict,
                                                (NSString)(item.CourseName));
                }



                object[] locationKeys   = { "location_id", "location_name", "location_X", "location_Y" };
                object[] locationValues = { location.locationID, location.locationName, location.posX, location.posY };

                var locationDict = NSDictionary.FromObjectsAndKeys(locationValues, locationKeys);

                //anyListDataDict = new NSMutableDictionary();

                anyListDataDict.SetValueForKey(allItemsDict, (NSString)location.locationName);
                allItemsDict.SetValueForKey(locationDict, (NSString)"location_info");

                AppData.LocationNode.GetChild(location.locationName)
                .SetValue <NSDictionary>(anyListDataDict);
            }
        }