public SubRaceEditModel(SubRace cond, OGLContext context) : base(cond, context) { if (cond.RaceName == null) { cond.RaceName = "*"; } ShowImage = new Command(async() => { await Navigation.PushAsync(new ImageEditor(Image, Model.ImageData, SaveImage, "Image")); }); SaveImage = new Command(async(par) => { MakeHistory(); Model.ImageData = par as byte[]; OnPropertyChanged("Image"); await Navigation.PopAsync(); }); SaveCostumRace = new Command((par) => { if (par is string s) { Races.Add(s); ParentRace = s; } }); Races.AddRange(context.RacesSimple.Keys); Races.Add("*"); if (!Races.Contains(cond.RaceName)) { Races.Add(cond.RaceName); } Races.Add(CUSTOM); }