blob: 0a9224b98ded4aa9a81d5fd1911be64a626004a5 (
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
39
40
41
42
43
44
45
46
47
48
49
|
using Gestor.Application.Helpers;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading;
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>> keyValuePairs = new List<KeyValuePair<string, string>>();
foreach (KeyValuePair<string, string> _erro in this._erros)
{
keyValuePairs.Add(new KeyValuePair<string, string>(_erro.Key.ToUpper(), _erro.Value.ToUpper()));
}
return keyValuePairs;
}
set
{
this.MutateVerbose<List<KeyValuePair<string, string>>>(ref this._erros, value, this.RaisePropertyChanged(), "Erros");
}
}
public ErrorDialogViewModel()
{
}
private Action<PropertyChangedEventArgs> RaisePropertyChanged()
{
return (PropertyChangedEventArgs args) => {
PropertyChangedEventHandler propertyChangedEventHandler = this.PropertyChanged;
if (propertyChangedEventHandler == null)
{
return;
}
propertyChangedEventHandler(this, args);
};
}
public event PropertyChangedEventHandler PropertyChanged;
}
}
|