Binding essai encore
continuous-integration/drone/push Build was killed Details

developpement
Liam MONCHANIN 2 years ago
parent ff86a3943d
commit 87533de711

@ -21,8 +21,8 @@ namespace Biblioteque_de_Class
public Database LoadDatabaseData()
{
db = persistence.LoadDatabaseData();
db.SetDefaultThemeList(persistence.LoadDefaultTheme());
db.SetDefaultLogoList(persistence.LoadDefaultLogo());
//db.SetDefaultThemeList(persistence.LoadDefaultTheme());
//db.SetDefaultLogoList(persistence.LoadDefaultLogo());
return db;
}
}

@ -28,10 +28,10 @@ namespace Notus_Persistance
database.AddUser(new User("Nicolas", "leHeros@gmail.com", "Feur"));
database.AddUser(new User("Benjamin", "labsent@gmail.com", "Moto2005"));
database.AddUser(new User("Liam", "liammonchanin@gmail.com", "Baguette"));
database.AddUser(new User("Brigitte", "Macroutte@gmail.com", "49Trois"));
database.AddUser(new User("Brigitte", "Brigitte@gmail.com", "493"));
// add some notes and tags to go faster
foreach(User user in database.GetUserList().Where(x => x.GetUsername().Contains("m")))
foreach (User user in database.GetUserList().Where(x => x.GetUsername().Contains("a")))
{
user.CreateNote("Note 1", "");
user.CreateNote("Note 2", "");
@ -41,14 +41,22 @@ namespace Notus_Persistance
}
// add note to user for sharing note test mixed with tag
uselect = (User)database.GetUserList().Where(x => x.GetUsername() == "Nicolas");
foreach (User user in database.GetUserList())
{
if (user.GetEmail().Equals("leHeros@gmail.com") && user.GetUsername().Equals("Nicolas") && user.GetPassword().Equals("Feur"))
{
uselect = user;
uselect.CreateNote("Note 4", "Logo_1");
uselect.CreateTag("Tag 3", "#00FF00");
nselect = (Note)uselect.GetNoteList().Where(x => x.GetName() == "Note 4");
uselect.AddTagToNoteList(nselect, (Tags)uselect.GetTagList().Where(x => x.GetName() == "Tag 3"));
nselect.AddCollaborator(uselect,(User)database.GetUserList().Where(x => x.GetUsername() == "Benjamin"));
uselect = (User)database.GetUserList().Where(x => x.GetUsername() == "Benjamin");
//nselect = (Note)uselect.GetNoteList().Where(x => x.GetName() == "Note 4");
//uselect.AddTagToNoteList(nselect, (Tags)uselect.GetTagList().Where(x => x.GetName() == "Tag 3"));
//nselect.AddCollaborator(uselect, (User)database.GetUserList().Where(x => x.GetUsername() == "Benjamin"));
//uselect = (User)database.GetUserList().Where(x => x.GetUsername() == "Benjamin");
uselect.CreateTag("Tag 4", "#FF0000");
}
}
// add some default logos and themes
database.GetDefaultLogoList().Add(new Logo("Logo_1", "logo"));

@ -6,7 +6,10 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Notus_Vue", "notus_vue\Notus_Vue.csproj", "{561264A1-4611-40FB-A662-3EF65550CA71}"
ProjectSection(ProjectDependencies) = postProject
{184478A9-E14F-42E0-B963-B3A4474C9C1C} = {184478A9-E14F-42E0-B963-B3A4474C9C1C}
{7B7F1062-9498-44E5-AC77-84BC90A3B730} = {7B7F1062-9498-44E5-AC77-84BC90A3B730}
{92DD50C5-EEAD-44ED-AEFF-E21935725477} = {92DD50C5-EEAD-44ED-AEFF-E21935725477}
{AFCEAA99-3A25-4E9E-B498-72DD76A6B7FF} = {AFCEAA99-3A25-4E9E-B498-72DD76A6B7FF}
{EE443C17-B31D-4AD0-9141-920876E7DF79} = {EE443C17-B31D-4AD0-9141-920876E7DF79}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Biblioteque_de_Class", "Biblioteque_de_Class\Biblioteque_de_Class.csproj", "{92DD50C5-EEAD-44ED-AEFF-E21935725477}"

