fixed merge
continuous-integration/drone/push Build was killed
Details
continuous-integration/drone/push Build was killed
Details
commit
907eb84ba0
@ -0,0 +1,9 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -1,205 +1,184 @@
|
|||||||
|
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
namespace Model
|
|
||||||
{
|
namespace Model
|
||||||
/// <summary>
|
{
|
||||||
/// A user is an entity with a _name, a surname, mail, profilePict and a list of priority.
|
/// <summary>
|
||||||
/// This user can login with an Id and a password
|
/// A user is an entity with a name, a surname, mail, profilePict and a list of priority.
|
||||||
/// </summary>
|
/// This user can login with an Id and a password
|
||||||
[DataContract(Name = "user")]
|
/// </summary>
|
||||||
public class User : IEquatable<User> , INotifyPropertyChanged
|
[DataContract(Name = "user")]
|
||||||
{
|
public class User : IEquatable<User> , INotifyPropertyChanged
|
||||||
#region Private Attributes
|
{
|
||||||
|
#region Private Attributes
|
||||||
[DataMember] private string name="";
|
[DataMember] private string _name = "";
|
||||||
[DataMember] private string surname="";
|
[DataMember] private string _surname = "";
|
||||||
[DataMember] private string mail = "";
|
[DataMember] private string _mail = "";
|
||||||
[DataMember] private string picture = "";
|
|
||||||
[DataMember] private string password = "";
|
[DataMember(Name = "priorities")]
|
||||||
[DataMember] private List<Priority> priorities;
|
public ObservableCollection<Priority> _priorities { get; private set; } = new ObservableCollection<Priority>
|
||||||
|
{
|
||||||
public event PropertyChangedEventHandler? PropertyChanged;
|
Priority.Gourmet,
|
||||||
#endregion
|
Priority.Economic,
|
||||||
|
Priority.Fast,
|
||||||
#region Properties
|
Priority.Light,
|
||||||
|
Priority.Easy
|
||||||
/// <summary>
|
};
|
||||||
/// Property to get Name of users and a setter
|
|
||||||
/// </summary>
|
public event PropertyChangedEventHandler? PropertyChanged;
|
||||||
/// <exception cref="ArgumentException" >Setter have Exception which is trigger when Name is null</exception>
|
#endregion
|
||||||
public string Name
|
|
||||||
{
|
#region Properties
|
||||||
get { return name; }
|
/// <summary>
|
||||||
set
|
/// Property to get Name of users and a setter
|
||||||
{
|
/// </summary>
|
||||||
|
/// <exception cref="ArgumentException" >Setter have Exception which is trigger when Name is null</exception>
|
||||||
name = value;
|
public string Name
|
||||||
OnPropertyChanged();
|
{
|
||||||
}
|
get { return _name; }
|
||||||
}
|
set
|
||||||
|
{
|
||||||
/// <summary>
|
|
||||||
/// Property to get Surname of users and a setter
|
_name = value;
|
||||||
/// </summary>
|
OnPropertyChanged();
|
||||||
/// <exception cref="ArgumentException" >Setter have Exception which is trigger when Surname is null</exception>
|
}
|
||||||
public string Surname
|
}
|
||||||
{
|
|
||||||
get { return surname; }
|
/// <summary>
|
||||||
set
|
/// Property to get Surname of users and a setter
|
||||||
{
|
/// </summary>
|
||||||
|
/// <exception cref="ArgumentException" >Setter have Exception which is trigger when Surname is null</exception>
|
||||||
surname = value;
|
public string Surname
|
||||||
OnPropertyChanged();
|
{
|
||||||
}
|
get { return _surname; }
|
||||||
}
|
set
|
||||||
|
{
|
||||||
/// <summary>
|
|
||||||
/// Property to get mail of users and a setter
|
_surname = value;
|
||||||
/// </summary>
|
OnPropertyChanged();
|
||||||
/// <exception cref="ArgumentException" >User's mail will serve to log the user. So there's no setter, just an init. User will enter one time his email at his
|
}
|
||||||
/// account creation.</exception>
|
}
|
||||||
public string Mail
|
|
||||||
{
|
/// <summary>
|
||||||
get { return mail; }
|
/// Property to get mail of users and a setter
|
||||||
private init
|
/// </summary>
|
||||||
{
|
/// <exception cref="ArgumentException" >User's mail will serve to log the user. So there's no setter, just an init. User will enter one time his email at his
|
||||||
if (string.IsNullOrWhiteSpace(value))
|
/// account creation.</exception>
|
||||||
{
|
public string Mail
|
||||||
throw new ArgumentException("Impossible d'avoir un champ Email vide!");
|
{
|
||||||
}
|
get { return _mail; }
|
||||||
mail = value;
|
private init
|
||||||
}
|
{
|
||||||
}
|
if (string.IsNullOrWhiteSpace(value))
|
||||||
|
{
|
||||||
public string Password
|
throw new ArgumentException("Impossible d'avoir un champ Email vide!");
|
||||||
{
|
}
|
||||||
get => password;
|
_mail = value;
|
||||||
set => password = value;
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
|
/// The user's hashed password. The hashed method is defined with the PasswordManager.
|
||||||
/// <summary>
|
/// <br/>See: <see cref="IPasswordManager"/>.
|
||||||
/// For now, we define the ProfilPict as a string which is "PhotoParDefaut"
|
/// </summary>
|
||||||
/// when the value is null.
|
[DataMember(Name = "hashedpass")]
|
||||||
/// </summary>
|
public string Password { get; private set; } = "";
|
||||||
public string ProfilPict
|
|
||||||
{
|
/// <summary>
|
||||||
get => picture;
|
/// For now, we define the ProfilePict as a string which is "PhotoParDefaut"
|
||||||
set => picture = value;
|
/// when the value is null.
|
||||||
|
/// </summary>
|
||||||
}
|
[DataMember(Name = "profilepic")]
|
||||||
|
public string ProfilePict { get; private set; } = "default_picture.png";
|
||||||
/// <summary>
|
|
||||||
/// This is the list of priorities specific tu the user. This list is initiate
|
/// <summary>
|
||||||
/// by default. User could change it at will.
|
/// This is the list of priorities specific tu the user. This list is initiate
|
||||||
/// </summary>
|
/// by default. User could change it at will.
|
||||||
|
/// </summary>
|
||||||
public List<Priority> Priorities
|
public ReadOnlyObservableCollection<Priority> Priorities { get; private set; }
|
||||||
{
|
#endregion
|
||||||
get => priorities;
|
|
||||||
set=> priorities = value;
|
#region Methods
|
||||||
}
|
public override bool Equals(object? other)
|
||||||
|
{
|
||||||
public override bool Equals(object? other)
|
if (ReferenceEquals(other, null)) return false;
|
||||||
{
|
if (ReferenceEquals(other, this)) return true;
|
||||||
if (other == null) return false;
|
if (GetType() != other.GetType()) return false;
|
||||||
if (other == this) return true;
|
|
||||||
return Equals(other);
|
return Equals(other as User);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Equals(User? other)
|
public bool Equals(User? other)
|
||||||
{
|
{
|
||||||
if (other == null) return false;
|
if (other == null) return false;
|
||||||
return Name.Equals(other.Name) && Surname.Equals(other.Surname) && Mail.Equals(other.Mail);
|
if (other == this) return true;
|
||||||
}
|
|
||||||
|
return Name.Equals(other.Name) && Surname.Equals(other.Surname) && Mail.Equals(other.Mail);
|
||||||
public override int GetHashCode()
|
}
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
public override int GetHashCode()
|
||||||
}
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
protected void OnPropertyChanged ([CallerMemberName] string? propertyName = null)
|
|
||||||
{
|
protected void OnPropertyChanged([CallerMemberName] string? propertyName = null)
|
||||||
if (PropertyChanged != null)
|
{
|
||||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
if (PropertyChanged != null)
|
||||||
}
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||||
|
}
|
||||||
public override string ToString()
|
|
||||||
{
|
public override string ToString()
|
||||||
return $"{Name} {Surname}";
|
{
|
||||||
}
|
return $"{Name} {Surname}";
|
||||||
|
}
|
||||||
[DataMember(Name = "passmgr")]
|
#endregion
|
||||||
public IPasswordManager psswMgr { get; private set; }
|
|
||||||
|
#region Constructors
|
||||||
|
/// <summary>
|
||||||
#endregion
|
/// Construtors of user.
|
||||||
|
/// </summary>
|
||||||
#region Constructors
|
/// <param name="name">The name of the user</param>
|
||||||
|
/// <param name="surname">The surname of the user</param>
|
||||||
/// <summary>
|
/// <param name="mail">The user needs an email to login.</param>
|
||||||
/// Construtors of user.
|
/// <param name="hashedPassword">The password of the new user.</param>
|
||||||
/// </summary>
|
public User(string name, string surname, string mail, string hashedPassword)
|
||||||
/// <param name="name">The name of the user</param>
|
{
|
||||||
/// <param name="surname">The surname of the user</param>
|
Name = name;
|
||||||
/// <param name="mail">The user needs an email to login.</param>
|
Surname = surname;
|
||||||
/// <param name="password">The password of the new user.</param>
|
Mail = mail;
|
||||||
/// <param name="passwordManager">The password manager to manage the user password.</param>
|
Password = hashedPassword;
|
||||||
public User(string name, string surname, string mail, string password, IPasswordManager passwordManager)
|
Priorities = new ReadOnlyObservableCollection<Priority>(_priorities);
|
||||||
{
|
}
|
||||||
Name = name;
|
|
||||||
Surname = surname;
|
/// <inheritdoc cref="User.User"/>
|
||||||
Mail = mail;
|
/// <param name="profilePict">Profile picture of the new user.</param>
|
||||||
psswMgr = passwordManager;
|
public User(string name, string surname, string mail, string hashedPassword, string profilePict)
|
||||||
Password = psswMgr.HashPassword(password);
|
: this(name, surname, mail, hashedPassword)
|
||||||
priorities = new List<Priority> {
|
{
|
||||||
Priority.Gourmet,
|
ProfilePict = profilePict;
|
||||||
Priority.Economic,
|
}
|
||||||
Priority.Fast,
|
|
||||||
Priority.Light,
|
/// <inheritdoc cref="User.User"/>
|
||||||
Priority.Easy};
|
public User()
|
||||||
ProfilPict = picture;
|
: this("John", "Doe", "truc@gmail.com", "mdp")
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc cref="User.User"/>
|
||||||
/// <inheritdoc cref="User.User"/>
|
/// <param name="user">The user to copy.</param>
|
||||||
/// </summary>
|
public User(User user)
|
||||||
public User(string name, string surname, string mail, string password)
|
{
|
||||||
: this(name, surname,mail, password, new PasswordSHA256())
|
Name = user.Name;
|
||||||
{
|
Surname = user.Surname;
|
||||||
|
Mail = user.Mail;
|
||||||
}
|
Password = user.Password;
|
||||||
|
_priorities = user._priorities;
|
||||||
/// <summary>
|
Priorities = new ReadOnlyObservableCollection<Priority>(_priorities);
|
||||||
/// <inheritdoc cref="User.User"/>
|
ProfilePict = user.ProfilePict;
|
||||||
/// </summary>
|
}
|
||||||
public User()
|
#endregion
|
||||||
: this("John", "Doe", "truc@gmail.com", "mdp")
|
}
|
||||||
{
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <inheritdoc cref="User.User"/>
|
|
||||||
/// </summary>
|
|
||||||
public User (User user)
|
|
||||||
{
|
|
||||||
Name = user.Name;
|
|
||||||
Surname = user.Surname;
|
|
||||||
Mail = user.Mail;
|
|
||||||
psswMgr = user.psswMgr;
|
|
||||||
Password = user.Password;
|
|
||||||
priorities = user.Priorities;
|
|
||||||
ProfilPict = user.ProfilPict;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,14 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\Managers\Managers.csproj" />
|
||||||
|
<ProjectReference Include="..\..\Model\Model.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -1,55 +1,77 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.5.33516.290
|
VisualStudioVersion = 17.5.33516.290
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp", "ConsoleApp\ConsoleApp.csproj", "{666C2211-8EBB-4FC8-9484-CB93BC854153}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp", "ConsoleApp\ConsoleApp.csproj", "{666C2211-8EBB-4FC8-9484-CB93BC854153}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Model", "Model\Model.csproj", "{42FF86BD-92F9-4A32-A938-68515905378F}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Model", "Model\Model.csproj", "{42FF86BD-92F9-4A32-A938-68515905378F}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Views", "Views\Views.csproj", "{508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Views", "Views\Views.csproj", "{508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Model_UnitTests", "Tests\Model_UnitTests\Model_UnitTests.csproj", "{45AB746A-194B-4E43-81EB-83B06F35AA33}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Model_UnitTests", "Tests\Model_UnitTests\Model_UnitTests.csproj", "{45AB746A-194B-4E43-81EB-83B06F35AA33}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{08B80CE8-A01D-4D86-8989-AF225D5DA48C}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{08B80CE8-A01D-4D86-8989-AF225D5DA48C}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataPersistence", "DataPersistence\DataPersistence.csproj", "{432F9D12-B1F7-4A79-8720-4971BB10B831}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataPersistence", "Persistance\DataPersistence\DataPersistence.csproj", "{432F9D12-B1F7-4A79-8720-4971BB10B831}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Managers", "Managers\Managers.csproj", "{A3703A19-687C-4F63-A5DE-18E6D8995C77}"
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
EndProject
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppException", "AppException\AppException.csproj", "{77E6BD97-B1E5-45F5-ABFB-9A1D985A8EDE}"
|
||||||
Release|Any CPU = Release|Any CPU
|
EndProject
|
||||||
EndGlobalSection
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FakePersistance", "Persistance\FakePersistance\FakePersistance.csproj", "{7C340CB2-8925-4BC4-9D8C-9058D9657F3F}"
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
EndProject
|
||||||
{666C2211-8EBB-4FC8-9484-CB93BC854153}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Persistance", "Persistance", "{F6413DA3-CE67-4097-8FF7-8D221AF2A5E8}"
|
||||||
{666C2211-8EBB-4FC8-9484-CB93BC854153}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
EndProject
|
||||||
{666C2211-8EBB-4FC8-9484-CB93BC854153}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
Global
|
||||||
{666C2211-8EBB-4FC8-9484-CB93BC854153}.Release|Any CPU.Build.0 = Release|Any CPU
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
{42FF86BD-92F9-4A32-A938-68515905378F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
{42FF86BD-92F9-4A32-A938-68515905378F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
{42FF86BD-92F9-4A32-A938-68515905378F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
EndGlobalSection
|
||||||
{42FF86BD-92F9-4A32-A938-68515905378F}.Release|Any CPU.Build.0 = Release|Any CPU
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{666C2211-8EBB-4FC8-9484-CB93BC854153}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{666C2211-8EBB-4FC8-9484-CB93BC854153}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
{666C2211-8EBB-4FC8-9484-CB93BC854153}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{666C2211-8EBB-4FC8-9484-CB93BC854153}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Release|Any CPU.Build.0 = Release|Any CPU
|
{42FF86BD-92F9-4A32-A938-68515905378F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
{42FF86BD-92F9-4A32-A938-68515905378F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{45AB746A-194B-4E43-81EB-83B06F35AA33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{42FF86BD-92F9-4A32-A938-68515905378F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{45AB746A-194B-4E43-81EB-83B06F35AA33}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{42FF86BD-92F9-4A32-A938-68515905378F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{45AB746A-194B-4E43-81EB-83B06F35AA33}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{45AB746A-194B-4E43-81EB-83B06F35AA33}.Release|Any CPU.Build.0 = Release|Any CPU
|
{508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{432F9D12-B1F7-4A79-8720-4971BB10B831}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||||
{432F9D12-B1F7-4A79-8720-4971BB10B831}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{432F9D12-B1F7-4A79-8720-4971BB10B831}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{432F9D12-B1F7-4A79-8720-4971BB10B831}.Release|Any CPU.Build.0 = Release|Any CPU
|
{508B5600-AFD0-4AE4-A3CF-5FA8BE3ECE75}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
{45AB746A-194B-4E43-81EB-83B06F35AA33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
{45AB746A-194B-4E43-81EB-83B06F35AA33}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
HideSolutionNode = FALSE
|
{45AB746A-194B-4E43-81EB-83B06F35AA33}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
EndGlobalSection
|
{45AB746A-194B-4E43-81EB-83B06F35AA33}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
GlobalSection(NestedProjects) = preSolution
|
{432F9D12-B1F7-4A79-8720-4971BB10B831}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{45AB746A-194B-4E43-81EB-83B06F35AA33} = {08B80CE8-A01D-4D86-8989-AF225D5DA48C}
|
{432F9D12-B1F7-4A79-8720-4971BB10B831}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
EndGlobalSection
|
{432F9D12-B1F7-4A79-8720-4971BB10B831}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
{432F9D12-B1F7-4A79-8720-4971BB10B831}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
SolutionGuid = {ADEA5603-1EF6-4D43-9493-7D6D9DE7FA3F}
|
{A3703A19-687C-4F63-A5DE-18E6D8995C77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
EndGlobalSection
|
{A3703A19-687C-4F63-A5DE-18E6D8995C77}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
EndGlobal
|
{A3703A19-687C-4F63-A5DE-18E6D8995C77}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{A3703A19-687C-4F63-A5DE-18E6D8995C77}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{77E6BD97-B1E5-45F5-ABFB-9A1D985A8EDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{77E6BD97-B1E5-45F5-ABFB-9A1D985A8EDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{77E6BD97-B1E5-45F5-ABFB-9A1D985A8EDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{77E6BD97-B1E5-45F5-ABFB-9A1D985A8EDE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{7C340CB2-8925-4BC4-9D8C-9058D9657F3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{7C340CB2-8925-4BC4-9D8C-9058D9657F3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{7C340CB2-8925-4BC4-9D8C-9058D9657F3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{7C340CB2-8925-4BC4-9D8C-9058D9657F3F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(NestedProjects) = preSolution
|
||||||
|
{45AB746A-194B-4E43-81EB-83B06F35AA33} = {08B80CE8-A01D-4D86-8989-AF225D5DA48C}
|
||||||
|
{432F9D12-B1F7-4A79-8720-4971BB10B831} = {F6413DA3-CE67-4097-8FF7-8D221AF2A5E8}
|
||||||
|
{7C340CB2-8925-4BC4-9D8C-9058D9657F3F} = {F6413DA3-CE67-4097-8FF7-8D221AF2A5E8}
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {ADEA5603-1EF6-4D43-9493-7D6D9DE7FA3F}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
|
@ -1,89 +1,89 @@
|
|||||||
<?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"
|
||||||
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
||||||
xmlns:local="clr-namespace:Views"
|
xmlns:local="clr-namespace:Views"
|
||||||
xmlns:model="clr-namespace:Model;assembly=Model"
|
xmlns:model="clr-namespace:Model;assembly=Model"
|
||||||
x:Class="Views.Home"
|
x:Class="Views.Home"
|
||||||
x:Name="homepage">
|
x:Name="homepage">
|
||||||
|
|
||||||
<local:ContainerBase
|
<local:ContainerBase x:Name="container_base"
|
||||||
IsNotConnected="{Binding IsNotConnected, Source={x:Reference homepage}}"
|
NeedReturn="False">
|
||||||
NeedReturn="{Binding NeedReturn, Source={x:Reference homepage}}">
|
|
||||||
|
<!-- Flyout -->
|
||||||
<!-- Flyout -->
|
<local:ContainerBase.MyFlyoutContent>
|
||||||
<local:ContainerBase.MyFlyoutContent>
|
<VerticalStackLayout Grid.Row="1">
|
||||||
<VerticalStackLayout Grid.Row="1">
|
<!-- Research -->
|
||||||
<!-- Research -->
|
<Label
|
||||||
<Label
|
Text="Recherche de recettes :" FontSize="14"
|
||||||
Text="Recherche de recettes :" FontSize="14"
|
Margin="20, 10, 15, 0"/>
|
||||||
Margin="20, 10, 15, 0"/>
|
<SearchBar
|
||||||
<SearchBar
|
Placeholder="Mots-clés (ex.: rapide, fromage)"
|
||||||
Placeholder="Mots-clés (ex.: rapide, fromage)"
|
TextColor="Black"
|
||||||
FontAttributes="Italic" TextColor="Black"
|
BackgroundColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Gray300}}"
|
||||||
BackgroundColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Gray300}}"
|
Margin="15, 10, 15, 40"
|
||||||
Margin="15, 10, 15, 40"
|
SearchButtonPressed="SearchBar_SearchButtonPressed"/>
|
||||||
SearchButtonPressed="SearchBar_SearchButtonPressed"/>
|
|
||||||
|
<!-- Direct research -->
|
||||||
<!-- Direct research -->
|
<Button
|
||||||
<Button
|
Text="Toutes les recettes"
|
||||||
Text="Toutes les recettes"
|
ImageSource="home_icon.png"
|
||||||
ImageSource="home_icon.png"
|
Style="{StaticResource button1}"
|
||||||
Style="{StaticResource button1}"
|
Clicked="AllRecipes_Clicked"/>
|
||||||
Clicked="AllRecipes_Clicked"/>
|
<Button
|
||||||
<Button
|
Text="Entrées"
|
||||||
Text="Entrées"
|
ImageSource="flatware_icon.png"
|
||||||
ImageSource="flatware_icon.png"
|
Style="{StaticResource button1}"
|
||||||
Style="{StaticResource button1}"
|
Clicked="Entrees_Clicked"/>
|
||||||
Clicked="Entrees_Clicked"/>
|
<Button
|
||||||
<Button
|
Text="Plats"
|
||||||
Text="Plats"
|
ImageSource="room_service_icon.png"
|
||||||
ImageSource="room_service_icon.png"
|
Style="{StaticResource button1}"
|
||||||
Style="{StaticResource button1}"
|
Clicked="Plats_Clicked"/>
|
||||||
Clicked="Plats_Clicked"/>
|
<Button
|
||||||
<Button
|
Text="Desserts"
|
||||||
Text="Desserts"
|
ImageSource="coffee_icon.png"
|
||||||
ImageSource="coffee_icon.png"
|
Style="{StaticResource button1}"
|
||||||
Style="{StaticResource button1}"
|
Clicked="Desserts_Clicked"/>
|
||||||
Clicked="Desserts_Clicked"/>
|
</VerticalStackLayout>
|
||||||
</VerticalStackLayout>
|
</local:ContainerBase.MyFlyoutContent>
|
||||||
</local:ContainerBase.MyFlyoutContent>
|
|
||||||
|
<!-- Master -->
|
||||||
<!-- Master -->
|
<local:ContainerBase.MyContent>
|
||||||
<local:ContainerBase.MyContent>
|
<ScrollView>
|
||||||
<ScrollView>
|
<StackLayout BindingContext="{Binding ., Source={x:Reference homepage}}"
|
||||||
<StackLayout BindingContext="{Binding RecipesDisplayed}" MinimumWidthRequest="400">
|
MinimumWidthRequest="400">
|
||||||
<!--Modification du prof apportée sur le stacklayout pour empecher l'affichage d'une seule case recipe-->
|
<!--Modification du prof apportée sur le stacklayout pour empecher l'affichage d'une seule case recipe-->
|
||||||
<Label
|
<Label
|
||||||
Text="{Binding Description}"
|
Text="{Binding RecipesDisplayed.Description}"
|
||||||
TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource Gray100}}"
|
TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource Gray100}}"
|
||||||
FontSize="24"
|
FontSize="24"
|
||||||
Padding="15"/>
|
Padding="15"/>
|
||||||
|
|
||||||
<FlexLayout
|
<FlexLayout
|
||||||
Margin="0, 15"
|
Margin="0, 15"
|
||||||
Wrap="Wrap"
|
Wrap="Wrap"
|
||||||
JustifyContent="Start"
|
JustifyContent="Start"
|
||||||
AlignItems="Center"
|
AlignItems="Center"
|
||||||
AlignContent="SpaceEvenly"
|
AlignContent="SpaceEvenly"
|
||||||
HorizontalOptions="Center"
|
HorizontalOptions="Center"
|
||||||
BindableLayout.ItemsSource="{Binding}">
|
BindableLayout.ItemsSource="{Binding RecipesDisplayed}">
|
||||||
|
|
||||||
<BindableLayout.ItemTemplate>
|
<BindableLayout.ItemTemplate>
|
||||||
<DataTemplate x:DataType="model:Recipe">
|
<DataTemplate x:DataType="model:Recipe">
|
||||||
|
|
||||||
<local:RecipeCase
|
<local:RecipeCase
|
||||||
CaseImageSource="{Binding Image}"
|
CaseImageSource="{Binding Image}"
|
||||||
RecipeTitle="{Binding Title}"/>
|
RecipeTitle="{Binding Title}"/>
|
||||||
|
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</BindableLayout.ItemTemplate>
|
</BindableLayout.ItemTemplate>
|
||||||
|
|
||||||
</FlexLayout>
|
</FlexLayout>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</local:ContainerBase.MyContent>
|
</local:ContainerBase.MyContent>
|
||||||
|
|
||||||
</local:ContainerBase>
|
</local:ContainerBase>
|
||||||
|
|
||||||
</ContentPage>
|
</ContentPage>
|
@ -0,0 +1,16 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace Views;
|
||||||
|
|
||||||
|
public partial class MyProfil : ContentPage
|
||||||
|
{
|
||||||
|
public MasterManager Master => (Application.Current as App).Master;
|
||||||
|
public User user => Master.User.CurrentConnected;
|
||||||
|
|
||||||
|
public MyProfil()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
BindingContext = this;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
|
namespace Views;
|
||||||
|
/// <summary>
|
||||||
|
/// Classe de la page contenant le detail de la recette
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public partial class ViewRecette : ContentPage
|
||||||
|
{
|
||||||
|
public MasterManager Master => (Application.Current as App).Master;
|
||||||
|
public User user => Master.User.CurrentConnected;
|
||||||
|
public Recipe Recipe => Master.Recipe.CurrentSelected;
|
||||||
|
public RecipeCollection AllRecipes => Master.Recipe.GetAllRecipes();
|
||||||
|
public ViewRecette()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
BindingContext = this;
|
||||||
|
}
|
||||||
|
}
|
@ -1,61 +1,60 @@
|
|||||||
using DataPersistence;
|
using DataPersistence;
|
||||||
using Model;
|
using Model;
|
||||||
using Model.Managers;
|
|
||||||
|
namespace Views;
|
||||||
namespace Views;
|
|
||||||
|
public partial class ContainerFlyout : ContentView
|
||||||
public partial class ContainerFlyout : ContentView
|
{
|
||||||
{
|
public MasterManager Master => (Application.Current as App).Master;
|
||||||
public MasterManager MasterMgr => (App.Current as App).MasterMgr;
|
public User ConnectedUser => Master.User.CurrentConnected;
|
||||||
public User user => (App.Current as App).CurrentUser;
|
|
||||||
|
public ContainerFlyout()
|
||||||
public ContainerFlyout()
|
{
|
||||||
{
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
BindingContext = this;
|
BindingContext = this;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
|
||||||
|
#region Bindable XAML Properties
|
||||||
#region Bindable XAML Properties
|
// Bind MyFlyoutContent
|
||||||
// Bind MyFlyoutContent
|
public static readonly BindableProperty MyFlyoutContentProperty =
|
||||||
public static readonly BindableProperty MyFlyoutContentProperty =
|
BindableProperty.Create("MyFlyoutContent", typeof(View), typeof(ContainerFlyout), new Grid());
|
||||||
BindableProperty.Create("MyFlyoutContent", typeof(View), typeof(ContainerFlyout), new Grid());
|
|
||||||
|
public View MyFlyoutContent
|
||||||
public View MyFlyoutContent
|
{
|
||||||
{
|
get => (View)GetValue(MyFlyoutContentProperty);
|
||||||
get => (View)GetValue(MyFlyoutContentProperty);
|
set => SetValue(MyFlyoutContentProperty, value);
|
||||||
set => SetValue(MyFlyoutContentProperty, value);
|
}
|
||||||
}
|
|
||||||
|
// Bind IsNotConnected
|
||||||
// Bind IsNotConnected
|
public static readonly BindableProperty IsConnectedProperty =
|
||||||
public static readonly BindableProperty IsNotConnectedProperty =
|
BindableProperty.Create("IsConnected", typeof(bool), typeof(Button), true);
|
||||||
BindableProperty.Create("IsNotConnected", typeof(bool), typeof(Button), true);
|
|
||||||
|
public bool IsConnected
|
||||||
public bool IsNotConnected
|
{
|
||||||
{
|
get => (bool)GetValue(IsConnectedProperty);
|
||||||
get => (bool)GetValue(IsNotConnectedProperty);
|
set => SetValue(IsConnectedProperty, value);
|
||||||
set => SetValue(IsNotConnectedProperty, value);
|
}
|
||||||
}
|
|
||||||
|
// bind NeedReturn
|
||||||
// bind NeedReturn
|
public static readonly BindableProperty NeedReturnProperty =
|
||||||
public static readonly BindableProperty NeedReturnProperty =
|
BindableProperty.Create("NeedReturn", typeof(bool), typeof(Border), false);
|
||||||
BindableProperty.Create("NeedReturn", typeof(bool), typeof(Border), false);
|
|
||||||
|
public bool NeedReturn
|
||||||
public bool NeedReturn
|
{
|
||||||
{
|
get => (bool)GetValue(NeedReturnProperty);
|
||||||
get => (bool)GetValue(NeedReturnProperty);
|
set => SetValue(NeedReturnProperty, value);
|
||||||
set => SetValue(NeedReturnProperty, value);
|
}
|
||||||
}
|
#endregion
|
||||||
#endregion
|
|
||||||
|
public async void ProfileButton_Clicked(object sender, EventArgs e)
|
||||||
public async void ProfileButton_Clicked(object sender, EventArgs e)
|
{
|
||||||
{
|
await Navigation.PushModalAsync(new MyProfil());
|
||||||
await Navigation.PushModalAsync(new MyProfil());
|
}
|
||||||
}
|
|
||||||
|
public async void ConnectionButton_Clicked(object sender, EventArgs e)
|
||||||
public async void ConnectionButton_Clicked(object sender, EventArgs e)
|
{
|
||||||
{
|
await Navigation.PushModalAsync(new Login());
|
||||||
await Navigation.PushModalAsync(new Login());
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@ -1,27 +1,27 @@
|
|||||||
namespace Views;
|
namespace Views;
|
||||||
|
|
||||||
public partial class MiniHeader : ContentView
|
public partial class MiniHeader : ContentView
|
||||||
{
|
{
|
||||||
public MiniHeader()
|
public MiniHeader()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly BindableProperty TitleMiniProperty =
|
public static readonly BindableProperty TitleMiniProperty =
|
||||||
BindableProperty.Create(nameof(TitleMini), typeof(string), typeof(Label), "Erreur de titre");
|
BindableProperty.Create(nameof(TitleMini), typeof(string), typeof(Label), "Erreur de titre");
|
||||||
|
|
||||||
public string TitleMini
|
public string TitleMini
|
||||||
{
|
{
|
||||||
get => (string)GetValue(TitleMiniProperty);
|
get => (string)GetValue(TitleMiniProperty);
|
||||||
set => SetValue(TitleMiniProperty, value);
|
set => SetValue(TitleMiniProperty, value);
|
||||||
}
|
}
|
||||||
// bind NeedReturn
|
// bind NeedReturn
|
||||||
public static readonly BindableProperty NeedReturnProperty =
|
public static readonly BindableProperty NeedReturnProperty =
|
||||||
BindableProperty.Create("NeedReturn", typeof(bool), typeof(Border), false);
|
BindableProperty.Create("NeedReturn", typeof(bool), typeof(Border), false);
|
||||||
|
|
||||||
public bool NeedReturn
|
public bool NeedReturn
|
||||||
{
|
{
|
||||||
get => (bool)GetValue(NeedReturnProperty);
|
get => (bool)GetValue(NeedReturnProperty);
|
||||||
set => SetValue(NeedReturnProperty, value);
|
set => SetValue(NeedReturnProperty, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,32 +1,32 @@
|
|||||||
namespace Views;
|
namespace Views;
|
||||||
|
|
||||||
public partial class RecipeCase : ContentView
|
public partial class RecipeCase : ContentView
|
||||||
{
|
{
|
||||||
public RecipeCase()
|
public RecipeCase()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly BindableProperty CaseImageSourceProperty =
|
public static readonly BindableProperty CaseImageSourceProperty =
|
||||||
BindableProperty.Create("CaseImageSource", typeof(ImageSource), typeof(Image));
|
BindableProperty.Create("CaseImageSource", typeof(ImageSource), typeof(Image));
|
||||||
|
|
||||||
public ImageSource CaseImageSource
|
public ImageSource CaseImageSource
|
||||||
{
|
{
|
||||||
get => (ImageSource)GetValue(CaseImageSourceProperty);
|
get => (ImageSource)GetValue(CaseImageSourceProperty);
|
||||||
set => SetValue(CaseImageSourceProperty, value);
|
set => SetValue(CaseImageSourceProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly BindableProperty RecipeTitleProperty =
|
public static readonly BindableProperty RecipeTitleProperty =
|
||||||
BindableProperty.Create("RecipeTitle", typeof(string), typeof(Label));
|
BindableProperty.Create("RecipeTitle", typeof(string), typeof(Label));
|
||||||
|
|
||||||
public string RecipeTitle
|
public string RecipeTitle
|
||||||
{
|
{
|
||||||
get => (string)GetValue(RecipeTitleProperty);
|
get => (string)GetValue(RecipeTitleProperty);
|
||||||
set => SetValue(RecipeTitleProperty, value);
|
set => SetValue(RecipeTitleProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void ImageButton_Clicked(object sender, EventArgs e)
|
private async void ImageButton_Clicked(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
await Navigation.PushModalAsync(new ViewRecette());
|
await Navigation.PushModalAsync(new ViewRecette());
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,51 +0,0 @@
|
|||||||
using CommunityToolkit.Maui.Behaviors;
|
|
||||||
using DataPersistence;
|
|
||||||
using Model;
|
|
||||||
using Model.Managers;
|
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.Diagnostics;
|
|
||||||
|
|
||||||
namespace Views;
|
|
||||||
|
|
||||||
public partial class MyProfil : ContentPage
|
|
||||||
{
|
|
||||||
public MasterManager MasterMgr => (App.Current as App).MasterMgr;
|
|
||||||
public User CurrentUser => (App.Current as App).CurrentUser;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public MyProfil()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
|
|
||||||
BindingContext = this;
|
|
||||||
}
|
|
||||||
public ObservableCollection<Priority> PriorityList { get; private set; } = new ObservableCollection<Priority>()
|
|
||||||
{ Priority.Economic, Priority.Fast, Priority.Easy, Priority.Light, Priority.Gourmet };
|
|
||||||
void DragGestureRecognizer_DragStarting2(System.Object sender, Microsoft.Maui.Controls.DragStartingEventArgs e)
|
|
||||||
{
|
|
||||||
e.Data.Properties["value"] = (sender as Element).Parent.BindingContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DropGestureRecognizer_Drop2(System.Object sender, Microsoft.Maui.Controls.DropEventArgs e)
|
|
||||||
{
|
|
||||||
var receivingElement = (Priority)((sender as Element).Parent.BindingContext);
|
|
||||||
|
|
||||||
var draggedElement = (Priority)e.Data.Properties["value"];
|
|
||||||
int draggedIndex = PriorityList.IndexOf(draggedElement);
|
|
||||||
PriorityList.RemoveAt(draggedIndex);
|
|
||||||
|
|
||||||
int receivingIndex = PriorityList.IndexOf(receivingElement);
|
|
||||||
PriorityList.Insert(receivingIndex + 1, draggedElement);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnMyRecipeClicked(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Navigation.PushModalAsync(new MyPosts());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnAddRecipeClicked(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Navigation.PushModalAsync(new AddRecipe());
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
using Model.Managers;
|
|
||||||
using Model;
|
|
||||||
|
|
||||||
namespace Views;
|
|
||||||
/// <summary>
|
|
||||||
/// Classe de la page contenant le detail de la recette
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public partial class ViewRecette : ContentPage
|
|
||||||
{
|
|
||||||
public MasterManager MasterMgr => (App.Current as App).MasterMgr;
|
|
||||||
public User user => (App.Current as App).CurrentUser;
|
|
||||||
public Recipe Recipe => (App.Current as App).CurrentRecipe;
|
|
||||||
public RecipeCollection AllRecipes => (App.Current as App).AllRecipes;
|
|
||||||
public ViewRecette()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
BindingContext = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in new issue