правка пути

main
Пилипенко Андрей Борисович 3 weeks ago
parent 31af132b31
commit f630287d35

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
 <?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">
@ -30,7 +30,7 @@
<ScrollView x:Name="LeftScrollView"
Grid.Row="2" Grid.Column="0"
BackgroundColor="White">
<VerticalStackLayout x:Name="LeftPanel" Spacing="0"/>
<VerticalStackLayout x:Name="LeftPanel" Spacing="0"/>
</ScrollView>
<!-- Правая панель -->
@ -55,22 +55,21 @@
<!-- Toolbar -->
<FlexLayout x:Name="ToolbarLayout"
Grid.Row="3"
Grid.ColumnSpan="2"
Padding="10"
BackgroundColor="Transparent"
Direction="Row"
Wrap="Wrap"
JustifyContent="Center"
AlignItems="Center">
<Button x:Name="CopyButton" Text="F5 Copy" Clicked="OnCopyClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,8,8" />
<Button x:Name="MoveButton" Text="F6 Move" Clicked="OnMoveClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,8,8" />
<Button x:Name="MkdirButton" Text="F7 Mkdir" Clicked="OnMkdirClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,8,8" />
<Button x:Name="DeleteButton" Text="F8 Delete" Clicked="OnDeleteClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,8,8" />
<Button x:Name="HomeButton" Text="Home" Clicked="OnHomeClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,8,8" />
<Button x:Name="ExitButton" Text="F10 Exit" Clicked="OnExitClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,0,8" />
Grid.Row="3"
Grid.ColumnSpan="2"
Padding="10"
BackgroundColor="Transparent"
Direction="Row"
Wrap="Wrap"
JustifyContent="Center"
AlignItems="Center">
<Button x:Name="CopyButton" Text="F5 Copy" Clicked="OnCopyClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,8,8" />
<Button x:Name="MoveButton" Text="F6 Move" Clicked="OnMoveClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,8,8" />
<Button x:Name="MkdirButton" Text="F7 Mkdir" Clicked="OnMkdirClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,8,8" />
<Button x:Name="DeleteButton" Text="F8 Delete" Clicked="OnDeleteClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,8,8" />
<Button x:Name="HomeButton" Text="Home" Clicked="OnHomeClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,8,8" />
<Button x:Name="ExitButton" Text="F10 Exit" Clicked="OnExitClicked" Padding="12,6" MinimumWidthRequest="80" Margin="0,0,0,8" />
</FlexLayout>
</Grid>
</ContentPage>
</ContentPage>

@ -1,7 +1,6 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
using CommanderApp.Services;
using Microsoft.Maui.Controls;
namespace CommanderApp;
@ -31,7 +30,7 @@ public partial class MainPage : ContentPage, INotifyPropertyChanged
if (_panelManager.LeftPanelPath != value)
{
_panelManager.UpdatePanelPaths(value, _panelManager.RightPanelPath);
OnPropertyChanged();
NotifyPropertyChanged();
}
}
}
@ -44,7 +43,7 @@ public partial class MainPage : ContentPage, INotifyPropertyChanged
if (_panelManager.RightPanelPath != value)
{
_panelManager.UpdatePanelPaths(_panelManager.LeftPanelPath, value);
OnPropertyChanged();
NotifyPropertyChanged();
}
}
}
@ -580,11 +579,10 @@ public partial class MainPage : ContentPage, INotifyPropertyChanged
private void OnExitClicked(object sender, EventArgs e) => Application.Current?.Quit();
// INotifyPropertyChanged
public event PropertyChangedEventHandler? PropertyChanged;
protected void SetProperty<T>(ref T field, T value, [CallerMemberName] string? propertyName = null)
public new event PropertyChangedEventHandler? PropertyChanged;
protected virtual void NotifyPropertyChanged([CallerMemberName] string? propertyName = null)
{
if (EqualityComparer<T>.Default.Equals(field, value)) return;
field = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}

Loading…
Cancel
Save