PipefyAddCompanies/UI/Views/MainWindow.xaml

70 lines
2.6 KiB
XML

<Window x:Class="PipefyAddCompanies.UI.Views.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:viewModels="clr-namespace:PipefyAddCompanies.UI.ViewModels"
Title="Pipefy Add Companies"
AllowDrop="True"
DragEnter="Window_DragEnter"
Drop="Window_Drop"
Height="564"
Width="800"
Closing="Window_Closing">
<Grid>
<Grid.RowDefinitions>
<!-- Linha para os botões -->
<RowDefinition Height="Auto" />
<!-- Linha para o DataGrid de empresas pendentes (ajustável com a altura da janela) -->
<RowDefinition Height="*" />
<!-- Linha para o DataGrid de empresas já existentes (altura fixa) -->
<RowDefinition Height="200" />
</Grid.RowDefinitions>
<!-- StackPanel para organizar os botões na parte superior -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="10" Grid.Row="0">
<!-- Botão para selecionar a planilha -->
<Button Content="Selecionar Planilha"
Width="136"
Height="25"
Command="{Binding SelecionarArquivoCommand}"
Margin="0,0,10,0" />
<!-- Botão de Processar que só é habilitado quando a planilha está carregada -->
<Button Content="Processar"
Width="136"
Height="26"
Command="{Binding ProcessarCommand}"
IsEnabled="{Binding PodeProcessar}"
Margin="0,0,10,0" />
<!-- Botão para limpar dados -->
<Button Content="Limpar Dados"
Width="136"
Height="26"
Command="{Binding LimparCommand}" />
</StackPanel>
<!-- DataGrid para exibir as empresas pendentes -->
<DataGrid
ItemsSource="{Binding Empresas}"
AutoGenerateColumns="True"
Margin="10"
Grid.Row="1" />
<!-- Label para empresas já existentes -->
<Label
Content="Empresas já existentes:"
HorizontalAlignment="Left"
Margin="10,-200,0,0"
VerticalAlignment="Center"
Grid.Row="2" />
<!-- DataGrid para exibir as empresas já existentes -->
<DataGrid
ItemsSource="{Binding EmpresasExistentes}"
AutoGenerateColumns="True"
Margin="10"
Grid.Row="2" />
</Grid>
</Window>