public void PutText(SpannableString originalText)
 {
     _originalText = originalText;
     if (_originalText.Length() > TRIM_LENGTH)
     {
         _trimmedText = TextUtils.ConcatFormatted(_originalText.SubSequenceFormatted(0, TRIM_LENGTH),
                                                  new SpannableString("..."));
     }
     else
     {
         _trimmedText = _originalText;
     }
     this.TextFormatted = _trimmedText;
 }
        private void UpdateFormattedText()
        {
            if (Element?.FormattedText == null)
            {
                return;
            }

            var spanList = new List <SpannableString>();

            foreach (var span in label.FormattedText.Spans)
            {
                var ss = new SpannableString(span.Text);

                ss.SetSpan(new ForegroundColorSpan(span.TextColor.ToAndroid()), 0, span.Text.Length, SpanTypes.ExclusiveExclusive);
                ss.SetSpan(new AbsoluteSizeSpan((int)span.FontSize, true), 0, span.Text.Length, SpanTypes.ExclusiveExclusive);
                if (!string.IsNullOrEmpty(span.FontFamily))
                {
                    var exportFonts = FontRegistrar.HasFont(span.FontFamily);
                    if (exportFonts.hasFont)
                    {
                        var tf = Typeface.CreateFromFile(exportFonts.fontPath);
                        ss.SetSpan(new TypefaceSpan(tf), 0, span.Text.Length, SpanTypes.ExclusiveExclusive);
                    }
                    else
                    {
                        var tf = GetTypeface();
                        ss.SetSpan(new TypefaceSpan(span.FontFamily), 0, span.Text.Length, SpanTypes.ExclusiveExclusive);
                    }
                }
                else
                {
                    var tf = GetTypeface();
                    ss.SetSpan(new TypefaceSpan(span.FontFamily), 0, span.Text.Length, SpanTypes.ExclusiveExclusive);
                }

                spanList.Add(ss);
            }

            var result = new SpannableString(TextUtils.ConcatFormatted(spanList.ToArray()));

            Control.TextFormatted = result;
        }
Example #3
0
        //get a formatted list of events and properties that can be put in a ListView/DropDown
        public List <SpannableString> GetEventDisplayList()
        {
            SpannableString[]      result;
            List <SpannableString> final = new List <SpannableString>();

            foreach (Event e in _connection.Table <Event>())
            {
                result = new SpannableString[]
                {
                    FormatString.setBold("'" + e.eventName + "'"),
                    FormatString.setBold(" | "),
                    FormatString.setNormal("(" + e.startDate + " - " + e.endDate + ")"),
                    FormatString.setBold(" | "),
                    FormatString.setBold("ID: " + e.eventID),
                };
                final.Add(new SpannableString(TextUtils.ConcatFormatted(result)));
            }
            //reverse so that biggest event ID (newest event) is first
            final.Reverse();
            return(final);
        }
Example #4
0
        public List <SpannableString> GetCompiledDisplayList()
        {
            SpannableString[]      result;
            List <SpannableString> final = new List <SpannableString>();

            foreach (CompiledEventData e in _connection.Table <CompiledEventData>())
            {
                result = new SpannableString[]
                {
                    FormatString.setBold("'" + e.officialName + "'"),
                    FormatString.setBold(" | "),
                    FormatString.setNormal("Date Modified: " + e.dateMod + " at "),
                    FormatString.setBold(e.timeMod),
                    FormatString.setBold(" | "),
                    FormatString.setBold("ID: " + e.cID),
                };
                final.Add(new SpannableString(TextUtils.ConcatFormatted(result)));
            }
            //newest first
            final.Reverse();
            return(final);
        }
Example #5
0
        //get formatted list of matches for use in ListView, etc
        public List <SpannableString> GetMatchDisplayList(int eid)
        {
            List <SpannableString> result = new List <SpannableString>();

            SpannableString[] disp;
            foreach (MatchData s in _connection.Table <MatchData>())
            {
                if (s.eventID == eid)
                {
                    disp = new SpannableString[]
                    {
                        FormatString.setNormal("Match "),
                        FormatString.setBold(s.matchNumber.ToString()),
                        FormatString.setNormal(" (Team: "),
                        FormatString.setBold(s.teamNumber.ToString()),
                        FormatString.setNormal(")"),
                    };
                    result.Add(new SpannableString(TextUtils.ConcatFormatted(disp)));
                }
            }
            //put newest match first
            result.Reverse();
            return(result);
        }
