Vue sur les fichiers distants

This commit is contained in:
Paul Schneider 2016-11-15 12:06:42 +01:00
commit f92591c2ff
15 changed files with 280 additions and 146 deletions

View file

@ -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);
}
@ -290,7 +295,19 @@ namespace BookAStar
// Start the Hub connection
public async void StartHubConnection ()
{
await chatHubConnection.Start();
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()