aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Properties/Settings.settings
blob: 033d7a5e9e2266753180f4e3a9299f575046701e (plain)
1
2
3
4
5
6
7
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
  <Profiles>
    <Profile Name="(Default)" />
  </Profiles>
  <Settings />
</SettingsFile>
<UserControl x:Class="Tango.MachineEM.UI.Views.MainView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             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: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: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}" >

    <UserControl.Resources>
        <converters:BooleanInverseConverter x:Key="BooleanInverseConverter"></converters:BooleanInverseConverter>
        <converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
    </UserControl.Resources>
    <Grid>
        <Grid.Background>
            <ImageBrush ImageSource="../Images/circuit.jpg" Opacity="0.1" Stretch="UniformToFill"></ImageBrush>
        </Grid.Background>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="100"/>
                <RowDefinition Height="1*"/>
            </Grid.RowDefinitions>

            <Grid>
                <Grid.Effect>
                    <DropShadowEffect BlurRadius="10"/>
                </Grid.Effect>
                <Grid.Background>
                    <SolidColorBrush Color="#151515" Opacity="0.8" />
                </Grid.Background>
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="20 15">
                    <Image Source="/Images/embedded-device.png" RenderOptions.BitmapScalingMode="Fant"></Image>
                    <TextBlock Text="Tango Embedded Emulator" VerticalAlignment="Center" Margin="20 0 0 0" FontSize="36" Foreground="Red">
                        <TextBlock.Effect>
                            <DropShadowEffect/>
                        </TextBlock.Effect>
                    </TextBlock>
                </StackPanel>
            </Grid>

            <Grid Grid.Row="1" Margin="20">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="70"/>
                    </Grid.RowDefinitions>

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="1*"/>
                            <ColumnDefinition Width="280"/>
                        </Grid.ColumnDefinitions>
                        <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="1">
                            <DockPanel>
                                <TextBlock DockPanel.Dock="Top" Margin="10 0 0 0">HARDWARE EVENTS</TextBlock>
                                <ListBox BorderThickness="0" Background="#66000000" Margin="10 10 10 40" ItemsSource="{Binding Emulator.EventsStates}" FontSize="11">
                                    <ListBox.ItemContainerStyle>
                                        <Style TargetType="ListBoxItem">

                                        </Style>
                                    </ListBox.ItemContainerStyle>
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <CheckBox FontSize="11" Content="{Binding EventType}" IsChecked="{Binding IsActive}" Margin="5"></CheckBox>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </DockPanel>
                        </Grid>
                    </Grid>

                    <Grid x:Name="gridContent" Background="#151515" Margin="5" Visibility="Hidden">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="300" />
                                <ColumnDefinition Width="1*"/>
                            </Grid.ColumnDefinitions>

                            <Grid Background="#181818">
                                <Grid Margin="10 0 10 0">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="40"/>
                                        <RowDefinition Height="346*"/>
                                        <RowDefinition Height="70"/>
                                    </Grid.RowDefinitions>

                                    <TextBlock VerticalAlignment="Center" FontSize="16" Foreground="#BB1404" FontWeight="Bold">STUBS</TextBlock>

                                    <ListBox Grid.Row="1" ItemsSource="{Binding AvailableStubs}" SelectedItem="{Binding SelectedAvailableStub}" SelectedIndex="-1">
                                        <ListBox.ItemTemplate>
                                            <DataTemplate>
                                                <Grid>
                                                    <StackPanel Orientation="Horizontal" Margin="2 10 0 10">
                                                        <fa:ImageAwesome Icon="Cogs" Foreground="Gray" Width="24" Height="24" VerticalAlignment="Center"></fa:ImageAwesome>
                                                        <StackPanel Margin="5 0 0 0" VerticalAlignment="Center">
                                                            <TextBlock Margin="2" FontSize="14" Text="{Binding Name}"></TextBlock>
                                                            <TextBlock Margin="2" FontSize="12" Text="{Binding Description}"></TextBlock>
                                                        </StackPanel>
                                                    </StackPanel>
                                                    <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Stroke="Black" StrokeThickness="1"></Rectangle>
                                                </Grid>
                                            </DataTemplate>
                                        </ListBox.ItemTemplate>
                                    </ListBox>

                                    <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
                                        <Button Cursor="Hand" Width="50" Height="50" VerticalAlignment="Center" Style="{DynamicResource MetroCircleButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding ClearCommand}">
                                            <StackPanel Orientation="Horizontal">
                                                <fa:ImageAwesome Icon="Refresh" Foreground="Gainsboro" Width="24"></fa:ImageAwesome>
                                            </StackPanel>
                                        </Button>
                                        <Button Cursor="Hand" Width="50" Height="50" VerticalAlignment="Center" Style="{DynamicResource MetroCircleButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding CancelCommand}">
                                            <StackPanel Orientation="Horizontal">
                                                <fa:ImageAwesome Icon="Stop" Foreground="Red" Width="24"></fa:ImageAwesome>
                                            </StackPanel>
                                        </Button>
                                        <Button Cursor="Hand" Width="50" Height="50" VerticalAlignment="Center" Style="{DynamicResource MetroCircleButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding RunCommand}">
                                            <StackPanel Orientation="Horizontal">
                                                <fa:ImageAwesome Icon="Play" Width="24" Foreground="LimeGreen"></fa:ImageAwesome>
                                            </StackPanel>
                                        </Button>
                                    </StackPanel>
                                </Grid>
                            </Grid>

                            <Grid Grid.Column="1">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="107*"/>
                                        <RowDefinition Height="60*"/>
                                    </Grid.RowDefinitions>

                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="200"/>
                                            <ColumnDefinition Width="1*"/>
                                        </Grid.ColumnDefinitions>

                                        <Grid>
                                            <GroupBox Header="PARAMETERS" Padding="5">
                                                <Grid Background="#252525">
                                                    <editors:ParameterizedEditor ParameterizedObject="{Binding SelectedStub}" ItemMargin="10" ItemLabelMargin="0 0 0 5" />
                                                </Grid>
                                            </GroupBox>
                                        </Grid>
                                    </Grid>

                                    <Grid Grid.Row="1">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="30"/>
                                            <RowDefinition Height="1*"/>
                                        </Grid.RowDefinitions>

                                        <Border Background="#202020" Padding="5" CornerRadius="10 0 0 10">
                                            <TextBlock FontSize="16" VerticalAlignment="Center">LOG</TextBlock>
                                        </Border>

                                        <Grid Grid.Row="1">
                                            <TextBox x:Name="txtResponse" IsReadOnly="True" TextChanged="txtResponse_TextChanged" Text="{Binding Log}" Background="Black" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" BorderThickness="0" Padding="5" FontSize="11" Foreground="Gainsboro"></TextBox>
                                        </Grid>
                                    </Grid>
                                </Grid>
                            </Grid>
                        </Grid>
                    </Grid>
                    <Grid x:Name="gridActions" Grid.Row="1" Margin="5">
                        <Grid.Effect>
                            <DropShadowEffect BlurRadius="10" />
                        </Grid.Effect>
                        <Grid.Background>
                            <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>
                            <Button Margin="5" MinWidth="100" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding ClearCommand}">
                                <StackPanel Orientation="Horizontal">
                                    <fa:ImageAwesome Icon="Refresh" Width="16"></fa:ImageAwesome>
                                    <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">CLEAR</TextBlock>
                                </StackPanel>
                            </Button>
                            <Button Margin="5" MinWidth="100" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding StopCommand}">
                                <StackPanel Orientation="Horizontal">
                                    <fa:ImageAwesome Icon="Stop" Width="16"></fa:ImageAwesome>
                                    <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">STOP</TextBlock>
                                </StackPanel>
                            </Button>
                            <Button Margin="5" MinWidth="100" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding StartCommand}">
                                <StackPanel Orientation="Horizontal">
                                    <fa:ImageAwesome Icon="Play" Width="16"></fa:ImageAwesome>
                                    <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">START</TextBlock>
                                </StackPanel>
                            </Button>
                        </StackPanel>
                    </Grid>
                </Grid>
            </Grid>
        </Grid>
    </Grid>
</UserControl>