build : Chgt rep pour le C# / Création de la console pour test
continuous-integration/drone/push Build is failing Details

Popup_qui_marche_pas
Jade VAN BRABANDT 2 years ago
parent 7eebbbecb0
commit 2e9b4ccf15

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

@ -0,0 +1,2 @@
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");

@ -5,6 +5,10 @@ VisualStudioVersion = 17.0.31611.283
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stim", "Stim\Stim.csproj", "{88365436-AFDF-4183-B010-C13784779E6B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stim_Model", "Stim_Model\Stim_Model.csproj", "{F9E5DE48-8AF0-4F85-8A78-7639066FD061}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Console", "Console\Console.csproj", "{D1C5D8F9-A7E8-4D52-9A7E-15373CAD5C08}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -17,6 +21,14 @@ Global
{88365436-AFDF-4183-B010-C13784779E6B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{88365436-AFDF-4183-B010-C13784779E6B}.Release|Any CPU.Build.0 = Release|Any CPU
{88365436-AFDF-4183-B010-C13784779E6B}.Release|Any CPU.Deploy.0 = Release|Any CPU
{F9E5DE48-8AF0-4F85-8A78-7639066FD061}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F9E5DE48-8AF0-4F85-8A78-7639066FD061}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F9E5DE48-8AF0-4F85-8A78-7639066FD061}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F9E5DE48-8AF0-4F85-8A78-7639066FD061}.Release|Any CPU.Build.0 = Release|Any CPU
{D1C5D8F9-A7E8-4D52-9A7E-15373CAD5C08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D1C5D8F9-A7E8-4D52-9A7E-15373CAD5C08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D1C5D8F9-A7E8-4D52-9A7E-15373CAD5C08}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D1C5D8F9-A7E8-4D52-9A7E-15373CAD5C08}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Stim_Model
{
internal class Administrateur : User
{
public int Permission
{
get { return permission; }
private set
{
permission = value;
}
}
private int permission;
public Administrateur(string username, string biographie, string email, string password, int perm)
: base(username, biographie, email, password)
{
Permission = perm;
}
}
}

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Stim
namespace Stim_Model
{
internal class Game
{
@ -35,7 +35,7 @@ namespace Stim
get { return year; }
private set
{
if (value < 1950 || value > 2023) return ;
if (value < 1957 || value >= 2023) return;
year = value;
}
}
@ -62,7 +62,7 @@ namespace Stim
{
sum += review.Rate;
}
return sum/Reviews.Count;
return sum / Reviews.Count;
}
public void AddReview(Review review)

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Stim
namespace Stim_Model
{
internal class Review
{

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>
</Project>

@ -2,19 +2,19 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Stim
namespace Stim_Model
{
internal class User
{
static int nbUser=0;
static int nbUser = 0;
private int id;
public string Username
{
get { return Username; }
get { return username; }
private set
{
username = value;
@ -29,24 +29,26 @@ namespace Stim
get { return email; }
private set
{
//check email
email = value;
Regex rg_email = new Regex("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$");
if (rg_email.IsMatch(email))
email = value;
return;
}
}
private string email;
public string Password
{
get { return password; }
get { return password; }
private set
{
Regex rg = new Regex("^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$");
Regex rg = new Regex("^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,32}$");
if (!rg.IsMatch(password)) return;
password = value;
}
}
private string password;
public List<Game> Games { get; set; }
public List<Game> Followed_Games { get; set; }
public User(string username, string biographie, string email, string password)
{
@ -57,7 +59,7 @@ namespace Stim
Biographie = biographie;
Email = email;
Password = password;
Games = new List<Game>();
Followed_Games = new List<Game>();
}
}
}
Loading…
Cancel
Save