Nextrek
Diff Revisions
798
vs
799
for /Android/SmartCharging/SmartCharging_WP/SmartCharging/SiteOwnerRegistrationPage.xaml.cs
|
@@ -35,6 +35,7 @@ |
35 |
35 |
|
private ObservableDictionary defaultViewModel = new ObservableDictionary(); |
36 |
36 |
|
private SiteType selectedSiteType; |
37 |
37 |
|
private SmartChargeAPI SMA; |
|
38 |
+ |
private ErrorHandler errorHandler; |
38 |
39 |
|
|
39 |
40 |
|
public SiteOwnerRegistrationPage() |
40 |
41 |
|
{ |
|
@@ -44,6 +45,7 @@ |
44 |
45 |
|
this.navigationHelper.LoadState += this.NavigationHelper_LoadState; |
45 |
46 |
|
this.navigationHelper.SaveState += this.NavigationHelper_SaveState; |
46 |
47 |
|
this.SMA = SmartChargeAPI.Instance; |
|
48 |
+ |
this.errorHandler = new ErrorHandler(); |
47 |
49 |
|
} |
48 |
50 |
|
|
49 |
51 |
|
/// <summary> |
|
@@ -153,11 +155,11 @@ |
153 |
155 |
|
PhoneNumber = this.PhoneNumberInput.Text, |
154 |
156 |
|
Email = this.EmailInput.Text, |
155 |
157 |
|
WebSite = this.SiteWebsiteTextBox.Text, |
156 |
|
- |
Chargers = System.Text.RegularExpressions.Regex.IsMatch(this.NumberOfChargersTextBox.Text, "[^0-9]") ? int.Parse(this.NumberOfChargersTextBox.Text) : 0 |
|
158 |
+ |
Chargers = System.Text.RegularExpressions.Regex.IsMatch(this.NumberOfChargersTextBox.Text, "[0-9]+") ? int.Parse(this.NumberOfChargersTextBox.Text) : 0 |
157 |
159 |
|
|
158 |
160 |
|
}; |
159 |
161 |
|
|
160 |
|
- |
bool siteAdditionResult = await this.SMA.AddSite(newSite, this.SiteImagePicker.images.ToList()); |
|
162 |
+ |
bool siteAdditionResult = await this.SMA.AddSite(newSite, this.SiteImagePicker.pickedImages.ToList()); |
161 |
163 |
|
if (siteAdditionResult) |
162 |
164 |
|
{ |
163 |
165 |
|
this.goToUserPage(); |