Esempio n. 1
0
        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");
            }
        }
Esempio n. 2
0
 public bool AnyPatternMatches(char[,] patternToReplace)
 {
     return(AllPatterns.Any(matchingPattern => PatternMatches(matchingPattern, patternToReplace)));
 }