You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
4.3 KiB
XML
92 lines
4.3 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
x:Class="CommanderApp.MainPage"
|
|
Title="MAUI Commander">
|
|
|
|
<!-- Изменяем RowDefinitions: добавляем строку под заголовком -->
|
|
<Grid RowDefinitions="Auto, Auto, *, Auto" ColumnDefinitions="*, *">
|
|
<!-- Новая строка: пути над панелями (где были красные линии) -->
|
|
<Label Text="{Binding LeftPath}"
|
|
Grid.Row="1" Grid.Column="0"
|
|
Padding="12,6"
|
|
FontSize="14"
|
|
FontAttributes="Bold"
|
|
BackgroundColor="#f0f0f0"
|
|
TextColor="Black"
|
|
VerticalTextAlignment="Center"
|
|
LineBreakMode="MiddleTruncation" />
|
|
|
|
<Label Text="{Binding RightPath}"
|
|
Grid.Row="1" Grid.Column="1"
|
|
Padding="12,6"
|
|
FontSize="14"
|
|
FontAttributes="Bold"
|
|
BackgroundColor="#f0f0f0"
|
|
TextColor="Black"
|
|
VerticalTextAlignment="Center"
|
|
LineBreakMode="MiddleTruncation" />
|
|
|
|
<!-- Левая панель -->
|
|
<CollectionView x:Name="LeftPanel"
|
|
Grid.Row="2" Grid.Column="0"
|
|
ItemsSource="{Binding LeftItems}"
|
|
SelectionMode="None">
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid Padding="10" BackgroundColor="Transparent">
|
|
<HorizontalStackLayout Spacing="10">
|
|
<Image Source="{Binding Icon}" WidthRequest="20" HeightRequest="20" />
|
|
<Label Text="{Binding Name}" VerticalOptions="Center" />
|
|
</HorizontalStackLayout>
|
|
|
|
<Grid.GestureRecognizers>
|
|
<TapGestureRecognizer NumberOfTapsRequired="1" Tapped="OnLeftItemTapped" />
|
|
<TapGestureRecognizer NumberOfTapsRequired="2" Tapped="OnLeftItemDoubleTapped" />
|
|
</Grid.GestureRecognizers>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</CollectionView>
|
|
|
|
<!-- Правая панель -->
|
|
<CollectionView x:Name="RightPanel"
|
|
Grid.Row="2" Grid.Column="1"
|
|
ItemsSource="{Binding RightItems}"
|
|
SelectionMode="None">
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid Padding="10" BackgroundColor="Transparent">
|
|
<HorizontalStackLayout Spacing="10">
|
|
<Image Source="{Binding Icon}" WidthRequest="20" HeightRequest="20" />
|
|
<Label Text="{Binding Name}" VerticalOptions="Center" />
|
|
</HorizontalStackLayout>
|
|
|
|
<Grid.GestureRecognizers>
|
|
<TapGestureRecognizer NumberOfTapsRequired="1" Tapped="OnRightItemTapped" />
|
|
<TapGestureRecognizer NumberOfTapsRequired="2" Tapped="OnRightItemDoubleTapped" />
|
|
</Grid.GestureRecognizers>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</CollectionView>
|
|
|
|
<!-- Адаптивный Toolbar (Footer) -->
|
|
<FlexLayout Grid.Row="3"
|
|
Grid.ColumnSpan="2"
|
|
Padding="10"
|
|
BackgroundColor="#e0e0e0"
|
|
Direction="Row"
|
|
Wrap="Wrap"
|
|
JustifyContent="Center"
|
|
AlignItems="Center">
|
|
|
|
<Button Text="F5 Copy" Clicked="OnCopyClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,8,8" />
|
|
<Button Text="F6 Move" Clicked="OnMoveClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,8,8" />
|
|
<Button Text="F7 Mkdir" Clicked="OnMkdirClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,8,8" />
|
|
<Button Text="F8 Delete" Clicked="OnDeleteClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,8,8" />
|
|
<Button Text="F10 Exit" Clicked="OnExitClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,0,8" />
|
|
|
|
</FlexLayout>
|
|
</Grid>
|
|
</ContentPage> |