Update (Front-End): Project
continuous-integration/drone/push Build is failing Details

pull/2/head
lodufour1 1 year ago
parent 9b98c6e297
commit 17eda607cb

@ -72,9 +72,6 @@
</ItemGroup>
<ItemGroup>
<Compile Update="Composants\ListItemView.xaml.cs">
<DependentUpon>ListItemView.xaml</DependentUpon>
</Compile>
<Compile Update="Composants\RatingView.xaml.cs">
<DependentUpon>RatingView.xaml</DependentUpon>
</Compile>
@ -84,9 +81,6 @@
</ItemGroup>
<ItemGroup>
<MauiXaml Update="Composants\ListItemView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Composants\RatingView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>

@ -1,49 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="BookApp.Composants.ListItemView">
<Grid RowDefinitions="Auto" Margin="25,0,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="25"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0"
Source="{Binding Icone}"
HeightRequest="25"
WidthRequest="25"/>
<Label Grid.Column="1"
Text="{Binding Name}"
FontAttributes="Bold"
Padding="5"
VerticalOptions="Center"/>
<Grid Grid.Column="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0"
Text="{Binding Name}"
FontAttributes="Bold"
Padding="5"
VerticalOptions="Center"
Margin="0,0,30,0"/>
<Button Grid.Column="1"
ImageSource="chevron_right.svg"
HeightRequest="35"
WidthRequest="35"
Command="{Binding Path=BindingContext.ButtonCommand, Source={x:Reference Name=ListItemRoot}}"
HorizontalOptions="End"/>
</Grid>
<BoxView Grid.ColumnSpan="4"
HeightRequest="1"
BackgroundColor="LightGray"
VerticalOptions="End" />
</Grid>
</ContentView>

@ -1,18 +0,0 @@
namespace BookApp.Composants
{
public partial class ListItemView : ContentView
{
public static readonly BindableProperty ButtonCommandProperty = BindableProperty.Create(nameof(ButtonCommand), typeof(Command), typeof(ListItemView));
public Command ButtonCommand
{
get => (Command)GetValue(ButtonCommandProperty);
set => SetValue(ButtonCommandProperty, value);
}
public ListItemView()
{
InitializeComponent();
}
}
}

@ -1,8 +1,6 @@
<?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"
xmlns:viewmodels="clr-namespace:BookApp.ViewModel"
xmlns:composants="clr-namespace:BookApp.Composants"
x:Class="BookApp.Pages.Filtrage"
Title="Filtrage">
@ -31,18 +29,8 @@
<ToolbarItem IconImageSource="plus_icone.svg" Priority="1" Order="Primary" />
</ContentPage.ToolbarItems>
<ContentPage.BindingContext>
<viewmodels:SearchViewModel />
</ContentPage.BindingContext>
<StackLayout>
<SearchBar x:Name="searchBar"
SearchCommand="{Binding PerformSearch}"
SearchCommandParameter="{Binding Text, Source={x:Reference searchBar}}"/>
<ListView x:Name="searchResults"
ItemsSource="{Binding SearchResults}" />
<!-- <composants:ListItemView Icone="{Binding ImageBook}" Name="{Binding Name}" ButtonCommand="{Binding Press}" /> -->
<SearchBar Placeholder="Search items..." />
</StackLayout>
</ContentPage>

@ -5,6 +5,7 @@ namespace BookApp.Pages;
public partial class Filtrage : ContentPage
{
SearchBar searchBar = new SearchBar { Placeholder = "Search items..." };
public TousViewModel Data = new TousViewModel();
public Filtrage()
{

@ -1,46 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using BookApp.Data;
using System.Windows.Input;
using BookApp.Model;
using System.Collections.ObjectModel;
namespace BookApp.ViewModel
{
public class SearchViewModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public ObservableCollection<Book> BookCollection { get; set; } =
new ObservableCollection<Book>();
protected virtual void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
/*
public ICommand PerformSearch => new Command<string>((string query) =>
{
//SearchResults = DataService.GetSearchResults(query);
SearchResults = BookCollection = BookCollection.Select(query);
});
private List<string> searchResults = BookCollection.GetStubData();
public List<string> SearchResults
{
get
{
return searchResults;
}
set
{
searchResults = value;
NotifyPropertyChanged();
}
}*/
}
}
Loading…
Cancel
Save