mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-03-12 23:01:52 +01:00
Update Packages
This commit is contained in:
commit
1d48abd51f
@ -103,11 +103,11 @@ build_iOS:
|
||||
script:
|
||||
- 'nuget restore' # restore Nuget dependencies
|
||||
- 'msbuild /t:Restore'
|
||||
- 'msbuild /t:Borepin_iOS /p:Configuration=Debug /p:Platform=iPhone /p:ArchiveOnBuild=true' # build the project /p:AndroidKeyStore=True
|
||||
- 'msbuild /t:Borepin_iOS /p:Configuration=Debug /p:Platform=iPhone /p:ArchiveOnBuild=true /p:BuildIpa=true' # build the project /p:AndroidKeyStore=True
|
||||
artifacts:
|
||||
expire_in: 1 week # save gitlab server space, we copy the files we need to deploy folder later on
|
||||
paths:
|
||||
- Borepin/Borepin.iOS/bin/iPhone/Debug/Borepin.ipa
|
||||
- Borepin/Borepin.iOS/bin/iPhone/Debug/Borepin.iOS.ipa
|
||||
- Borepin/Borepin.iOS/bin/iPhone/Debug/
|
||||
# - '$env:TEST_FOLDER\' # saving entire Test project so NUnit can run tests
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
||||
<PackageReference Include="Prism.DryIoc.Forms">
|
||||
<Version>8.1.97</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
|
||||
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2125" />
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -2,6 +2,7 @@
|
||||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.OS;
|
||||
using AndroidX.AppCompat.App;
|
||||
|
||||
namespace Borepin.Droid
|
||||
{
|
||||
@ -10,6 +11,8 @@ namespace Borepin.Droid
|
||||
{
|
||||
protected override void OnCreate(Bundle savedInstanceState)
|
||||
{
|
||||
AppCompatDelegate.DefaultNightMode = AppCompatDelegate.ModeNightNo;
|
||||
|
||||
TabLayoutResource = Resource.Layout.Tabbar;
|
||||
ToolbarResource = Resource.Layout.Toolbar;
|
||||
|
||||
|
17996
Borepin/Borepin.Android/Resources/Resource.designer.cs
generated
17996
Borepin/Borepin.Android/Resources/Resource.designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\packages\Xamarin.Forms.5.0.0.2083\build\Xamarin.Forms.props" Condition="Exists('..\..\packages\Xamarin.Forms.5.0.0.2083\build\Xamarin.Forms.props')" />
|
||||
<Import Project="..\..\packages\Xamarin.Forms.5.0.0.2125\build\Xamarin.Forms.props" Condition="Exists('..\..\packages\Xamarin.Forms.5.0.0.2125\build\Xamarin.Forms.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@ -89,20 +89,20 @@
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="webkit-sharp, Version=1.1.15.0, Culture=neutral, PublicKeyToken=eaa1d335d2e19745, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Xamarin.Forms.Platform.GTK.5.0.0.2083\lib\net45\webkit-sharp.dll</HintPath>
|
||||
<Reference Include="Xamarin.Forms.Core">
|
||||
<HintPath>..\..\packages\Xamarin.Forms.5.0.0.2125\lib\netstandard2.0\Xamarin.Forms.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Xamarin.Forms.5.0.0.2083\lib\netstandard2.0\Xamarin.Forms.Core.dll</HintPath>
|
||||
<Reference Include="Xamarin.Forms.Platform">
|
||||
<HintPath>..\..\packages\Xamarin.Forms.5.0.0.2125\lib\netstandard2.0\Xamarin.Forms.Platform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Platform, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Xamarin.Forms.5.0.0.2083\lib\netstandard2.0\Xamarin.Forms.Platform.dll</HintPath>
|
||||
<Reference Include="Xamarin.Forms.Xaml">
|
||||
<HintPath>..\..\packages\Xamarin.Forms.5.0.0.2125\lib\netstandard2.0\Xamarin.Forms.Xaml.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Platform.GTK, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Xamarin.Forms.Platform.GTK.5.0.0.2083\lib\net45\Xamarin.Forms.Platform.GTK.dll</HintPath>
|
||||
<Reference Include="webkit-sharp">
|
||||
<HintPath>..\..\packages\Xamarin.Forms.Platform.GTK.5.0.0.2125\lib\net45\webkit-sharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Xamarin.Forms.5.0.0.2083\lib\netstandard2.0\Xamarin.Forms.Xaml.dll</HintPath>
|
||||
<Reference Include="Xamarin.Forms.Platform.GTK">
|
||||
<HintPath>..\..\packages\Xamarin.Forms.Platform.GTK.5.0.0.2125\lib\net45\Xamarin.Forms.Platform.GTK.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@ -123,12 +123,5 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\packages\Xamarin.Forms.5.0.0.2083\build\Xamarin.Forms.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.5.0.0.2083\build\Xamarin.Forms.props'))" />
|
||||
<Error Condition="!Exists('..\..\packages\Xamarin.Forms.5.0.0.2083\build\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.5.0.0.2083\build\Xamarin.Forms.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\..\packages\Xamarin.Forms.5.0.0.2083\build\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.5.0.0.2083\build\Xamarin.Forms.targets')" />
|
||||
<Import Project="..\..\packages\Xamarin.Forms.5.0.0.2125\build\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.5.0.0.2125\build\Xamarin.Forms.targets')" />
|
||||
</Project>
|
@ -5,6 +5,6 @@
|
||||
<package id="Prism.Core" version="8.1.97" targetFramework="net48" />
|
||||
<package id="Prism.DryIoc.Forms" version="8.1.97" targetFramework="net48" />
|
||||
<package id="Prism.Forms" version="8.1.97" targetFramework="net48" />
|
||||
<package id="Xamarin.Forms" version="5.0.0.2083" targetFramework="net48" />
|
||||
<package id="Xamarin.Forms.Platform.GTK" version="5.0.0.2083" targetFramework="net48" />
|
||||
<package id="Xamarin.Forms" version="5.0.0.2125" targetFramework="net48" />
|
||||
<package id="Xamarin.Forms.Platform.GTK" version="5.0.0.2125" targetFramework="net48" />
|
||||
</packages>
|
@ -2,6 +2,5 @@
|
||||
x:Class="Borepin.UWP.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Borepin.UWP">
|
||||
|
||||
xmlns:local="using:Borepin.UWP" RequestedTheme="Light">
|
||||
</Application>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
@ -183,7 +183,7 @@
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
|
||||
<PackageReference Include="Xamarin.Forms">
|
||||
<Version>5.0.0.2083</Version>
|
||||
<Version>5.0.0.2125</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
@ -196,4 +196,8 @@
|
||||
<ItemGroup>
|
||||
<Folder Include="Assets.xcassets\LaunchIcon.imageset\" />
|
||||
</ItemGroup>
|
||||
<Target Name="BeforeBuild" Condition=" '$(GITLAB_CI)' == 'true' ">
|
||||
<XmlPoke XmlInputPath="Info.plist" Query="//dict/key[. = 'CFBundleVersion']/following-sibling::string[1]" Value="$(CI_PIPELINE_ID)" />
|
||||
<XmlPoke XmlInputPath="Info.plist" Query="//dict/key[. = 'CFBundleShortVersionString']/following-sibling::string[1]" Value="0.1.0" />
|
||||
</Target>
|
||||
</Project>
|
@ -40,5 +40,7 @@
|
||||
<false/>
|
||||
<key>NFCReaderUsageDescription</key>
|
||||
<string>FabAccess needs to be able to read your card for authentication with the server.</string>
|
||||
<key>UIUserInterfaceStyle</key>
|
||||
<string>Light</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -45,6 +45,7 @@ namespace Borepin
|
||||
containerRegistry.RegisterForNavigation<MachineListPage, MachineListPageModel>();
|
||||
containerRegistry.RegisterForNavigation<ServerListPage, ServerListPageModel>();
|
||||
containerRegistry.RegisterForNavigation<ServerPage, ServerPageModel>();
|
||||
containerRegistry.RegisterForNavigation<ListPage, ListPageModel>();
|
||||
|
||||
containerRegistry.RegisterForNavigation<WelcomePage, WelcomePageModel>("SetUpProcess_WelcomePage");
|
||||
//containerRegistry.RegisterForNavigation<ScanPage, ScanPageModel>("SetUpProcess_ScanPage");
|
||||
|
@ -28,7 +28,7 @@
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="Plugin.Multilingual" Version="1.0.2" />
|
||||
<PackageReference Include="Prism.DryIoc.Forms" Version="8.1.97" />
|
||||
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
|
||||
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2125" />
|
||||
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@ -65,6 +65,9 @@
|
||||
<EmbeddedResource Update="Page\AddServerProcess\HostSelectPage.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Page\ListPage.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Page\AddServerProcess\LoginChoosePage.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
@ -92,6 +95,9 @@
|
||||
<EmbeddedResource Update="Page\StartUpDistributorPage.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Page\TestPage.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
@ -103,6 +109,12 @@
|
||||
<EmbeddedResource Update="Styles\LightTheme.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="View\IsBusyView.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="View\ListItemView.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="View\ScanView.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
|
@ -29,12 +29,12 @@ namespace Borepin.Model
|
||||
State = _Machine.State;
|
||||
Manager = new UserVisualize(_Machine.Manager);
|
||||
|
||||
CanUse = _Machine.Use != null;
|
||||
CanInUse = _Machine.Inuse != null;
|
||||
CanTransfer = _Machine.Transfer != null;
|
||||
CanCheck = _Machine.Check != null;
|
||||
CanManage = _Machine.Manage != null;
|
||||
CanAdmin = _Machine.Admin != null;
|
||||
CanUse = !((UseInterface_Proxy)_Machine.Use).IsNull;
|
||||
CanInUse = !((InUseInterface_Proxy) _Machine.Inuse).IsNull;
|
||||
CanTransfer = !((TransferInterface_Proxy) _Machine.Transfer).IsNull;
|
||||
CanCheck = !((CheckInterface_Proxy) _Machine.Check).IsNull;
|
||||
CanManage = !((ManageInterface_Proxy) _Machine.Manage).IsNull;
|
||||
CanAdmin = !((AdminInterface_Proxy) _Machine.Admin).IsNull;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
19
Borepin/Borepin/Page/ListPage.xaml
Normal file
19
Borepin/Borepin/Page/ListPage.xaml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:views="clr-namespace:Borepin.View"
|
||||
x:Class="Borepin.Page.ListPage">
|
||||
<ContentPage.Content>
|
||||
<StackLayout>
|
||||
<ListView ItemsSource="{Binding ListItemViewModel_List}">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
<views:ListItemView />
|
||||
</ViewCell>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</StackLayout>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
15
Borepin/Borepin/Page/ListPage.xaml.cs
Normal file
15
Borepin/Borepin/Page/ListPage.xaml.cs
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace Borepin.Page
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class ListPage : ContentPage
|
||||
{
|
||||
public ListPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
16
Borepin/Borepin/Page/SetUpProcess/ScanPage.xaml
Normal file
16
Borepin/Borepin/Page/SetUpProcess/ScanPage.xaml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="Borepin.Page.SetUpProcess.ScanPage"
|
||||
xmlns:i18n="clr-namespace:Borepin.Helpers"
|
||||
xmlns:views="clr-namespace:Borepin.View">
|
||||
<ContentPage.Content>
|
||||
<ScrollView>
|
||||
<StackLayout Style="{StaticResource Style_StackLayout_Content}">
|
||||
<views:ScanView />
|
||||
<Label Text="{i18n:Translate SetUp_ScanPage_Text}" Style="{StaticResource Style_Label_Text}"/>
|
||||
<Button Text="{i18n:Translate SetUp_ScanPage_Button}" Command="{Binding NextCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
21
Borepin/Borepin/Page/TestPage.xaml
Normal file
21
Borepin/Borepin/Page/TestPage.xaml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="Borepin.Page.TestPage"
|
||||
xmlns:converters="clr-namespace:Borepin.Converter">
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<converters:InvertBoolConverter x:Key="InvertBoolConverter"/>
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
<ContentPage.Content>
|
||||
<StackLayout Padding="20">
|
||||
<StackLayout IsVisible="{Binding IsBusy}">
|
||||
<ActivityIndicator IsRunning="{Binding IsBusy}"></ActivityIndicator>
|
||||
</StackLayout>
|
||||
<StackLayout IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}">
|
||||
<Label Text="TestPage"/>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
20
Borepin/Borepin/Page/TestPage.xaml.cs
Normal file
20
Borepin/Borepin/Page/TestPage.xaml.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace Borepin.Page
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class TestPage : ContentPage
|
||||
{
|
||||
public TestPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@ -31,12 +31,11 @@ namespace Borepin.PageModel.AddServerProcess
|
||||
#endregion
|
||||
|
||||
#region LoadData
|
||||
public override async Task LoadData()
|
||||
public override Task LoadData()
|
||||
{
|
||||
IsBusy = true;
|
||||
|
||||
IsBusy = false;
|
||||
await Task.CompletedTask;
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -125,8 +124,7 @@ namespace Borepin.PageModel.AddServerProcess
|
||||
|
||||
public override void OnNavigatedTo(INavigationParameters parameters)
|
||||
{
|
||||
IsBusy = true;
|
||||
Task.Run(LoadData);
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
@ -16,12 +16,11 @@ namespace Borepin.PageModel.AddServerProcess
|
||||
#endregion
|
||||
|
||||
#region LoadData
|
||||
public override async Task LoadData()
|
||||
public override Task LoadData()
|
||||
{
|
||||
IsBusy = true;
|
||||
|
||||
IsBusy = false;
|
||||
await Task.CompletedTask;
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -51,8 +50,7 @@ namespace Borepin.PageModel.AddServerProcess
|
||||
|
||||
public override void OnNavigatedTo(INavigationParameters parameters)
|
||||
{
|
||||
IsBusy = true;
|
||||
Task.Run(LoadData);
|
||||
IsBusy = false;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ using Borepin.Service.BFFH;
|
||||
using Borepin.Service.Connections;
|
||||
using Prism.Commands;
|
||||
using Prism.Navigation;
|
||||
using Prism.Services;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
@ -15,13 +16,16 @@ namespace Borepin.PageModel.AddServerProcess
|
||||
#region Private Properties
|
||||
private readonly IBFFHService _BFFHService;
|
||||
private readonly IConnectionService _ConnectionService;
|
||||
private readonly IPageDialogService _PageDialogService;
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
public LoginPasswordPageModel(INavigationService navigationService, IBFFHService bffhService, IConnectionService connectionService) : base(navigationService)
|
||||
public LoginPasswordPageModel(INavigationService navigationService, IBFFHService bffhService, IConnectionService connectionService, IPageDialogService pageDialogService) : base(navigationService)
|
||||
{
|
||||
_BFFHService = bffhService;
|
||||
_ConnectionService = connectionService;
|
||||
_PageDialogService = pageDialogService;
|
||||
|
||||
|
||||
AuthenticateCommand = new DelegateCommand(async () => await AuthenticateCommandExecuted());
|
||||
|
||||
@ -30,12 +34,11 @@ namespace Borepin.PageModel.AddServerProcess
|
||||
#endregion
|
||||
|
||||
#region LoadData
|
||||
public override async Task LoadData()
|
||||
public override Task LoadData()
|
||||
{
|
||||
IsBusy = true;
|
||||
|
||||
IsBusy = false;
|
||||
await Task.CompletedTask;
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -65,11 +68,19 @@ namespace Borepin.PageModel.AddServerProcess
|
||||
|
||||
private async Task AuthenticateCommandExecuted()
|
||||
{
|
||||
IsBusy = true;
|
||||
|
||||
Connection connection_update = _BFFHService.ActiveConnection;
|
||||
|
||||
connection_update.Username = Username;
|
||||
|
||||
await _BFFHService.Authenticate(connection_update, Password).ConfigureAwait(false);
|
||||
if(!await _BFFHService.Authenticate(connection_update, Password))
|
||||
{
|
||||
await _PageDialogService.DisplayAlertAsync("Connection failed", "Unable to authenticate to server.", "Ok");
|
||||
|
||||
IsBusy = false;
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
@ -77,7 +88,7 @@ namespace Borepin.PageModel.AddServerProcess
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
|
||||
// Could be better catched
|
||||
}
|
||||
|
||||
await _ConnectionService.LogConnect(_BFFHService.ActiveConnection);
|
||||
@ -99,8 +110,7 @@ namespace Borepin.PageModel.AddServerProcess
|
||||
|
||||
public override void OnNavigatedTo(INavigationParameters parameters)
|
||||
{
|
||||
IsBusy = true;
|
||||
Task.Run(LoadData);
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
57
Borepin/Borepin/PageModel/ListPageModel.cs
Normal file
57
Borepin/Borepin/PageModel/ListPageModel.cs
Normal file
@ -0,0 +1,57 @@
|
||||
using Borepin.Model;
|
||||
using Borepin.ViewModel;
|
||||
using Prism.Mvvm;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Input;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Borepin.PageModel
|
||||
{
|
||||
public class ListPageModel : BindableBase
|
||||
{
|
||||
public ListPageModel()
|
||||
{
|
||||
ListItemViewModel_List = new List<ListItemViewModel>()
|
||||
{
|
||||
new ListItemViewModel(
|
||||
new ListItem()
|
||||
{
|
||||
Value1 = "ListItem 1"
|
||||
}),
|
||||
|
||||
new ListItemViewModel(
|
||||
new ListItem()
|
||||
{
|
||||
Value1 = "ListItem 2"
|
||||
}),
|
||||
|
||||
new ListItemViewModel(
|
||||
new ListItem()
|
||||
{
|
||||
Value1 = "ListItem 3"
|
||||
}),
|
||||
};
|
||||
|
||||
SelectListItemCommand = new Command<object>(SelectListItemCommandExecuted);
|
||||
}
|
||||
|
||||
private List<ListItemViewModel> _ListItemViewModel_List;
|
||||
public List<ListItemViewModel> ListItemViewModel_List
|
||||
{
|
||||
get => _ListItemViewModel_List;
|
||||
set => SetProperty(ref _ListItemViewModel_List, value);
|
||||
}
|
||||
|
||||
private ICommand _SelectListItemCommand;
|
||||
public ICommand SelectListItemCommand
|
||||
{
|
||||
get => _SelectListItemCommand;
|
||||
set => SetProperty(ref _SelectListItemCommand, value);
|
||||
}
|
||||
|
||||
private void SelectListItemCommandExecuted(object obj)
|
||||
{
|
||||
System.Diagnostics.Debugger.Break();
|
||||
}
|
||||
}
|
||||
}
|
@ -25,11 +25,9 @@ namespace Borepin.PageModel
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region LoadData
|
||||
#region Data
|
||||
public override async Task LoadData()
|
||||
{
|
||||
IsBusy = true;
|
||||
|
||||
if (_BFFHService.ActiveConnection == null)
|
||||
{
|
||||
IsBusy = false;
|
||||
|
@ -28,7 +28,7 @@ namespace Borepin.PageModel
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region LoadData
|
||||
#region Data
|
||||
public override async Task LoadData()
|
||||
{
|
||||
IsBusy = true;
|
||||
|
@ -1,31 +1,20 @@
|
||||
using Borepin.Base;
|
||||
using Prism.Mvvm;
|
||||
using Prism.Navigation;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Borepin.PageModel
|
||||
{
|
||||
public class MainPagePageModel : PageModelBase
|
||||
public class MainPagePageModel : BindableBase
|
||||
{
|
||||
#region Constructors
|
||||
public MainPagePageModel(INavigationService navigationService) : base(navigationService)
|
||||
private INavigationService _NavigationService;
|
||||
|
||||
public MainPagePageModel(INavigationService navigationService)
|
||||
{
|
||||
_NavigationService = navigationService;
|
||||
NavigateCommand = new Command<string>(NavigateCommandExecuted);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region LoadData
|
||||
public override async Task LoadData()
|
||||
{
|
||||
IsBusy = true;
|
||||
|
||||
IsBusy = false;
|
||||
await LoadData();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Commands
|
||||
private ICommand _NavigationCommand;
|
||||
|
||||
public ICommand NavigateCommand
|
||||
@ -42,19 +31,5 @@ namespace Borepin.PageModel
|
||||
System.Diagnostics.Debugger.Break();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region INavigationService
|
||||
public override void OnNavigatedFrom(INavigationParameters parameters)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void OnNavigatedTo(INavigationParameters parameters)
|
||||
{
|
||||
IsBusy = false;
|
||||
//Task.Run(LoadData);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -31,11 +31,9 @@ namespace Borepin.PageModel
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region LoadData
|
||||
#region Data
|
||||
public override async Task LoadData()
|
||||
{
|
||||
IsBusy = true;
|
||||
|
||||
List<Connection> list = await _ConnectionService.GetConnectionList();
|
||||
if (_BFFHService.ActiveConnection != null)
|
||||
{
|
||||
|
@ -37,13 +37,10 @@ namespace Borepin.PageModel
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region LoadData
|
||||
public override async Task LoadData()
|
||||
#region Data
|
||||
public override Task LoadData()
|
||||
{
|
||||
IsBusy = true;
|
||||
|
||||
IsBusy = false;
|
||||
await LoadData();
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -94,7 +91,14 @@ namespace Borepin.PageModel
|
||||
IsBusy = false;
|
||||
return;
|
||||
}
|
||||
await _BFFHService.Authenticate();
|
||||
|
||||
if(!await _BFFHService.Authenticate())
|
||||
{
|
||||
await _PageDialogService.DisplayAlertAsync("Connection failed", "Unable to authenticate to server.", "Ok");
|
||||
|
||||
IsBusy = false;
|
||||
return;
|
||||
}
|
||||
|
||||
IsConnected = true;
|
||||
}
|
||||
@ -169,8 +173,7 @@ namespace Borepin.PageModel
|
||||
IsConnected = false;
|
||||
}
|
||||
|
||||
IsBusy = true;
|
||||
Task.Run(LoadData);
|
||||
IsBusy = false;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
54
Borepin/Borepin/PageModel/SetUpProcess/ScanPageModel.cs
Normal file
54
Borepin/Borepin/PageModel/SetUpProcess/ScanPageModel.cs
Normal file
@ -0,0 +1,54 @@
|
||||
using Borepin.Base;
|
||||
using Prism.Commands;
|
||||
using Prism.Navigation;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Borepin.PageModel.SetUpProcess
|
||||
{
|
||||
public class ScanPageModel : PageModelBase
|
||||
{
|
||||
#region Constructors
|
||||
public ScanPageModel(INavigationService navigationService) : base(navigationService)
|
||||
{
|
||||
NextCommand = new DelegateCommand<object>(NextCommandCommandExecuted);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Data
|
||||
public override Task LoadData()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Commands
|
||||
private ICommand _NextCommand;
|
||||
public ICommand NextCommand
|
||||
{
|
||||
get => _NextCommand;
|
||||
set => SetProperty(ref _NextCommand, value);
|
||||
}
|
||||
private async void NextCommandCommandExecuted(object obj)
|
||||
{
|
||||
INavigationResult result = await _NavigationService.NavigateAsync("AddServerProcess_HostSelectPage");
|
||||
if (!result.Success)
|
||||
{
|
||||
System.Diagnostics.Debugger.Break();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region INavigationAware
|
||||
public override void OnNavigatedFrom(INavigationParameters parameters)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void OnNavigatedTo(INavigationParameters parameters)
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -15,13 +15,10 @@ namespace Borepin.PageModel.SetUpProcess
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region LoadData
|
||||
public override async Task LoadData()
|
||||
#region Data
|
||||
public override Task LoadData()
|
||||
{
|
||||
IsBusy = true;
|
||||
|
||||
IsBusy = false;
|
||||
await Task.CompletedTask;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -34,7 +31,8 @@ namespace Borepin.PageModel.SetUpProcess
|
||||
}
|
||||
private async void NextCommandCommandExecuted(object obj)
|
||||
{
|
||||
INavigationResult result = await _NavigationService.NavigateAsync("SetUpProcess_ScanPage");
|
||||
//INavigationResult result = await _NavigationService.NavigateAsync("SetUpProcess_ScanPage");
|
||||
INavigationResult result = await _NavigationService.NavigateAsync("AddServerProcess_HostSelectPage");
|
||||
if (!result.Success)
|
||||
{
|
||||
System.Diagnostics.Debugger.Break();
|
||||
@ -50,8 +48,7 @@ namespace Borepin.PageModel.SetUpProcess
|
||||
|
||||
public override void OnNavigatedTo(INavigationParameters parameters)
|
||||
{
|
||||
IsBusy = true;
|
||||
Task.Run(LoadData);
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
@ -27,12 +27,9 @@ namespace Borepin.PageModel
|
||||
#endregion
|
||||
|
||||
#region LoadData
|
||||
public override async Task LoadData()
|
||||
public override Task LoadData()
|
||||
{
|
||||
IsBusy = true;
|
||||
|
||||
IsBusy = false;
|
||||
await LoadData();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -78,8 +75,7 @@ namespace Borepin.PageModel
|
||||
|
||||
public override void OnNavigatedTo(INavigationParameters parameters)
|
||||
{
|
||||
IsBusy = true;
|
||||
Task.Run(LoadData);
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
39
Borepin/Borepin/PageModel/TestPageModel.cs
Normal file
39
Borepin/Borepin/PageModel/TestPageModel.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using Borepin.Base;
|
||||
using Prism.Navigation;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Borepin.PageModel
|
||||
{
|
||||
class TestPageModel : PageModelBase
|
||||
{
|
||||
#region Contructors
|
||||
public TestPageModel(INavigationService navigationService) : base(navigationService)
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Data
|
||||
public override Task LoadData()
|
||||
{
|
||||
Task.Delay(3000);
|
||||
|
||||
IsBusy = false;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region INavigationService
|
||||
public override void OnNavigatedFrom(INavigationParameters parameters)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void OnNavigatedTo(INavigationParameters parameters)
|
||||
{
|
||||
IsBusy = true;
|
||||
Task.Run(LoadData);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -10,48 +10,35 @@
|
||||
|
||||
namespace Borepin.Resources.Text {
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class TextResource {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
private static System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
private static System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal TextResource() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Borepin.Resources.Text.TextResource", typeof(TextResource).Assembly);
|
||||
if (object.Equals(null, resourceMan)) {
|
||||
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Borepin.Resources.Text.TextResource", typeof(TextResource).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
@ -60,45 +47,30 @@ namespace Borepin.Resources.Text {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Login to your Space.
|
||||
/// </summary>
|
||||
internal static string SetUp_ScanPage_Button {
|
||||
get {
|
||||
return ResourceManager.GetString("SetUp_ScanPage_Button", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Wenn du dieses Logo siehst, dann kannst du es scannen.
|
||||
/// </summary>
|
||||
internal static string SetUp_ScanPage_Text {
|
||||
get {
|
||||
return ResourceManager.GetString("SetUp_ScanPage_Text", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Start working.
|
||||
/// </summary>
|
||||
internal static string SetUp_WelcomePage_Button {
|
||||
get {
|
||||
return ResourceManager.GetString("SetUp_WelcomePage_Button", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Hier muss ein kurzer Text hin was FabAccess ist und was man damit machen kann.
|
||||
/// </summary>
|
||||
internal static string SetUp_WelcomePage_Text {
|
||||
get {
|
||||
return ResourceManager.GetString("SetUp_WelcomePage_Text", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Welcome.
|
||||
/// </summary>
|
||||
internal static string SetUp_WelcomePage_Title {
|
||||
get {
|
||||
return ResourceManager.GetString("SetUp_WelcomePage_Title", resourceCulture);
|
||||
|
@ -124,10 +124,10 @@
|
||||
<value>Wenn du dieses Logo siehst, dann kannst du es scannen</value>
|
||||
</data>
|
||||
<data name="SetUp_WelcomePage_Button" xml:space="preserve">
|
||||
<value>Start working</value>
|
||||
<value>Begin working</value>
|
||||
</data>
|
||||
<data name="SetUp_WelcomePage_Text" xml:space="preserve">
|
||||
<value>Hier muss ein kurzer Text hin was FabAccess ist und was man damit machen kann</value>
|
||||
<value>Automate your Space with FabAccess</value>
|
||||
</data>
|
||||
<data name="SetUp_WelcomePage_Title" xml:space="preserve">
|
||||
<value>Welcome</value>
|
||||
|
@ -75,20 +75,21 @@ namespace Borepin.Service.BFFH
|
||||
{
|
||||
string password = await _CredentialService.GetPasswordAsync(ActiveConnection);
|
||||
|
||||
await _Connection.Auth("PLAIN", new Dictionary<string, object> { { "Username", ActiveConnection.Username }, { "Password", password } });
|
||||
|
||||
return await Task.FromResult(true);
|
||||
return await _Connection.Auth("PLAIN", new Dictionary<string, object> { { "Username", ActiveConnection.Username }, { "Password", password } });
|
||||
}
|
||||
|
||||
public async Task<bool> Authenticate(Connection connection, string password)
|
||||
{
|
||||
await _Connection.Auth("PLAIN", new Dictionary<string, object> { { "Username", ActiveConnection.Username }, { "Password", password } }).ConfigureAwait(false);
|
||||
bool result = await _Connection.Auth("PLAIN", new Dictionary<string, object> { { "Username", ActiveConnection.Username }, { "Password", password } });
|
||||
|
||||
if(result == true)
|
||||
{
|
||||
await _CredentialService.AddCredentialsAsync(connection, password);
|
||||
|
||||
ActiveConnection = connection;
|
||||
}
|
||||
|
||||
return await Task.FromResult(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
public Task<IMachineSystem> GetMachineSystemInterface()
|
||||
|
10
Borepin/Borepin/View/IsBusyView.xaml
Normal file
10
Borepin/Borepin/View/IsBusyView.xaml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="Borepin.View.IsBusyView">
|
||||
<ContentView.Content>
|
||||
<StackLayout>
|
||||
<Label Text="IsBusy" />
|
||||
</StackLayout>
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
20
Borepin/Borepin/View/IsBusyView.xaml.cs
Normal file
20
Borepin/Borepin/View/IsBusyView.xaml.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace Borepin.View
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class IsBusyView : ContentView
|
||||
{
|
||||
public IsBusyView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
12
Borepin/Borepin/View/ListItemView.xaml
Normal file
12
Borepin/Borepin/View/ListItemView.xaml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="Borepin.View.ListItemView"
|
||||
xmlns:pagemodel="clr-namespace:Borepin.PageModel">
|
||||
<ContentView.Content>
|
||||
<StackLayout Orientation="Horizontal" HorizontalOptions="Center">
|
||||
<Label Text="{Binding Value}" />
|
||||
<Button Text="X" Command="{Binding Source={RelativeSource AncestorType={x:Type pagemodel:ListPageModel}}, Path=SelectListItemCommand}" CommandParameter="{Binding .}" />
|
||||
</StackLayout>
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
15
Borepin/Borepin/View/ListItemView.xaml.cs
Normal file
15
Borepin/Borepin/View/ListItemView.xaml.cs
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace Borepin.View
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class ListItemView : ContentView
|
||||
{
|
||||
public ListItemView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
20
Borepin/Borepin/ViewModel/ListItemViewModel.cs
Normal file
20
Borepin/Borepin/ViewModel/ListItemViewModel.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using Borepin.Model;
|
||||
using Prism.Mvvm;
|
||||
|
||||
namespace Borepin.ViewModel
|
||||
{
|
||||
public class ListItemViewModel : BindableBase
|
||||
{
|
||||
public ListItemViewModel(ListItem listItem)
|
||||
{
|
||||
Value = listItem.Value1;
|
||||
}
|
||||
|
||||
private string _Value;
|
||||
public string Value
|
||||
{
|
||||
get => _Value;
|
||||
set => SetProperty(ref _Value, value);
|
||||
}
|
||||
}
|
||||
}
|
@ -124,7 +124,6 @@ namespace FabAccessAPI
|
||||
|
||||
public async Task<bool> Authenticate(string mech, Dictionary<string, object> properties)
|
||||
{
|
||||
|
||||
var m = SaslFactory.Create(mech);
|
||||
foreach (KeyValuePair<string, object> entry in properties)
|
||||
{
|
||||
|
@ -40,11 +40,15 @@ namespace FabAccessAPI
|
||||
/// <param name="mech">The desired authentication mechanism</param>
|
||||
/// <param name="kvs">Key-Value data specific to the mechanism</param>
|
||||
/// <returns></returns>
|
||||
public async Task Auth(string mech, Dictionary<string, object> kvs, CancellationToken cancellationToken_ = default)
|
||||
public async Task<bool> Auth(string mech, Dictionary<string, object> kvs, CancellationToken cancellationToken_ = default)
|
||||
{
|
||||
// _bootstrapCap = await _bootstrapCap.Unwrap();
|
||||
var authCap = await _bootstrapCap.AuthenticationSystem(cancellationToken_).ConfigureAwait(false);
|
||||
if(_auth == null)
|
||||
{
|
||||
var authCap = await _bootstrapCap.AuthenticationSystem(cancellationToken_);
|
||||
_auth = new Auth(authCap);
|
||||
}
|
||||
|
||||
var mechs = await _auth.GetMechanisms();
|
||||
//_Log.Debug($"The Server supports the following auth mechs: {string.Join(", ", mechs)}");
|
||||
|
||||
@ -53,7 +57,7 @@ namespace FabAccessAPI
|
||||
throw new UnsupportedMechanismException();
|
||||
}
|
||||
|
||||
await _auth.Authenticate(mech, kvs);
|
||||
return await _auth.Authenticate(mech, kvs);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user