diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2020-05-12 09:53:39 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2020-05-12 09:53:39 +0300 |
| commit | d79f3a623044d0a57e24aa4abe51faa0223160ec (patch) | |
| tree | 75b50c294d94a329bed3a6697d2ae9d6060bf050 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI | |
| parent | 85d26ce565ad8e65d6755010fb4ed14890944091 (diff) | |
| parent | c925d1a37aab06e5dc8073eee42a52252f68f58b (diff) | |
| download | Tango-d79f3a623044d0a57e24aa4abe51faa0223160ec.tar.gz Tango-d79f3a623044d0a57e24aa4abe51faa0223160ec.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI')
3 files changed, 22 insertions, 8 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs index 9bee35697..81d3f4243 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs @@ -27,6 +27,11 @@ namespace Tango.MachineStudio.UI.ViewModels public ExternalBridgeLoginIntent Intent { get; set; } /// <summary> + /// Gets or sets a value indicating whether to require safety level operations permission from the remote machine. + /// </summary> + public bool RequireSafetyOperations { get; set; } + + /// <summary> /// Gets or sets the login command. /// </summary> public RelayCommand<String> LoginCommand { get; set; } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs index 46491c823..0e02d779f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -598,6 +598,8 @@ namespace Tango.MachineStudio.UI.ViewModels Password = config.Password, UserGuid = AuthenticationProvider.CurrentUser.Guid, Intent = config.Intent, + UserName = AuthenticationProvider.CurrentUser.Contact.FullName, + RequireSafetyLevelOperations = config.RequireSafetyOperations }); _reconnectionMachine = machine; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml index 5be9ba089..e4cdfe199 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineLoginView.xaml @@ -17,14 +17,21 @@ <Grid> <DockPanel LastChildFill="True"> - <StackPanel Margin="10" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right" DockPanel.Dock="Bottom"> - <Button Command="{Binding LoginCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Password}" Style="{StaticResource MaterialDesignFlatButton}" IsDefault="True" Margin="0 8 8 0"> - LOGIN - </Button> - <Button Command="{Binding CancelCommand}" Style="{StaticResource MaterialDesignFlatButton}" Margin="0 8 0 0"> - CANCEL - </Button> - </StackPanel> + <Grid DockPanel.Dock="Bottom"> + + <CheckBox IsChecked="{Binding RequireSafetyOperations}" VerticalAlignment="Center" Margin="68 0 0 0" ToolTip="Require safety level operations permission from a near-by machine user"> + <TextBlock Margin="0 -2 0 0">Require Safety Level Operations</TextBlock> + </CheckBox> + + <StackPanel Margin="10" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right"> + <Button Command="{Binding LoginCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Password}" Style="{StaticResource MaterialDesignFlatButton}" IsDefault="True" Margin="0 8 8 0"> + LOGIN + </Button> + <Button Command="{Binding CancelCommand}" Style="{StaticResource MaterialDesignFlatButton}" Margin="0 8 0 0"> + CANCEL + </Button> + </StackPanel> + </Grid> <Grid Margin="10"> <StackPanel> <StackPanel Orientation="Horizontal" VerticalAlignment="Top"> |
