Exemplo n.º 1
0
        protected string getHeader(Starbase118Positions post)
        {
            string hdr = "{{Post|";

            hdr = hdr + positionColor[postDivision[post]] + "|";
            hdr = hdr + postTitle[post] + "}}" + Environment.NewLine;

            return(hdr);
        }
Exemplo n.º 2
0
 public Starbase118HistoryEntry(string first, string last, Starbase118Positions post, Starbase118Ranks rank,
                                Stardate joinD, Stardate leaveD, string image, string notes, bool currMember, bool hasProfile)
 {
     charFirstN    = first;
     charLastN     = last;
     charPosition  = post;
     charRank      = rank;
     charJoinDate  = joinD;
     charLeaveDate = leaveD;
     charImgStr    = image;
     charNotes     = notes;
     charOnShip    = currMember;
     hasNoLink     = hasProfile;
 }
        protected string getHeader(Starbase118Positions post)
        {
            string hdr = "{{Post|";
            hdr = hdr + positionColor[postDivision[post]] + "|";
            hdr = hdr + postTitle[post] + "}}" + Environment.NewLine;

            return hdr;
        }
Exemplo n.º 4
0
        protected string DisplayPosts(Starbase118Positions post, string pipStyle)
        {
            string outStr = "";

            if (unsortedList.Count(item => item.charPosition == post) > 0)
            {
                //now to find any on ship and treat them as current, unless they have a listed end date
                foreach (Starbase118HistoryEntry hist in unsortedList)
                {
                    if (hist.charOnShip && hist.charLeaveDate != null)
                    {
                        hist.charLeaveDate = Stardate.Today();
                    }
                }

                var selection = unsortedList.Where(item => item.charPosition == post)
                                .OrderByDescending(o => o.charLeaveDate);

                outStr += "{{Post|";
                outStr += positionColor[postDivision[post]] + "|";
                outStr += postTitle[post] + "}}" + Environment.NewLine;

                foreach (Starbase118HistoryEntry ent in selection)
                {
                    if (!ent.hasNoLink)
                    {
                        if (ent.charOnShip)
                        {
                            outStr += "{{New|";
                        }
                        else
                        {
                            outStr += "{{Old|";
                        }
                    }

                    else
                    {
                        if (ent.charOnShip)
                        {
                            outStr += "{{No Link New|";
                        }
                        else
                        {
                            outStr += "{{No Link Old|";
                        }
                    }

                    outStr += rankTitle[ent.charRank] + "|";
                    outStr += ent.charFirstN + "|" + ent.charLastN + "|";

                    if (marineRanks.Contains(ent.charRank.ToString()))
                    {
                        outStr += positionColor["Marine"] + "|";
                    }
                    else
                    {
                        outStr += positionColor[postDivision[ent.charPosition]] + "|";
                    }

                    outStr += ent.charJoinDate.ToString() + " - ";

                    /*    if (ent.charOnShip == true)
                     * outStr += "Present";
                     * else */if (ent.charLeaveDate == null)
                    {
                        outStr += "??????";
                    }
                    else
                    {
                        outStr += ent.charLeaveDate.ToString();
                    }

                    outStr += "|" + ent.charImgStr;
                    outStr += "|STYLE=" + pipStyle;

                    if (ent.charNotes != null)
                    {
                        outStr += "|NOTES=" + ent.charNotes;
                    }

                    outStr += "}}" + Environment.NewLine;
                }
            }

            return(outStr);
        }
        protected string DisplayPosts(Starbase118Positions post, string pipStyle)
        {
            string outStr = "";

                if (unsortedList.Count(item => item.charPosition == post) > 0)
                {
                    //now to find any on ship and treat them as current, unless they have a listed end date
                    foreach (Starbase118HistoryEntry hist in unsortedList)
                    {
                    if (hist.charOnShip && hist.charLeaveDate != null)
                        hist.charLeaveDate = Stardate.Today();
                    }

                    var selection = unsortedList.Where(item => item.charPosition == post)
                                                .OrderByDescending(o => o.charLeaveDate);

                outStr += "{{Post|";
                outStr += positionColor[postDivision[post]] + "|";
                outStr += postTitle[post] + "}}" + Environment.NewLine;

                foreach (Starbase118HistoryEntry ent in selection)
                    {
                        if (!ent.hasNoLink)
                        {
                            if (ent.charOnShip) outStr += "{{New|";
                            else outStr += "{{Old|";
                        }

                        else
                        {
                            if (ent.charOnShip) outStr += "{{No Link New|";
                            else outStr += "{{No Link Old|";
                        }

                        outStr += rankTitle[ent.charRank] + "|";
                        outStr += ent.charFirstN + "|" + ent.charLastN + "|";

                        if (marineRanks.Contains(ent.charRank.ToString()))
                            outStr += positionColor["Marine"] + "|";
                        else
                            outStr += positionColor[postDivision[ent.charPosition]] + "|";

                        outStr += ent.charJoinDate.ToString() + " - ";

                         /*    if (ent.charOnShip == true)
                            outStr += "Present";
                        else */ if (ent.charLeaveDate == null)
                            outStr += "??????";
                        else
                            outStr += ent.charLeaveDate.ToString();

                        outStr += "|" + ent.charImgStr;
                        outStr += "|STYLE=" + pipStyle;

                        if (ent.charNotes != null)
                            outStr += "|NOTES=" + ent.charNotes;

                        outStr += "}}" + Environment.NewLine;
                    }
                }

            return outStr;
        }