diff --git a/YavscLib/YavscLib.csproj b/YavscLib/YavscLib.csproj
index e1d6d593..68fc7847 100644
--- a/YavscLib/YavscLib.csproj
+++ b/YavscLib/YavscLib.csproj
@@ -73,20 +73,29 @@
MinimumRecommendedRules.ruleset
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -97,8 +106,6 @@
-
-
diff --git a/YavscLib/project.lock.json b/YavscLib/project.lock.json
index 79695a3d..2621d394 100644
--- a/YavscLib/project.lock.json
+++ b/YavscLib/project.lock.json
@@ -3,22 +3,20 @@
"version": 2,
"targets": {
".NETFramework,Version=v4.5.1": {},
- ".NETPortable,Version=v4.5,Profile=Profile111": {},
- ".NETFramework,Version=v4.5.1/debian.8-x86": {},
- ".NETFramework,Version=v4.5.1/debian.8-x64": {},
- ".NETPortable,Version=v4.5,Profile=Profile111/debian.8-x86": {},
- ".NETPortable,Version=v4.5,Profile=Profile111/debian.8-x64": {}
+ ".NETPortable,Version=v4.5,Profile=Profile111": {}
},
"libraries": {},
"projectFileDependencyGroups": {
"": [],
".NETFramework,Version=v4.5.1": [],
".NETPortable,Version=v4.5,Profile=Profile111": [
- "fx/System.Runtime >= 4.0.0",
- "fx/System.Globalization >= 4.0.0",
- "fx/System.Resources.ResourceManager >= 4.0.0",
- "fx/System.Collections >= 4.0.0",
- "fx/System.Collections.Generic >= 4.0.0"
+ "System.Collections >= 4.0.0",
+ "System.Collections.Generic >= 4.0.0",
+ "System.Globalization >= 4.0.0",
+ "System.Resources.ResourceManager >= 4.0.0",
+ "System.Runtime >= 4.0.0"
]
- }
+ },
+ "tools": {},
+ "projectFileToolGroups": {}
}
\ No newline at end of file
diff --git a/ZicMoove/ZicMoove.Droid/Helpers/YavscHelpers.cs b/ZicMoove/ZicMoove.Droid/Helpers/YavscHelpers.cs
index ed435de6..b6ac009a 100644
--- a/ZicMoove/ZicMoove.Droid/Helpers/YavscHelpers.cs
+++ b/ZicMoove/ZicMoove.Droid/Helpers/YavscHelpers.cs
@@ -6,6 +6,7 @@ using System.Net;
using System.Runtime.Serialization.Json;
using System.Text;
using ZicMoove.Model.Auth.Account;
+using System.IO;
namespace ZicMoove.Droid
{
@@ -13,13 +14,23 @@ namespace ZicMoove.Droid
public static class YavscHelpers
{
- public static void SetRegId(this User user, string regId)
+ public static string GetSpecialFolder(this string specialPath)
{
- if (user.YavscTokens == null)
+ if (specialPath == null)
throw new InvalidOperationException();
-
+ var appData =
+ System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData);
+ string imagesFolder = System.IO.Path.Combine(appData, specialPath);
+ DirectoryInfo di = new DirectoryInfo(imagesFolder);
+ // FIXME Create this folder at app startup
+ if (!di.Exists) di.Create();
+ return imagesFolder;
+ }
+
+ public static string GetTmpDir ()
+ {
+ return GetSpecialFolder("tmp");
}
-
}
}
diff --git a/ZicMoove/ZicMoove.Droid/MainActivity.cs b/ZicMoove/ZicMoove.Droid/MainActivity.cs
index c5e81e86..cc4cc127 100644
--- a/ZicMoove/ZicMoove.Droid/MainActivity.cs
+++ b/ZicMoove/ZicMoove.Droid/MainActivity.cs
@@ -505,11 +505,7 @@ namespace ZicMoove.Droid
get
{
if (imagesFolder != null) return imagesFolder;
- var appData =
- System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData);
- imagesFolder = System.IO.Path.Combine(appData, Constants.ImagePath);
- DirectoryInfo di = new DirectoryInfo(imagesFolder);
- if (!di.Exists) di.Create();
+ imagesFolder = Constants.ImagePath.GetSpecialFolder();
return imagesFolder;
}
}
@@ -541,11 +537,11 @@ namespace ZicMoove.Droid
}
}
}
-
+ var acode = photo[1];
+ var act = DataManager.Instance.Activities.LocalGet(acode);
+ act.LocalPhoto = Path.Combine(images, $"{acode}.svg");
}
}
- foreach (var act in DataManager.Instance.Activities)
- { act.LocalPhoto = Path.Combine(images, $"{act.Code}.svg"); }
DataManager.Instance.Activities.SaveEntity();
}
}
diff --git a/ZicMoove/ZicMoove.Droid/Services/GCMHandlers/EstimateGCMHandler.cs b/ZicMoove/ZicMoove.Droid/Services/GCMHandlers/EstimateGCMHandler.cs
index dc3826fd..3beef9f4 100644
--- a/ZicMoove/ZicMoove.Droid/Services/GCMHandlers/EstimateGCMHandler.cs
+++ b/ZicMoove/ZicMoove.Droid/Services/GCMHandlers/EstimateGCMHandler.cs
@@ -37,7 +37,8 @@ namespace ZicMoove.Droid.Services.GCMHandlers
var client = JsonConvert.DeserializeObject(clientJson);
var estimate = new Estimate
{
- Id = eid
+ Id = eid,
+ CommandType = data.GetString("CommandType")
};
var dateString = data.GetString("ProviderValidationDate");
DateTime evDate;
diff --git a/ZicMoove/ZicMoove/App.xaml.cs b/ZicMoove/ZicMoove/App.xaml.cs
index eafcafc0..8fb19cc4 100644
--- a/ZicMoove/ZicMoove/App.xaml.cs
+++ b/ZicMoove/ZicMoove/App.xaml.cs
@@ -195,27 +195,32 @@ namespace ZicMoove
}
- BookQueriesPage bQueriesPage;
- AccountChooserPage accChooserPage;
- ActivityPage homePage;
+ static BookQueriesPage bQueriesPage;
+ static AccountChooserPage accChooserPage;
+ static ActivityPage homePage;
private static UserProfilePage userProfilePage;
public static UserProfilePage UserProfilePage
{ get { return userProfilePage; } }
- ChatPage chatPage;
- PinPage pinPage;
+ static ChatPage chatPage;
+ static PinPage pinPage;
- public static void ShowPage(Page page)
+ public static async void ShowPage(Page page)
{
+ if (page == homePage)
+ {
+ await Navigation.PopToRootAsync();
+ return;
+ }
if (Navigation.NavigationStack.Contains(page))
{
if (Navigation.NavigationStack.Last() == page) return;
Navigation.RemovePage(page);
page.Parent = null;
}
- Navigation.PushAsync(page);
+ await Navigation.PushAsync(page);
}
private void BuildMainPage()
@@ -263,7 +268,7 @@ namespace ZicMoove
BindingContext = new ChatViewModel()
};
- pinPage = new PinPage();
+ pinPage = new PinPage { Title = Strings.Carte };
// var mainPage = new NavigationPage(bQueriesPage);
@@ -322,6 +327,7 @@ namespace ZicMoove
masterDetail.ToolbarItems.Add(tiHome);
masterDetail.ToolbarItems.Add(tiSetts);
masterDetail.ToolbarItems.Add(tiPubChat);
+ masterDetail.ToolbarItems.Add(tiPinPage);
this.MainPage = masterDetail;
NavigationService = new NavigationService(Navigation);
diff --git a/ZicMoove/ZicMoove/Data/RemoteEntity.cs b/ZicMoove/ZicMoove/Data/RemoteEntity.cs
index 2230eaec..f67de444 100644
--- a/ZicMoove/ZicMoove/Data/RemoteEntity.cs
+++ b/ZicMoove/ZicMoove/Data/RemoteEntity.cs
@@ -142,9 +142,10 @@ namespace ZicMoove.Data
created = response.IsSuccessStatusCode;
if (!created)
{
+
// TODO throw custom exception, and catch to inform user
var errcontent = await response.Content.ReadAsStringAsync();
- Debug.WriteLine(string.Format(Strings.CreationFailed));
+ Debug.WriteLine(string.Format(Strings.CreationFailed,stringContent,ControllerUri.AbsoluteUri));
Debug.WriteLine(errcontent);
}
else
diff --git a/ZicMoove/ZicMoove/Interfaces/IBillingLine.cs b/ZicMoove/ZicMoove/Interfaces/IBillingLine.cs
deleted file mode 100644
index 3eb4b7e2..00000000
--- a/ZicMoove/ZicMoove/Interfaces/IBillingLine.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-
-namespace ZicMoove.Interfaces
-{
- public interface IBillingLine
- {
- int Count { get; set; }
- string Description { get; set; }
- TimeSpan Duration { get; set; }
- decimal UnitaryCost { get; set; }
- }
-}
\ No newline at end of file
diff --git a/ZicMoove/ZicMoove/Interfaces/IEstimate.cs b/ZicMoove/ZicMoove/Interfaces/IEstimate.cs
deleted file mode 100644
index d8c370eb..00000000
--- a/ZicMoove/ZicMoove/Interfaces/IEstimate.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using ZicMoove.Model.Workflow;
-using System.Collections.Generic;
-
-namespace ZicMoove.Model.Interfaces
-{
- public interface IEstimate
- {
- List AttachedFiles { get; set; }
- List AttachedGraphics { get; }
- List Bill { get; set; }
- string ClientId { get; set; }
- long? CommandId { get; set; }
- string CommandType { get; set; }
- string Description { get; set; }
- long Id { get; set; }
- string OwnerId { get; set; }
- string Title { get; set; }
- }
-}
\ No newline at end of file
diff --git a/ZicMoove/ZicMoove/Model/Workflow/Activity.cs b/ZicMoove/ZicMoove/Model/Workflow/Activity.cs
index 39149d20..d509c6f6 100644
--- a/ZicMoove/ZicMoove/Model/Workflow/Activity.cs
+++ b/ZicMoove/ZicMoove/Model/Workflow/Activity.cs
@@ -1,10 +1,11 @@
using Newtonsoft.Json;
using System;
-using YavscLib;
+using XLabs.Forms.Mvvm;
namespace ZicMoove.Model.Workflow
{
- public class Activity : IActivity
+ using YavscLib;
+ public class Activity : ViewModel, IActivity
{
public string Code
{
@@ -74,6 +75,11 @@ namespace ZicMoove.Model.Workflow
get;
set;
}
- public string LocalPhoto { get; set; }
+ private string photo;
+
+ public string LocalPhoto {
+ get { return photo; }
+ set { SetProperty(ref photo, value);
+ } }
}
}
diff --git a/ZicMoove/ZicMoove/Model/Workflow/CommandForm.cs b/ZicMoove/ZicMoove/Model/Workflow/CommandForm.cs
index cdc87566..c686a15b 100644
--- a/ZicMoove/ZicMoove/Model/Workflow/CommandForm.cs
+++ b/ZicMoove/ZicMoove/Model/Workflow/CommandForm.cs
@@ -9,7 +9,7 @@ namespace ZicMoove.Model.Workflow
{
public class CommandForm : ICommandForm
{
- public string Action
+ public string ActionName
{
get; set;
}
diff --git a/ZicMoove/ZicMoove/Model/Workflow/Estimate.cs b/ZicMoove/ZicMoove/Model/Workflow/Estimate.cs
index aa055fcb..d998cac2 100644
--- a/ZicMoove/ZicMoove/Model/Workflow/Estimate.cs
+++ b/ZicMoove/ZicMoove/Model/Workflow/Estimate.cs
@@ -7,9 +7,9 @@ using System.Linq;
namespace ZicMoove.Model.Workflow
{
using Data;
- using Interfaces;
using Musical;
- using Social;
+ using YavscLib.Workflow;
+
public partial class Estimate : IEstimate
{
public long Id { get; set; }
diff --git a/ZicMoove/ZicMoove/Pages/ClientPages/ActivityPage.xaml b/ZicMoove/ZicMoove/Pages/ClientPages/ActivityPage.xaml
index cfb658e5..bac0aa7b 100644
--- a/ZicMoove/ZicMoove/Pages/ClientPages/ActivityPage.xaml
+++ b/ZicMoove/ZicMoove/Pages/ClientPages/ActivityPage.xaml
@@ -3,8 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ZicMoove.Pages.ClientPages.ActivityPage"
xmlns:local="clr-namespace:ZicMoove;assembly=ZicMoove"
- xmlns:views="clr-namespace:ZicMoove.Views;assembly=ZicMoove"
+ xmlns:views="clr-namespace:ZicMoove.Views;assembly=ZicMoove"
+ xmlns:converters="clr-namespace:ZicMoove.Converters;assembly=ZicMoove"
>
+
+
+
+
@@ -30,7 +35,7 @@
-
+
diff --git a/ZicMoove/ZicMoove/Pages/EstimatePages/BillingLine.cs b/ZicMoove/ZicMoove/Pages/EstimatePages/BillingLine.cs
index 4cdd632a..be15cc3a 100644
--- a/ZicMoove/ZicMoove/Pages/EstimatePages/BillingLine.cs
+++ b/ZicMoove/ZicMoove/Pages/EstimatePages/BillingLine.cs
@@ -1,15 +1,20 @@
-
-using ZicMoove.Interfaces;
-using System;
+using System;
namespace ZicMoove.Model.Workflow
{
- public class BillingLine : IBillingLine
+ using YavscLib.Billing;
+ public class BillingLine : ICommandLine
{
public long Id { get; set; }
+
public string Description { get; set; }
+
public TimeSpan Duration { get; set; }
+
public int Count { get; set; } = 1;
+
public decimal UnitaryCost { get; set; }
+
+ public long EstimateId { get; set; }
}
}
diff --git a/ZicMoove/ZicMoove/Pages/EstimatePages/BookQueryPage.xaml.cs b/ZicMoove/ZicMoove/Pages/EstimatePages/BookQueryPage.xaml.cs
index 184ff4ca..8243136d 100644
--- a/ZicMoove/ZicMoove/Pages/EstimatePages/BookQueryPage.xaml.cs
+++ b/ZicMoove/ZicMoove/Pages/EstimatePages/BookQueryPage.xaml.cs
@@ -79,6 +79,7 @@ namespace ZicMoove.Pages
ClientId = BookQuery.Client.UserId,
CommandId = BookQuery.Id,
OwnerId = MainSettings.CurrentUser.Id,
+ CommandType = "RdvQuery",
Id = 0
});
DataManager.Instance.EstimationCache.Add(editEstimateViewModel);
diff --git a/ZicMoove/ZicMoove/Pages/EstimatePages/EditBillingLinePage.xaml.cs b/ZicMoove/ZicMoove/Pages/EstimatePages/EditBillingLinePage.xaml.cs
index 0e77d7ff..c4c29a81 100644
--- a/ZicMoove/ZicMoove/Pages/EstimatePages/EditBillingLinePage.xaml.cs
+++ b/ZicMoove/ZicMoove/Pages/EstimatePages/EditBillingLinePage.xaml.cs
@@ -15,12 +15,6 @@ namespace ZicMoove.Pages
InitializeComponent();
foreach (string du in Enum.GetNames(typeof(BillingLineViewModel.DurationUnits)))
picker.Items.Add(du);
- BindingContext = new BillingLineViewModel(new BillingLine());
- }
-
- public EditBillingLinePage()
- {
- Initialize();
}
public EditBillingLinePage(BillingLineViewModel model)
diff --git a/ZicMoove/ZicMoove/Pages/EstimatePages/EditEstimatePage.xaml.cs b/ZicMoove/ZicMoove/Pages/EstimatePages/EditEstimatePage.xaml.cs
index 286cb981..940d6209 100644
--- a/ZicMoove/ZicMoove/Pages/EstimatePages/EditEstimatePage.xaml.cs
+++ b/ZicMoove/ZicMoove/Pages/EstimatePages/EditEstimatePage.xaml.cs
@@ -54,8 +54,9 @@ namespace ZicMoove.Pages
protected void OnNewCommanLine(object sender, EventArgs e)
{
- var com = new BillingLine() { Count = 1, UnitaryCost = 0.01m };
- var bill = ((EditEstimateViewModel)BindingContext).Bill;
+ var model = (EditEstimateViewModel)BindingContext;
+ var com = new BillingLine() { Count = 1, UnitaryCost = 0.01m, EstimateId = model.Data.Id };
+ var bill = model.Bill;
var lineView = new BillingLineViewModel(com)
{ ValidateCommand = new Command(() => {
bill.Add(new BillingLineViewModel(com));
diff --git a/ZicMoove/ZicMoove/Pages/PinPage.cs b/ZicMoove/ZicMoove/Pages/PinPage.cs
index ed40ca8d..b61ab108 100644
--- a/ZicMoove/ZicMoove/Pages/PinPage.cs
+++ b/ZicMoove/ZicMoove/Pages/PinPage.cs
@@ -79,7 +79,7 @@ namespace ZicMoove.Pages
};
OnInitMap();
/*
- // A "relocate" button : useless, since it yet exists
+ // A "relocate" button :
var reLocate = new Button { Text = "Re-centrer" };
reLocate.Clicked += async delegate {
diff --git a/ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs b/ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs
index 7a75cea7..aef8f833 100644
--- a/ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs
+++ b/ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs
@@ -1,17 +1,19 @@
-
-using ZicMoove.ViewModels.UserProfile;
-using Plugin.Media;
+using Plugin.Media;
using Plugin.Media.Abstractions;
using System;
-
using Xamarin.Forms;
-using ZicMoove.Settings;
-using ZicMoove.Helpers;
using System.Net.Http;
+using Android.Graphics;
namespace ZicMoove.Pages.UserProfile
{
- public partial class UserProfilePage
+ using ViewModels.UserProfile;
+ using Helpers;
+ using System.IO;
+ using System.Threading.Tasks;
+ using Android.Content.Res;
+
+ public partial class UserProfilePage
{
public UserProfilePage()
{
@@ -28,62 +30,135 @@ namespace ZicMoove.Pages.UserProfile
BindingContext = model;
}
-
+
private async void BtnPay_Clicked(object sender, EventArgs e)
{
App.PlatformSpecificInstance.Pay(0.1, Interfaces.PayMethod.Immediate, "test payment");
-
}
private async void AvatarButton_Clicked(object sender, EventArgs e)
{
+ IsBusy = true;
if (!CrossMedia.Current.IsCameraAvailable || !CrossMedia.Current.IsTakePhotoSupported)
{
await DisplayAlert("No Camera", ":( No camera avaialble.", "OK");
+ IsBusy = false;
return;
}
- IsBusy = true;
var file = await CrossMedia.Current.TakePhotoAsync(new StoreCameraMediaOptions
{
Directory = "Avatars",
- Name = "me.jpg"
+ Name = "me.jpg",
+ DefaultCamera = CameraDevice.Front
});
if (file == null)
- return;
- using (var client = UserHelpers.CreateJsonClient())
{
- // Get the whole data
- try
+ IsBusy = false;
+ return;
+ }
+ if (TargetPlatform.Android == Device.OS)
+ {
+ // Rotate if needed
+ BitmapFactory.Options options = new BitmapFactory.Options { };
+ Android.Media.ExifInterface exif = new Android.Media.ExifInterface(file.Path);
+ var orientation = exif.GetAttributeInt(
+ Android.Media.ExifInterface.TagOrientation, 0);
+ using (var stream = file.GetStream())
{
- using (var stream = file.GetStream())
- {
- var requestContent = new MultipartFormDataContent();
- var content = new StreamContent(stream);
- var filename = "me.jpg";
- content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/octet-stream");
- content.Headers.Add("Content-Disposition", $"form-data; name=\"file\"; filename=\"{filename}\"");
- requestContent.Add(content, "file", filename);
+ var bmp = await BitmapFactory.DecodeStreamAsync(stream);
- using (var response = await client.PostAsync(Constants.YavscApiUrl + "/setavatar", requestContent))
+ // Next we calculate the ratio that we need to resize the image by
+ // in order to fit the requested dimensions.
+ int outHeight = options.OutHeight;
+ int outWidth = options.OutWidth;
+ Matrix mtx = new Matrix();
+
+ Bitmap nbmp = null;
+ switch (orientation)
+ {
+ case (int)Orientation.Undefined: // Nexus 7 landscape...
+ mtx.PreRotate(180);
+ nbmp = Bitmap.CreateBitmap(bmp, 0, 0, bmp.Width, bmp.Height, mtx, false);
+ mtx.Dispose();
+ mtx = null;
+ break;
+ case (int)Orientation.Landscape:
+ break;
+ case 1: // landscape left
+ case 3: // Landskape right
+ mtx.PreRotate(180);
+ nbmp = Bitmap.CreateBitmap(bmp, 0, 0, bmp.Width, bmp.Height, mtx, false);
+ break;
+ case 6: // portrait
+ mtx.PreRotate(90);
+ nbmp = Bitmap.CreateBitmap(bmp, 0, 0, bmp.Width, bmp.Height, mtx, false);
+ break;
+ case 8: // my portrait
+ mtx.PreRotate(-90);
+ nbmp = Bitmap.CreateBitmap(bmp, 0, 0, bmp.Width, bmp.Height, mtx, false);
+ break;
+ }
+ if (nbmp != null)
+ {
+ using (var ostream = new MemoryStream())
{
- if (response.IsSuccessStatusCode)
- {
- // TODO image update
- var recnt = await response.Content.ReadAsStringAsync();
- }
+ nbmp.Compress(Bitmap.CompressFormat.Png, 10, ostream);
+ ostream.Seek(0, SeekOrigin.Begin);
+ var ok = await SendAvatarStreamAsync(ostream);
+ }
+ nbmp.Dispose();
+ }
+ else
+ {
+ using (var ostream = new MemoryStream())
+ {
+ bmp.Compress(Bitmap.CompressFormat.Png, 10, ostream);
+ ostream.Seek(0, SeekOrigin.Begin);
+ var ok = await SendAvatarStreamAsync(ostream);
}
}
+ mtx.Dispose();
+ bmp.Dispose();
}
- catch (Exception ex)
+ exif.Dispose();
+ options.Dispose();
+ }
+ else
+ {
+ using (var stream = file.GetStream())
{
- // TODO error report
+ var ok = await SendAvatarStreamAsync(stream);
}
- }
+ }
IsBusy = false;
}
+ private async Task SendAvatarStreamAsync(Stream stream)
+ {
+ using (var client = UserHelpers.CreateJsonClient())
+ {
+ var requestContent = new MultipartFormDataContent();
+ var content = new StreamContent(stream);
+ var filename = "me.jpg";
+ content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/octet-stream");
+ content.Headers.Add("Content-Disposition", $"form-data; name=\"file\"; filename=\"{filename}\"");
+ requestContent.Add(content, "file", filename);
+
+ using (var response = await client.PostAsync(Constants.YavscApiUrl + "/setavatar", requestContent))
+ {
+ if (response.IsSuccessStatusCode)
+ {
+ // TODO image update
+ var recnt = await response.Content.ReadAsStringAsync();
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
public void OnManageFiles(object sender, EventArgs e)
{
ShowPage(null, true);
diff --git a/ZicMoove/ZicMoove/Strings.Designer.cs b/ZicMoove/ZicMoove/Strings.Designer.cs
index ba17da42..0a7df32e 100644
--- a/ZicMoove/ZicMoove/Strings.Designer.cs
+++ b/ZicMoove/ZicMoove/Strings.Designer.cs
@@ -97,6 +97,15 @@ namespace ZicMoove {
}
}
+ ///
+ /// Recherche une chaîne localisée semblable à Carte.
+ ///
+ public static string Carte {
+ get {
+ return ResourceManager.GetString("Carte", resourceCulture);
+ }
+ }
+
///
/// Recherche une chaîne localisée semblable à Annonces client.
///
@@ -125,7 +134,7 @@ namespace ZicMoove {
}
///
- /// Recherche une chaîne localisée semblable à La création a échoué, contenu envoyé: {stringContent} @ Uri: {ControllerUri.AbsoluteUri}: Erreur : {errcontent}.
+ /// Recherche une chaîne localisée semblable à La création a échoué, contenu envoyé: {0} @ Uri: {1}.
///
public static string CreationFailed {
get {
diff --git a/ZicMoove/ZicMoove/Strings.resx b/ZicMoove/ZicMoove/Strings.resx
index 764e7615..bc620a79 100644
--- a/ZicMoove/ZicMoove/Strings.resx
+++ b/ZicMoove/ZicMoove/Strings.resx
@@ -124,7 +124,7 @@
Annuler la validation
- La création a échoué, contenu envoyé: {stringContent} @ Uri: {ControllerUri.AbsoluteUri}: Erreur : {errcontent}
+ La création a échoué, contenu envoyé: {0} @ Uri: {1}
Faire un devis
@@ -248,4 +248,7 @@
Rue
+
+ Carte
+
\ No newline at end of file
diff --git a/ZicMoove/ZicMoove/ViewModels/EstimateAndBilling/BillingLineViewModel.cs b/ZicMoove/ZicMoove/ViewModels/EstimateAndBilling/BillingLineViewModel.cs
index 8e284105..0c511a9f 100644
--- a/ZicMoove/ZicMoove/ViewModels/EstimateAndBilling/BillingLineViewModel.cs
+++ b/ZicMoove/ZicMoove/ViewModels/EstimateAndBilling/BillingLineViewModel.cs
@@ -1,15 +1,16 @@
-using ZicMoove.Attributes;
-using ZicMoove.Interfaces;
-using ZicMoove.Model.Workflow;
-using ZicMoove.ViewModels.Validation;
+
using System;
using System.Globalization;
using System.Windows.Input;
using System.ComponentModel;
+using YavscLib.Billing;
namespace ZicMoove.ViewModels.EstimateAndBilling
{
- public class BillingLineViewModel : EditingViewModel, IBillingLine
+ using Attributes;
+ using Model.Workflow;
+ using Validation;
+ public class BillingLineViewModel : EditingViewModel, ICommandLine
{
public ICommand RemoveCommand { get; set; }
public ICommand ValidateCommand { set; get; }
@@ -67,6 +68,34 @@ namespace ZicMoove.ViewModels.EstimateAndBilling
Data.Count = count;
}
}
+ private long estimateId;
+ public long EstimateId
+ {
+ get
+ {
+ return estimateId;
+ }
+ set
+ {
+ SetProperty(ref estimateId, value);
+ Data.EstimateId = estimateId;
+ }
+ }
+
+ private long id;
+ public long Id
+ {
+ get
+ {
+ return id;
+ }
+ set
+ {
+ SetProperty(ref id, value);
+ Data.Id = id;
+ }
+ }
+
private string description;
public string Description
{
diff --git a/ZicMoove/ZicMoove/ViewModels/Messaging/ChatViewModel.cs b/ZicMoove/ZicMoove/ViewModels/Messaging/ChatViewModel.cs
index a2336c3b..306c27c1 100644
--- a/ZicMoove/ZicMoove/ViewModels/Messaging/ChatViewModel.cs
+++ b/ZicMoove/ZicMoove/ViewModels/Messaging/ChatViewModel.cs
@@ -21,15 +21,20 @@ namespace ZicMoove.ViewModels.Messaging
public ConnectionState State
{
get { return state; }
+ set
+ {
+ SetProperty(ref state, value);
+ }
}
public ChatViewModel()
{
- App.ChatHubConnection.StateChanged += ChatHubConnection_StateChanged;
- MainSettings.UserChanged += MainSettings_UserChanged;
Messages = new ObservableCollection();
Notifs = new ObservableCollection();
ChatUsers = DataManager.Instance.ChatUsers;
+ State = App.ChatHubConnection.State;
+ App.ChatHubConnection.StateChanged += ChatHubConnection_StateChanged;
+ MainSettings.UserChanged += MainSettings_UserChanged;
App.ChatHubProxy.On("addMessage", (n, m) =>
{
Messages.Add(new ChatMessage
@@ -93,7 +98,7 @@ namespace ZicMoove.ViewModels.Messaging
private void ChatHubConnection_StateChanged(StateChange obj)
{
- SetProperty(ref state, obj.NewState, "State");
+ State = obj.NewState;
}
}
}
diff --git a/ZicMoove/ZicMoove/ViewModels/UserProfile/UserProfileViewModel.cs b/ZicMoove/ZicMoove/ViewModels/UserProfile/UserProfileViewModel.cs
index cfb4cefe..b2a73672 100644
--- a/ZicMoove/ZicMoove/ViewModels/UserProfile/UserProfileViewModel.cs
+++ b/ZicMoove/ZicMoove/ViewModels/UserProfile/UserProfileViewModel.cs
@@ -48,8 +48,8 @@ namespace ZicMoove.ViewModels.UserProfile
}
set
{
- MainSettings.AllowGPSUsage = value;
SetProperty(ref allowUseMyPosition, value);
+ MainSettings.AllowGPSUsage = value;
}
}
@@ -62,8 +62,8 @@ namespace ZicMoove.ViewModels.UserProfile
}
set
{
- MainSettings.AllowProBookingOnly = value;
SetProperty(ref allowUseMyPosition, value);
+ MainSettings.AllowProBookingOnly = value;
}
}
bool receivePushNotifications = MainSettings.PushNotifications;
@@ -75,8 +75,8 @@ namespace ZicMoove.ViewModels.UserProfile
}
set
{
- MainSettings.PushNotifications = value;
SetProperty(ref receivePushNotifications, value);
+ MainSettings.PushNotifications = value;
}
}
private long queryCount;
diff --git a/ZicMoove/ZicMoove/ZicMoove.csproj b/ZicMoove/ZicMoove/ZicMoove.csproj
index 68fdc862..d4b228d4 100644
--- a/ZicMoove/ZicMoove/ZicMoove.csproj
+++ b/ZicMoove/ZicMoove/ZicMoove.csproj
@@ -185,8 +185,6 @@
-
-
BookQueriesPage.xaml