예제 #1
0
        private void LoadZoneMaps(IUnitOfWork uow, eZoneType zoneType)
        {
            var repo     = DIContainer.CreateRepository <Repositories.IZoneMapRepository>(uow);
            var zoneMaps = repo.GetForZoneType(zoneType).Select(zm => new { zm.ZoneMapID, zm.Description });

            cboZoneMap.DataValueField = "ZoneMapID";
            cboZoneMap.DataTextField  = "Description";

            cboZoneMap.DataSource = zoneMaps.ToList();
            cboZoneMap.DataBind();
        }
예제 #2
0
 private Zone2(Region region, ushort id, string name, int xoffset, int yoffset, int width, int height,
               eZoneType type, ushort proxyZone)
 {
     Region       = region;
     ID           = id;
     Name         = name.Trim();
     XOffset      = xoffset;
     YOffset      = yoffset;
     Width        = width;
     Height       = height;
     Type         = type;
     OffsetVector = new Vector3(XOffset, YOffset, 0);
     ProxyZone    = proxyZone;
 }
예제 #3
0
    public void AddCard(CardController card, eZoneType zone = eZoneType.Library)
    {
        _playerCardsDictionary.Add(card.UniqueId, card);

        if (zone == eZoneType.Library)
        {
            _libraryContainer.AddCardToZone(card);
        }
        else
        {
            Debug.LogError("Unsupported zone to add card!");
        }

        //card.transform.SetParent(this.gameObject.transform);
    }
예제 #4
0
    public virtual void SetZone(NWZone zone, INWPlayer player)
    {
        _cardsInZone = new List<CardController>();
        _zoneData = zone;
        _zoneType = zone.Type;
        _player = player;

        InitializeZoneController();
    }
예제 #5
0
        //Internal Functions -------------------------------------------------------

        internal void internalSetZoneStatus(int s)
        {
            eZoneStatus tzs = zoneStatus;
            eZoneType   tzt = zoneType;

            switch (s)
            {
            case 0:
                tzs = eZoneStatus.Normal;
                tzt = eZoneType.Unconfigured;
                break;

            case 1:
                tzs = eZoneStatus.Normal;
                tzt = eZoneType.Open;
                break;

            case 2:
                tzs = eZoneStatus.Normal;
                tzt = eZoneType.EOL;
                break;

            case 3:
                tzs = eZoneStatus.Normal;
                tzt = eZoneType.Short;
                break;

            case 5:
                tzs = eZoneStatus.Trouble;
                tzt = eZoneType.Open;
                break;

            case 6:
                tzs = eZoneStatus.Trouble;
                tzt = eZoneType.EOL;
                break;

            case 7:
                tzs = eZoneStatus.Trouble;
                tzt = eZoneType.Short;
                break;

            case 9:
                tzs = eZoneStatus.Violated;
                tzt = eZoneType.Open;
                break;

            case 10:
                tzs = eZoneStatus.Violated;
                tzt = eZoneType.EOL;
                break;

            case 11:
                tzs = eZoneStatus.Violated;
                tzt = eZoneType.Short;
                break;

            case 12:
                tzs = eZoneStatus.SoftBypassed;
                break;

            case 13:
                tzs = eZoneStatus.Bypassed;
                tzt = eZoneType.Open;
                break;

            case 14:
                tzs = eZoneStatus.Bypassed;
                tzt = eZoneType.EOL;
                break;

            case 15:
                tzs = eZoneStatus.Bypassed;
                tzt = eZoneType.Short;
                break;
            }

            if (tzs != zoneStatus)
            {
                zoneStatus = tzs;
                //  myPanel.SendDebug(string.Format("Zone {0} - internalSetZoneStatus - zoneStatus = {1}", zoneNumber, zoneStatus.ToString()));
                OnElkZoneEvent(eElkZoneEventUpdateType.StatusChange);
            }
            if (tzt != zoneType)
            {
                zoneType = tzt;
                //  myPanel.SendDebug(string.Format("Zone {0} - internalSetZoneStatus - zoneType = {1}", zoneNumber, zoneType.ToString()));
                OnElkZoneEvent(eElkZoneEventUpdateType.TypeChange);
            }
            checkRegistered();
        }
예제 #6
0
 public override void Decode(Hashtable data)
 {
     PlayerId = (int)data[(int)eZoneDataKeys.PlayerId];
     ZoneType = (eZoneType)data[(int)eZoneDataKeys.ZoneType];
     ZoneId = (int)data[(int)eZoneDataKeys.ZoneId];
 }
예제 #7
0
 public NWZoneDataObject(int playerId, eZoneType zoneType, int zoneId)
 {
     PlayerId = playerId;
     ZoneType = zoneType;
     ZoneId = zoneId;
 }
예제 #8
0
 public NWZone(eZoneType zone, List<NWCard> cardsInZone)
 {
     _zoneType = zone;
     _cardsInZone = cardsInZone;
 }
예제 #9
0
 public NWZone(eZoneType zone)
 {
     _zoneType = zone;
 }