ACR_ChooserCreator.ChooserLists.DrawAreas C# (CSharp) Method

DrawAreas() public static method

public static DrawAreas ( CLRScriptBase script, User currentUser ) : void
script CLRScriptFramework.CLRScriptBase
currentUser User
return void
        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);
        }