Last-Modified: Sat, 20 Jun 2026 07:15:05 GMT Expires: Tue, 17 Jun 2036 07:15:05 GMT Tango - Twine softwares
aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ActionLogs/Views
Commit message (Expand)AuthorAgeFilesLines
* MS. Statistics mode. In open popup at least one checkbox remains selected. 2)...Victoria Plitt2020-08-261-2/+2
* mergeAvi Levkovich2020-08-251-18/+13
* Actions log. - Added IsLoadingDifferences property for waiting loading differ...Victoria Plitt2020-03-181-1/+1
* Job Runs, Action Logs - added async method to loading data.Victoria Plitt2020-03-181-2/+3
* Machine Studio. Changes in Statistics Job Runs and Action log. Improving dat...Victoria Plitt2020-03-181-4/+5
* Fixed issue with job run start date.Roy Ben Shabat2020-03-151-1/+1
* Machine Studio. Set some colors in dialogs for Dark theme.Victoria Plitt2020-02-051-3/+3
* Fixed issue with user creation validation.Roy Ben-Shabat2020-01-281-14/+22
* Added selection color to grid items , removed gray selection from tree view,...Victoria Plitt2019-12-291-4/+50
* Action Logs View, added copy button, changes GUI alignments and stylesVictoria Plitt2019-12-262-55/+131
* Implementing the new Machine Studio ActionLogs module.Victoria Plitt2019-12-241-68/+147
* Working on ActionLogs module.Victoria Plitt2019-12-222-1/+103
* Added ActionLogs MS module.Roy Ben Shabat2019-12-182-0/+43
<controls:View x:Class="Tango.MachineStudio.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:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
             xmlns:dockablz="clr-namespace:Dragablz.Dockablz;assembly=Dragablz"
             xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
             xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:db="clr-namespace:Tango.MachineStudio.DB.Views;assembly=Tango.MachineStudio.DB"
             xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
             mc:Ignorable="d" 
             d:DesignHeight="720" d:DesignWidth="1270" Background="Transparent" DataContext="{Binding MainViewVM, Source={StaticResource Locator}}">

    <UserControl.Resources>
        <converters:StringEllipsisConverter x:Key="StringEllipsisConverter" />
    </UserControl.Resources>

    <Grid>
        <Grid.Style>
            <Style TargetType="Grid">
                <Style.Triggers>
                    <DataTrigger Binding="{Binding NotificationProvider.HasTaskItems}" Value="True">
                        <Setter Property="Cursor" Value="AppStarting"></Setter>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding NotificationProvider.HasTaskItems}" Value="False">
                        <Setter Property="Cursor" Value="Arrow"></Setter>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </Grid.Style>

        <materialDesign:DrawerHost IsLeftDrawerOpen="{Binding ElementName=MenuToggleButton, Path=IsChecked}">
            <materialDesign:DrawerHost.LeftDrawerContent>
                <DockPanel LastChildFill="False">
                    <StackPanel MinWidth="300" DockPanel.Dock="Top">
                        <Grid>
                            <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" 
                                    HorizontalAlignment="Right" Margin="16"
                                    IsChecked="{Binding ElementName=MenuToggleButton, Path=IsChecked, Mode=TwoWay}" />

                            <StackPanel Margin="5 0 0 0" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
                                <Image Source="/Images/account.png" RenderOptions.BitmapScalingMode="Fant" VerticalAlignment="Center" Width="50" Height="50"></Image>
                                <TextBlock FontSize="16" TextTrimming="CharacterEllipsis" MaxWidth="170" FontStyle="Italic" FontWeight="Bold" Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding AuthenticationProvider.CurrentUser.Contact.FullName}"></TextBlock>
                            </StackPanel>
                        </Grid>
                        <StackPanel Margin="0 16 0 0">
                            <ListBoxItem>
                                <i:Interaction.Triggers>
                                    <i:EventTrigger EventName="PreviewMouseUp">
                                        <i:InvokeCommandAction Command="{Binding HomeCommand}"></i:InvokeCommandAction>
                                    </i:EventTrigger>
                                </i:Interaction.Triggers>
                                <StackPanel Orientation="Horizontal">
                                    <materialDesign:PackIcon VerticalAlignment="Center" Kind="Home" Width="32" Height="32"></materialDesign:PackIcon>
                                    <TextBlock FontSize="16" VerticalAlignment="Center" Margin="10 0 0 0">Home</TextBlock>
                                </StackPanel>
                            </ListBoxItem>
                        </StackPanel>
                        <StackPanel Margin="10 10 0 0">
                            <TextBlock Foreground="Silver" FontSize="16" FontWeight="Bold" FontStyle="Italic">MODULES</TextBlock>
                            <Separator Background="Gainsboro" />
                        </StackPanel>
                        <ListBox ItemsSource="{Binding StudioModuleLoader.UserModules}" HorizontalContentAlignment="Stretch" FontSize="14">
                            <ListBox.ItemContainerStyle>
                                <Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
                                    <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
                                    <Setter Property="VerticalContentAlignment" Value="Stretch"></Setter>
                                </Style>
                            </ListBox.ItemContainerStyle>
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <Grid Background="Transparent">
                                        <i:Interaction.Triggers>
                                            <i:EventTrigger EventName="PreviewMouseUp">
                                                <i:InvokeCommandAction Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.StartModuleCommand}" CommandParameter="{Binding}"></i:InvokeCommandAction>
                                            </i:EventTrigger>
                                        </i:Interaction.Triggers>

                                        <StackPanel Orientation="Horizontal" Margin="0 0 0 0" ToolTip="{Binding Description}">
                                            <Ellipse Height="35" Width="35" VerticalAlignment="Center">
                                                <Ellipse.Fill>
                                                    <ImageBrush ImageSource="{Binding Image}" RenderOptions.BitmapScalingMode="Fant" />
                                                </Ellipse.Fill>
                                            </Ellipse>
                                            <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding Name}"></TextBlock>
                                        </StackPanel>
                                    </Grid>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                    </StackPanel>

                    <StackPanel DockPanel.Dock="Bottom">
                        <Separator Margin="0 10 0 0" Background="Gainsboro" />
                        <ListBoxItem>
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="PreviewMouseUp">
                                    <i:InvokeCommandAction Command="{Binding SignoutCommand}"></i:InvokeCommandAction>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                            <StackPanel Orientation="Horizontal">
                                <materialDesign:PackIcon VerticalAlignment="Center" Kind="Logout" Width="32" Height="32"></materialDesign:PackIcon>
                                <TextBlock FontSize="16" VerticalAlignment="Center" Margin="10 0 0 0">Sign out</TextBlock>
                            </StackPanel>
                        </ListBoxItem>
                    </StackPanel>
                </DockPanel>
            </materialDesign:DrawerHost.LeftDrawerContent>
            <DockPanel>
                <materialDesign:ColorZone Padding="16" materialDesign:ShadowAssist.ShadowDepth="Depth2"
                                            Mode="PrimaryMid" DockPanel.Dock="Top">
                    <DockPanel>
                        <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" IsChecked="{Binding IsMenuOpened}"
                                        x:Name="MenuToggleButton"/>
                        <materialDesign:PopupBox DockPanel.Dock="Right" PlacementMode="BottomAndAlignRightEdges" StaysOpen="False">
                            <StackPanel>
                                <Button Content="Machine Connection" Command="{Binding ConnectCommand}" />
                                <Button Content="Disconnect Machine" Command="{Binding DisconnectCommand}" />
                                <Separator/>
                                <Button Content="Exit" />
                            </StackPanel>
                        </materialDesign:PopupBox>
                        <Grid>
                            <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Height="60" HorizontalAlignment="Center">
                                <Image Source="/Images/machine-trans.png" RenderOptions.BitmapScalingMode="Fant"></Image>
                                <TextBlock Text="Machine Studio" VerticalAlignment="Center" Margin="20 0 0 0" FontSize="36"/>
                            </StackPanel>

                            <Grid HorizontalAlignment="Right">
                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                                    <Grid Margin="0 0 20 0">
                                        <ItemsControl ItemsSource="{Binding NotificationProvider.BarItems}">
                                            <ItemsControl.ItemsPanel>
                                                <ItemsPanelTemplate>
                                                    <StackPanel Orientation="Horizontal" IsItemsHost="True" VerticalAlignment="Center"></StackPanel>
                                                </ItemsPanelTemplate>
                                            </ItemsControl.ItemsPanel>
                                            <ItemsControl.ItemTemplate>
                                                <DataTemplate>
                                                    <ContentControl Margin="0 0 10 0" Content="{Binding Element}" VerticalAlignment="Center"></ContentControl>
                                                </DataTemplate>
                                            </ItemsControl.ItemTemplate>
                                        </ItemsControl>
                                    </Grid>
                                    
                                    <Button VerticalAlignment="Center" Margin="10 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" FontSize="12" ToolTip="Connect to machine on the local network" BorderThickness="0" Command="{Binding ConnectCommand}">
                                        <!--<Button.Background>
                                            <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                                <GradientStop Color="White" Offset="0.4" />
                                                <GradientStop Color="#75E0FA" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Button.Background>-->
                                        <StackPanel Orientation="Horizontal">
                                            <Grid>
                                                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                                                    <TextBlock Text="Machine Connection" VerticalAlignment="Center" Foreground="White"></TextBlock>
                                                    <materialDesign:PackIcon Margin="10 0 0 0" Width="24" Height="24">
                                                        <materialDesign:PackIcon.Style>
                                                            <Style TargetType="materialDesign:PackIcon">
                                                                <Setter Property="Foreground" Value="#333333"></Setter>
                                                                <Setter Property="Kind" Value="LanDisconnect"></Setter>
                                                                <Style.Triggers>
                                                                    <DataTrigger Binding="{Binding ApplicationManager.IsMachineConnected,Mode=OneWay}" Value="True">
                                                                        <Setter Property="Foreground" Value="#03FF8E"></Setter>
                                                                        <Setter Property="Kind" Value="LanConnect"></Setter>
                                                                    </DataTrigger>
                                                                </Style.Triggers>
                                                            </Style>
                                                        </materialDesign:PackIcon.Style>
                                                    </materialDesign:PackIcon>
                                                </StackPanel>
                                            </Grid>
                                        </StackPanel>
                                    </Button>
                                </StackPanel>
                            </Grid>
                        </Grid>
                    </DockPanel>
                </materialDesign:ColorZone>

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

                        <Grid Grid.Row="1">
                            <controls:MultiTransitionControl x:Name="TransitionControl" AlwaysFade="True" TransitionType="Zoom">
                                <controls:MultiTransitionControl.Controls>
                                    <ContentControl Tag="Home">
                                        <Grid>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="150"/>
                                                <RowDefinition Height="*"/>
                                            </Grid.RowDefinitions>
                                            <Grid>
                                                <StackPanel Margin="30 20" HorizontalAlignment="Left">
                                                    <TextBlock Style="{StaticResource MaterialDesignDisplay1TextBlock}">Welcome to Machine Studio</TextBlock>
                                                    <TextBlock HorizontalAlignment="Right" Margin="0 5 -130 0" FontStyle="Italic" Style="{StaticResource MaterialDesignSubheadingTextBlock}" Foreground="{StaticResource AccentColorBrush}">Select Your Studio Module...</TextBlock>
                                                </StackPanel>
                                            </Grid>

                                            <Grid Grid.Row="2">
                                                <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                                                    <ItemsControl ItemsSource="{Binding StudioModuleLoader.UserModules}" Margin="10">
                                                        <ItemsControl.ItemsPanel>
                                                            <ItemsPanelTemplate>
                                                                <WrapPanel IsItemsHost="True"></WrapPanel>
                                                            </ItemsPanelTemplate>
                                                        </ItemsControl.ItemsPanel>

                                                        <ItemsControl.ItemTemplate>
                                                            <DataTemplate>
                                                                <materialDesign:Card Width="300" Margin="10" Height="400">
                                                                    <Grid >
                                                                        <Grid.RowDefinitions>
                                                                            <RowDefinition Height="180" />
                                                                            <RowDefinition Height="*" />
                                                                            <RowDefinition Height="Auto" />
                                                                        </Grid.RowDefinitions>
                                                                        <Image Source="{Binding Image,Mode=OneWay}" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" />
                                                                        <Button Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.StartModuleCommand}" CommandParameter="{Binding}" Grid.Row="0" Margin="0,0,20,-35" HorizontalAlignment="Right" Width="70" Height="70" VerticalAlignment="Bottom" Style="{StaticResource MaterialDesignFloatingActionMiniButton}" ToolTip="Start This Module">
                                                                            <materialDesign:PackIcon Kind="Play" Width="30" Height="30" />
                                                                        </Button>
                                                                        <StackPanel Grid.Row="1" Margin="8,24,8,0">
                                                                            <TextBlock FontWeight="Bold" FontSize="20" Text="{Binding Name,Mode=OneWay}"></TextBlock>
                                                                            <TextBlock VerticalAlignment="Center" Margin="0 5 0 0" FontSize="14" TextWrapping="Wrap" Text="{Binding Description,Mode=OneWay}"></TextBlock>
                                                                        </StackPanel>
                                                                        <StackPanel Grid.Row="2" Margin="8" HorizontalAlignment="Right" Orientation="Horizontal">
                                                                            <materialDesign:PopupBox Padding="2,0,2,0" Style="{StaticResource MaterialDesignToolPopupBox}">
                                                                                <StackPanel>
                                                                                    <Button Content="More" />
                                                                                    <Button Content="Options" />
                                                                                </StackPanel>
                                                                            </materialDesign:PopupBox>
                                                                        </StackPanel>
                                                                    </Grid>
                                                                </materialDesign:Card>
                                                            </DataTemplate>
                                                        </ItemsControl.ItemTemplate>
                                                    </ItemsControl>
                                                </ScrollViewer>
                                            </Grid>
                                        </Grid>
                                    </ContentControl>
                                </controls:MultiTransitionControl.Controls>
                            </controls:MultiTransitionControl>
                        </Grid>
                    </Grid>

                    <Border HorizontalAlignment="Right" Margin="0 -1 10 0" VerticalAlignment="Top" Width="300" Height="40" Padding="5" CornerRadius="0 0 30 30" BorderThickness="1 0 1 1" BorderBrush="DimGray">
                        <Border.Style>
                            <Style TargetType="Border">
                                <Setter Property="RenderTransform">
                                    <Setter.Value>
                                        <ScaleTransform ScaleX="1" ScaleY="0"></ScaleTransform>
                                    </Setter.Value>
                                </Setter>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding NotificationProvider.HasTaskItems}" Value="True">
                                        <DataTrigger.EnterActions>
                                            <BeginStoryboard HandoffBehavior="Compose">
                                                <Storyboard>
                                                    <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" FillBehavior="HoldEnd" To="1" Duration="00:00:0.2"></DoubleAnimation>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </DataTrigger.EnterActions>
                                        <DataTrigger.ExitActions>
                                            <BeginStoryboard HandoffBehavior="Compose">
                                                <Storyboard>
                                                    <DoubleAnimation BeginTime="00:00:02" FillBehavior="HoldEnd" Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" From="1" Duration="00:00:0.5"></DoubleAnimation>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </DataTrigger.ExitActions>
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </Border.Style>
                        <Border.Background>
                            <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                <GradientStop Color="#03A9F4"/>
                                <GradientStop Color="#0081BB" Offset="1"/>
                            </LinearGradientBrush>
                        </Border.Background>

                        <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="20 0 0 0">
                            <mahapps:ProgressRing Width="24" Height="24" Foreground="White"></mahapps:ProgressRing>
                            <TextBlock Text="{Binding NotificationProvider.CurrentTaskItem.Message,Converter={StaticResource StringEllipsisConverter},ConverterParameter=35}" Foreground="White" VerticalAlignment="Center" Margin="10 0 0 0" TextWrapping="Wrap"></TextBlock>
                        </StackPanel>
                    </Border>
                </Grid>
            </DockPanel>
        </materialDesign:DrawerHost>
    </Grid>
</controls:View>