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 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stim", "Stim\Stim.csproj", "{88365436-AFDF-4183-B010-C13784779E6B}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stim", "Stim\Stim.csproj", "{88365436-AFDF-4183-B010-C13784779E6B}"
EndProject 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 Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU 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.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.Build.0 = Release|Any CPU
{88365436-AFDF-4183-B010-C13784779E6B}.Release|Any CPU.Deploy.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 EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE 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.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Stim namespace Stim_Model
{ {
internal class Game internal class Game
{ {
@ -35,7 +35,7 @@ namespace Stim
get { return year; } get { return year; }
private set private set
{ {
if (value < 1950 || value > 2023) return ; if (value < 1957 || value >= 2023) return;
year = value; year = value;
} }
} }

@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Stim namespace Stim_Model
{ {
internal class Review 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,10 +2,10 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Stim namespace Stim_Model
{ {
internal class User internal class User
{ {
@ -14,7 +14,7 @@ namespace Stim
public string Username public string Username
{ {
get { return Username; } get { return username; }
private set private set
{ {
username = value; username = value;
@ -29,8 +29,10 @@ namespace Stim
get { return email; } get { return email; }
private set private set
{ {
//check email Regex rg_email = new Regex("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$");
if (rg_email.IsMatch(email))
email = value; email = value;
return;
} }
} }
private string email; private string email;
@ -40,13 +42,13 @@ namespace Stim
get { return password; } get { return password; }
private set 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; if (!rg.IsMatch(password)) return;
password = value; password = value;
} }
} }
private string password; 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) public User(string username, string biographie, string email, string password)
{ {
@ -57,7 +59,7 @@ namespace Stim
Biographie = biographie; Biographie = biographie;
Email = email; Email = email;
Password = password; Password = password;
Games = new List<Game>(); Followed_Games = new List<Game>();
} }
} }
} }
Loading…
Cancel
Save