Feat : les nullables créations du diable
continuous-integration/drone/push Build was killed Details

Popup_qui_marche_pas
Jade VAN BRABANDT 2 years ago
parent 23382b0331
commit e7381df2f3

@ -9,16 +9,16 @@ namespace Model
public class Game : INotifyPropertyChanged, IEquatable<Game> public class Game : INotifyPropertyChanged, IEquatable<Game>
{ {
[DataMember] [DataMember]
public string? Name public string Name
{ {
get => name; get => name;
private set private set
{ {
if (string.IsNullOrWhiteSpace(value)) return; if (string.IsNullOrWhiteSpace(value)) name="Default";
name = value; name = value;
} }
} }
private string? name; private string name;
[DataMember] [DataMember]
public string? Description public string? Description
@ -45,16 +45,16 @@ namespace Model
private int year; private int year;
[DataMember] [DataMember]
public string? Cover public string Cover
{ {
get => cover; get => cover;
private set private set
{ {
if (string.IsNullOrWhiteSpace(value)) return; if (string.IsNullOrWhiteSpace(value)) cover="no_cover.png";
cover = value; cover = value;
} }
} }
private string? cover; private string cover;
[DataMember] [DataMember]
public ObservableCollection<string> Tags public ObservableCollection<string> Tags
@ -94,7 +94,7 @@ namespace Model
Year = year; Year = year;
if (c_tags is not null) tags = new ObservableCollection<string>(c_tags); if (c_tags is not null) tags = new ObservableCollection<string>(c_tags);
else tags = new ObservableCollection<string>(); else tags = new ObservableCollection<string>();
if (string.IsNullOrWhiteSpace(cover)) Cover = "Default"; if (string.IsNullOrWhiteSpace(cover)) Cover = "no_cover.png";
else Cover = cover; else Cover = cover;
if (string.IsNullOrWhiteSpace(c_lien)) Lien = "Default"; if (string.IsNullOrWhiteSpace(c_lien)) Lien = "Default";
else Lien = c_lien; else Lien = c_lien;

Loading…
Cancel
Save