public ObjectPaneViewModel(GC_Object gcobject)
 {
     if (gcobject == null)
         throw new ArgumentNullException("gcobject");
     this.Item = gcobject;
     this.Title = gcobject.Name;
     this.Class = gcobject.Class;
     this.Image = gcobject.Image;
 }
Esempio n. 2
0
 public ObjectPaneViewModel(GC_Object gcobject)
 {
     if (gcobject == null)
     {
         throw new ArgumentNullException("gcobject");
     }
     this.Item  = gcobject;
     this.Title = gcobject.Name;
     this.Class = gcobject.Class;
     this.Image = gcobject.Image;
 }
Esempio n. 3
0
        public override void AssignChanges()
        {
            IEnumerable <GC_Object> coll = (Item as GC_Object).Game.Objects.Where(x => x.Name == this.Title);

            if (coll.Count() > 0 && coll.FirstOrDefault() != this.Item)
            {
                this.Title = this.Title + " - " + Application.Current.FindResource("New").ToString();
            }
            GC_Object obj = Item as GC_Object;

            obj.Name  = this.Title;
            obj.Class = this.Class;
            obj.Image = this.Image;
        }