コード例 #1
0
    private void Initializing()
    {
        if (!ReferenceEquals(_placesController.PlacesDic, null))
        {
            if (_placesController.PlacesDic.ContainsKey(_placeId))
            {
                PlaceEntry place = _placesController.PlacesDic[_placeId];
                Dictionary <string, Arriver> arrivers = new Dictionary <string, Arriver>();
                arrivers = place.Arrivers;
                if (arrivers.Count > 0)
                {
                    _arriverAtPlaceGenerator.CreateTemplateArriverAtPlace(arrivers);

                    if (itemsParent != null)
                    {
                        itemsParent.GetComponentsInChildren(includeInactive: true, result: arriverSlots);
                    }

                    for (int index = 0; index < arriverSlots.Count; index++)
                    {
                        arriverSlots[index].OnPointerEnterNpcSlot.AddListener(OnPointerEnterNpcSlotHandler);
                        arriverSlots[index].OnPointerExitNpcSlot.AddListener(OnPointerExitNpcSlotHandler);
                        arriverSlots[index].OnPointerLeftClickNpcSlot.AddListener(OnPointerLeftClickNpcSlotHandler);
                    }
                    OnDisplayFinished?.Invoke();
                }
            }
        }
    }
コード例 #2
0
 private void SaveButton_Clicked(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(PlaceEntry.Text))
     {
         PlaceEntry.Focus();
     }
     else if (String.IsNullOrEmpty(TotalCount.Text) || int.Parse(TotalCount.Text) < 1)
     {
         TotalCount.Focus();
     }
     else if ((RecordEditViewModel.Position == PositionInfo.PositionOption.Pin && RecordEditViewModel.Latitude == 0 && RecordEditViewModel.Longitude == 0) ||
              (RecordEditViewModel.Position != PositionInfo.PositionOption.Pin && RecordEditViewModel.PositionList.Count == 0))
     {
         Application.Current.MainPage.DisplayAlert("Fundort festlegen", "Lege zunächste einen Fundort fest.", "Okay");
         RecordAreaButton_Clicked(null, null);
     }
 }