|
|
|
|
@ -4,43 +4,46 @@
|
|
|
|
|
x:Class="CommanderApp.MainPage"
|
|
|
|
|
Title="MAUI Commander">
|
|
|
|
|
|
|
|
|
|
<Grid RowDefinitions="Auto, *, Auto" ColumnDefinitions="*, *">
|
|
|
|
|
<!-- Заголовки панелей -->
|
|
|
|
|
<!-- Изменяем RowDefinitions: добавляем строку под заголовком -->
|
|
|
|
|
<Grid RowDefinitions="Auto, Auto, *, Auto" ColumnDefinitions="*, *">
|
|
|
|
|
<!-- Новая строка: пути над панелями (где были красные линии) -->
|
|
|
|
|
<Label Text="{Binding LeftPath}"
|
|
|
|
|
Grid.Row="0" Grid.Column="0"
|
|
|
|
|
Padding="10" FontAttributes="Bold" BackgroundColor="#f0f0f0"/>
|
|
|
|
|
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="0" Grid.Column="1"
|
|
|
|
|
Padding="10" FontAttributes="Bold" BackgroundColor="#f0f0f0"/>
|
|
|
|
|
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="1" Grid.Column="0"
|
|
|
|
|
Grid.Row="2" Grid.Column="0"
|
|
|
|
|
ItemsSource="{Binding LeftItems}"
|
|
|
|
|
SelectionMode="Single"
|
|
|
|
|
SelectionChanged="OnLeftSelectionChanged">
|
|
|
|
|
SelectionMode="None">
|
|
|
|
|
<CollectionView.ItemTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<Grid Padding="10" Background="Transparent">
|
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
|
|
|
<VisualStateGroup Name="CommonStates">
|
|
|
|
|
<VisualState Name="Selected">
|
|
|
|
|
<VisualState.Setters>
|
|
|
|
|
<Setter Property="BackgroundColor" Value="#d0e0ff" />
|
|
|
|
|
</VisualState.Setters>
|
|
|
|
|
</VisualState>
|
|
|
|
|
<VisualState Name="Normal">
|
|
|
|
|
<VisualState.Setters>
|
|
|
|
|
<Setter Property="BackgroundColor" Value="Transparent" />
|
|
|
|
|
</VisualState.Setters>
|
|
|
|
|
</VisualState>
|
|
|
|
|
</VisualStateGroup>
|
|
|
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
@ -48,39 +51,28 @@
|
|
|
|
|
|
|
|
|
|
<!-- Правая панель -->
|
|
|
|
|
<CollectionView x:Name="RightPanel"
|
|
|
|
|
Grid.Row="1" Grid.Column="1"
|
|
|
|
|
Grid.Row="2" Grid.Column="1"
|
|
|
|
|
ItemsSource="{Binding RightItems}"
|
|
|
|
|
SelectionMode="Single"
|
|
|
|
|
SelectionChanged="OnRightSelectionChanged">
|
|
|
|
|
SelectionMode="None">
|
|
|
|
|
<CollectionView.ItemTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<Grid Padding="10" Background="Transparent">
|
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
|
|
|
<VisualStateGroup Name="CommonStates">
|
|
|
|
|
<VisualState Name="Selected">
|
|
|
|
|
<VisualState.Setters>
|
|
|
|
|
<Setter Property="BackgroundColor" Value="#d0e0ff" />
|
|
|
|
|
</VisualState.Setters>
|
|
|
|
|
</VisualState>
|
|
|
|
|
<VisualState Name="Normal">
|
|
|
|
|
<VisualState.Setters>
|
|
|
|
|
<Setter Property="BackgroundColor" Value="Transparent" />
|
|
|
|
|
</VisualState.Setters>
|
|
|
|
|
</VisualState>
|
|
|
|
|
</VisualStateGroup>
|
|
|
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
|
|
|
|
|
|
<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="2"
|
|
|
|
|
<FlexLayout Grid.Row="3"
|
|
|
|
|
Grid.ColumnSpan="2"
|
|
|
|
|
Padding="10"
|
|
|
|
|
BackgroundColor="#e0e0e0"
|
|
|
|
|
@ -89,8 +81,7 @@
|
|
|
|
|
JustifyContent="Center"
|
|
|
|
|
AlignItems="Center">
|
|
|
|
|
|
|
|
|
|
<Button Text="F5 Copy" Clicked="OnCopyClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,8
|
|
|
|
|
,8" />
|
|
|
|
|
<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" />
|
|
|
|
|
|