summaryrefslogtreecommitdiff
path: root/Decompiler/Gestor.Application.ViewModels.Generic/ErrorDialogViewModel.cs
blob: 66e554c78e10548bf781e7a3b4fe905e7545779d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Gestor.Application.Helpers;

namespace Gestor.Application.ViewModels.Generic;

public class ErrorDialogViewModel : DialogViewModel, INotifyPropertyChanged
{
	private List<KeyValuePair<string, string>> _erros;

	public List<KeyValuePair<string, string>> Erros
	{
		get
		{
			List<KeyValuePair<string, string>> list = new List<KeyValuePair<string, string>>();
			foreach (KeyValuePair<string, string> erro in _erros)
			{
				list.Add(new KeyValuePair<string, string>(erro.Key.ToUpper(), erro.Value.ToUpper()));
			}
			return list;
		}
		set
		{
			this.MutateVerbose(ref _erros, value, RaisePropertyChanged(), "Erros");
		}
	}

	public new event PropertyChangedEventHandler PropertyChanged;

	private Action<PropertyChangedEventArgs> RaisePropertyChanged()
	{
		return delegate(PropertyChangedEventArgs args)
		{
			this.PropertyChanged?.Invoke(this, args);
		};
	}
}