public static void ShowSuccessOrFailure(this IToastService me, IStringLocalizer localizer, int count, string message) { if (count > 0) me.ShowSuccess(localizer[message], localizer["Success"].ToString()); else if (count < 0) me.ShowInfo(localizer[message], localizer["Info"].ToString()); else me.ShowError(localizer[message], localizer["Fault"].ToString()); }
public void OnMove(IToastService toastService, IMoveModel move, String playerName) { if (NotifyOnMove) { toastService.ShowInfo("Moved!", playerName); if (move.ThrownMeeple != null) { OnKick(toastService, move, playerName); } } }
public static void ShowSuccessOrFailure(this IToastService me, IStringLocalizer localizer, int count, string?message) { if (string.IsNullOrWhiteSpace(message)) { message = string.Empty; } if (count > 0) { me.ShowSuccess(localizer[message], localizer["Success"].ToString()); } else if (count < 0) { me.ShowInfo(localizer[message], localizer["Info"].ToString()); } else { me.ShowError(localizer[message], localizer["Fault"].ToString()); } }
public async Task Fix(ErrorFix errorFix) { switch (errorFix) { case ErrorFix.Logout: if (_localLoginService.IsAuthenticated) { await _localLoginService.LocalLogout(); _toastService.ShowInfo(_textService.Toast_AppDidAutomaticLogout, _textService.Toast_Info); } break; case ErrorFix.WrongVersion: _navigationService.ForceReload(); Console.WriteLine("After Fix of versions"); break; default: throw new ArgumentOutOfRangeException(nameof(errorFix), errorFix, null); } }
public static void ShowLoginRequired(this IToastService toastService, TextService textService) { toastService.ShowInfo(textService.Toast_YouNeedToLogIn, textService.Toast_Info); }