Inheritance: IComparable
Example #1
0
 public static void DrawAreas(CLRScriptBase script, User currentUser)
 {
     script.ClearListBox(currentUser.Id, "SCREEN_DMC_CHOOSER", "LISTBOX_ACR_CHOOSER_AREAS");
     if (ALFA.Shared.Modules.InfoStore.ActiveAreas.Keys.Contains(script.GetArea(currentUser.Id)))
     {
         ALFA.Shared.ActiveArea currentArea = ALFA.Shared.Modules.InfoStore.ActiveAreas[script.GetArea(currentUser.Id)];
         string currentName = "<Color=DarkOrange>" + currentArea.DisplayName + "________";
         DisplayString.ShortenStringToWidth(currentName, 250);
         currentName = currentName.Trim('_') + "</color>";
         script.AddListBoxRow(currentUser.Id, "SCREEN_DMC_CHOOSER", "LISTBOX_ACR_CHOOSER_AREAS", currentArea.Id.ToString(), "LISTBOX_ITEM_TEXT=  " + currentName, "", "5=" + currentArea.Id.ToString(), "");
         List <ALFA.Shared.ActiveArea> adjAreas = new List <ALFA.Shared.ActiveArea>();
         foreach (ALFA.Shared.ActiveArea adjacentArea in currentArea.ExitTransitions.Values)
         {
             if (!adjAreas.Contains(adjacentArea))
             {
                 string adjName = "<Color=DarkGoldenRod>" + adjacentArea.DisplayName + "________";
                 DisplayString.ShortenStringToWidth(adjName, 250);
                 adjName = adjName.Trim('_') + "</color>";
                 script.AddListBoxRow(currentUser.Id, "SCREEN_DMC_CHOOSER", "LISTBOX_ACR_CHOOSER_AREAS", adjacentArea.Id.ToString(), "LISTBOX_ITEM_TEXT=  " + adjName, "", "5=" + adjacentArea.Id.ToString(), "");
                 adjAreas.Add(adjacentArea);
             }
         }
     }
     foreach (ALFA.Shared.ActiveArea area in AreaList)
     {
         script.AddListBoxRow(currentUser.Id, "SCREEN_DMC_CHOOSER", "LISTBOX_ACR_CHOOSER_AREAS", area.Id.ToString(), "LISTBOX_ITEM_TEXT=  " + area.DisplayName, "", "5=" + area.Id.ToString(), "");
     }
     currentUser.LastSeenArea = script.GetArea(currentUser.Id);
 }
Example #2
0
        public int CompareTo(object other)
        {
            ActiveArea otherArea = other as ActiveArea;

            if (otherArea != null)
            {
                return(CompareTo(otherArea));
            }
            return(0);
        }
Example #3
0
 public int CompareTo(ActiveArea other)
 {
     return(LocalizedName.CompareTo(other.LocalizedName));
 }
 public int CompareTo(ActiveArea other)
 {
     return LocalizedName.CompareTo(other.LocalizedName);
 }