user dialogs on UWP for loading

This commit is contained in:
Kyle Spearrin 2017-12-23 00:04:52 -05:00
parent 4dc388015c
commit 4ebd249356
2 changed files with 27 additions and 1 deletions

View file

@ -1,4 +1,5 @@
using Bit.App.Abstractions; using Acr.UserDialogs;
using Bit.App.Abstractions;
using Bit.App.Models.Page; using Bit.App.Models.Page;
using Coding4Fun.Toolkit.Controls; using Coding4Fun.Toolkit.Controls;
using System; using System;
@ -18,6 +19,13 @@ namespace Bit.UWP.Services
{ {
public class DeviceActionService : IDeviceActionService public class DeviceActionService : IDeviceActionService
{ {
private readonly IUserDialogs _userDialogs;
public DeviceActionService(IUserDialogs userDialogs)
{
_userDialogs = userDialogs;
}
public bool CanOpenFile(string fileName) => true; public bool CanOpenFile(string fileName) => true;
public void ClearCache() public void ClearCache()
@ -143,5 +151,20 @@ namespace Bit.UWP.Services
IsHitTestVisible = false IsHitTestVisible = false
}.Show(); }.Show();
} }
public void ShowLoading(string text)
{
_userDialogs.ShowLoading(text, MaskType.Black);
}
public void HideLoading()
{
_userDialogs.HideLoading();
}
public Task LaunchAppAsync(string appName, Xamarin.Forms.Page page)
{
throw new NotImplementedException();
}
} }
} }

View file

@ -188,6 +188,9 @@
</Page> </Page>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Acr.UserDialogs">
<Version>6.5.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform"> <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.0.5</Version> <Version>6.0.5</Version>
</PackageReference> </PackageReference>