diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-09-10 14:30:00 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-09-10 14:30:00 +0300 |
| commit | 9e4a2eb24ad1882cee1cc9d43f0af0faff2ba861 (patch) | |
| tree | 553b88553729097418a697c628b8b8046e34cdd9 /Software/Visual_Studio/Utilities | |
| parent | 8e0ac4d5d4f097753321d64d3ca2d47b2f6b3770 (diff) | |
| download | Tango-9e4a2eb24ad1882cee1cc9d43f0af0faff2ba861.tar.gz Tango-9e4a2eb24ad1882cee1cc9d43f0af0faff2ba861.zip | |
Working on Tango.Git and Tag creation upon release.
Diffstat (limited to 'Software/Visual_Studio/Utilities')
| -rw-r--r-- | Software/Visual_Studio/Utilities/Tango.MachineEM.UI/ViewModels/MainViewVM.cs | 21 | ||||
| -rw-r--r-- | Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml | 12 |
2 files changed, 30 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/ViewModels/MainViewVM.cs index 62a05472d..a66ed6b7e 100644 --- a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/ViewModels/MainViewVM.cs @@ -12,6 +12,7 @@ using Tango.Transport.Servers; using Tango.Transport.Transporters; using Tango.Core; using Tango.Settings; +using Tango.PMR.ThreadLoading; namespace Tango.MachineEM.UI.ViewModels { @@ -64,10 +65,30 @@ namespace Tango.MachineEM.UI.ViewModels set { _selectedPort = value; RaisePropertyChanged(nameof(SelectedPort)); } } + private ThreadLoadingState _threadLoadingState; + public ThreadLoadingState ThreadLoadingState + { + get { return _threadLoadingState; } + set { _threadLoadingState = value; OnThreadLoadingStateChanged(); } + } + + #endregion #region Private Methods + private void OnThreadLoadingStateChanged() + { + try + { + Emulator?.SetThreadLoadingState(ThreadLoadingState); + } + catch (Exception ex) + { + LogManager.Log(ex); + } + } + #endregion #region Commands diff --git a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml index 6ebd1cde2..62bacd6d2 100644 --- a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml @@ -9,6 +9,7 @@ xmlns:fa="http://schemas.fontawesome.io/icons/" xmlns:vm="clr-namespace:Tango.MachineEM.UI.ViewModels" xmlns:pmr="clr-namespace:Tango.PMR.MachineStatus;assembly=Tango.PMR" + xmlns:threadLoading="clr-namespace:Tango.PMR.ThreadLoading;assembly=Tango.PMR" xmlns:local="clr-namespace:Tango.MachineEM.UI.Views" mc:Ignorable="d" d:DesignHeight="720" d:DesignWidth="1300" Foreground="Gainsboro" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" > @@ -137,11 +138,16 @@ <!--BUTTONS HERE--> <Button Padding="10 0 0 0" Margin="5" Height="45" HorizontalContentAlignment="Left" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding AbortJobCommand}"> - <StackPanel Orientation="Horizontal"> + <DockPanel> <fa:ImageAwesome Icon="ExclamationTriangle" Width="16"></fa:ImageAwesome> - <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">ABORT JOB</TextBlock> - </StackPanel> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">ABORT JOB</TextBlock> + </DockPanel> </Button> + + <DockPanel Margin="5 20 5 0"> + <TextBlock FontSize="12" DockPanel.Dock="Top">Thread Loading State</TextBlock> + <ComboBox Margin="0 5 0 0" ItemsSource="{Binding Source={x:Type threadLoading:ThreadLoadingState},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding ThreadLoadingState,Mode=OneWayToSource}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox> + </DockPanel> </StackPanel> </Grid> <TextBox x:Name="txtLog" Grid.Column="1" FontFamily="monospaced" TextChanged="txtLog_TextChanged" Text="{Binding Log}" Background="Transparent" Foreground="Red" FontSize="11" Padding="5" Style="{x:Null}" BorderThickness="0" IsReadOnly="True" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap"> |
