internal static string ToSerializedValue(this DeliveryLocation value) { switch (value) { case DeliveryLocation.Unknown: return("Unknown"); case DeliveryLocation.Inbox: return("Inbox"); case DeliveryLocation.JunkFolder: return("JunkFolder"); case DeliveryLocation.DeletedFolder: return("DeletedFolder"); case DeliveryLocation.Quarantine: return("Quarantine"); case DeliveryLocation.External: return("External"); case DeliveryLocation.Failed: return("Failed"); case DeliveryLocation.Dropped: return("Dropped"); case DeliveryLocation.Forwarded: return("Forwarded"); } return(null); }
public PlanItem(IItem item) : base(item) { // EF ComplexType objects cannot be null if (Unit == null) { Unit = new Unit(); } if (DeliveryDate == null) { DeliveryDate = new Period(); } if (DeliveryAddress == null) { DeliveryAddress = new AddressOptional(); } if (DeliveryLocation == null) { DeliveryLocation = new DeliveryLocation(); } if (Classification == null) { Classification = new ClassificationCPVOptional(); } }
private void SpawnLocationButton(DeliveryLocation l) { DeliveryLocation dl = l; Button locationButton = Instantiate(locationButtonPrefab, locationsButtonsContainer).GetComponent <Button>(); locationButton.onClick.AddListener(() => LookAtLocation(dl)); locationButton.transform.GetChild(0).GetComponentInChildren <Text>().text = l.name; }
private void SpawnDeliveryLocation(DeliveryLocation l) { GameObject dl = Instantiate(deliveryLocationPrefab); dl.transform.localEulerAngles = new Vector3(l.y + visualOffset.y, -l.x - visualOffset.x, 0); l.visualPoint = dl.transform.GetChild(0); SpawnLocationButton(l); }
public void LookAtLocation(DeliveryLocation l) { Transform cameraParent = Camera.main.transform.parent; Transform cameraPivot = cameraParent.parent; cameraParent.DOLocalRotate(new Vector3(l.y, 0, 0), lookDuration, RotateMode.Fast).SetEase(lookEase); cameraPivot.DOLocalRotate(new Vector3(0, -l.x, 0), lookDuration, RotateMode.Fast).SetEase(lookEase); FindObjectOfType <FollowTarget>().target = l.visualPoint; }
public static DeliveryLocationDto FromLocation(DeliveryLocation location) { return(new DeliveryLocationDto { Address = location.Address, BuildingNumber = location.BuildingNumber, EntranceNumber = location.EntranceNumber, FloorNumber = location.FloorNumber, ApartmentNumber = location.ApartmentNumber, Latitude = location.Latitude, Longitude = location.Longitude, Note = location.Note, ContactPerson = ContactPersonDto.FromContactPerson(location.ContactPerson), ArrivalStartDateTime = location.ArrivalStartDateTime, ArrivalFinishDateTime = location.ArrivalFinishDateTime, CourierArrivedDateTime = location.CourierArrivedDateTime }); }
public static void ShouldBeEquivalentOf(this DeliveryLocation location, PostNord.ServicePoint servicePoint) { location.ShouldNotBeNull(); location.text.ShouldEqual(servicePoint.Name); location.value.Address.ShouldEqual(string.Concat(servicePoint.DeliveryAddress.StreetName, ' ', servicePoint.DeliveryAddress.StreetNumber)); }