agrobot_base/AgroBase/OperationControl/Views/PreparacaoMapa/PreparacaoMapaBottomView.xaml

802 lines
27 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.PreparacaoMapaBottomView"
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"
mc:Ignorable="d">
<UserControl.Resources>
<BooleanToVisibilityConverter
x:Key="BoolToVisibilityConverter"/>
<!-- ===================================================== -->
<!-- SCROLL BAR -->
<!-- ===================================================== -->
<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>
<!-- ===================================================== -->
<!-- CARDS -->
<!-- ===================================================== -->
<Style x:Key="SectionCardStyle"
TargetType="Border">
<Setter Property="Background"
Value="#242424"/>
<Setter Property="BorderBrush"
Value="#3A3A3A"/>
<Setter Property="BorderThickness"
Value="1"/>
<Setter Property="CornerRadius"
Value="10"/>
<Setter Property="Padding"
Value="14"/>
<Setter Property="Margin"
Value="0,0,0,12"/>
</Style>
<Style x:Key="SectionTitleStyle"
TargetType="TextBlock">
<Setter Property="Foreground"
Value="White"/>
<Setter Property="FontSize"
Value="14"/>
<Setter Property="FontWeight"
Value="SemiBold"/>
</Style>
<Style x:Key="SectionDescriptionStyle"
TargetType="TextBlock">
<Setter Property="Foreground"
Value="#8F8F8F"/>
<Setter Property="FontSize"
Value="11"/>
<Setter Property="TextWrapping"
Value="Wrap"/>
<Setter Property="Margin"
Value="0,4,0,12"/>
</Style>
<Style x:Key="FieldLabelStyle"
TargetType="TextBlock">
<Setter Property="Foreground"
Value="#A8A8A8"/>
<Setter Property="FontSize"
Value="11"/>
<Setter Property="Margin"
Value="0,0,0,5"/>
</Style>
<Style x:Key="FieldTextBoxStyle"
TargetType="TextBox">
<Setter Property="Height"
Value="34"/>
<Setter Property="Background"
Value="#1C1C1C"/>
<Setter Property="Foreground"
Value="White"/>
<Setter Property="BorderBrush"
Value="#484848"/>
<Setter Property="BorderThickness"
Value="1"/>
<Setter Property="Padding"
Value="8,4"/>
<Setter Property="VerticalContentAlignment"
Value="Center"/>
</Style>
<!-- ===================================================== -->
<!-- BOTÕES -->
<!-- ===================================================== -->
<Style x:Key="PanelButtonStyle"
TargetType="Button">
<Setter Property="Height"
Value="40"/>
<Setter Property="Foreground"
Value="White"/>
<Setter Property="Background"
Value="#303030"/>
<Setter Property="BorderBrush"
Value="#505050"/>
<Setter Property="BorderThickness"
Value="1"/>
<Setter Property="FontSize"
Value="12"/>
<Setter Property="FontWeight"
Value="SemiBold"/>
<Setter Property="Cursor"
Value="Hand"/>
<Setter Property="HorizontalContentAlignment"
Value="Center"/>
<Setter Property="VerticalContentAlignment"
Value="Center"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate
TargetType="Button">
<Border
x:Name="ButtonBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="7">
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger
Property="IsMouseOver"
Value="True">
<Setter
TargetName="ButtonBorder"
Property="Background"
Value="#393939"/>
</Trigger>
<Trigger
Property="IsEnabled"
Value="False">
<Setter
TargetName="ButtonBorder"
Property="Opacity"
Value="0.38"/>
<Setter
Property="Cursor"
Value="Arrow"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="PrimaryButtonStyle"
TargetType="Button"
BasedOn="{StaticResource PanelButtonStyle}">
<Setter Property="Background"
Value="#235B3A"/>
<Setter Property="BorderBrush"
Value="#3E8B5E"/>
</Style>
<Style x:Key="ContinueButtonStyle"
TargetType="Button"
BasedOn="{StaticResource PanelButtonStyle}">
<Setter Property="Height"
Value="44"/>
<Setter Property="Background"
Value="#174D35"/>
<Setter Property="BorderBrush"
Value="#43A36A"/>
<Setter Property="FontSize"
Value="13"/>
</Style>
</UserControl.Resources>
<Grid Background="#1C1C1C">
<Grid.RowDefinitions>
<RowDefinition Height="64"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- ===================================================== -->
<!-- CABEÇALHO -->
<!-- ===================================================== -->
<Border
Grid.Row="0"
Background="#222222"
BorderBrush="#343434"
BorderThickness="0,0,0,1">
<Grid Margin="12,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- ============================================= -->
<!-- VOLTAR -->
<!-- ============================================= -->
<Button
Grid.Column="0"
Width="76"
Height="32"
Command="{Binding VoltarCommand}"
IsEnabled="{Binding PodeVoltar}"
VerticalAlignment="Center"
Background="#292929"
Foreground="#D8D8D8"
BorderBrush="#454545"
BorderThickness="1"
Cursor="Hand"
FontSize="11"
FontWeight="SemiBold"
Content="‹ Voltar">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border
x:Name="Border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="6">
<ContentPresenter
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger
Property="IsMouseOver"
Value="True">
<Setter
TargetName="Border"
Property="Background"
Value="#353535"/>
<Setter
TargetName="Border"
Property="BorderBrush"
Value="#5A5A5A"/>
</Trigger>
<Trigger
Property="IsEnabled"
Value="False">
<Setter
TargetName="Border"
Property="Opacity"
Value="0.35"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
<!-- ============================================= -->
<!-- CONTEXTO -->
<!-- ============================================= -->
<StackPanel
Grid.Column="1"
Margin="12,0,0,0"
VerticalAlignment="Center">
<TextBlock
Text="Preparação"
Foreground="White"
FontSize="17"
FontWeight="SemiBold"/>
<TextBlock
Text="Mapa e posicionamento da estação"
Foreground="#858585"
FontSize="11"
Margin="0,2,0,0"/>
</StackPanel>
</Grid>
</Border>
<!-- ===================================================== -->
<!-- CONTEÚDO -->
<!-- ===================================================== -->
<ScrollViewer
Grid.Row="1"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Disabled"
CanContentScroll="False"
PanningMode="VerticalOnly">
<ScrollViewer.Resources>
<Style
TargetType="ScrollBar"
BasedOn="{StaticResource ThinScrollBar}"/>
</ScrollViewer.Resources>
<StackPanel
Margin="14,14,8,14">
<!-- ============================================= -->
<!-- MAPA -->
<!-- ============================================= -->
<Border
Style="{StaticResource SectionCardStyle}">
<StackPanel>
<TextBlock
Text="Mapa da operação"
Style="{StaticResource SectionTitleStyle}"/>
<TextBlock
Text="Carregue o arquivo que representa as ruas da área onde o equipamento irá operar."
Style="{StaticResource SectionDescriptionStyle}"/>
<Button
Content="▣ Carregar ou trocar mapa"
Style="{StaticResource PanelButtonStyle}"
Command="{Binding CarregarMapaCommand}"
IsEnabled="{Binding PodeCarregarMapa}"/>
<Button
Content="+ Criar novo mapa"
Style="{StaticResource PanelButtonStyle}"
Command="{Binding CriarMapaCommand}"
IsEnabled="{Binding PodeCriarMapa}"
Margin="0,8,0,0"
ToolTip="Cria um mapa por levantamento GNSS, rua por rua, sem exigir Rover."/>
<Button
Content="✎ Editar mapa"
Style="{StaticResource PanelButtonStyle}"
Command="{Binding EditarMapaCommand}"
IsEnabled="{Binding PodeEditarMapa}"
Margin="0,8,0,0"
ToolTip="Abre o editor operacional neste mapa, sem exigir rover conectado."/>
</StackPanel>
</Border>
<!-- ===================================================== -->
<!-- PAPEL DO GNSS -->
<!-- ===================================================== -->
<Border Style="{StaticResource SectionCardStyle}">
<StackPanel>
<TextBlock
Text="Uso atual do GNSS"
Style="{StaticResource SectionTitleStyle}"/>
<TextBlock
Text="Defina se a antena será movimentada para levantamento ou utilizada como referência fixa."
Style="{StaticResource SectionDescriptionStyle}"/>
<Border
Background="#1D1D1D"
BorderBrush="#3D3D3D"
BorderThickness="1"
CornerRadius="7"
Padding="10"
Margin="0,0,0,12">
<StackPanel>
<TextBlock
Text="{Binding PapelGnssTexto}"
Foreground="{Binding PapelGnssCor}"
FontSize="12"
FontWeight="Bold"/>
<TextBlock
Text="{Binding PapelGnssDescricao}"
Foreground="#A0A0A0"
FontSize="10"
TextWrapping="Wrap"
Margin="0,4,0,0"/>
</StackPanel>
</Border>
<Button
Content="{Binding TextoBotaoModoGnss}"
Style="{StaticResource PanelButtonStyle}"
Command="{Binding UsarGnssMovelCommand}"
IsEnabled="{Binding PodeUsarGnssMovel}"/>
</StackPanel>
</Border>
<!-- ============================================= -->
<!-- GNSS / BASE -->
<!-- ============================================= -->
<Border
Style="{StaticResource SectionCardStyle}">
<StackPanel>
<TextBlock
Text="Posicionamento da estação"
Style="{StaticResource SectionTitleStyle}"/>
<TextBlock
Text="Defina como a posição da estação será estabelecida quando ela for utilizada como base."
Style="{StaticResource SectionDescriptionStyle}"/>
<TextBlock
Text="Método de posicionamento"
Style="{StaticResource FieldLabelStyle}"/>
<ComboBox
Height="36"
Margin="0,0,0,12"
VerticalContentAlignment="Center"
ItemsSource="{Binding MetodosFixacaoDisponiveis}"
DisplayMemberPath="Nome"
SelectedValuePath="Valor"
SelectedValue="{Binding MetodoFixacaoSelecionado, Mode=TwoWay}"
IsEnabled="{Binding PodeEditarMetodoFixacao}"/>
<!-- ===================================== -->
<!-- MANUAL -->
<!-- ===================================== -->
<StackPanel
Visibility="{Binding ExibirCamposManuais,
Converter={StaticResource BoolToVisibilityConverter}}"
Margin="0,0,0,12">
<TextBlock
Text="Latitude"
Style="{StaticResource FieldLabelStyle}"/>
<TextBox
Text="{Binding LatitudeManualTexto,
Mode=TwoWay,
UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource FieldTextBoxStyle}"
IsEnabled="{Binding PodeEditarCoordenadasManuais}"
Margin="0,0,0,10"/>
<TextBlock
Text="Longitude"
Style="{StaticResource FieldLabelStyle}"/>
<TextBox
Text="{Binding LongitudeManualTexto,
Mode=TwoWay,
UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource FieldTextBoxStyle}"
IsEnabled="{Binding PodeEditarCoordenadasManuais}"
Margin="0,0,0,10"/>
<TextBlock
Text="Altitude elipsoidal (m)"
Style="{StaticResource FieldLabelStyle}"/>
<TextBox
Text="{Binding AltitudeManualTexto,
Mode=TwoWay,
UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource FieldTextBoxStyle}"
IsEnabled="{Binding PodeEditarCoordenadasManuais}"/>
</StackPanel>
<!-- ===================================== -->
<!-- PROGRESSO -->
<!-- ===================================== -->
<Grid
Visibility="{Binding FixacaoEmAndamento,
Converter={StaticResource BoolToVisibilityConverter}}"
Margin="0,0,0,12">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="48"/>
</Grid.ColumnDefinitions>
<ProgressBar
Grid.Column="0"
Height="18"
Minimum="0"
Maximum="100"
Value="{Binding ProgressoFixacao}"
Margin="0,0,8,0"/>
<TextBlock
Grid.Column="1"
Text="{Binding ProgressoFixacaoTexto}"
Foreground="#D0D0D0"
FontSize="11"
FontWeight="SemiBold"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Grid>
<Button
Content="{Binding TextoBotaoFixarBase}"
Style="{StaticResource PrimaryButtonStyle}"
Command="{Binding FixarBaseCommand}"
IsEnabled="{Binding PodeFixarBase}"/>
</StackPanel>
</Border>
<!-- ============================================= -->
<!-- OFFSET -->
<!-- ============================================= -->
<Border
Style="{StaticResource SectionCardStyle}"
Visibility="{Binding ExibirOffsets,
Converter={StaticResource BoolToVisibilityConverter}}">
<StackPanel>
<TextBlock
Text="Ajuste da antena"
Style="{StaticResource SectionTitleStyle}"/>
<TextBlock
Text="Aplique o deslocamento entre o ponto de referência da base e a posição física da antena."
Style="{StaticResource SectionDescriptionStyle}"/>
<TextBlock
Text="Offset frontal (cm)"
Style="{StaticResource FieldLabelStyle}"/>
<TextBox
Text="{Binding OffsetFrontalBaseTexto,
Mode=TwoWay,
UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource FieldTextBoxStyle}"
IsEnabled="{Binding PodeEditarOffsetBase}"
Margin="0,0,0,10"/>
<TextBlock
Text="Offset lateral (cm)"
Style="{StaticResource FieldLabelStyle}"/>
<TextBox
Text="{Binding OffsetLateralBaseTexto,
Mode=TwoWay,
UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource FieldTextBoxStyle}"
IsEnabled="{Binding PodeEditarOffsetBase}"
Margin="0,0,0,12"/>
<Button
Content="Aplicar ajuste"
Style="{StaticResource PanelButtonStyle}"
Command="{Binding AplicarOffsetCommand}"/>
</StackPanel>
</Border>
</StackPanel>
</ScrollViewer>
<!-- ===================================================== -->
<!-- AVANÇAR -->
<!-- ===================================================== -->
<Border
Grid.Row="2"
Background="#202020"
BorderBrush="#343434"
BorderThickness="0,1,0,0"
Padding="14">
<Button
Content="Continuar para parametrização ❯"
Style="{StaticResource ContinueButtonStyle}"
Command="{Binding ContinuarCommand}"/>
</Border>
</Grid>
</UserControl>