aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures/Views/ProcedureRunnerExecutionView.xaml
blob: 5c87abec536c7a7e75ac22d61c48981ebe7f6d91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.
<UserControl x:Class="Tango.FSE.Procedures.Views.ProcedureRunnerExecutionView"
             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:global="clr-namespace:Tango.FSE.Procedures"
             xmlns:vm="clr-namespace:Tango.FSE.Procedures.ViewModels"
             xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:controls="clr-namespace:Tango.FSE.Common.Controls;assembly=Tango.FSE.Common"
             xmlns:graphs="clr-namespace:Tango.FSE.Common.Graphs;assembly=Tango.FSE.Common"
             xmlns:local="clr-namespace:Tango.FSE.Procedures.Views"
             mc:Ignorable="d" 
             d:DesignHeight="720" d:DesignWidth="1280" d:DesignStyle="{StaticResource FSE_User_Control_Designer}" d:DataContext="{d:DesignInstance Type=vm:ProcedureRunnerViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.ProcedureRunnerViewVM}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}">

    <Grid>
        <Ellipse Fill="{StaticResource FSE_PrimaryBackgroundDarkBrush}" Opacity="0.7" Width="2050" Margin="-1500 -500 0 -500" />
        <Grid Margin="10">
            <DockPanel>
                <Grid Margin="20 20 0 0" Height="100" VerticalAlignment="Top" DockPanel.Dock="Top">
                    <DockPanel>
                        <Grid>
                            <Image Margin="0 10 0 0" Source="../Images/project.png" Stretch="None" VerticalAlignment="Top" RenderOptions.BitmapScalingMode="Fant" />
                            <material:PackIcon Margin="0 0 -15 15" Kind="Play" Foreground="{StaticResource FSE_GreenBrush}" Width="48" Height="48" VerticalAlignment="Bottom" HorizontalAlignment="Right" />
                        </Grid>
                        <StackPanel Margin="20 0 0 0">
                            <TextBlock FontSize="{StaticResource FSE_ModuleHeaderFontSize}" Foreground="{StaticResource FSE_PrimaryAccentBrush}" Text="{Binding RunningProcedureProject.Name}"></TextBlock>
                            <TextBlock Margin="0 5 0 0" Foreground="{StaticResource FSE_GrayBrush}" LineHeight="18" Text="{Binding RunningProcedureProject.Description}"></TextBlock>
                        </StackPanel>
                    </DockPanel>
                </Grid>
                <Grid Margin="105 0 0 0">
                    <ScrollViewer HorizontalScrollBarVisibility="Disabled">
                        <StackPanel>
                            <StackPanel>
                                <StackPanel IsEnabled="{Binding ProjectRunner.CanRun}" Margin="0 40 0 0" Visibility="{Binding HasProcedureInputs,Converter={StaticResource BooleanToVisibilityConverter},FallbackValue='Visible',TargetNullValue='Visible'}">
                                    <TextBlock FontSize="{StaticResource FSE_LargeFontSize}" FontWeight="SemiBold" Foreground="{StaticResource FSE_PrimaryAccentBrush}">Inputs</TextBlock>
                                    <!--<Rectangle Margin="0 2 0 0" Stroke="{StaticResource FSE_BorderBrush}" StrokeDashArray="5" />-->
                                    <TextBlock Margin="0 5 0 0" Foreground="{StaticResource FSE_GrayBrush}" Text="Please provide the necessary inputs or leave as defaults."></TextBlock>

                                    <ItemsControl Margin="0 10 0 0" ItemsSource="{Binding RunningProcedureProject.Inputs}">
                                        <ItemsControl.ItemTemplate>
                                            <DataTemplate>
                                                <DockPanel Margin="0 10 20 10">
                                                    <material:PackIcon VerticalAlignment="Center" Kind="Pen" Width="32" Height="32" />
                                                    <StackPanel Margin="10 0 0 0">
                                                        <TextBlock FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_GrayBrush}" Text="{Binding DisplayName,FallbackValue='N/A'}"></TextBlock>
                                                        <StackPanel Orientation="Horizontal">
                                                            <ContentControl Content="{Binding}" HorizontalAlignment="Left" Width="250" Margin="0 2 0 0">
                                                                <ContentControl.Style>
                                                                    <Style TargetType="ContentControl">
                                                                        <Setter Property="ContentTemplate">
                                                                            <Setter.Value>
                                                                                <DataTemplate>
                                                                                    <TextBox Style="{StaticResource FSE_Rounded_Corners_TextBox}" Padding="5" Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}"></TextBox>
                                                                                </DataTemplate>
                                                                            </Setter.Value>
                                                                        </Setter>
                                                                        <Style.Triggers>
                                                                            <DataTrigger Binding="{Binding Type}" Value="Selection">
                                                                                <Setter Property="ContentTemplate">
                                                                                    <Setter.Value>
                                                                                        <DataTemplate>
                                                                                            <controls:FSERoundedCornersComboBox Height="29" ItemsSource="{Binding SelectionInputs}" SelectedValue="{Binding Value}" SelectedValuePath="Value" DisplayMemberPath="Name"/>
                                                                                        </DataTemplate>
                                                                                    </Setter.Value>
                                                                                </Setter>
                                                                            </DataTrigger>
                                                                            <DataTrigger Binding="{Binding Type}" Value="Boolean">
                                                                                <Setter Property="ContentTemplate">
                                                                                    <Setter.Value>
                                                                                        <DataTemplate>
                                                                                            <DockPanel>
                                                                                                <ToggleButton x:Name="chkInput" Cursor="Hand" IsChecked="{Binding Value}" FocusVisualStyle="{x:Null}" HorizontalAlignment="Left" />
                                                                                                <Rectangle VerticalAlignment="Center" Margin="10 0 0 0">
                                                                                                    <Rectangle.Style>
                                                                                                        <Style TargetType="Rectangle">
                                                                                                            <Setter Property="Stroke" Value="{StaticResource FSE_BorderBrush}">
                                                                                                            </Setter>
                                                                                                            <Style.Triggers>
                                                                                                                <DataTrigger Binding="{Binding ElementName=chkInput,Path=IsChecked}" Value="True">
                                                                                                                    <Setter Property="Stroke" Value="{StaticResource FSE_PrimaryAccentBrush}"></Setter>
                                                                                                                </DataTrigger>
                                                                                                            </Style.Triggers>
                                                                                                        </Style>
                                                                                                    </Rectangle.Style>
                                                                                                </Rectangle>
                                                                                            </DockPanel>
                                                                                        </DataTemplate>
                                                                                    </Setter.Value>
                                                                                </Setter>
                                                                            </DataTrigger>
                                                                        </Style.Triggers>
                                                                    </Style>
                                                                </ContentControl.Style>
                                                            </ContentControl>
                                                            <material:PackIcon VerticalAlignment="Center" Margin="20 0 0 0" Foreground="{StaticResource FSE_GrayBrush}" Kind="InfoCircleOutline" />
                                                            <TextBlock Margin="5 0 0 0" FontSize="{StaticResource FSE_SmallFontSize}" VerticalAlignment="Center" Foreground="{StaticResource FSE_GrayBrush}" Text="{Binding Description,FallbackValue='No description provided'}"></TextBlock>
                                                        </StackPanel>
                                                    </StackPanel>
                                                </DockPanel>
                                            </DataTemplate>
                                        </ItemsControl.ItemTemplate>
                                    </ItemsControl>
                                </StackPanel>

                                <StackPanel HorizontalAlignment="Left" Width="1050" Margin="0 20 0 0">
                                    <DockPanel>
                                        <Grid Margin="20 0 0 0" DockPanel.Dock="Right" >
                                            <Button material:ButtonAssist.CornerRadius="25" Command="{Binding StartProjectCommand}" Visibility="{Binding ProjectRunner.IsRunning,Converter={StaticResource BooleanToVisibilityInverseConverter}}" IsEnabled="{Binding ProjectRunner.CanRun}" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Width="200" Height="50">
                                                <DockPanel>
                                                    <material:PackIcon Kind="Play" Foreground="{StaticResource FSE_GreenBrush}" Width="24" Height="24" />
                                                    <TextBlock Margin="10 0 0 0" VerticalAlignment="Center">START</TextBlock>
                                                </DockPanel>
                                            </Button>
                                            <Button material:ButtonAssist.CornerRadius="25" Command="{Binding StopProjectCommand}" Visibility="{Binding ProjectRunner.IsRunning,Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Width="200" Height="50">
                                                <DockPanel>
                                                    <material:PackIcon Kind="Stop" Foreground="{StaticResource FSE_RedBrush}" Width="24" Height="24" />
                                                    <TextBlock Margin="10 0 0 0" VerticalAlignment="Center">STOP</TextBlock>
                                                </DockPanel>
                                            </Button>
                                        </Grid>
                                        <StackPanel VerticalAlignment="Bottom">
                                            <TextBlock Text="{Binding Status}"></TextBlock>
                                            <ProgressBar Margin="0 5 0 0" Height="10" IsIndeterminate="{Binding ProcedureProgress.IsIndeterminate}" Minimum="0" Maximum="{Binding ProcedureProgress.Maximum}" Value="{Binding ProcedureProgress.Value}" />
                                            <TextBlock Margin="0 5 0 0" FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_GrayBrush}" Text="{Binding ProcedureProgress.Message}"></TextBlock>
                                        </StackPanel>
                                    </DockPanel>
                                </StackPanel>
                            </StackPanel>
                            <StackPanel Margin="0 100 0 0" HorizontalAlignment="Left" Visibility="{Binding ProjectRunner.State,Converter={StaticResource EnumToVisibilityConverter},ConverterParameter='Failed'}">
                                <TextBlock FontSize="{StaticResource FSE_LargeFontSize}" FontWeight="SemiBold" Foreground="{StaticResource FSE_RedBrush}">Procedure Failed</TextBlock>
                                <TextBlock Margin="0 20 0 0">The procedure has failed to complete with the following error:</TextBlock>
                                <TextBlock Text="{Binding FailedError}" Margin="0 5 0 0" FontSize="{StaticResource FSE_SmallFontSize}" Foreground="{StaticResource FSE_GrayBrush}" TextWrapping="Wrap"></TextBlock>
                            </StackPanel>
                            <StackPanel>
                                <StackPanel.Style>
                                    <Style TargetType="StackPanel">
                                        <Setter Property="Opacity" Value="0"></Setter>
                                        <Style.Triggers>
                                            <DataTrigger Binding="{Binding ProjectRunner.State}" Value="Completed">
                                                <DataTrigger.EnterActions>
                                                    <BeginStoryboard>
                                                        <Storyboard>
                                                            <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="00:00:0.5" />
                                                        </Storyboard>
                                                    </BeginStoryboard>
                                                </DataTrigger.EnterActions>
                                                <DataTrigger.ExitActions>
                                                    <BeginStoryboard>
                                                        <Storyboard>
                                                            <DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="00:00:0.5" />
                                                        </Storyboard>
                                                    </BeginStoryboard>
                                                </DataTrigger.ExitActions>
                                            </DataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </StackPanel.Style>
                                <StackPanel Margin="0 100 0 0" HorizontalAlignment="Left" Width="1050">
                                    <TextBlock FontSize="{StaticResource FSE_LargeFontSize}" FontWeight="SemiBold" Foreground="{StaticResource FSE_PrimaryAccentBrush}">Results</TextBlock>
                                    <!--<Rectangle Margin="0 2 0 0" Stroke="{StaticResource FSE_BorderBrush}" StrokeDashArray="5" />-->
                                </StackPanel>
                                <Grid HorizontalAlignment="Left" Margin="0 20 0 0">
                                    <local:ResultsView DataContext="{Binding ResultsViewVM}" />
                                </Grid>
                            </StackPanel>
                        </StackPanel>
                    </ScrollViewer>
                </Grid>
            </DockPanel>
        </Grid>
    </Grid>
</UserControl>