Exemple #1
0
        public Start(IMediator mediator, IDialogService dialogService)
        {
            Order   = 130;
            Name    = "Start";
            Command = new Command(
                async _ =>
            {
                var dialog = new ConfirmationDialog($"Are you sure you want to start {Context.Name}?");

                if (dialogService.ShowDialog(dialog) is DialogResult.Yes)
                {
                    await mediator.Send(StartRequestFactory.Create(Context)).ConfigureAwait(false);
                }
            });
        }
Exemple #2
0
        public Start(IMediator mediator, IDialogService dialogService)
        {
            Order   = 130;
            Name    = "Start";
            Icon    = "MaterialLight.Play";
            Command = new Command(
                async _ =>
            {
                var dialog = new ConfirmationDialog($"Are you sure you want to start {Context.Name}?");

                if (await dialogService.ShowDialogAsync(dialog) is DialogResult.Yes)
                {
                    await mediator.Send(StartRequestFactory.Create(Context));
                }
            });
        }