private bool InsertEntity(long id, BankEntity entity)
 {
     bool isAdded = false;
     if (!BankEntity.ContainsKey (id)) isAdded = true;
     BankEntity [id] = entity;
     AddToQueue (id);
     return isAdded;
 }
예제 #2
0
 public EntityMarker(BankEntity entity, IconType iconType)
 {
     this.Entity = entity;
     this.MarkerOptions = new MarkerOptions ();
     this.MarkerOptions.SetTitle (entity.Description());
     this.MarkerOptions.SetPosition (new LatLng(entity.Latitude, entity.Longitude));
     this.Type = MarkerType.Regular;
     IconType = iconType;
 }
        public static EntityViewFragment NewInstance(BankEntity bankEntity, bool IsRelativeToUserLocation)
        {
            EntityViewFragment entityViewFragment = new EntityViewFragment ();
            Bundle args = new Bundle();
            args.PutDouble ("Distance", bankEntity.Distance);
            args.PutString ("Name", bankEntity.Name);
            args.PutDouble ("Latitude", bankEntity.Latitude);
            args.PutDouble ("Longitude", bankEntity.Longitude);
            args.PutString ("LocationType", bankEntity.LocationType);
            args.PutLong ("LocationId", bankEntity.LocationId);
            args.PutLong ("Id", bankEntity.Id);
            args.PutString ("Brand", bankEntity.BrandName ());
            args.PutString ("Address", bankEntity.Address);
            args.PutBoolean ("IsRelativeToUserLocation", IsRelativeToUserLocation);

            entityViewFragment.Arguments =  args;
            return entityViewFragment;
        }
        public override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate (savedInstanceState);
            if (Arguments != null)
            {
                long id = Arguments.GetLong("Id");
                string name = Arguments.GetString("Name");
                long locationId = Arguments.GetLong ("LocationId");
                double latitude = Arguments.GetDouble("Latitude");
                double longitude = Arguments.GetDouble ("Longitude");
                double distance = Arguments.GetDouble("Distance");
                string locationType = Arguments.GetString("LocationType");
                string brand = Arguments.GetString ("Brand");
                string address = Arguments.GetString ("Address");
                IsRelativeToUserLocation = Arguments.GetBoolean ("IsRelativeToUserLocation");

                BankEntity = locationType == "ATM" ?
                    new Atm (id, brand, name, locationId, latitude, longitude, distance, locationType, address) as BankEntity :
                    new Branch (id, name, locationId, latitude, longitude, distance, locationType, address) as BankEntity;
            }
        }
예제 #5
0
 public EntityMarker(BankEntity entity, IconType iconType, MarkerType markerType)
     : this(entity, iconType)
 {
     this.Type = markerType;
     IconType = IconType.Closest;
 }
 private bool Include(BankEntity aBankEntity)
 {
     if (!aBankEntity.IsOwnBrand ()) return true;
     if (aBankEntity.IsOwnBrand () && !aBankEntity.IsAtm()) return true;
     return false;
 }
 private bool Include(BankEntity aBankEntity)
 {
     return (!aBankEntity.IsBranch());
 }
 private bool Include(BankEntity aBankEntity)
 {
     return aBankEntity.IsOwnBrand ();
 }