public LevelPaneViewModel(GC_Level gclevel) { if (gclevel == null) throw new ArgumentNullException("gclevel"); this.Item = gclevel; this.Title = gclevel.Name; this.BackgroundImage = gclevel.BackgroundImage; this.BackgroundImageLayout = gclevel.BackgroundImageLayout; this.Width = gclevel.Width; this.Height = gclevel.Height; }
public LevelPaneViewModel(GC_Level gclevel) { if (gclevel == null) { throw new ArgumentNullException("gclevel"); } this.Item = gclevel; this.Title = gclevel.Name; this.BackgroundImage = gclevel.BackgroundImage; this.BackgroundImageLayout = gclevel.BackgroundImageLayout; this.Width = gclevel.Width; this.Height = gclevel.Height; }
public override void AssignChanges() { IEnumerable <GC_Level> coll = (Item as GC_Level).Game.Levels.Where(x => x.Name == this.Title); if (coll.Count() > 0 && coll.FirstOrDefault() != this.Item) { this.Title = this.Title + " - " + Application.Current.FindResource("New").ToString(); } GC_Level level = Item as GC_Level; level.Name = this.Title; level.BackgroundImage = this.BackgroundImage; level.BackgroundImageLayout = this.BackgroundImageLayout; level.Width = this.Width; level.Height = this.Height; }