Example #6
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Match_Data);
            //get controls from layout and assign event handlers
            bDeleteMatch        = FindViewById <Button>(Resource.Id.bDeleteMatch);
            bDeleteMatch.Click += ButtonClicked;
            bEditMatch          = FindViewById <Button>(Resource.Id.bEditMatch);
            bEditMatch.Click   += ButtonClicked;
            gridRecent          = FindViewById <GridView>(Resource.Id.gridRecent);
            textRecent          = FindViewById <TextView>(Resource.Id.textRecent);
            //get the current match to display data for
            currentMatch = eData.GetCurrentMatch();
            SpannableString[] textDisp = new SpannableString[]
            {
                FormatString.setNormal("Viewing Data For - Match: "),
                FormatString.setBold(currentMatch.matchNumber.ToString()),
                FormatString.setNormal(" /// Team: "),
                FormatString.setBold(currentMatch.teamNumber.ToString())
            };
            //set title text
            textRecent.TextFormatted = new SpannableString(TextUtils.ConcatFormatted(textDisp));
            //make display lists
            List <SpannableString> data       = new List <SpannableString>();
            List <SpannableString> properties = new List <SpannableString>();
            List <SpannableString> display    = new List <SpannableString>();

            string[] propertiesPre = new string[]
            {
                "Match Number",
                "Team Number",
                "Result of Team's Alliance",
                "Position",
                "Table",
                "Started Off Level",
                "Sandstorm Mode",
                "Hatch in Sandstorm",
                "Cargo in Sandstorm",
                "Crossed Hab Line",
                "Can do Cargo",
                "Does Cargo Well",
                "Barely Does Cargo",
                "Can do Hatches",
                "Does Hatches Well",
                "Barely Does Hatches",
                "Climbing Level",
                "Good Driveteam",
                "Recommended",
                "Additional Comments",
            };
            //format the properties
            for (int i = 0; i < propertiesPre.Length; i++)
            {
                properties.Add(FormatString.setBold(propertiesPre[i]));
            }
            string[] dataPre = new string[]
            {
                currentMatch.matchNumber.ToString(),
                     currentMatch.teamNumber.ToString(),
                     currentMatch.getResult(),
                     currentMatch.getPosition(),
                     currentMatch.isTable.ToString().ToUpper(),
                "Level " + currentMatch.sandstormStartLevel.ToString(),
                     currentMatch.getSandstormMode(),
                     currentMatch.sandstormHatch.ToString(),
                     currentMatch.sandstormCargo.ToString(),
                     currentMatch.sandstormLine.ToString(),
                     currentMatch.cargo.ToString(),
                     currentMatch.cargoWell.ToString(),
                     currentMatch.cargoBarely.ToString(),
                     currentMatch.hatch.ToString(),
                     currentMatch.hatchWell.ToString(),
                     currentMatch.hatchBarely.ToString(),
                     currentMatch.getClimb(),
                     currentMatch.goodDrivers.ToString(),
                     currentMatch.getRecommendation(),
                     currentMatch.additionalComments,
            };
            //format the data
            for (int i = 0; i < dataPre.Length; i++)
            {
                data.Add(FormatString.setNormal(dataPre[i]));
            }
            //combine properties and data
            for (int i = 0; i < properties.Count; i++)
            {
                display.Add(properties[i]);
                display.Add(data[i]);
            }
            //adapt the lists to be displayed in the grid
            ArrayAdapter gridAdapt = new ArrayAdapter <SpannableString>(this, Android.Resource.Layout.SimpleListItem1, display);

            gridRecent.Adapter = gridAdapt;
        }
