Merge branch 'master' into forms-refresh
This commit is contained in:
Коммит
a4f2ba99ac
|
@ -48,5 +48,6 @@
|
|||
<PackageReference Include="FormsToolkit" Version="2.0.1" />
|
||||
<PackageReference Include="MonkeyCache" Version="1.0.0-beta" />
|
||||
<PackageReference Include="MonkeyCache.FileStore" Version="1.0.0-beta" />
|
||||
<PackageReference Include="Com.Airbnb.Xamarin.Forms.Lottie" Version="2.6.3" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -28,6 +28,20 @@ namespace ContosoFieldService
|
|||
return jobDetailsPageModel;
|
||||
}
|
||||
}
|
||||
static WorkingJobViewModel workingJobViewModel;
|
||||
public static WorkingJobViewModel WorkingJobViewModel
|
||||
{
|
||||
get
|
||||
{
|
||||
if (workingJobViewModel == null)
|
||||
{
|
||||
workingJobViewModel = new WorkingJobViewModel();
|
||||
workingJobViewModel.Init(DummyData.GetDummyJobs().First());
|
||||
}
|
||||
|
||||
return workingJobViewModel;
|
||||
}
|
||||
}
|
||||
|
||||
static PartsViewModel partsPageModel;
|
||||
public static PartsViewModel PartsPageModel => partsPageModel ?? (partsPageModel = new PartsViewModel { Parts = DummyData.GetDummyParts() });
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:design="clr-namespace:ContosoFieldService;assembly=ContosoFieldService.Core"
|
||||
xmlns:themes="using:ContosoFieldService.Themes"
|
||||
BindingContext="{x:Static design:PageModelLocator.JobDetailsPageModel}"
|
||||
xmlns:lottie="clr-namespace:Lottie.Forms;assembly=Lottie.Forms"
|
||||
BindingContext="{x:Static design:PageModelLocator.WorkingJobViewModel}"
|
||||
x:Class="ContosoFieldService.Pages.WorkingJobPage"
|
||||
BackgroundColor="{StaticResource BackgroundColor}"
|
||||
Title="Working">
|
||||
|
@ -18,8 +19,7 @@
|
|||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
|
||||
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
|
@ -153,5 +153,40 @@
|
|||
Text="Complete"
|
||||
Command="{Binding CompleteClicked}" />
|
||||
</StackLayout>
|
||||
|
||||
<!-- Loading Overlay -->
|
||||
<Grid IsVisible="{Binding IsUploading}" Grid.RowSpan="2">
|
||||
<BoxView
|
||||
VerticalOptions="Fill"
|
||||
HorizontalOptions="Fill"
|
||||
BackgroundColor="Black"
|
||||
Opacity="0.8" />
|
||||
|
||||
<StackLayout
|
||||
Margin="20"
|
||||
HorizontalOptions="Fill"
|
||||
VerticalOptions="Center">
|
||||
|
||||
<lottie:AnimationView
|
||||
Animation="image-upload.json"
|
||||
Loop="true"
|
||||
AutoPlay="true"
|
||||
VerticalOptions="Center"
|
||||
HeightRequest="300"
|
||||
WidthRequest="300"/>
|
||||
|
||||
<Label
|
||||
Text="UPLOADING"
|
||||
HorizontalTextAlignment="Center"
|
||||
FontAttributes="Bold"
|
||||
TextColor="White"
|
||||
HorizontalOptions="Center" />
|
||||
<Label
|
||||
Text="Please do not leave this page."
|
||||
HorizontalTextAlignment="Center"
|
||||
TextColor="White"
|
||||
HorizontalOptions="Center" />
|
||||
</StackLayout>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ContentPage>
|
|
@ -23,6 +23,13 @@ namespace ContosoFieldService.ViewModels
|
|||
Timer timer;
|
||||
int increment;
|
||||
|
||||
bool isUploading;
|
||||
public bool IsUploading
|
||||
{
|
||||
get { return isUploading; }
|
||||
set { isUploading = value; RaisePropertyChanged(); }
|
||||
}
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Details { get; set; }
|
||||
public string Duration { get; set; }
|
||||
|
@ -120,12 +127,13 @@ namespace ContosoFieldService.ViewModels
|
|||
if (file != null)
|
||||
{
|
||||
Analytics.TrackEvent("Taking a photo");
|
||||
IsUploading = true;
|
||||
|
||||
var updatedJob = await photoService.UploadPhotoAsync(selectedJob.Id, file);
|
||||
jobService.InvalidateCache("Jobs");
|
||||
Init(updatedJob);
|
||||
|
||||
await CoreMethods.DisplayAlert("Saved", "Image Saved", "OK");
|
||||
IsUploading = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -357,6 +357,12 @@
|
|||
<Reference Include="MonkeyCache.FileStore">
|
||||
<HintPath>..\..\packages\MonkeyCache.FileStore.1.0.0-beta\lib\monoandroid81\MonkeyCache.FileStore.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lottie.Android">
|
||||
<HintPath>..\..\packages\Com.Airbnb.Android.Lottie.2.6.0\lib\monoandroid81\Lottie.Android.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lottie.Forms">
|
||||
<HintPath>..\..\packages\Com.Airbnb.Xamarin.Forms.Lottie.2.6.3\lib\monoandroid81\Lottie.Forms.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MainActivity.cs" />
|
||||
|
@ -439,6 +445,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidAsset Include="Assets\photoupload.json" />
|
||||
<AndroidAsset Include="Assets\image-upload.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<GoogleServicesJson Include="google-services.json" />
|
||||
|
|
|
@ -7,6 +7,7 @@ using CarouselView.FormsPlugin.Android;
|
|||
using ContosoFieldService.Services;
|
||||
using FFImageLoading.Forms.Platform;
|
||||
using Firebase;
|
||||
using Lottie.Forms.Droid;
|
||||
using Microsoft.AppCenter.Push;
|
||||
using Microsoft.Identity.Client;
|
||||
using Xamarin;
|
||||
|
@ -38,7 +39,7 @@ namespace ContosoFieldService.Droid
|
|||
|
||||
global::Xamarin.Forms.Forms.Init(this, bundle);
|
||||
CachedImageRenderer.Init(false);
|
||||
//AnimationViewRenderer.Init();
|
||||
AnimationViewRenderer.Init();
|
||||
FormsMaps.Init(this, bundle);
|
||||
CarouselViewRenderer.Init();
|
||||
Xamarin.Essentials.Platform.Init(this, bundle);
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="CarouselView.FormsPlugin" version="5.2.0" targetFramework="monoandroid81" />
|
||||
<package id="Com.Airbnb.Android.Lottie" version="2.6.0" targetFramework="monoandroid81" />
|
||||
<package id="Com.Airbnb.Xamarin.Forms.Lottie" version="2.6.3" targetFramework="monoandroid81" />
|
||||
<package id="Corcav.Behaviors" version="2.3.7" targetFramework="monoandroid81" />
|
||||
<package id="DLToolkit.Forms.Controls.FlowListView" version="2.0.11" targetFramework="monoandroid81" />
|
||||
<package id="FormsToolkit" version="2.0.1" targetFramework="monoandroid81" />
|
||||
|
|
|
@ -305,6 +305,12 @@
|
|||
<Reference Include="MonkeyCache.FileStore">
|
||||
<HintPath>..\..\packages\MonkeyCache.FileStore.1.0.0-beta\lib\xamarinios10\MonkeyCache.FileStore.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lottie.iOS">
|
||||
<HintPath>..\..\packages\Com.Airbnb.iOS.Lottie.2.5.4\lib\xamarinios10\Lottie.iOS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Lottie.Forms">
|
||||
<HintPath>..\..\packages\Com.Airbnb.Xamarin.Forms.Lottie.2.6.3\lib\xamarinios10\Lottie.Forms.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
|
||||
|
@ -423,6 +429,7 @@
|
|||
<BundleResource Include="Resources\icon_share.png" />
|
||||
<BundleResource Include="Resources\icon_share%402x.png" />
|
||||
<BundleResource Include="Resources\icon_share%403x.png" />
|
||||
<BundleResource Include="Resources\image-upload.json" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
<Import Project="..\..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('..\..\packages\NETStandard.Library.2.0.3\build\netstandard2.0\NETStandard.Library.targets')" />
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1,6 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="CarouselView.FormsPlugin" version="5.2.0" targetFramework="xamarinios10" />
|
||||
<package id="Com.Airbnb.iOS.Lottie" version="2.5.4" targetFramework="xamarinios10" />
|
||||
<package id="Com.Airbnb.Xamarin.Forms.Lottie" version="2.6.3" targetFramework="xamarinios10" />
|
||||
<package id="Corcav.Behaviors" version="2.3.7" targetFramework="xamarinios10" />
|
||||
<package id="DLToolkit.Forms.Controls.FlowListView" version="2.0.11" targetFramework="xamarinios10" />
|
||||
<package id="FormsToolkit" version="2.0.1" targetFramework="xamarinios10" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче