|
|
|
@ -25,6 +25,7 @@ namespace BookAStar
|
|
|
|
|
using ViewModels.UserProfile;
|
|
|
|
|
using Pages.UserProfile;
|
|
|
|
|
using ViewModels.EstimateAndBilling;
|
|
|
|
|
using System.Net;
|
|
|
|
|
|
|
|
|
|
public partial class App : Application // superclass new in 1.3
|
|
|
|
|
{
|
|
|
|
@ -109,7 +110,7 @@ namespace BookAStar
|
|
|
|
|
BindingContext = page.BindingContext
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
DataManager.Current.AppState.SaveCollection();
|
|
|
|
|
DataManager.Current.AppState.SaveEntity();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// called on app startup, after OnStartup, not on rotation
|
|
|
|
@ -124,7 +125,7 @@ namespace BookAStar
|
|
|
|
|
pageType, true, pageState.BindingContext);
|
|
|
|
|
}
|
|
|
|
|
DataManager.Current.AppState.Clear();
|
|
|
|
|
DataManager.Current.AppState.SaveCollection();
|
|
|
|
|
DataManager.Current.AppState.SaveEntity();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// FIXME Not called?
|
|
|
|
@ -206,6 +207,7 @@ namespace BookAStar
|
|
|
|
|
masterDetail.Detail = new NavigationPage(home);
|
|
|
|
|
ToolbarItem tiSetts = new ToolbarItem()
|
|
|
|
|
{
|
|
|
|
|
Priority = 0,
|
|
|
|
|
Text = "Paramètres",
|
|
|
|
|
Icon = "ic_corp_icon.png",
|
|
|
|
|
Command = new Command(
|
|
|
|
@ -215,6 +217,7 @@ namespace BookAStar
|
|
|
|
|
|
|
|
|
|
ToolbarItem tiHome = new ToolbarItem()
|
|
|
|
|
{
|
|
|
|
|
Priority = -1,
|
|
|
|
|
Text = "Accueil",
|
|
|
|
|
Icon = "icon.png",
|
|
|
|
|
Command = new Command(
|
|
|
|
@ -224,6 +227,7 @@ namespace BookAStar
|
|
|
|
|
|
|
|
|
|
ToolbarItem tiPubChat= new ToolbarItem()
|
|
|
|
|
{
|
|
|
|
|
Priority = 1,
|
|
|
|
|
Text = "Chat",
|
|
|
|
|
Icon = "chat_icon_s.png",
|
|
|
|
|
Command = new Command(
|
|
|
|
@ -233,6 +237,7 @@ namespace BookAStar
|
|
|
|
|
masterDetail.ToolbarItems.Add(tiHome);
|
|
|
|
|
masterDetail.ToolbarItems.Add(tiSetts);
|
|
|
|
|
masterDetail.ToolbarItems.Add(tiPubChat);
|
|
|
|
|
|
|
|
|
|
this.MainPage = masterDetail;
|
|
|
|
|
NavigationService = new NavigationService(masterDetail.Detail.Navigation);
|
|
|
|
|
}
|
|
|
|
@ -289,9 +294,21 @@ namespace BookAStar
|
|
|
|
|
}
|
|
|
|
|
// Start the Hub connection
|
|
|
|
|
public async void StartHubConnection ()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
await chatHubConnection.Start();
|
|
|
|
|
}
|
|
|
|
|
catch (WebException webex )
|
|
|
|
|
{
|
|
|
|
|
// TODO use webex, set this cx down status somewhere,
|
|
|
|
|
// & display it & maybe try again later.
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
// TODO use ex
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SetupHubConnection()
|
|
|
|
|
{
|
|
|
|
|