Example #7
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.General_Compiled);
            //get controls from layout
            bDeleteData          = FindViewById <Button>(Resource.Id.bDeleteData);
            bDeleteData.Click   += ButtonClicked;
            gridTeams            = FindViewById <GridView>(Resource.Id.gridViewTeam);
            gridTeams.ItemClick += gridClicked;
            textRecent           = FindViewById <TextView>(Resource.Id.textEvent);
            viewDataHeight       = FindViewById <LinearLayout>(Resource.Id.viewDataHeight);
            //get current compiled data
            currentCompiled = eData.GetCurrentCompiled();
            SpannableString[] textDisp = new SpannableString[]
            {
                FormatString.setNormal("Viewing Data for Event: \n"),
                FormatString.setBold("'" + currentCompiled.officialName + "'"),
                FormatString.setNormal(" as of "),
                FormatString.setBold(currentCompiled.dateMod),
                FormatString.setNormal(" at "),
                FormatString.setBold(currentCompiled.timeMod)
            };
            //set title display text
            textRecent.TextFormatted = TextUtils.ConcatFormatted(textDisp);
            //column titles
            properties = new string[]
            {
                "Team",
                "Recommend %",
                "Record",
                "Cargo/Hatch %",
                "        Climb?\n(Lvl 2%/Lvl 3%)",
                "Good Drivers (%)",
                "'Table' %"
            };
            //get general data for all teams
            List <int>             teamNumbers = currentCompiled.getTeamNumbersArray();
            List <int>             recPerc     = currentCompiled.getRecPercentArray();
            List <string>          record      = currentCompiled.getWinRecordArray();
            List <int>             cargoPerc   = currentCompiled.getCargoPercentArray();
            List <int>             hatchPerc   = currentCompiled.getHatchPercentArray();
            List <int>             climbPerc2  = currentCompiled.getClimb2PercentArray();
            List <int>             climbPerc3  = currentCompiled.getClimb3PercentArray();
            List <int>             driversPerc = currentCompiled.getDriversPercentArray();
            List <int>             tablePerc   = currentCompiled.getTablePercentArray();
            List <int>             winPerc     = currentCompiled.getWinPercentArray();
            List <SpannableString> display     = new List <SpannableString>();

            //format data in the right order for the grid based on values
            for (int i = 0; i < properties.Length; i++)
            {
                display.Add(FormatString.setBold(properties[i]));
            }
            for (int i = 0; i < currentCompiled.compileData().Count; i++)
            {
                //add the team number
                display.Add(FormatString.setBold(teamNumbers[i].ToString()));
                //recommendation percent
                if (recPerc[i] >= Constants.recommendThreshHigh)
                {
                    display.Add(FormatString.setColorBold(recPerc[i].ToString() + "%", Constants.appGreen));
                }
                else if (recPerc[i] <= Constants.recommendThreshLow)
                {
                    display.Add(FormatString.setColorBold(recPerc[i].ToString() + "%", Constants.appRed));
                }
                else
                {
                    display.Add(FormatString.setNormal(recPerc[i].ToString() + "%"));
                }
                //win-loss-tie record
                if (winPerc[i] >= Constants.winThreshHigh)
                {
                    display.Add(FormatString.setColorBold(record[i], Constants.appGreen));
                }
                else if (winPerc[i] <= Constants.winThreshLow)
                {
                    display.Add(FormatString.setColorBold(record[i], Constants.appRed));
                }
                else
                {
                    display.Add(FormatString.setNormal(record[i]));
                }
                //cargo/hatch percents
                if (cargoPerc[i] >= Constants.hatch_cargoThreshHigh)
                {
                    display.Add(FormatString.setColorBold(cargoPerc[i].ToString() + "% / " + hatchPerc[i].ToString() + "%", Constants.appGreen));
                }
                else if (cargoPerc[i] <= Constants.hatch_cargoThreshLow)
                {
                    display.Add(FormatString.setColorBold(cargoPerc[i].ToString() + "% / " + hatchPerc[i].ToString() + "%", Constants.appRed));
                }
                else
                {
                    display.Add(FormatString.setNormal(cargoPerc[i].ToString() + "% / " + hatchPerc[i].ToString() + "%"));
                }
                //climbing percents
                List <SpannableString> climbDisplay = new List <SpannableString>();
                if (climbPerc2[i] >= Constants.climb2Thresh)
                {
                    climbDisplay.Add(FormatString.setColorBold(climbPerc2[i].ToString() + "% / ", Constants.appGreen));
                }
                else
                {
                    climbDisplay.Add(FormatString.setNormal(climbPerc2[i].ToString() + "% / "));
                }
                if (climbPerc3[i] >= Constants.climb3Thresh)
                {
                    climbDisplay.Add(FormatString.setColorBold(climbPerc3[i].ToString() + "%", Constants.appGreen));
                }
                else
                {
                    climbDisplay.Add(FormatString.setNormal(climbPerc3[i].ToString() + "%"));
                }
                display.Add(new SpannableString(TextUtils.ConcatFormatted(climbDisplay.ToArray())));
                //driveteam percents
                if (driversPerc[i] >= Constants.driversThreshHigh)
                {
                    display.Add(FormatString.setColorBold(driversPerc[i].ToString() + "%", Constants.appGreen));
                }
                else if (driversPerc[i] <= Constants.driversThreshLow)
                {
                    display.Add(FormatString.setColorBold(driversPerc[i].ToString() + "%", Constants.appRed));
                }
                else
                {
                    display.Add(FormatString.setNormal(driversPerc[i].ToString() + "%"));
                }
                //table percent
                if (tablePerc[i] >= Constants.tableTresh)
                {
                    display.Add(FormatString.setColorBold(tablePerc[i].ToString() + "%", Constants.appRed));
                }
                else
                {
                    display.Add(FormatString.setColorBold(tablePerc[i].ToString() + "%", Constants.appGreen));
                }
            }
            //display data in the grid
            ArrayAdapter gridAdapt = new ArrayAdapter <SpannableString>(this, Android.Resource.Layout.SimpleListItem1, display);

            gridTeams.Adapter = gridAdapt;
            float scale = this.Resources.DisplayMetrics.Density;

            FrameLayout.LayoutParams _params = new FrameLayout.LayoutParams((int)(1200 * scale), LinearLayout.LayoutParams.WrapContent);
            viewDataHeight.LayoutParameters = _params;
        }
