private async void DeletePattern(object item) { var selectedPattern = item as Pattern; if (await Application.Current.MainPage.DisplayAlert("Подтверждение", "Вы уверены?", "Да", "Нет")) { var response = await PatternService.Instance.RemovePattern(selectedPattern.pattern_name); if (response.Item1) { AllPatterns.Remove(selectedPattern); } await Application.Current.MainPage.DisplayAlert("Message", response.Item2, "OK"); } }
public bool AnyPatternMatches(char[,] patternToReplace) { return(AllPatterns.Any(matchingPattern => PatternMatches(matchingPattern, patternToReplace))); }