Exemple #1
0
        async Task Dispatch()
        {
            CarouselSelectedIndex index = (CarouselSelectedIndex)carousel.SelectedIndex;

            switch (index)
            {
            case CarouselSelectedIndex.Name:
                this.InvalidateNameCommand.Execute(null);
                if (!IsInvalidateName)
                {
                    ++carousel.SelectedIndex;
                }
                break;

            case CarouselSelectedIndex.Number:
                this.InvalidateNumberCommand.Execute(null);
                if (!IsInvalidateNumber)
                {
                    ++carousel.SelectedIndex;
                }
                break;

            case CarouselSelectedIndex.Address:
                this.InvalidateNameCommand.Execute(null);
                this.InvalidateNumberCommand.Execute(null);
                this.ValidateCommand.Execute(null);
                if (this.IsValidate && !this.IsBusy)
                {
                    this.IsBusy = true;
                    await this.Save();
                }
                else
                {
                    if (IsInvalidateName)
                    {
                        carousel.SelectedIndex = 0;
                    }
                    else if (IsInvalidateNumber)
                    {
                        carousel.SelectedIndex = 1;
                    }
                }
                break;

            default:
                break;
            }
        }
Exemple #2
0
        async Task Dispatch()
        {
            CarouselSelectedIndex index = (CarouselSelectedIndex)carousel.SelectedIndex;

            switch (index)
            {
            case CarouselSelectedIndex.Origin:
                if (!this.IsBusy)
                {
                    this.IsBusy = true;
                    await this.Save();
                }
                break;

            default:
                ++carousel.SelectedIndex;
                break;
            }
        }