Example #8
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Team_Details);
            //get controls from layout
            gridStats     = FindViewById <GridView>(Resource.Id.gridViewStats);
            gridSandstorm = FindViewById <GridView>(Resource.Id.gridViewSandstorm);
            gridMatches   = FindViewById <GridView>(Resource.Id.gridViewMatches);
            textTitle     = FindViewById <TextView>(Resource.Id.textTeam);
            linearMatches = FindViewById <LinearLayout>(Resource.Id.linearMatches);
            //get current compiled data
            currentCompiled = eData.GetCurrentCompiled();
            //put matches in order for team
            CompiledEventData[] compiledPreSort = eData.GetCompiledEventDataForIndex(eData.getTeamIndex().ID).ToArray();
            Array.Sort(compiledPreSort, delegate(CompiledEventData data1, CompiledEventData data2)
            {
                return(data1.matchNumber.CompareTo(data2.matchNumber));
            });
            Array.Reverse(compiledPreSort);
            List <CompiledEventData> compiled = compiledPreSort.ToList();
            int currentTeam = compiled[0].teamNumber;

            //display current team in the title
            textTitle.TextFormatted = TextUtils.ConcatFormatted(FormatString.setNormal("Viewing Stats for Team: '"), FormatString.setBold(currentTeam.ToString()), FormatString.setNormal("'"));
            //get team-specific details from compiled data
            int    recPerc            = currentCompiled.getRecPercentForTeam(currentTeam);
            string record             = currentCompiled.getWinRecordForTeam(currentTeam);
            int    cargoPerc          = currentCompiled.getCargoPercentForTeam(currentTeam);
            int    hatchPerc          = currentCompiled.getHatchPercentForTeam(currentTeam);
            int    climbPerc2         = currentCompiled.getClimb2PercentForTeam(currentTeam);
            int    climbPerc3         = currentCompiled.getClimb3PercentForTeam(currentTeam);
            int    driversPerc        = currentCompiled.getDriversPercentForTeam(currentTeam);
            int    tablePerc          = currentCompiled.getTablePercentForTeam(currentTeam);
            int    winPerc            = currentCompiled.getWinPercentForTeam(currentTeam);
            int    cargoSandstormPerc = currentCompiled.getCargoSandstormPercentForTeam(currentTeam);
            int    hatchSandstormPerc = currentCompiled.getHabSandstormPercentForTeam(currentTeam);
            int    habPerc            = currentCompiled.getHabSandstormPercentForTeam(currentTeam);
            int    autoPerc           = currentCompiled.getAutoPercentForTeam(currentTeam);
            int    teleopPerc         = currentCompiled.getTeleopPercentForTeam(currentTeam);
            int    nothingPerc        = currentCompiled.getNothingPercentForTeam(currentTeam);
            //first two rows
            List <SpannableString> statsDisp = new List <SpannableString>()
            {
                FormatString.setNormal("Cargo / Hatch"),
                FormatString.setNormal("Climb Level 2 / Level 3"),
                FormatString.setNormal("Recommendation %"),
                FormatString.setBold(cargoPerc.ToString() + "% / " + hatchPerc.ToString() + "%"),
                FormatString.setBold(climbPerc2.ToString() + "% / " + climbPerc3.ToString() + "%"),
                FormatString.setBold(recPerc.ToString() + "%"),
            };

            //third row (decide)
            //cargo or hatch bot
            if (cargoPerc >= Constants.hatch_cargoMin && hatchPerc >= Constants.hatch_cargoMin)
            {
                statsDisp.Add(FormatString.setColorBold("Both", Constants.appGreen));
            }
            else if (cargoPerc >= Constants.hatch_cargoMin)
            {
                statsDisp.Add(FormatString.setColorBold("Cargo", Constants.appGreen));
            }
            else if (hatchPerc >= Constants.hatch_cargoMin)
            {
                statsDisp.Add(FormatString.setColorBold("Hatch", Constants.appGreen));
            }
            else
            {
                statsDisp.Add(FormatString.setColorBold("Neither", Constants.appRed));
            }
            //what kind of climber
            if (climbPerc2 >= Constants.climb2Min && climbPerc3 >= Constants.climb3Min)
            {
                statsDisp.Add(FormatString.setColorBold("Level 2/3 Climber", Constants.appGreen));
            }
            else if (climbPerc3 >= Constants.climb3Min)
            {
                statsDisp.Add(FormatString.setColorBold("Level 3 Climber", Constants.appGreen));
            }
            else if (climbPerc2 >= Constants.climb2Min)
            {
                statsDisp.Add(FormatString.setColorBold("Level 2 Climber", Constants.appGreen));
            }
            else
            {
                statsDisp.Add(FormatString.setColorBold("No reliable climber", Constants.appRed));
            }
            //recommendation
            if (recPerc >= Constants.recommendThreshHigh)
            {
                statsDisp.Add(FormatString.setColorBold("Recommended", Constants.appGreen));
            }
            else if (recPerc <= Constants.recommendThreshLow)
            {
                statsDisp.Add(FormatString.setColorBold("Not Recommended", Constants.appRed));
            }
            else
            {
                statsDisp.Add(FormatString.setColorBold("Possible Recommend", Constants.appYellow));
            }
            //display general stats in first grid box
            ArrayAdapter gridStatsAdapt = new ArrayAdapter <SpannableString>(this, Android.Resource.Layout.SimpleListItem1, statsDisp);

            gridStats.Adapter = gridStatsAdapt;
            //figure out which sandstorm mode they use the most often
            SpannableString primaryMode;

            if (autoPerc > teleopPerc && autoPerc > nothingPerc)
            {
                primaryMode = FormatString.setColorBold("Auto", Constants.appGreen);
            }
            else if (teleopPerc > autoPerc && teleopPerc > nothingPerc)
            {
                primaryMode = FormatString.setColorBold("Teleop w/Camera", Constants.appGreen);
            }
            else
            {
                primaryMode = FormatString.setColorBold("Nothing", Constants.appRed);
            }
            SpannableString cargo = FormatString.setColorBold("NO (" + cargoSandstormPerc.ToString() + "%) ", Constants.appRed);
            SpannableString hatch = FormatString.setColorBold("NO (" + hatchSandstormPerc.ToString() + "%) ", Constants.appRed);
            SpannableString hab   = FormatString.setColorBold("NO (" + habPerc.ToString() + "%) ", Constants.appRed);

            if (cargoSandstormPerc >= Constants.sandstorm_Hatch_CargoThresh)
            {
                cargo = FormatString.setColorBold("YES (" + cargoSandstormPerc.ToString() + "%) ", Constants.appGreen);
            }
            if (hatchSandstormPerc >= Constants.sandstorm_Hatch_CargoThresh)
            {
                hatch = FormatString.setColorBold("YES (" + hatchSandstormPerc.ToString() + "%) ", Constants.appGreen);
            }
            if (habPerc >= Constants.sandstorm_Hatch_CargoThresh)
            {
                hab = FormatString.setColorBold("YES (" + habPerc.ToString() + "%) ", Constants.appGreen);
            }
            List <SpannableString> sandstormDisp = new List <SpannableString>()
            {
                FormatString.setBold("Primary Sandstorm Mode: "),
                primaryMode,
                FormatString.setBold("Cargo? "),
                cargo,
                FormatString.setBold("Hatch? "),
                hatch,
                FormatString.setBold("Crossed Hab Line? "),
                hab,
            };
            //display sandstorm stats in the second grid
            ArrayAdapter gridSandstormAdapt = new ArrayAdapter <SpannableString>(this, Android.Resource.Layout.SimpleListItem1, sandstormDisp);

            gridSandstorm.Adapter = gridSandstormAdapt;
            //display a list of matches the team was in and the details from each one
            string[] properties = new string[]
            {
                "Result of Team's Alliance",
                "Position",
                "Table",
                "Started Off Level",
                "Sandstorm Mode",
                "Hatch in Sandstorm",
                "Cargo in Sandstorm",
                "Crossed Hab Line",
                "Can do Cargo",
                "Does Cargo Well",
                "Barely Does Cargo",
                "Can do Hatches",
                "Does Hatches Well",
                "Barely Does Hatches",
                "Climbing Level",
                "Good Driveteam",
                "Recommended"
            };
            gridMatches.NumColumns = compiled.Count + 1;
            List <SpannableString> display = new List <SpannableString>();

            compiled.Reverse();
            //rows
            {
                display.Add(FormatString.setBold("Match Number:"));
                for (int i = 0; i < compiled.Count; i++)
                {
                    display.Add(FormatString.setBold(compiled[i].matchNumber.ToString()));
                }
                int p = 0;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].result == 0)
                    {
                        display.Add(FormatString.setColor(compiled[j].getResult(), Constants.appGreen));
                    }
                    else if (compiled[j].result == 1)
                    {
                        display.Add(FormatString.setColor(compiled[j].getResult(), Constants.appRed));
                    }
                    else
                    {
                        display.Add(FormatString.setColor(compiled[j].getResult(), Constants.appYellow));
                    }
                }
                p++;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].position >= 3)
                    {
                        display.Add(FormatString.setColor(compiled[j].getPosition(), Constants.appBlue));
                    }
                    else
                    {
                        display.Add(FormatString.setColor(compiled[j].getPosition(), Constants.appOrange));
                    }
                }
                p++;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].isTable)
                    {
                        display.Add(FormatString.setColorBold(compiled[j].isTable.ToString().ToUpper(), Constants.appRed));
                    }
                    else
                    {
                        display.Add(FormatString.setColor(compiled[j].isTable.ToString().ToUpper(), Constants.appGreen));
                    }
                }
                p++;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].sandstormStartLevel == 1)
                    {
                        display.Add(FormatString.setNormal("Level " + compiled[j].sandstormStartLevel.ToString()));
                    }
                    else
                    {
                        display.Add(FormatString.setColor("Level " + compiled[j].sandstormStartLevel.ToString(), Constants.appGreen));
                    }
                }
                p++;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].sandstormMode == 0 || compiled[j].sandstormMode == 1)
                    {
                        display.Add(FormatString.setColor(compiled[j].getSandstormMode(), Constants.appGreen));
                    }
                    else
                    {
                        display.Add(FormatString.setColor(compiled[j].getSandstormMode(), Constants.appRed));
                    }
                }
                p++;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].sandstormHatch)
                    {
                        display.Add(FormatString.setColor(compiled[j].sandstormHatch.ToString(), Constants.appGreen));
                    }
                    else
                    {
                        display.Add(FormatString.setColor(compiled[j].sandstormHatch.ToString(), Constants.appRed));
                    }
                }
                p++;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].sandstormCargo)
                    {
                        display.Add(FormatString.setColor(compiled[j].sandstormCargo.ToString(), Constants.appGreen));
                    }
                    else
                    {
                        display.Add(FormatString.setColor(compiled[j].sandstormCargo.ToString(), Constants.appRed));
                    }
                }
                p++;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].sandstormLine)
                    {
                        display.Add(FormatString.setColor(compiled[j].sandstormLine.ToString(), Constants.appGreen));
                    }
                    else
                    {
                        display.Add(FormatString.setColor(compiled[j].sandstormLine.ToString(), Constants.appRed));
                    }
                }
                p++;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].cargo)
                    {
                        display.Add(FormatString.setColor(compiled[j].cargo.ToString(), Constants.appGreen));
                    }
                    else
                    {
                        display.Add(FormatString.setColor(compiled[j].cargo.ToString(), Constants.appRed));
                    }
                }
                p++;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].cargoWell)
                    {
                        display.Add(FormatString.setColor(compiled[j].cargoWell.ToString(), Constants.appGreen));
                    }
                    else
                    {
                        display.Add(FormatString.setColor(compiled[j].cargoWell.ToString(), Constants.appRed));
                    }
                }
                p++;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].cargoBarely)
                    {
                        display.Add(FormatString.setColor(compiled[j].cargoBarely.ToString(), Constants.appRed));
                    }
                    else
                    {
                        display.Add(FormatString.setColor(compiled[j].cargoBarely.ToString(), Constants.appGreen));
                    }
                }
                p++;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].hatch)
                    {
                        display.Add(FormatString.setColor(compiled[j].hatch.ToString(), Constants.appGreen));
                    }
                    else
                    {
                        display.Add(FormatString.setColor(compiled[j].hatch.ToString(), Constants.appRed));
                    }
                }
                p++;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].hatchWell)
                    {
                        display.Add(FormatString.setColor(compiled[j].hatchWell.ToString(), Constants.appGreen));
                    }
                    else
                    {
                        display.Add(FormatString.setColor(compiled[j].hatchWell.ToString(), Constants.appRed));
                    }
                }
                p++;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].hatchBarely)
                    {
                        display.Add(FormatString.setColor(compiled[j].hatchBarely.ToString(), Constants.appRed));
                    }
                    else
                    {
                        display.Add(FormatString.setColor(compiled[j].hatchBarely.ToString(), Constants.appGreen));
                    }
                }
                p++;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].climb == 3)
                    {
                        display.Add(FormatString.setColorBold(compiled[j].getClimb(), Constants.appGreen));
                    }
                    else if (compiled[j].climb == 2)
                    {
                        display.Add(FormatString.setColor(compiled[j].getClimb(), Constants.appGreen));
                    }
                    else
                    {
                        display.Add(FormatString.setColor(compiled[j].getClimb(), Constants.appRed));
                    }
                }
                p++;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].goodDrivers)
                    {
                        display.Add(FormatString.setColor(compiled[j].goodDrivers.ToString(), Constants.appGreen));
                    }
                    else
                    {
                        display.Add(FormatString.setColor(compiled[j].goodDrivers.ToString(), Constants.appRed));
                    }
                }
                p++;
                display.Add(FormatString.setBold(properties[p]));
                for (int j = 0; j < compiled.Count; j++)
                {
                    if (compiled[j].wouldRecommend == 0)
                    {
                        display.Add(FormatString.setColorBold(compiled[j].getRecommendation(), Constants.appGreen));
                    }
                    else if (compiled[j].wouldRecommend == 1)
                    {
                        display.Add(FormatString.setColorBold(compiled[j].getRecommendation(), Constants.appRed));
                    }
                    else
                    {
                        display.Add(FormatString.setColorBold(compiled[j].getRecommendation(), Constants.appYellow));
                    }
                }
            }
            //put matches in the third grid
            ArrayAdapter gridMatchesAdapt = new ArrayAdapter <SpannableString>(this, Android.Resource.Layout.SimpleListItem1, display);

            gridMatches.Adapter = gridMatchesAdapt;
            float scale = this.Resources.DisplayMetrics.Density;

            FrameLayout.LayoutParams _params = new FrameLayout.LayoutParams((int)(compiled.Count * 300 * scale), LinearLayout.LayoutParams.WrapContent);
            linearMatches.LayoutParameters = _params;
        }