58
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
1 using System;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
2 using System.ComponentModel;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
3 using System.Linq;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
4 using System.Windows;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
5 using System.Windows.Input;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
6 using FluentValidation;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
7 using SilverlightValidation.Interfaces;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
8 using SilverlightValidation.Validators;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
9 using SilverlightValidation.Models;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
10 using SilverlightValidation.Commands;
|
60
|
11 using GalaSoft.MvvmLight.Messaging;
|
|
12 using SilverlightValidation.Messages;
|
58
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
13
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
14 namespace SilverlightValidation.ViewModels
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
15 {
|
60
|
16 public class UserViewModel : ViewModelBase, IUserModel, IEditableObject
|
58
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
17 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
18 #region Fields
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
19
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
20 private readonly UserModelValidator _validator;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
21 private UserModel _data;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
22 private UserModel _backup;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
23
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
24 #endregion
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
25
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
26 #region Constructor
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
27
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
28 public UserViewModel(UserModel model, UserModelValidator validator)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
29 {
|
97
|
30 if (model == null) throw new ArgumentNullException("model");
|
|
31 if (validator == null) throw new ArgumentNullException("validator");
|
|
32
|
58
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
33 _validator = validator;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
34 _data = model;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
35 _backup = model.Clone();
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
36
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
37 OkCommand = new RelayCommand(OkCommandExecute);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
38 CancelCommand = new RelayCommand(CancelCommandExecute);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
39 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
40
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
41 #endregion
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
42
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
43 #region Methods
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
44
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
45 private void SetProperties(IUserModel source)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
46 {
|
60
|
47 _data.Username = source.Username;
|
|
48 _data.Password = source.Password;
|
|
49 _data.Email = source.Email;
|
|
50 _data.DateOfBirth = source.DateOfBirth;
|
|
51 _data.Description = source.Description;
|
58
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
52 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
53
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
54 #endregion
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
55
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
56 #region Properties
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
57
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
58 private const string UsernameProperty = "Username";
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
59 public string Username
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
60 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
61 get { return _data.Username; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
62 set
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
63 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
64 if (_data.Username != value)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
65 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
66 _data.Username = value;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
67 RaisePropertyChanged(UsernameProperty);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
68 IsChanged = true;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
69 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
70
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
71 ClearError(UsernameProperty);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
72 var validationResult = _validator.Validate(this, UsernameProperty);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
73 if (!validationResult.IsValid)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
74 validationResult.Errors.ToList().ForEach(x => SetError(UsernameProperty, x.ErrorMessage));
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
75 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
76 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
77
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
78 private const string PasswordProperty = "Password";
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
79 public string Password
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
80 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
81 get { return _data.Password; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
82 set
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
83 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
84 if (_data.Password != value)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
85 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
86 _data.Password = value;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
87 RaisePropertyChanged(PasswordProperty);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
88 IsChanged = true;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
89 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
90
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
91 ClearError(PasswordProperty);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
92 var validationResult = _validator.Validate(this, PasswordProperty);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
93 if (!validationResult.IsValid)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
94 validationResult.Errors.ToList().ForEach(x => SetError(PasswordProperty, x.ErrorMessage));
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
95 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
96 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
97
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
98 private const string EmailProperty = "Email";
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
99 public string Email
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
100 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
101 get { return _data.Email; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
102 set
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
103 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
104 if (_data.Email != value)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
105 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
106 _data.Email = value;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
107 RaisePropertyChanged(EmailProperty);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
108 IsChanged = true;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
109 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
110
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
111 ClearError(EmailProperty);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
112 var validationResult = _validator.Validate(this, EmailProperty);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
113 if (!validationResult.IsValid)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
114 validationResult.Errors.ToList().ForEach(x => SetError(EmailProperty, x.ErrorMessage));
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
115 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
116 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
117
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
118 private const string DateOfBirthProperty = "DateOfBirth";
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
119 public DateTime? DateOfBirth
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
120 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
121 get { return _data.DateOfBirth; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
122 set
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
123 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
124 if (_data.DateOfBirth != value)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
125 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
126 _data.DateOfBirth = value;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
127 RaisePropertyChanged(DateOfBirthProperty);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
128 IsChanged = true;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
129 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
130
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
131 ClearError(DateOfBirthProperty);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
132 var validationResult = _validator.Validate(this, DateOfBirthProperty);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
133 if (!validationResult.IsValid)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
134 validationResult.Errors.ToList().ForEach(x => SetError(DateOfBirthProperty, x.ErrorMessage));
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
135 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
136 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
137
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
138 private const string DescriptionProperty = "Description";
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
139 public string Description
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
140 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
141 get { return _data.Description; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
142 set
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
143 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
144 if (_data.Description != value)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
145 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
146 _data.Description = value;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
147 RaisePropertyChanged(DescriptionProperty);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
148 IsChanged = true;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
149 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
150
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
151 ClearError(DescriptionProperty);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
152 var validationResult = _validator.Validate(this, DescriptionProperty);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
153 if (!validationResult.IsValid)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
154 validationResult.Errors.ToList().ForEach(x => SetError(DescriptionProperty, x.ErrorMessage));
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
155 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
156 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
157
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
158 #endregion
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
159
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
160 #region Commands
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
161
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
162 public ICommand OkCommand { get; set; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
163 public ICommand CancelCommand { get; set; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
164
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
165 private void OkCommandExecute(object obj)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
166 {
|
60
|
167 RefreshToViewErrors();
|
58
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
168
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
169 if (IsChanged && !HasErrors)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
170 {
|
60
|
171 // save here
|
|
172 Messenger.Default.Send<UserViewResponseMessage>(
|
|
173 new UserViewResponseMessage() { UserViewModel = this });
|
58
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
174 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
175 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
176
|
60
|
177 // in case user hasn't touched the form
|
|
178 private void RefreshToViewErrors()
|
|
179 {
|
|
180 Username = _data.Username;
|
|
181 Password = _data.Password;
|
|
182 Email = _data.Email;
|
|
183 DateOfBirth = _data.DateOfBirth;
|
|
184 }
|
|
185
|
58
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
186 private void CancelCommandExecute(object obj)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
187 {
|
60
|
188 Messenger.Default.Send<UserViewResponseMessage>(
|
|
189 new UserViewResponseMessage() { UserViewModel = null });
|
58
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
190 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
191
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
192 #endregion
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
193
|
60
|
194 private void ResetFormData()
|
58
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
195 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
196 SetProperties(_backup);
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
197 ClearAllErrors();
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
198 IsChanged = false;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
199 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
200
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
201 public bool IsChanged { get; private set; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
202
|
60
|
203 #region IEditableObject for datagrid
|
58
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
204
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
205 private bool inEdit;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
206 public void BeginEdit()
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
207 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
208 if (inEdit) return;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
209 inEdit = true;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
210 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
211
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
212 public void CancelEdit()
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
213 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
214 if (!inEdit) return;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
215 inEdit = false;
|
60
|
216 ResetFormData();
|
58
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
217 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
218
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
219 public void EndEdit()
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
220 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
221 if (!inEdit) return;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
222 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
223
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
224 #endregion
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
225 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
226 }
|