2016-07-12 06:55:16 +03:00
|
|
|
|
using Bit.App.Abstractions;
|
|
|
|
|
using System;
|
2016-06-28 02:53:31 +03:00
|
|
|
|
using Xamarin.Forms;
|
2016-07-12 06:55:16 +03:00
|
|
|
|
using XLabs.Ioc;
|
2016-06-28 02:53:31 +03:00
|
|
|
|
|
|
|
|
|
namespace Bit.App.Controls
|
|
|
|
|
{
|
|
|
|
|
public class ExtendedContentPage : ContentPage
|
|
|
|
|
{
|
2016-07-12 06:55:16 +03:00
|
|
|
|
private ISyncService _syncService;
|
|
|
|
|
|
2016-06-28 02:53:31 +03:00
|
|
|
|
public ExtendedContentPage()
|
|
|
|
|
{
|
2016-07-12 06:55:16 +03:00
|
|
|
|
_syncService = Resolver.Resolve<ISyncService>();
|
|
|
|
|
|
2016-06-28 02:53:31 +03:00
|
|
|
|
BackgroundColor = Color.FromHex("efeff4");
|
2016-07-12 06:55:16 +03:00
|
|
|
|
IsBusy = _syncService.SyncInProgress;
|
|
|
|
|
|
|
|
|
|
MessagingCenter.Subscribe<Application, bool>(Application.Current, "SyncCompleted", (sender, success) =>
|
|
|
|
|
{
|
|
|
|
|
IsBusy = _syncService.SyncInProgress;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
MessagingCenter.Subscribe<Application>(Application.Current, "SyncStarted", (sender) =>
|
|
|
|
|
{
|
|
|
|
|
IsBusy = _syncService.SyncInProgress;
|
|
|
|
|
});
|
2016-06-28 02:53:31 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|