правка пути

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

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>  <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="CommanderApp.MainPage" x:Class="CommanderApp.MainPage"
Title="MAUI Commander"> Title="MAUI Commander">
@ -30,7 +30,7 @@
<ScrollView x:Name="LeftScrollView" <ScrollView x:Name="LeftScrollView"
Grid.Row="2" Grid.Column="0" Grid.Row="2" Grid.Column="0"
BackgroundColor="White"> BackgroundColor="White">
<VerticalStackLayout x:Name="LeftPanel" Spacing="0"/> <VerticalStackLayout x:Name="LeftPanel" Spacing="0"/>
</ScrollView> </ScrollView>
<!-- Правая панель --> <!-- Правая панель -->
@ -55,22 +55,21 @@
<!-- Toolbar --> <!-- Toolbar -->
<FlexLayout x:Name="ToolbarLayout" <FlexLayout x:Name="ToolbarLayout"
Grid.Row="3" Grid.Row="3"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Padding="10" Padding="10"
BackgroundColor="Transparent" BackgroundColor="Transparent"
Direction="Row" Direction="Row"
Wrap="Wrap" Wrap="Wrap"
JustifyContent="Center" JustifyContent="Center"
AlignItems="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" />
<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> </FlexLayout>
</Grid> </Grid>
</ContentPage> </ContentPage>

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

Loading…
Cancel
Save