From 5fc24f673390204cc60b74641eac91e138f14122 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 22 Feb 2017 10:08:48 +0100 Subject: [PATCH 01/10] s'inscrire au sujet /topic/jobs quand on est presta --- .../Services/GcmRegistrationIntentService.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ZicMoove/ZicMoove.Droid/Services/GcmRegistrationIntentService.cs b/ZicMoove/ZicMoove.Droid/Services/GcmRegistrationIntentService.cs index 9a4a73b8..4b33057b 100644 --- a/ZicMoove/ZicMoove.Droid/Services/GcmRegistrationIntentService.cs +++ b/ZicMoove/ZicMoove.Droid/Services/GcmRegistrationIntentService.cs @@ -9,6 +9,7 @@ using Android.Gms.Gcm.Iid; using Android.OS; using Android; using ZicMoove.Settings; +using System.Linq; namespace ZicMoove.Droid { @@ -101,12 +102,14 @@ namespace ZicMoove.Droid { var pubSub = GcmPubSub.GetInstance(this); pubSub.Subscribe(token, "/topics/global", null); - + if (MainSettings.CurrentUser.Roles.Contains("Performer")) + // TODO add activity codes in the bundle + pubSub.Subscribe(token, "/topics/jobs", null); // TODO if a Activity is specified, // and general annonces in this activity are accepted: - // // pubSub.Subscribe(token, "/topics/jobs/"+ActivityCode, null); - } + + } } } From 24463083ea00481410359303bb1aec5dcca3f940 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 22 Feb 2017 10:09:10 +0100 Subject: [PATCH 02/10] fixe l'envoi du selfy en avatar --- .../ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs b/ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs index 0b396f11..49668eab 100644 --- a/ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs +++ b/ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs @@ -58,9 +58,14 @@ namespace ZicMoove.Pages.UserProfile { 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); - using (var response = await client.PostAsync(Constants.YavscApiUrl + "/setavatar", content)) + using (var response = await client.PostAsync(Constants.YavscApiUrl + "/setavatar", requestContent)) { if (response.IsSuccessStatusCode) { From 194f7d53a6c936fe6f2ea0fc1ae64bc530f1882b Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 22 Feb 2017 14:37:13 +0100 Subject: [PATCH 03/10] refabrique du model d'erreurs --- .../EstimatePages/EditBillingLinePage.xaml.cs | 17 +++++++++-- .../EstimatePages/EditEstimatePage.xaml.cs | 15 ++-------- .../BillingLineViewModel.cs | 22 +++++++------- .../EditEstimateViewModel.cs | 27 ++++++++++++++++- .../ViewModels/Validation/EditingViewModel.cs | 29 +++++++++---------- .../Validation/{Error.cs => InputError.cs} | 0 .../{ModelState.cs => ViewModelState.cs} | 8 ++--- .../WorkFlow/WorkflowBookViewModel.cs | 5 ++++ 8 files changed, 77 insertions(+), 46 deletions(-) rename ZicMoove/ZicMoove/ViewModels/Validation/{Error.cs => InputError.cs} (100%) rename ZicMoove/ZicMoove/ViewModels/Validation/{ModelState.cs => ViewModelState.cs} (91%) diff --git a/ZicMoove/ZicMoove/Pages/EstimatePages/EditBillingLinePage.xaml.cs b/ZicMoove/ZicMoove/Pages/EstimatePages/EditBillingLinePage.xaml.cs index 5006e97b..0e77d7ff 100644 --- a/ZicMoove/ZicMoove/Pages/EstimatePages/EditBillingLinePage.xaml.cs +++ b/ZicMoove/ZicMoove/Pages/EstimatePages/EditBillingLinePage.xaml.cs @@ -4,17 +4,28 @@ using ZicMoove.ViewModels.EstimateAndBilling; using System; using System.Collections.Generic; using Xamarin.Forms; +using ZicMoove.Model.Workflow; namespace ZicMoove.Pages { public partial class EditBillingLinePage : ContentPage { - public EditBillingLinePage(BillingLineViewModel model) + public void Initialize() { InitializeComponent(); - foreach - (string du in Enum.GetNames(typeof(BillingLineViewModel.DurationUnits))) + 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) + { + Initialize(); BindingContext = model; } diff --git a/ZicMoove/ZicMoove/Pages/EstimatePages/EditEstimatePage.xaml.cs b/ZicMoove/ZicMoove/Pages/EstimatePages/EditEstimatePage.xaml.cs index 9d6da291..286cb981 100644 --- a/ZicMoove/ZicMoove/Pages/EstimatePages/EditEstimatePage.xaml.cs +++ b/ZicMoove/ZicMoove/Pages/EstimatePages/EditEstimatePage.xaml.cs @@ -22,25 +22,16 @@ namespace ZicMoove.Pages public EditEstimatePage(EditEstimateViewModel model) { BindingContext = model; - Model.CheckCommand = new Action( - (e, m) => - { - foreach (var line in model.Bill) - { - line.Check(); - if (!line.ViewModelState.IsValid) - model.ViewModelState.AddError("Bill", "invalid line"); - } - }); InitializeComponent(); - Model.Check(); } protected override void OnBindingContextChanged() { base.OnBindingContextChanged(); - ((EditEstimateViewModel)BindingContext).PropertyChanged += EditEstimatePage_PropertyChanged; + if (Model == null) return; + Model.PropertyChanged += EditEstimatePage_PropertyChanged; + Model.Check(); } private void EditEstimatePage_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) diff --git a/ZicMoove/ZicMoove/ViewModels/EstimateAndBilling/BillingLineViewModel.cs b/ZicMoove/ZicMoove/ViewModels/EstimateAndBilling/BillingLineViewModel.cs index d4cb9337..8e284105 100644 --- a/ZicMoove/ZicMoove/ViewModels/EstimateAndBilling/BillingLineViewModel.cs +++ b/ZicMoove/ZicMoove/ViewModels/EstimateAndBilling/BillingLineViewModel.cs @@ -16,15 +16,6 @@ namespace ZicMoove.ViewModels.EstimateAndBilling public BillingLineViewModel(BillingLine data): base(data) { - CheckCommand = new Action( - (l,s) => { - if (string.IsNullOrWhiteSpace(l.Description)) - { - s.AddError("Description",Strings.NoDescription); - } - if (l.UnitaryCost < 0) { s.AddError("UnitaryCost", Strings.InvalidValue); } - if (l.Count < 0) { s.AddError("Count", Strings.InvalidValue); } - }); SyncData(); } @@ -39,7 +30,7 @@ namespace ZicMoove.ViewModels.EstimateAndBilling description = Data.Description; unitaryCostText = Data.UnitaryCost.ToString("G", CultureInfo.InvariantCulture); } - CheckCommand(Data, ViewModelState); + Check(); } protected override void OnPropertyChanged(PropertyChangedEventArgs e) @@ -51,6 +42,17 @@ namespace ZicMoove.ViewModels.EstimateAndBilling } } + public override void Check() + { + ModelState.Clear(); + if (string.IsNullOrWhiteSpace(Data.Description)) + { + ModelState.AddError("Description", Strings.NoDescription); + } + if (Data.UnitaryCost < 0) { ModelState.AddError("UnitaryCost", Strings.InvalidValue); } + if (Data.Count < 0) { ModelState.AddError("Count", Strings.InvalidValue); } + } + private int count; public int Count { diff --git a/ZicMoove/ZicMoove/ViewModels/EstimateAndBilling/EditEstimateViewModel.cs b/ZicMoove/ZicMoove/ViewModels/EstimateAndBilling/EditEstimateViewModel.cs index 82dc34d1..e942a1fd 100644 --- a/ZicMoove/ZicMoove/ViewModels/EstimateAndBilling/EditEstimateViewModel.cs +++ b/ZicMoove/ZicMoove/ViewModels/EstimateAndBilling/EditEstimateViewModel.cs @@ -12,6 +12,7 @@ namespace ZicMoove.ViewModels.EstimateAndBilling using Model.Social; using Validation; using Model.Musical; + using System; public class EditEstimateViewModel : EditingViewModel { @@ -52,7 +53,7 @@ namespace ZicMoove.ViewModels.EstimateAndBilling NotifyPropertyChanged("Query"); NotifyPropertyChanged("CLient"); NotifyPropertyChanged("ModelState"); - + Check(); } protected override void OnPropertyChanged(PropertyChangedEventArgs e) @@ -76,6 +77,30 @@ namespace ZicMoove.ViewModels.EstimateAndBilling NotifyPropertyChanged("ViewModelState"); } + public override void Check() + { + ModelState.Clear(); + if (Data == null) return; + if (string.IsNullOrWhiteSpace(Data.Title)) + ModelState.AddError("Title", "Spécifier un titre"); + if (string.IsNullOrWhiteSpace(Data.Description)) + ModelState.AddError("Description", "Veuillez décrire l'objet de cette facture"); + if (Data.Bill==null) + ModelState.AddError("Bill", "Veuillez ajouter au moins une ligne de facture"); + else + { + if (Data.Bill.Count==0) + ModelState.AddError("Bill", "Veuillez ajouter au moins une ligne de facture"); + var ilc = (Bill.Count(l => !l.ModelState.IsValid)); + if (ilc > 0) + { + var pluriel = (ilc > 1) ? "les lignes" : "la ligne"; + ModelState.AddError("Bill", "Veuillez corriger {pluriel} de facture"); + } + } + NotifyPropertyChanged("ModelState"); + } + [JsonIgnore] public ObservableCollection AttachedFiles { diff --git a/ZicMoove/ZicMoove/ViewModels/Validation/EditingViewModel.cs b/ZicMoove/ZicMoove/ViewModels/Validation/EditingViewModel.cs index bd3f9a1f..68b493b4 100644 --- a/ZicMoove/ZicMoove/ViewModels/Validation/EditingViewModel.cs +++ b/ZicMoove/ZicMoove/ViewModels/Validation/EditingViewModel.cs @@ -9,16 +9,14 @@ namespace ZicMoove.ViewModels.Validation /// Used to make the DataManager know how /// to sync local and remote data /// - public class EditingViewModel: ViewModel + public abstract class EditingViewModel: ViewModel { - [JsonIgnore] - public Action CheckCommand { set; get; } public DataType Data { get; set; } - private ModelState viewModelState = new ModelState(); + private ViewModelState viewModelState = new ViewModelState(); - public ModelState ViewModelState + public ViewModelState ModelState { get { @@ -26,29 +24,28 @@ namespace ZicMoove.ViewModels.Validation } set { - base.SetProperty(ref viewModelState, value); + base.SetProperty(ref viewModelState, value); } } public EditingViewModel(DataType data) { this.Data = data; - ViewModelState = new ModelState(); + ModelState = new ViewModelState(); } protected override void OnPropertyChanged(PropertyChangedEventArgs e) { base.OnPropertyChanged(e); - Check(); - } - public virtual void Check() - { - if (CheckCommand != null) - { - ViewModelState.Clear(); - CheckCommand(Data, ViewModelState); - } + if (e.PropertyName != "ModelState") + Check(); } + /// + /// Must compute the ModelState property + /// from the Data one. + /// + public abstract void Check(); + /* NOTE : I had a dream. bool existsRemotely; diff --git a/ZicMoove/ZicMoove/ViewModels/Validation/Error.cs b/ZicMoove/ZicMoove/ViewModels/Validation/InputError.cs similarity index 100% rename from ZicMoove/ZicMoove/ViewModels/Validation/Error.cs rename to ZicMoove/ZicMoove/ViewModels/Validation/InputError.cs diff --git a/ZicMoove/ZicMoove/ViewModels/Validation/ModelState.cs b/ZicMoove/ZicMoove/ViewModels/Validation/ViewModelState.cs similarity index 91% rename from ZicMoove/ZicMoove/ViewModels/Validation/ModelState.cs rename to ZicMoove/ZicMoove/ViewModels/Validation/ViewModelState.cs index eac25a5e..4a47534c 100644 --- a/ZicMoove/ZicMoove/ViewModels/Validation/ModelState.cs +++ b/ZicMoove/ZicMoove/ViewModels/Validation/ViewModelState.cs @@ -8,15 +8,15 @@ using Xamarin.Forms; namespace ZicMoove.ViewModels.Validation { - public class ModelState : BindableObject + public class ViewModelState : BindableObject { public static readonly BindableProperty IsValidProperty = - BindableProperty.Create("IsValid", typeof(bool), typeof(ModelState), false); + BindableProperty.Create("IsValid", typeof(bool), typeof(ViewModelState), false); public static readonly BindableProperty ErrorsProperty = - BindableProperty.Create("Errors", typeof(Dictionary>), typeof(ModelState), null); + BindableProperty.Create("Errors", typeof(Dictionary>), typeof(ViewModelState), null); - public ModelState() + public ViewModelState() { Errors = new Dictionary>(); } diff --git a/ZicMoove/ZicMoove/ViewModels/WorkFlow/WorkflowBookViewModel.cs b/ZicMoove/ZicMoove/ViewModels/WorkFlow/WorkflowBookViewModel.cs index 30ea51de..fa8e3953 100644 --- a/ZicMoove/ZicMoove/ViewModels/WorkFlow/WorkflowBookViewModel.cs +++ b/ZicMoove/ZicMoove/ViewModels/WorkFlow/WorkflowBookViewModel.cs @@ -15,5 +15,10 @@ namespace ZicMoove.ViewModels.WorkFlow public WorkflowBookViewModel(BookQuery data) : base(data) { } + + public override void Check() + { + throw new NotImplementedException(); + } } } From 2cfde938e283eef6cd900bc1294713fa70146489 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 22 Feb 2017 14:39:38 +0100 Subject: [PATCH 04/10] fixe le dernier commit --- ZicMoove/ZicMoove/ZicMoove.csproj | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ZicMoove/ZicMoove/ZicMoove.csproj b/ZicMoove/ZicMoove/ZicMoove.csproj index 8b59f1c8..15016eee 100644 --- a/ZicMoove/ZicMoove/ZicMoove.csproj +++ b/ZicMoove/ZicMoove/ZicMoove.csproj @@ -104,6 +104,7 @@ + @@ -119,8 +120,8 @@ - - + + EstimateSigningPage.xaml @@ -184,7 +185,7 @@ - + @@ -304,9 +305,7 @@ Designer - - - + ..\..\packages\ExifLib.PCL.1.0.1\lib\portable-net45+sl50+win+WindowsPhoneApp81+wp80+Xamarin.iOS10+MonoAndroid10+MonoTouch10\ExifLib.dll From 8e89e2ecbd92aeb93f0015d9854424e3069e9925 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 22 Feb 2017 14:39:57 +0100 Subject: [PATCH 05/10] fixe la fenetre d'alerte --- ZicMoove/ZicMoove/App.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ZicMoove/ZicMoove/App.xaml.cs b/ZicMoove/ZicMoove/App.xaml.cs index 783dc231..ea3bdf16 100644 --- a/ZicMoove/ZicMoove/App.xaml.cs +++ b/ZicMoove/ZicMoove/App.xaml.cs @@ -334,7 +334,7 @@ namespace ZicMoove public static Task DisplayAlert(string title, string message, string yes = "OK", string no = null) { - var currentPage = ((NavigationPage)Current.MainPage).CurrentPage; + var currentPage = Navigation.NavigationStack.Last(); if (no == null) { return currentPage.DisplayAlert(title, message, yes).ContinueWith(task => true); From 4305cf75c56723ac4826065af44a13c0f6de6801 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 22 Feb 2017 14:40:41 +0100 Subject: [PATCH 06/10] devrait fixer la validation du devis --- ZicMoove/ZicMoove/Data/EstimateEntity.cs | 33 ++++++++++--------- .../EstimatePages/EstimateSigningPage.xaml.cs | 2 +- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/ZicMoove/ZicMoove/Data/EstimateEntity.cs b/ZicMoove/ZicMoove/Data/EstimateEntity.cs index dacce8cb..2f9ce810 100644 --- a/ZicMoove/ZicMoove/Data/EstimateEntity.cs +++ b/ZicMoove/ZicMoove/Data/EstimateEntity.cs @@ -10,6 +10,7 @@ namespace ZicMoove.Data using System.IO; using System.Linq; using System.Net.Http; + using System.Threading.Tasks; public class EstimateEntity : RemoteEntity { @@ -17,18 +18,15 @@ namespace ZicMoove.Data { } - public async void SignAsProvider(Estimate estimate, Stream stream) + public async Task SignAsProvider(Estimate estimate, Stream stream) { if (estimate.Id == 0) { - var ok = await this.Create(estimate); - if (!ok) - { - await App.DisplayAlert("Erreur d'accès au serveur", "Echec de l'envoi de l'estimation"); - return; - } - this.Add(estimate); + if (!await this.Create(estimate)) + { + await App.DisplayAlert("Erreur d'accès au serveur", "Echec de l'envoi de l'estimation"); + } } using (HttpClient client = UserHelpers.CreateJsonClient()) { @@ -40,24 +38,29 @@ namespace ZicMoove.Data 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 + $"/pdfestimate/prosign/{estimate.Id}", requestContent)) + Constants.YavscApiUrl + $"/pdfestimate/prosign/{estimate.Id}", requestContent)) { if (!response.IsSuccessStatusCode) - { + { var errContent = await response.Content.ReadAsStringAsync(); - throw new ApiCallFailedException($"SignAsProvider: {response.StatusCode} / {errContent}"); + await App.DisplayAlert("SignAsProvider", $"{response.StatusCode}: {errContent}"); + } + else + { + var json = await response.Content.ReadAsStringAsync(); + JsonConvert.PopulateObject(json, estimate); + this.Add(estimate); + this.SaveEntity(); } - var json = await response.Content.ReadAsStringAsync(); - JsonConvert.PopulateObject(json, estimate); } } catch (Exception ex) { - Debug.WriteLine(ex.ToString()); + await App.DisplayAlert("SignAsProvider", ex.Message); } } - this.SaveEntity(); } // TODO Check we don't loose nothing here diff --git a/ZicMoove/ZicMoove/Pages/EstimatePages/EstimateSigningPage.xaml.cs b/ZicMoove/ZicMoove/Pages/EstimatePages/EstimateSigningPage.xaml.cs index a8edf113..0c353ddc 100644 --- a/ZicMoove/ZicMoove/Pages/EstimatePages/EstimateSigningPage.xaml.cs +++ b/ZicMoove/ZicMoove/Pages/EstimatePages/EstimateSigningPage.xaml.cs @@ -48,7 +48,7 @@ namespace ZicMoove.Pages.EstimatePages */ stream.Seek(0, SeekOrigin.Begin); - DataManager.Instance.Estimates.SignAsProvider(estimate, stream); + await DataManager.Instance.Estimates.SignAsProvider(estimate, stream); DataManager.Instance.Estimates.SaveEntity(); } IsBusy = false; From d4a103675194e016329083e5bd57aa3d4e4713ad Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 22 Feb 2017 14:40:55 +0100 Subject: [PATCH 07/10] format du code --- ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs b/ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs index 49668eab..7a75cea7 100644 --- a/ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs +++ b/ZicMoove/ZicMoove/Pages/UserProfile/UserProfilePage.xaml.cs @@ -20,6 +20,7 @@ namespace ZicMoove.Pages.UserProfile btnPay.Clicked += BtnPay_Clicked; } + public UserProfilePage(UserProfileViewModel model) { InitializeComponent(); From 0e8057e48b6394f6762b73274c1ed7f811ac70b0 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 22 Feb 2017 14:41:07 +0100 Subject: [PATCH 08/10] reorg --- ZicMoove/ZicMoove/Model/{ => Workflow}/ClientProviderInfo.cs | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ZicMoove/ZicMoove/Model/{ => Workflow}/ClientProviderInfo.cs (100%) diff --git a/ZicMoove/ZicMoove/Model/ClientProviderInfo.cs b/ZicMoove/ZicMoove/Model/Workflow/ClientProviderInfo.cs similarity index 100% rename from ZicMoove/ZicMoove/Model/ClientProviderInfo.cs rename to ZicMoove/ZicMoove/Model/Workflow/ClientProviderInfo.cs From 1d3554528a4d5cd630c9be691e52c7f3fd358d11 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 22 Feb 2017 14:42:02 +0100 Subject: [PATCH 09/10] ne permettre la validation que quand le formulaire est valide --- .../EstimatePages/EditBillingLinePage.xaml | 63 +++++++++++-------- .../Pages/EstimatePages/EditEstimatePage.xaml | 2 +- 2 files changed, 37 insertions(+), 28 deletions(-) diff --git a/ZicMoove/ZicMoove/Pages/EstimatePages/EditBillingLinePage.xaml b/ZicMoove/ZicMoove/Pages/EstimatePages/EditBillingLinePage.xaml index 9399a506..9185c600 100644 --- a/ZicMoove/ZicMoove/Pages/EstimatePages/EditBillingLinePage.xaml +++ b/ZicMoove/ZicMoove/Pages/EstimatePages/EditBillingLinePage.xaml @@ -42,23 +42,29 @@ - - - - - - + - + Style="{Binding Source={x:Reference descriptionLenValidator}, Path=IsValid, Converter={StaticResource boolToStyleImage}}" /> + + + + + + - + + + + @@ -71,13 +77,15 @@ Title="Unité de temps" SelectedItem="{Binding DurationUnit, Mode=TwoWay}"> - + + - - @@ -86,15 +94,18 @@ - - + + + + @@ -103,15 +114,13 @@ + + Clicked="OnValidateClicked" + IsEnabled="{Binding ModelState.IsValid}"> diff --git a/ZicMoove/ZicMoove/Pages/EstimatePages/EditEstimatePage.xaml b/ZicMoove/ZicMoove/Pages/EstimatePages/EditEstimatePage.xaml index b196b1c1..6a345664 100644 --- a/ZicMoove/ZicMoove/Pages/EstimatePages/EditEstimatePage.xaml +++ b/ZicMoove/ZicMoove/Pages/EstimatePages/EditEstimatePage.xaml @@ -100,7 +100,7 @@ From b1973cae5f72ab67d2c11e09fe7ebd10589ecefd Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 22 Feb 2017 14:42:23 +0100 Subject: [PATCH 10/10] un essai ... --- ZicMoove/ZicMoove/Model/UI/AppEvent.cs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 ZicMoove/ZicMoove/Model/UI/AppEvent.cs diff --git a/ZicMoove/ZicMoove/Model/UI/AppEvent.cs b/ZicMoove/ZicMoove/Model/UI/AppEvent.cs new file mode 100644 index 00000000..0db61dc1 --- /dev/null +++ b/ZicMoove/ZicMoove/Model/UI/AppEvent.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ZicMoove.Model.UI +{ + public enum EventSeverity + { + Info, + Warning, + Critical + } + /// + /// Encapsule un événement concernant le fonctionnement + /// de cette présente application. + /// + class AppEvent + { + public DateTime Date { get; set; } + public string Message { get; set; } + public string Component { get; set; } + public EventSeverity Severity { get; set; } + } +}