agrobot_base/AgroBase/OperationControl/Views/Operacao/OperacaoRightView.xaml

244 lines
14 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<UserControl x:Class="OperationControl.Views.Operacao.OperacaoRightView"
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:local="clr-namespace:OperationControl.Views.Operacao"
xmlns:views="clr-namespace:OperationControl.Views.Operacao.Monitoramento"
mc:Ignorable="d">
<UserControl.Resources>
<BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
<Style x:Key="MenuButtonStyle" TargetType="Button">
<Setter Property="Margin" Value="0,0,0,10"/>
<Setter Property="Height" Value="52"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Background" Value="#2A2A2A"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderBrush" Value="#4A4A4A"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="10"
Padding="12">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#343434"/>
<Setter Property="BorderBrush" Value="#6A6A6A"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="RoverCardButtonStyle" TargetType="Button">
<Setter Property="Margin" Value="0,0,0,12"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ThinScrollBar" TargetType="ScrollBar">
<Setter Property="Width" Value="8"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ScrollBar">
<Grid Width="8" Background="Transparent">
<Border Margin="2,0,2,0" Background="#2F2F2F" CornerRadius="3"/>
<Track x:Name="PART_Track" Margin="2,0,2,0" IsDirectionReversed="True">
<Track.DecreaseRepeatButton>
<RepeatButton Opacity="0" IsHitTestVisible="False"/>
</Track.DecreaseRepeatButton>
<Track.Thumb>
<Thumb>
<Thumb.Template>
<ControlTemplate TargetType="Thumb">
<Border Background="#6B7280" CornerRadius="3" MinHeight="30"/>
</ControlTemplate>
</Thumb.Template>
</Thumb>
</Track.Thumb>
<Track.IncreaseRepeatButton>
<RepeatButton Opacity="0" IsHitTestVisible="False"/>
</Track.IncreaseRepeatButton>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Grid Background="#1C1C1C">
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- Cabeçalho -->
<Border Grid.Row="0" Background="#222222" BorderBrush="#343434" BorderThickness="0,0,0,1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="44"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Painel do Operador" VerticalAlignment="Center" Margin="16,0,0,0" Foreground="White" FontSize="18" FontWeight="SemiBold"/>
<Button Grid.Column="1" Content="" Width="32" Height="32" Margin="0,0,8,0" HorizontalAlignment="Center" VerticalAlignment="Center" Command="{Binding ToggleCollapseCommand}">
<Button.Style>
<Style TargetType="Button">
<Setter Property="Background" Value="#2E2E2E"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="BorderBrush" Value="#505050"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="8">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsCollapsed}" Value="True">
<Setter Property="Content" Value=""/>
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
</Grid>
</Border>
<!-- Conteúdo -->
<Grid Grid.Row="1" Margin="14">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Visibility" Value="Visible"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsCollapsed}" Value="True">
<Setter Property="Visibility" Value="Collapsed"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>
<!-- Sem rover selecionado -->
<Grid Visibility="{Binding SemRoverSelecionado, Converter={StaticResource BoolToVisibilityConverter}}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Margin="0,0,0,12">
<TextBlock Text="Selecione um rover disponível na rede" Foreground="#D0D0D0" FontSize="14" Margin="0,0,0,4"/>
<TextBlock Text="{Binding QuantidadeRoversTexto}" Foreground="#8E8E8E" FontSize="12"/>
</StackPanel>
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
<ItemsControl ItemsSource="{Binding Rovers}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Style="{StaticResource RoverCardButtonStyle}" Command="{Binding DataContext.SelecionarRoverCommand, RelativeSource={RelativeSource AncestorType=UserControl}}" CommandParameter="{Binding}">
<Border Background="{Binding CardBackground}" BorderBrush="{Binding BordaCardBrush}" BorderThickness="{Binding BordaCardThickness}" CornerRadius="12" Padding="14" SnapsToDevicePixels="True">
<StackPanel>
<TextBlock Text="{Binding EquipamentoTexto}" Foreground="White" FontSize="16" FontWeight="Bold"/>
<TextBlock Text="{Binding NumeroSerieTexto}" Foreground="#CFCFCF" Margin="0,8,0,0" FontSize="13"/>
<TextBlock Text="{Binding StatusTexto}" Foreground="{Binding StatusBrush}" Margin="0,8,0,0" FontSize="13" FontWeight="SemiBold"/>
</StackPanel>
</Border>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Grid>
<!-- Com rover selecionado -->
<Grid Visibility="{Binding ComRoverSelecionado, Converter={StaticResource BoolToVisibilityConverter}}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" Background="#262626" BorderBrush="#4E8EF7" BorderThickness="1" CornerRadius="12" Padding="14" Margin="0,0,0,14">
<StackPanel>
<TextBlock Text="{Binding RoverSelecionado.EquipamentoTexto}" Foreground="White" FontSize="16" FontWeight="Bold"/>
<TextBlock Text="{Binding RoverSelecionado.NumeroSerieTexto}" Foreground="#CFCFCF" Margin="0,8,0,0" FontSize="13"/>
<TextBlock Text="{Binding RoverSelecionado.StatusTexto}" Foreground="{Binding RoverSelecionado.StatusBrush}" Margin="0,8,0,0" FontSize="13" FontWeight="SemiBold"/>
</StackPanel>
</Border>
<Button Grid.Row="1" Content="{Binding TextoBotaoTopo}" Command="{Binding AcaoBotaoTopoCommand}" Margin="0,0,0,14" Height="42" Background="#2E2E2E" Foreground="White" BorderBrush="#555555" BorderThickness="1"/>
<Grid Grid.Row="2">
<!-- MENU -->
<StackPanel Visibility="{Binding EmMenu, Converter={StaticResource BoolToVisibilityConverter}}">
<Button Content="Diagnóstico" Style="{StaticResource MenuButtonStyle}" Command="{Binding SelecionarSecaoCommand}" CommandParameter="Diagnostico"/>
<Button Content="Parametrização ▶" Style="{StaticResource MenuButtonStyle}" Command="{Binding SelecionarSecaoCommand}" CommandParameter="Parametrizacao"/>
<Button Content="Controle ▶" Style="{StaticResource MenuButtonStyle}" Command="{Binding SelecionarSecaoCommand}" CommandParameter="Controle"/>
<Button Content="Resumo ▶" Style="{StaticResource MenuButtonStyle}" Command="{Binding SelecionarSecaoCommand}" CommandParameter="Resumo"/>
</StackPanel>
<!-- RESUMO -->
<ScrollViewer Visibility="{Binding EmResumo, Converter={StaticResource BoolToVisibilityConverter}}" VerticalScrollBarVisibility="Auto">
<ScrollViewer.Resources>
<Style TargetType="ScrollBar" BasedOn="{StaticResource ThinScrollBar}" />
</ScrollViewer.Resources>
<views:ResumoView x:Name="areaResumo" />
</ScrollViewer>
<!-- PARAMETRIZAÇÃO -->
<ScrollViewer Visibility="{Binding EmParametrizacao, Converter={StaticResource BoolToVisibilityConverter}}" VerticalScrollBarVisibility="Auto">
<ScrollViewer.Resources>
<Style TargetType="ScrollBar" BasedOn="{StaticResource ThinScrollBar}" />
</ScrollViewer.Resources>
<views:ParametrizacaoView x:Name="areaParametrizacao" />
</ScrollViewer>
<!-- CONTROLE -->
<ScrollViewer Visibility="{Binding EmControle, Converter={StaticResource BoolToVisibilityConverter}}" VerticalScrollBarVisibility="Auto">
<ScrollViewer.Resources>
<Style TargetType="ScrollBar" BasedOn="{StaticResource ThinScrollBar}" />
</ScrollViewer.Resources>
<views:ControleManualView x:Name="areaControle" />
</ScrollViewer>
</Grid>
</Grid>
</Grid>
</Grid>
</UserControl>