mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-03-12 14:51:44 +01:00
Merge branch 'beta' into 'main'
Update Main See merge request fabinfra/fabaccess/borepin!30
This commit is contained in:
commit
8bba433ff2
@ -31,6 +31,8 @@
|
|||||||
<MtouchDebug>true</MtouchDebug>
|
<MtouchDebug>true</MtouchDebug>
|
||||||
<CodesignKey>iPhone Developer</CodesignKey>
|
<CodesignKey>iPhone Developer</CodesignKey>
|
||||||
<MtouchSdkVersion>14.5</MtouchSdkVersion>
|
<MtouchSdkVersion>14.5</MtouchSdkVersion>
|
||||||
|
<CodesignProvision>Borepin Distribution Profile 2021</CodesignProvision>
|
||||||
|
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||||
<DebugType>none</DebugType>
|
<DebugType>none</DebugType>
|
||||||
|
@ -35,33 +35,37 @@ namespace Borepin
|
|||||||
|
|
||||||
protected override void RegisterTypes(IContainerRegistry containerRegistry)
|
protected override void RegisterTypes(IContainerRegistry containerRegistry)
|
||||||
{
|
{
|
||||||
// Register Navigation
|
#region Register Basic Navigation
|
||||||
|
containerRegistry.RegisterForNavigation<MainPage, MainPagePageModel>();
|
||||||
|
containerRegistry.RegisterForNavigation<NavigationPage>();
|
||||||
|
|
||||||
containerRegistry.RegisterForNavigation<StartUpDistributorPage, StartUpDistributorPageModel>();
|
containerRegistry.RegisterForNavigation<StartUpDistributorPage, StartUpDistributorPageModel>();
|
||||||
|
|
||||||
containerRegistry.RegisterForNavigation<NavigationPage>();
|
|
||||||
containerRegistry.RegisterForNavigation<MainPage, MainPagePageModel>();
|
|
||||||
containerRegistry.RegisterForNavigation<MachinePage, MachinePageModel>();
|
containerRegistry.RegisterForNavigation<MachinePage, MachinePageModel>();
|
||||||
containerRegistry.RegisterForNavigation<SettingsPage>();
|
containerRegistry.RegisterForNavigation<SettingsPage>();
|
||||||
containerRegistry.RegisterForNavigation<MachineListPage, MachineListPageModel>();
|
containerRegistry.RegisterForNavigation<MachineListPage, MachineListPageModel>();
|
||||||
containerRegistry.RegisterForNavigation<ServerListPage, ServerListPageModel>();
|
containerRegistry.RegisterForNavigation<ServerListPage, ServerListPageModel>();
|
||||||
containerRegistry.RegisterForNavigation<ServerPage, ServerPageModel>();
|
containerRegistry.RegisterForNavigation<ServerPage, ServerPageModel>();
|
||||||
containerRegistry.RegisterForNavigation<ListPage, ListPageModel>();
|
#endregion
|
||||||
|
|
||||||
|
#region Register Sequence Navigation
|
||||||
containerRegistry.RegisterForNavigation<WelcomePage, WelcomePageModel>("SetUpProcess_WelcomePage");
|
containerRegistry.RegisterForNavigation<WelcomePage, WelcomePageModel>("SetUpProcess_WelcomePage");
|
||||||
//containerRegistry.RegisterForNavigation<ScanPage, ScanPageModel>("SetUpProcess_ScanPage");
|
//containerRegistry.RegisterForNavigation<ScanPage, ScanPageModel>("SetUpProcess_ScanPage");
|
||||||
|
|
||||||
containerRegistry.RegisterForNavigation<LoginPasswordPage, LoginPasswordPageModel>("AddServerProcess_LoginPasswordPage");
|
containerRegistry.RegisterForNavigation<LoginPasswordPage, LoginPasswordPageModel>("AddServerProcess_LoginPasswordPage");
|
||||||
containerRegistry.RegisterForNavigation<HostSelectPage, HostSelectPageModel>("AddServerProcess_HostSelectPage");
|
containerRegistry.RegisterForNavigation<HostSelectPage, HostSelectPageModel>("AddServerProcess_HostSelectPage");
|
||||||
containerRegistry.RegisterForNavigation<LoginChoosePage, LoginChoosePageModel>("AddServerProcess_LoginChoosePage");
|
containerRegistry.RegisterForNavigation<LoginChoosePage, LoginChoosePageModel>("AddServerProcess_LoginChoosePage");
|
||||||
|
#endregion
|
||||||
|
|
||||||
//containerRegistry.RegisterForNavigation<TestPage, TestPageModel>();
|
#region Register Dialog
|
||||||
// Register Dialog
|
|
||||||
containerRegistry.RegisterDialog<ConfirmDialog, ConfirmDialogModel>();
|
containerRegistry.RegisterDialog<ConfirmDialog, ConfirmDialogModel>();
|
||||||
|
#endregion
|
||||||
|
|
||||||
// Register Service
|
#region Register Service
|
||||||
containerRegistry.Register<IConnectionService, ConnectionService>();
|
containerRegistry.Register<IConnectionService, ConnectionService>();
|
||||||
containerRegistry.Register<ICredentialService, CredentialService>();
|
containerRegistry.Register<ICredentialService, CredentialService>();
|
||||||
containerRegistry.RegisterSingleton<IBFFHService, BFFHService>();
|
containerRegistry.RegisterSingleton<IBFFHService, BFFHService>();
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,9 +21,17 @@
|
|||||||
</StackLayout>
|
</StackLayout>
|
||||||
<StackLayout IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}">
|
<StackLayout IsVisible="{Binding IsBusy, Converter={StaticResource InvertBoolConverter}}">
|
||||||
<Label Text="{Binding MachineItem.Name}" Style="{StaticResource LabelStyle_Title}"/>
|
<Label Text="{Binding MachineItem.Name}" Style="{StaticResource LabelStyle_Title}"/>
|
||||||
|
<Label Text="{Binding MachineItem.Description}" Style="{StaticResource Style_Label_Text}"/>
|
||||||
<Button Text="Use" Command="{Binding UseMachineCommand}" IsVisible="{Binding MachineItem.CanUse}" Style="{StaticResource Style_Button_Primary}"/>
|
<StackLayout IsVisible="{Binding MachineItem.CanUse}">
|
||||||
<Button Text="GiveBack" Command="{Binding GiveBackMachineCommand}" IsVisible="{Binding MachineItem.CanInUse}" Style="{StaticResource Style_Button_Primary}"/>
|
<Button Text="Use" Command="{Binding UseMachineCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||||
|
</StackLayout>
|
||||||
|
<StackLayout IsVisible="{Binding MachineItem.CanInUse}">
|
||||||
|
<Button Text="GiveBack" Command="{Binding GiveBackMachineCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||||
|
</StackLayout>
|
||||||
|
<StackLayout IsVisible="{Binding MachineItem.CanManage}">
|
||||||
|
<Label Text="Manage Machine:" Style="{StaticResource Style_Label_Property_Title}"/>
|
||||||
|
<Button Text="Force Free" Command="{Binding ForceFreeMachineCommand}" Style="{StaticResource Style_Button_Primary}"/>
|
||||||
|
</StackLayout>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ContentPage.Content>
|
</ContentPage.Content>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
x:Name="page">
|
x:Name="page">
|
||||||
<FlyoutPage.Flyout>
|
<FlyoutPage.Flyout>
|
||||||
<ContentPage Title="FabAccess">
|
<ContentPage Title="FabAccess">
|
||||||
<StackLayout>
|
<StackLayout Margin="0,50,0,0">
|
||||||
<Button Text="Machines" Command="{Binding NavigateCommand}" CommandParameter="MachineListPage" />
|
<Button Text="Machines" Command="{Binding NavigateCommand}" CommandParameter="MachineListPage" />
|
||||||
<Button Text="Servers" Command="{Binding NavigateCommand}" CommandParameter="ServerListPage" />
|
<Button Text="Servers" Command="{Binding NavigateCommand}" CommandParameter="ServerListPage" />
|
||||||
<!--<Button Text="Settings" Command="{Binding NavigateCommand}" CommandParameter="SettingsPage" />-->
|
<!--<Button Text="Settings" Command="{Binding NavigateCommand}" CommandParameter="SettingsPage" />-->
|
||||||
|
@ -25,6 +25,7 @@ namespace Borepin.PageModel
|
|||||||
|
|
||||||
UseMachineCommand = new DelegateCommand(UseMachineCommandExecuted);
|
UseMachineCommand = new DelegateCommand(UseMachineCommandExecuted);
|
||||||
GiveBackMachineCommand = new DelegateCommand(GiveBackMachineCommandExecuted);
|
GiveBackMachineCommand = new DelegateCommand(GiveBackMachineCommandExecuted);
|
||||||
|
ForceFreeMachineCommand = new DelegateCommand(ForceFreeMachineCommandExecuted);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -85,12 +86,27 @@ namespace Borepin.PageModel
|
|||||||
await inUseInterface.GiveBack();
|
await inUseInterface.GiveBack();
|
||||||
await LoadData();
|
await LoadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ICommand _ForceFreeMachineCommand;
|
||||||
|
public ICommand ForceFreeMachineCommand
|
||||||
|
{
|
||||||
|
get => _ForceFreeMachineCommand;
|
||||||
|
set => SetProperty(ref _ForceFreeMachineCommand, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void ForceFreeMachineCommandExecuted()
|
||||||
|
{
|
||||||
|
Machine.IManageInterface manageInterface = _Machine.Manage;
|
||||||
|
|
||||||
|
await manageInterface.ForceFree();
|
||||||
|
await LoadData();
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region INavigationService
|
#region INavigationService
|
||||||
public override void OnNavigatedFrom(INavigationParameters parameters)
|
public override void OnNavigatedFrom(INavigationParameters parameters)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnNavigatedTo(INavigationParameters parameters)
|
public override void OnNavigatedTo(INavigationParameters parameters)
|
||||||
|
@ -93,7 +93,7 @@ namespace Borepin.PageModel
|
|||||||
|
|
||||||
NavigationParameters parameters = new NavigationParameters
|
NavigationParameters parameters = new NavigationParameters
|
||||||
{
|
{
|
||||||
{ "instance", viewmodel.Instance }
|
{ "instance", viewmodel._Instance }
|
||||||
};
|
};
|
||||||
|
|
||||||
INavigationResult result = await _NavigationService.NavigateAsync($"ServerPage", parameters);
|
INavigationResult result = await _NavigationService.NavigateAsync($"ServerPage", parameters);
|
||||||
|
@ -101,6 +101,13 @@ namespace Borepin.PageModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
IsConnected = true;
|
IsConnected = true;
|
||||||
|
|
||||||
|
var result = await _NavigationService.NavigateAsync("/MainPage/NavigationPage/MachineListPage");
|
||||||
|
|
||||||
|
if (!result.Success)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Debugger.Break();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IsBusy = false;
|
IsBusy = false;
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
<Grid RowSpacing="0">
|
<Grid RowSpacing="0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="5" />
|
<ColumnDefinition Width="5" />
|
||||||
<ColumnDefinition Width="7*" />
|
<ColumnDefinition Width="6*" />
|
||||||
|
<ColumnDefinition Width="2*" />
|
||||||
<ColumnDefinition Width="2*" />
|
<ColumnDefinition Width="2*" />
|
||||||
<ColumnDefinition Width="1*" />
|
|
||||||
<ColumnDefinition Width="1" />
|
<ColumnDefinition Width="1" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
@ -9,15 +9,15 @@
|
|||||||
<ColumnDefinition Width="5" />
|
<ColumnDefinition Width="5" />
|
||||||
<ColumnDefinition Width="7*" />
|
<ColumnDefinition Width="7*" />
|
||||||
<ColumnDefinition Width="2*" />
|
<ColumnDefinition Width="2*" />
|
||||||
<ColumnDefinition Width="1*" />
|
<ColumnDefinition Width="2*" />
|
||||||
<ColumnDefinition Width="1" />
|
<ColumnDefinition Width="1" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition Height="1"/>
|
<RowDefinition Height="1"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Label Grid.Row="0" Grid.Column="1" Text="{Binding Instance.Address, StringFormat='{0}'}" Style="{StaticResource LabelStyle_Primary}"/>
|
<Label Grid.Row="0" Grid.Column="1" Text="{Binding Address, StringFormat='{0}'}" Style="{StaticResource LabelStyle_Primary}"/>
|
||||||
<Label Grid.Row="0" Grid.Column="2" Text="{Binding Instance.Username}" Style="{StaticResource LabelStyle_Second}" HorizontalTextAlignment="End" />
|
<Label Grid.Row="0" Grid.Column="2" Text="{Binding Username}" Style="{StaticResource LabelStyle_Second}" HorizontalTextAlignment="End" />
|
||||||
<Button Grid.Row="0" Grid.Column="3" Margin="0, 3, 0, 3" Text="->" Command="{Binding Source={RelativeSource AncestorType={x:Type pagemodel:ServerListPageModel}}, Path=SelectInstanceCommand}" CommandParameter="{Binding .}" Style="{StaticResource Style_Button_Primary}"/>
|
<Button Grid.Row="0" Grid.Column="3" Margin="0, 3, 0, 3" Text="->" Command="{Binding Source={RelativeSource AncestorType={x:Type pagemodel:ServerListPageModel}}, Path=SelectInstanceCommand}" CommandParameter="{Binding .}" Style="{StaticResource Style_Button_Primary}"/>
|
||||||
<BoxView Grid.Row="1" Grid.ColumnSpan="5" BackgroundColor="{StaticResource FifthColor}"/>
|
<BoxView Grid.Row="1" Grid.ColumnSpan="5" BackgroundColor="{StaticResource FifthColor}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
@ -1,28 +1,45 @@
|
|||||||
using Borepin.Model;
|
using Borepin.Model;
|
||||||
using Prism.Mvvm;
|
using Prism.Mvvm;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace Borepin.ViewModel
|
namespace Borepin.ViewModel
|
||||||
{
|
{
|
||||||
public class ServerListItemViewModel : BindableBase
|
public class ServerListItemViewModel : BindableBase
|
||||||
{
|
{
|
||||||
|
#region Private Properties
|
||||||
|
public Connection _Instance { get; private set; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructors
|
||||||
public ServerListItemViewModel(Connection instance)
|
public ServerListItemViewModel(Connection instance)
|
||||||
{
|
{
|
||||||
_Instance = instance;
|
_Instance = instance;
|
||||||
Address = instance.Address.ToString();
|
Address = ConvertUriToString(instance.Address);
|
||||||
}
|
Username = instance.Username;
|
||||||
|
|
||||||
private Connection _Instance;
|
|
||||||
public Connection Instance
|
|
||||||
{
|
|
||||||
get => _Instance;
|
|
||||||
set => SetProperty(ref _Instance, value);
|
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Properties
|
||||||
private string _Address;
|
private string _Address;
|
||||||
public string Address
|
public string Address
|
||||||
{
|
{
|
||||||
get => _Address;
|
get => _Address;
|
||||||
set => SetProperty(ref _Address, value);
|
set => SetProperty(ref _Address, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string _Username;
|
||||||
|
public string Username
|
||||||
|
{
|
||||||
|
get => _Username;
|
||||||
|
set => SetProperty(ref _Username, value);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Methods
|
||||||
|
public string ConvertUriToString(Uri uri)
|
||||||
|
{
|
||||||
|
return uri.Host;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user