@ -6,7 +6,8 @@
xmlns:local="clr-namespace:notus"
Shell.FlyoutBehavior="Locked"
Shell.FlyoutWidth="30"
Shell.NavBarIsVisible="False">
Shell.NavBarIsVisible="True"
Shell.BackgroundColor="Grey">
<ShellContent
Title="main_page"
@ -28,5 +29,9 @@
ContentTemplate="{DataTemplate local:InscrPage}"
Route="InscrPage"/>
<ShellContent
Title="ProfilPage"
ContentTemplate="{DataTemplate local:ProfilPage}"
Route="ProfilPage"/>
</Shell>

@ -0,0 +1,74 @@
<?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:toolkit="http://schemas.microsoft.com/dodnet/2022/maui/toolkit"
x:Class="notus.ProfilPage"
Title="ProfilPage"
BackgroundColor="#1C1C1C">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="1.5*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button
Text="Modifier Profil"
TextColor="#74fabd"
BackgroundColor="#4A4A4A"
Grid.Column="1"
Grid.Row="4"
VerticalOptions="Center"
HeightRequest="80"
FontSize="30"
/>
<Button
Text="Modifier Theme"
TextColor="#74fabd"
BackgroundColor="#4A4A4A"
Grid.Column="1"
Grid.Row="5"
FontSize="30"
VerticalOptions="Start"
HeightRequest="80"
/>
<Label
Text="Profil"
FontSize="30"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"
TextColor="#74fabd"
BackgroundColor="#4A4A4A"
Grid.Column="1"
Grid.Row="3"
VerticalOptions="End"
HeightRequest="80"
/>
<ImageButton
Source="profil.png"
Aspect="AspectFit"
Grid.Column="1"
Grid.Row="2"
WidthRequest="550"
HeightRequest="250"
BackgroundColor="#6E6E6E"
CornerRadius="10"
Clicked="ProfilClicked"
/>
</Grid>
</ContentPage>

@ -0,0 +1,17 @@
using Microsoft.Maui.Controls;
using Biblioteque_de_Class;
using Notus_Persistance;
namespace notus;
public partial class ProfilPage : ContentPage
{
public ProfilPage()
{
InitializeComponent();
}
void ProfilClicked(System.Object sender, System.EventArgs e)
{
}
}

@ -60,8 +60,8 @@
CornerRadius="50"
/>
<Label
Text="Nom de la note"
<Label x:Name="NomNote"
Text="{Binding Name}"
Grid.Column="1"
Grid.Row="0"
TextColor="#74fabd"
@ -72,7 +72,6 @@
HeightRequest="50"
HorizontalOptions="Center"
VerticalOptions="Start"
BindingContext="NomDeLaNoteSelected"
/>
<ImageButton
@ -104,10 +103,11 @@
PlaceholderColor="#74fabd"
/>
<VerticalStackLayout
<ListView x:Name="ListNote"
Grid.Column="0"
Grid.Row="2"
Grid.RowSpan="5"
BindingContext="ARefaire"
ItemsSource="{Binding NoteList}"
/>
<Editor

@ -1,24 +1,19 @@
using Microsoft.Maui.Controls;
using Biblioteque_de_Class;
using Notus_Persistance;
namespace notus;
public partial class RecherPage : ContentPage
{
public PersistenceManager manager { get; private set; } = new PersistenceManager(new Stub());
public RecherPage()
{
manager.LoadDatabaseData();
InitializeComponent();
ListNote.BindingContext = manager;
NomNote.BindingContext = manager;
}
void ProfilClicked()
{
}
void EditCLicked()
{
}
void SuppClicked()
{
}
}

@ -53,6 +53,14 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Biblioteque_de_Class\Biblioteque_de_Class.csproj" />
<ProjectReference Include="..\Notus_Persistence\Notus_Persistance.csproj" />
<ProjectReference Include="..\Tests\Notus_UnitTest_Database\Notus_UnitTest_Database.csproj" />
<ProjectReference Include="..\Tests\Notus_UnitTest_Note\Notus_UnitTest_Note.csproj" />
<ProjectReference Include="..\Tests\Notus_UnitTest_User\Notus_UnitTest_User.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="ConnecPage.xaml.cs">
<DependentUpon>ConnecPage.xaml</DependentUpon>
@ -60,6 +68,9 @@
<Compile Update="InscrPage.xaml.cs">
<DependentUpon>InscrPage.xaml</DependentUpon>
</Compile>
<Compile Update="ProfilPage.xaml.cs">
<DependentUpon>ProfilPage.xaml</DependentUpon>
</Compile>
<Compile Update="RecherPage.xaml.cs">
<DependentUpon>RecherPage.xaml</DependentUpon>
</Compile>
@ -72,6 +83,9 @@
<MauiXaml Update="InscrPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="ProfilPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="RecherPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>

Loading…
Cancel
Save