コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: PlanItem.cs プロジェクト: AqueGen/Prozorro
 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();
     }
 }
コード例 #3
0
    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;
    }
コード例 #4
0
    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);
    }
コード例 #5
0
    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;
    }
コード例 #6
0
 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
     });
 }
コード例 #7
0
 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));
 }