From b7f54078dd580fe73483b9ae0843208f841c4ec6 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Tue, 10 Jan 2017 12:38:19 +0100 Subject: [PATCH] perparing the client signature from the same page --- BookAStar/BookAStar/App.xaml | 2 +- BookAStar/BookAStar/Data/DataManager.cs | 2 ++ .../BookAStar/Model/Workflow/Estimate.cs | 11 +++++----- .../EstimatePages/EditBillingLinePage.xaml | 2 +- .../EstimatePages/EstimateSigningPage.xaml | 21 +++++++++++++++---- .../EstimatePages/EstimateSigningPage.xaml.cs | 12 +---------- .../EditEstimateViewModel.cs | 1 + .../Signing/EstimateSigningViewModel.cs | 13 ++++++++++++ 8 files changed, 42 insertions(+), 22 deletions(-) diff --git a/BookAStar/BookAStar/App.xaml b/BookAStar/BookAStar/App.xaml index aee77e6f..02b13cc7 100644 --- a/BookAStar/BookAStar/App.xaml +++ b/BookAStar/BookAStar/App.xaml @@ -63,7 +63,7 @@ - + + + @@ -20,11 +29,11 @@ - + - diff --git a/BookAStar/BookAStar/Pages/EstimatePages/EstimateSigningPage.xaml.cs b/BookAStar/BookAStar/Pages/EstimatePages/EstimateSigningPage.xaml.cs index a975e099..d72793b6 100644 --- a/BookAStar/BookAStar/Pages/EstimatePages/EstimateSigningPage.xaml.cs +++ b/BookAStar/BookAStar/Pages/EstimatePages/EstimateSigningPage.xaml.cs @@ -41,17 +41,7 @@ namespace BookAStar.Pages.EstimatePages ParentValidationCommand.Execute(true); } - private async void OnGetStats(object sender, EventArgs e) - { - var points = padView.Points.ToArray(); - using (var image = await padView.GetImageStreamAsync(SignatureImageFormat.Png)) - { - var pointCount = points.Count(); - var imageSize = image.Length / 1000; - var linesCount = points.Count(p => p == Point.Zero) + (points.Length > 0 ? 1 : 0); - await DisplayAlert("Stats", $"The signature has {linesCount} lines or {pointCount} points, and is {imageSize:#,###.0}KB (in memory) when saved as a PNG.", "Cool"); - } - } + private async void OnChangeTheme(object sender, EventArgs e) { var action = await DisplayActionSheet("Change Theme", "Cancel", null, "White", "Black", "Aqua"); diff --git a/BookAStar/BookAStar/ViewModels/EstimateAndBilling/EditEstimateViewModel.cs b/BookAStar/BookAStar/ViewModels/EstimateAndBilling/EditEstimateViewModel.cs index 1581d3c6..25032d81 100644 --- a/BookAStar/BookAStar/ViewModels/EstimateAndBilling/EditEstimateViewModel.cs +++ b/BookAStar/BookAStar/ViewModels/EstimateAndBilling/EditEstimateViewModel.cs @@ -50,6 +50,7 @@ namespace BookAStar.ViewModels.EstimateAndBilling NotifyPropertyChanged("Query"); NotifyPropertyChanged("CLient"); NotifyPropertyChanged("ModelState"); + } protected override void OnPropertyChanged(PropertyChangedEventArgs e) diff --git a/BookAStar/BookAStar/ViewModels/Signing/EstimateSigningViewModel.cs b/BookAStar/BookAStar/ViewModels/Signing/EstimateSigningViewModel.cs index a2035b24..20989946 100644 --- a/BookAStar/BookAStar/ViewModels/Signing/EstimateSigningViewModel.cs +++ b/BookAStar/BookAStar/ViewModels/Signing/EstimateSigningViewModel.cs @@ -10,5 +10,18 @@ namespace BookAStar.ViewModels.Signing { } public Command ValidationCommand { get; set; } + public ImageSource ProSignImage { + get + { + return new FileImageSource(); + } + } + public ImageSource CliSignImage + { + get + { + return new FileImageSource(); + } + } } }