Пример #1
0
        string GetLabelText(textContentE choice, LableClassE thing, string personName, string empStatusText, string debstr)
        {
            string rv = "";

            if (thing != LableClassE.person)
            {
                return(thing.ToString());
            }
            switch (choice)
            {
            case textContentE.empstatus:
            {
                Enum.TryParse <PersonMan.empStatusE>(empStatusText, true, out var stat);
                rv = GetIdText(stat);
            }
            break;

            case textContentE.name:
                rv = personName;
                break;

            case textContentE.debstr:
                rv = debstr;
                break;
            }
            return(rv);
        }
Пример #2
0
        public void AddFoundLabel(LableClassE thing, string model, string id, string id2, string debstr, Rect rect, Vector3 pt, Vector3 rot, Vector3 vel, string locname, string comment, Color color, float width)
        {
            var nlab = new LabelEntry(thing, model, id, id2, debstr, rect, pt, rot, vel, locname, comment, color, width);

            if (thing == LableClassE.person)
            {
                Enum.TryParse <PersonMan.empStatusE>(id2, true, out var stat);
                if (!GetEnabled(stat))
                {
                    return;                    // don't add lablel
                }
            }
            foundLabelList.Add(nlab);
        }
Пример #3
0
 public LabelEntry(LableClassE thing, string model, string id, string id2, string debstr, Rect rect, Vector3 pt, Vector3 rot, Vector3 vel, string locname, string comment, Color color, float width)
 {
     this.thing   = thing;
     this.model   = model;
     this.id      = id;
     this.id2     = id2;
     this.rect    = rect;
     this.pt      = pt;
     this.rot     = rot;
     this.vel     = vel;
     this.locname = locname;
     this.comment = comment;
     this.color   = color;
     this.width   = width;
 }
Пример #4
0
 public LabelEntry(Vehicle vehicle, Rect rect, Vector3 pt, Vector3 rot, Vector3 vel, string locname, string comment, Color color, float width)
 {
     this.thing   = LableClassE.vehicle;
     this.model   = vehicle.formName;
     this.id      = vehicle.vehicleId;
     this.id2     = vehicle.vehicleId;
     this.rect    = rect;
     this.pt      = pt;
     this.rot     = rot;
     this.vel     = vel;
     this.locname = locname;
     this.comment = comment;
     this.color   = color;
     this.width   = width;
     this.debstr  = "";
 }
Пример #5
0
 public LabelEntry(Person person, Rect rect, Vector3 pt, Vector3 rot, Vector3 vel, string locname, string comment, Color color, float width)
 {
     this.thing   = LableClassE.person;
     this.model   = person.avatarName;
     this.id      = person.personName;
     this.id2     = person.empStatus.ToString();
     this.rect    = rect;
     this.pt      = pt;
     this.rot     = rot;
     this.vel     = vel;
     this.locname = locname;
     this.comment = comment;
     this.color   = color;
     this.width   = width;
     this.debstr  = person.placeBld + "/" + person.placeNode + "/" + person.placeRoom;
 }