diff --git a/BookAStar/BookAStar/BookAStar.csproj b/BookAStar/BookAStar/BookAStar.csproj
index 9451ba1a..86ee64c2 100644
--- a/BookAStar/BookAStar/BookAStar.csproj
+++ b/BookAStar/BookAStar/BookAStar.csproj
@@ -43,6 +43,7 @@
+
@@ -58,6 +59,15 @@
+
+ EstimatesClientPage.xaml
+
+
+ EstimatesProviderPage.xaml
+
+
+ ViewEstimatePage.xaml
+
UserFiles.xaml
@@ -79,7 +89,7 @@
DocSigning.xaml
-
+
@@ -110,16 +120,16 @@
-
+
BookQueriesPage.xaml
-
+
BookQueryPage.xaml
ChatPage.xaml
-
+
EditBillingLinePage.xaml
@@ -170,7 +180,7 @@
-
+
EditEstimatePage.xaml
@@ -336,7 +346,7 @@
-
+
MSBuild:UpdateDesignTimeXaml
Designer
@@ -348,19 +358,19 @@
-
+
MSBuild:UpdateDesignTimeXaml
Designer
-
+
MSBuild:UpdateDesignTimeXaml
Designer
-
+
MSBuild:UpdateDesignTimeXaml
Designer
@@ -450,6 +460,24 @@
Designer
+
+
+ MSBuild:UpdateDesignTimeXaml
+ Designer
+
+
+
+
+ MSBuild:UpdateDesignTimeXaml
+ Designer
+
+
+
+
+ MSBuild:UpdateDesignTimeXaml
+ Designer
+
+
diff --git a/BookAStar/BookAStar/Pages/DocSigning.xaml b/BookAStar/BookAStar/Pages/DocSigning.xaml
index 3b3290b5..fe1dec3e 100644
--- a/BookAStar/BookAStar/Pages/DocSigning.xaml
+++ b/BookAStar/BookAStar/Pages/DocSigning.xaml
@@ -1,6 +1,22 @@
-
+
+
+
+
+
\ No newline at end of file
diff --git a/BookAStar/BookAStar/Pages/DocSigning.xaml.cs b/BookAStar/BookAStar/Pages/DocSigning.xaml.cs
index b284eee6..a68cf7f9 100644
--- a/BookAStar/BookAStar/Pages/DocSigning.xaml.cs
+++ b/BookAStar/BookAStar/Pages/DocSigning.xaml.cs
@@ -1,4 +1,5 @@
-using System;
+using SignaturePad.Forms;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -14,5 +15,45 @@ namespace BookAStar.ViewModels.Signing
{
InitializeComponent();
}
+ private async void OnGetStats(object sender, EventArgs e)
+ {
+ var points = padView.Points.ToArray();
+ 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);
+
+ image.Dispose();
+
+ 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");
+ switch (action)
+ {
+ case "White":
+ padView.BackgroundColor = Color.White;
+ padView.StrokeColor = Color.Black;
+ padView.ClearTextColor = Color.Black;
+ padView.ClearText = "Clear Markers";
+ break;
+
+ case "Black":
+ padView.BackgroundColor = Color.Black;
+ padView.StrokeColor = Color.White;
+ padView.ClearTextColor = Color.White;
+ padView.ClearText = "Clear Chalk";
+ break;
+
+ case "Aqua":
+ padView.BackgroundColor = Color.Aqua;
+ padView.StrokeColor = Color.Red;
+ padView.ClearTextColor = Color.Black;
+ padView.ClearText = "Clear The Aqua";
+ break;
+ }
+ }
}
}
diff --git a/BookAStar/BookAStar/Pages/Estimate/BookQueriesPage.xaml b/BookAStar/BookAStar/Pages/EstimatePages/BookQueriesPage.xaml
similarity index 96%
rename from BookAStar/BookAStar/Pages/Estimate/BookQueriesPage.xaml
rename to BookAStar/BookAStar/Pages/EstimatePages/BookQueriesPage.xaml
index 833e747c..f0478691 100644
--- a/BookAStar/BookAStar/Pages/Estimate/BookQueriesPage.xaml
+++ b/BookAStar/BookAStar/Pages/EstimatePages/BookQueriesPage.xaml
@@ -25,7 +25,8 @@
-
+
+
-
+
@@ -59,5 +60,6 @@
-
+
+
\ No newline at end of file
diff --git a/BookAStar/BookAStar/Pages/Estimate/BookQueriesPage.xaml.cs b/BookAStar/BookAStar/Pages/EstimatePages/BookQueriesPage.xaml.cs
similarity index 100%
rename from BookAStar/BookAStar/Pages/Estimate/BookQueriesPage.xaml.cs
rename to BookAStar/BookAStar/Pages/EstimatePages/BookQueriesPage.xaml.cs
diff --git a/BookAStar/BookAStar/Pages/Estimate/BookQueryPage.xaml b/BookAStar/BookAStar/Pages/EstimatePages/BookQueryPage.xaml
similarity index 78%
rename from BookAStar/BookAStar/Pages/Estimate/BookQueryPage.xaml
rename to BookAStar/BookAStar/Pages/EstimatePages/BookQueryPage.xaml
index 11b3d615..304efc8d 100644
--- a/BookAStar/BookAStar/Pages/Estimate/BookQueryPage.xaml
+++ b/BookAStar/BookAStar/Pages/EstimatePages/BookQueryPage.xaml
@@ -27,7 +27,13 @@
-
+
+
+
+
\ No newline at end of file
diff --git a/BookAStar/BookAStar/Pages/Estimate/BookQueryPage.xaml.cs b/BookAStar/BookAStar/Pages/EstimatePages/BookQueryPage.xaml.cs
similarity index 87%
rename from BookAStar/BookAStar/Pages/Estimate/BookQueryPage.xaml.cs
rename to BookAStar/BookAStar/Pages/EstimatePages/BookQueryPage.xaml.cs
index 0f73d1ed..def1f603 100644
--- a/BookAStar/BookAStar/Pages/Estimate/BookQueryPage.xaml.cs
+++ b/BookAStar/BookAStar/Pages/EstimatePages/BookQueryPage.xaml.cs
@@ -1,13 +1,14 @@
using System;
+using System.Linq;
using Xamarin.Forms;
using Xamarin.Forms.Maps;
namespace BookAStar.Pages
{
using Data;
+ using EstimatePages;
using Model;
using Model.Workflow;
- using System.Linq;
using ViewModels.EstimateAndBilling;
public partial class BookQueryPage : ContentPage
@@ -71,23 +72,31 @@ namespace BookAStar.Pages
{
DataManager.Current.Contacts.Merge(BookQuery.Client);
DataManager.Current.Contacts.SaveEntity();
- estimateToEdit = new Estimate()
+ estimateToEdit = new Estimate
{
ClientId = BookQuery.Client.UserId,
CommandId = BookQuery.Id,
OwnerId = MainSettings.CurrentUser.Id,
- Id = 0,
- Description = "# **Hello Estimate!**"
+ Id = 0
};
- editEstimateViewModel = new EditEstimateViewModel(estimateToEdit, LocalState.New);
+ editEstimateViewModel = new EditEstimateViewModel(estimateToEdit);
}
else
- editEstimateViewModel = new EditEstimateViewModel(estimateToEdit, LocalState.UpToDate);
+ editEstimateViewModel = new EditEstimateViewModel(estimateToEdit);
DataManager.Current.EstimationCache.Add(editEstimateViewModel);
}
App.NavigationService.NavigateTo(true,
editEstimateViewModel);
+
+
+ }
+
+ private void OnViewEstimate(object sender, EventArgs ev)
+ {
+ var bookQueryViewModel = (BookQueryViewModel) BindingContext;
+ App.NavigationService.NavigateTo(true,
+ new EditEstimateViewModel(bookQueryViewModel.Estimate));
}
protected override void OnSizeAllocated(double width, double height)
diff --git a/BookAStar/BookAStar/Pages/Estimate/EditBillingLinePage.xaml b/BookAStar/BookAStar/Pages/EstimatePages/EditBillingLinePage.xaml
similarity index 92%
rename from BookAStar/BookAStar/Pages/Estimate/EditBillingLinePage.xaml
rename to BookAStar/BookAStar/Pages/EstimatePages/EditBillingLinePage.xaml
index 624909f4..844114cc 100644
--- a/BookAStar/BookAStar/Pages/Estimate/EditBillingLinePage.xaml
+++ b/BookAStar/BookAStar/Pages/EstimatePages/EditBillingLinePage.xaml
@@ -50,9 +50,6 @@
-