aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views')
-rw-r--r--Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml191
1 files changed, 58 insertions, 133 deletions
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 c0c4b7b97..036fec7dc 100644
--- a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml
@@ -3,23 +3,19 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:controls="clr-namespace:Tango.MachineEM.UI.Controls"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
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:localConverters="clr-namespace:Tango.MachineEM.UI.Converters"
xmlns:local="clr-namespace:Tango.MachineEM.UI.Views"
mc:Ignorable="d"
- d:DesignHeight="780" d:DesignWidth="1300" Foreground="Gainsboro" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" >
+ d:DesignHeight="720" d:DesignWidth="1300" Foreground="Gainsboro" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" >
<UserControl.Resources>
<converters:BooleanInverseConverter x:Key="BooleanInverseConverter"></converters:BooleanInverseConverter>
<converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
- <localConverters:EventTypeToStringConverter x:Key="EventTypeToStringConverter" />
</UserControl.Resources>
<Grid>
<Grid.Background>
@@ -57,141 +53,17 @@
<Grid>
<Grid.ColumnDefinitions>
- <ColumnDefinition Width="220"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="280"/>
</Grid.ColumnDefinitions>
- <Grid Background="#A3000000">
- <StackPanel>
- <!--BUTTONS HERE-->
- <Button Padding="10 0 0 0" Height="45" Margin="5" HorizontalContentAlignment="Left" MinWidth="100" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding StartThreadLoadingCommand}">
- <StackPanel Orientation="Horizontal">
- <fa:ImageAwesome Icon="ChevronCircleDown" Width="16"></fa:ImageAwesome>
- <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">START THREAD LOADING</TextBlock>
- </StackPanel>
- </Button>
- <Button Padding="10 0 0 0" Height="45" Margin="5" HorizontalContentAlignment="Left" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding FinalizeThreadLoadingCommand}">
- <StackPanel Orientation="Horizontal">
- <fa:ImageAwesome Icon="ChevronCircleUp" Width="16"></fa:ImageAwesome>
- <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">FINALIZE THREAD LOADING</TextBlock>
- </StackPanel>
- </Button>
- <Button Padding="10 0 0 0" Margin="5" Height="45" HorizontalContentAlignment="Left" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding ValidateCartridgeCommand}">
- <StackPanel Orientation="Horizontal">
- <fa:ImageAwesome Icon="FlagCheckered" Width="16"></fa:ImageAwesome>
- <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">CARTRIDGE VALIDATION</TextBlock>
- </StackPanel>
- </Button>
- <ToggleButton Style="{StaticResource AccentedSquareButtonStyle}" BorderThickness="0" x:Name="toggleLevels" Height="45" Margin="5">
- <StackPanel Orientation="Horizontal">
- <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">MACHINE STATUS</TextBlock>
- <fa:ImageAwesome Icon="ChevronDown" Width="16" Foreground="White"></fa:ImageAwesome>
- </StackPanel>
- </ToggleButton>
- <Popup IsOpen="{Binding ElementName=toggleLevels,Path=IsChecked}" StaysOpen="True">
- <Border Padding="10">
- <StackPanel Orientation="Horizontal">
- <StackPanel HorizontalAlignment="Left">
- <TextBlock Foreground="Red">IDS Packs Levels</TextBlock>
- <ScrollViewer Height="400" HorizontalScrollBarVisibility="Disabled" Width="300">
- <ItemsControl Margin="0 5 0 0" ItemsSource="{Binding Emulator.MachineStatus.IDSPacksLevels}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <StackPanel Margin="0 5">
- <TextBlock>
- <Run Text="Index: "></Run>
- <Run Text="{Binding Index}"></Run>
- </TextBlock>
-
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Dispenser Level (nl): " />
- <TextBox Text="{Binding ElementName=sliderDispenser,Path=Value,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"></TextBox>
- </StackPanel>
-
- <Slider x:Name="sliderDispenser" Orientation="Horizontal" Minimum="0" Maximum="130000000" Value="{Binding DispenserLevel}"></Slider>
-
- <TextBlock>
- <Run Text="MidTank Level (ml): "></Run>
- <Run Text="{Binding ElementName=sliderMidTank,Path=Value}"></Run>
- </TextBlock>
-
- <Slider x:Name="sliderMidTank" Orientation="Horizontal" Minimum="0" Maximum="1.8" Value="{Binding MidTankLevel}"></Slider>
- </StackPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </StackPanel>
- <StackPanel Margin="10 0 0 0">
- <TextBlock Foreground="Red">MACHINE STATE</TextBlock>
- <ComboBox Margin="0 5 0 0" Width="150" ItemsSource="{Binding Source={x:Type pmr:MachineState},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding Emulator.MachineStatus.State,Mode=TwoWay}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox>
-
- <TextBlock Margin="0 20 0 0" Foreground="Red" Width="160">
- <Run>OVERALL TEMPERATURE</Run>
- <Run Text="{Binding ElementName=sliderTemperature,Path=Value,StringFormat='0.0',Mode=OneWay}"></Run>
- </TextBlock>
- <Slider x:Name="sliderTemperature" Margin="0 5 0 0" Minimum="0" Maximum="60" Value="{Binding Emulator.MachineStatus.OverallTemperature,Mode=TwoWay}"></Slider>
-
- <TextBlock Margin="0 10 0 0">SPOOL STATE</TextBlock>
- <ComboBox Margin="0 5 0 0" Width="150" ItemsSource="{Binding Source={x:Type pmr:SpoolState},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding Emulator.MachineStatus.SpoolState,Mode=TwoWay}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox>
- </StackPanel>
- </StackPanel>
- </Border>
- </Popup>
-
- <ToggleButton Style="{StaticResource AccentedSquareButtonStyle}" BorderThickness="0" x:Name="toggleIFS" Height="45" Margin="5">
- <StackPanel Orientation="Horizontal">
- <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">INK FILLING STATUS</TextBlock>
- <fa:ImageAwesome Icon="ChevronDown" Width="16" Foreground="White"></fa:ImageAwesome>
- </StackPanel>
- </ToggleButton>
- <Popup IsOpen="{Binding ElementName=toggleIFS,Path=IsChecked}" StaysOpen="True" PlacementTarget="{Binding ElementName=toggleIFS}" Placement="Bottom">
- <controls:InkFillingStatusView Height="300" Width="210" DataContext="{Binding Emulator.InkFillingStatus}" />
- </Popup>
-
- <Button Padding="10 0 0 0" Margin="5" Height="45" HorizontalContentAlignment="Left" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding AbortJobCommand}">
- <DockPanel>
- <fa:ImageAwesome Icon="ExclamationTriangle" Width="16"></fa:ImageAwesome>
- <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Center">ABORT JOB</TextBlock>
- </DockPanel>
- </Button>
-
- <Button Padding="10 0 0 0" Margin="5" HorizontalContentAlignment="Left" Height="45" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding PerformDataStoreTestCommand}">
- <DockPanel>
- <fa:ImageAwesome Icon="Database" Width="16"></fa:ImageAwesome>
- <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Center">DATASTORE TEST</TextBlock>
- </DockPanel>
- </Button>
-
- <Button Padding="10 0 0 0" Margin="5" HorizontalContentAlignment="Left" Height="45" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding GetDataStoreItemCommand}">
- <DockPanel>
- <fa:ImageAwesome Icon="Download" Width="16"></fa:ImageAwesome>
- <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Center">GET DATA STORE ITEM</TextBlock>
- </DockPanel>
- </Button>
-
- <Button HorizontalContentAlignment="Left" Padding="10 0 0 0" Margin="5" Height="45" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding PutDataStoreItemCommand}">
- <DockPanel>
- <fa:ImageAwesome Icon="Upload" Width="16"></fa:ImageAwesome>
- <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Center">PUT DATA STORE ITEM</TextBlock>
- </DockPanel>
- </Button>
- <!--BUTTONS HERE-->
-
- <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">
+ <TextBox x:Name="txtLog" 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">
</TextBox>
- <Grid Grid.Column="2">
+ <Grid Grid.Column="1">
<DockPanel>
<TextBlock DockPanel.Dock="Top" Margin="10 0 0 0">HARDWARE EVENTS</TextBlock>
- <ListBox BorderThickness="0" Background="#66000000" Margin="10 10 10 0" ItemsSource="{Binding Emulator.EventsStates}" FontSize="11">
+ <ListBox BorderThickness="0" Background="#66000000" Margin="10 10 10 40" ItemsSource="{Binding Emulator.EventsStates}" FontSize="11">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
@@ -199,7 +71,7 @@
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
- <CheckBox FontSize="11" Content="{Binding EventType,Converter={StaticResource EventTypeToStringConverter}}" IsChecked="{Binding IsActive}" Margin="5"></CheckBox>
+ <CheckBox FontSize="11" Content="{Binding EventType}" IsChecked="{Binding IsActive}" Margin="5"></CheckBox>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
@@ -309,6 +181,59 @@
<SolidColorBrush Color="#151515" Opacity="0.8" />
</Grid.Background>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="5">
+ <Button Margin="5" MinWidth="100" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding ValidateCartridgeCommand}">
+ <StackPanel Orientation="Horizontal">
+ <fa:ImageAwesome Icon="FlagCheckered" Width="16"></fa:ImageAwesome>
+ <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">CARTRIDGE VALIDATION</TextBlock>
+ </StackPanel>
+ </Button>
+ <ToggleButton Style="{StaticResource AccentedSquareButtonStyle}" BorderThickness="0" x:Name="toggleLevels" MinWidth="140" Margin="5 5 20 5">
+ <StackPanel Orientation="Horizontal">
+ <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">STATUS</TextBlock>
+ <fa:ImageAwesome Icon="ChevronDown" Width="16" Foreground="White"></fa:ImageAwesome>
+ </StackPanel>
+ </ToggleButton>
+ <Popup IsOpen="{Binding ElementName=toggleLevels,Path=IsChecked}" StaysOpen="True">
+ <Border Padding="10">
+ <StackPanel Orientation="Horizontal">
+ <StackPanel HorizontalAlignment="Left">
+ <TextBlock Foreground="Red">IDS Packs Levels</TextBlock>
+ <ScrollViewer Height="400" HorizontalScrollBarVisibility="Disabled">
+ <ItemsControl Margin="0 5 0 0" ItemsSource="{Binding Emulator.MachineStatus.IDSPacksLevels}">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Margin="0 5">
+ <TextBlock>
+ <Run Text="Index: "></Run>
+ <Run Text="{Binding Index}"></Run>
+ </TextBlock>
+
+ <StackPanel Orientation="Horizontal">
+ <TextBlock Text="Dispenser Level (nl): " />
+ <TextBox Text="{Binding ElementName=sliderDispenser,Path=Value,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"></TextBox>
+ </StackPanel>
+
+ <Slider x:Name="sliderDispenser" Orientation="Horizontal" Minimum="0" Maximum="130000000" Value="{Binding DispenserLevel}"></Slider>
+
+ <TextBlock>
+ <Run Text="MidTank Level (ml): "></Run>
+ <Run Text="{Binding ElementName=sliderMidTank,Path=Value}"></Run>
+ </TextBlock>
+
+ <Slider x:Name="sliderMidTank" Orientation="Horizontal" Minimum="0" Maximum="2500" Value="{Binding MidTankLevel}"></Slider>
+ </StackPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </ScrollViewer>
+ </StackPanel>
+ <StackPanel Margin="10 0 0 0">
+ <TextBlock Foreground="Red">MACHINE STATE</TextBlock>
+ <ComboBox Margin="0 5 0 0" Width="150" ItemsSource="{Binding Source={x:Type pmr:MachineState},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding Emulator.MachineStatus.State,Mode=TwoWay}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox>
+ </StackPanel>
+ </StackPanel>
+ </Border>
+ </Popup>
<CheckBox Margin="0 0 20 0" VerticalAlignment="Center" IsChecked="{Binding Emulator.EmulateCorruption}" Foreground="Red">Emulate Corruption</CheckBox>
<CheckBox Margin="0 0 20 0" VerticalAlignment="Center" IsChecked="{Binding Emulator.PerformNativeRoundTrip}">Perform Native RoundTrip</CheckBox>
<ComboBox IsEnabled="{Binding Emulator.IsStarted,Converter={StaticResource BooleanInverseConverter}}" MinWidth="140" Margin="5" BorderThickness="0" ItemsSource="{Binding Ports}" SelectedItem="{Binding SelectedPort}"></ComboBox>